Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Play+Java vs Play+Scala vs Grails vs rails vs JRuby on Rails

 
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a veteran Java programmer with very little web experience. I need to develop a website for a client. Not sure how to approach choosing a framework.

*Grails: I've played with it before, seems very intuitive to me (after I learned to debug its cryptic errors), but it seems its market share is incredibly low. Wonder why?

* Rails: little familiarity, but (please correct me if I am wrong!) seems to have more 3rd party libraries for everything, has AJAX built into the framework, its ActiveRecord pattern is most intuitive? But still suffers from Global Interpreter Lock, at least to a degree; and, being a Java programmer, I fear leaving the JVM

* JRuby on Rails: better for me than rails, but heard somewhere that it does not work as well (why?) and, more importantly, the popularity of Ruby is very low: http://www.google.com/trends/explore#q=ruby%20on%20rails%2C%20jruby%2C%20scala%2C%20play%20framework&cmpt=q&tz=
Wonder why?

* Java + Play: I get the benefit of the familiarity, but, to the best of my understanding, no scaffolding? I want to scaffold CRUD! Also, the documentation seems lacking and/or outdated. For instance, I am having a hard time configuring my Eclilpse to work with it, and I've spent half a day on it. One would think there would be a ready current tutorial. Plus, Java for some reason does not have an ActiveRecord ORM that I like, as far as I can tell (ActiveJDBC comes somewhat close to it)

* Scala + Play: Probably the best solution, but now I am going to hit too many learning curves at once: Scala, web, Play, Javascript, template language, sbt, etc. Slick looks good though!

* Python/Django - nah. I'd rather go with Rails.

* Anything else I've left out?

 
Bartender
Posts: 2407
36
Scala Python Oracle Postgres Database Linux
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you forgot Clojure or full-stack JavaScript and MongoDB with Mean.io...

You don't mention your client's needs here. Do they want/need a Java application, with the extra hosting costs and admin overhead? Or would the "website" be something you could do with a simple hosted WordPress or Drupal installation? Do they have the skills to maintain the website in future e.g. if you choose something like Scala/Play? Do they need this done quickly, in which case Rails/Grails/Django might be the most productive option, even if they're not your first choice for your resume.

FWIW, I don't have a lot of web-development experience, and I'm learning Play for Scala with Slick right now, which is fun but it's also a fairly steep learning curve. YMMV.
 
Jane Jukowsky
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your advice!

chris webster wrote:Well, you forgot Clojure or full-stack JavaScript and MongoDB with Mean.io...]



These would be all completely new skills for me. I've heard Clojure is great after you overcome the initial parentheses shock, but I don't want to go there now.

You don't mention your client's needs here. Do they want/need a Java application, with the extra hosting costs and admin overhead?


Hosting costs and admin overhead for a Java app? How so?

Or would the "website" be something you could do with a simple hosted WordPress or Drupal installation?


Nope. Perhaps if I wrote very extensive plug-ins, maybe; but I think writing from scratch would be easier.


Do they have the skills to maintain the website in future e.g. if you choose something like Scala/Play?


They don't have any programmers at all, so they'd had to hire/contract accordingly. Given that Scala developers are few and cost more, that is a significant argument for me. (Although, scala programmers tend to be all around good programmers in my experience)


Do they need this done quickly, in which case Rails/Grails/Django might be the most productive option, even if they're not your first choice for your resume.


They definitely need this done quickly, which is a good argument for Rails. (I would have chosen Grails, but thought Grails is dead?)

I wonder if Play (either Java/eBean or Scala/Slick) is slower than Rails, and if so, why? The frameworks are said to be more or less equivalent?

Why is it not choice for my resume? Ruby seems to pay as high as Java per my job search, second only to Scala.


FWIW, I don't have a lot of web-development experience, and I'm learning Play for Scala with Slick right now, which is fun but it's also a fairly steep learning curve. YMMV.


What did you find to be the hardest thing to learn? Are you coming from a dynamic language background?

BTW, is it true that eBean is nearly dead, and Slick requires you to explicitly map fields to columns, no convention over configuration?


 
Marshal
Posts: 67300
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this is the type of web application that's going to be handed off to other developers at some point then I'd suggest that using anything other than one of:
  • A Java-powered traditional web app (with Play or otherwsie)
  • A JavaScript MVC backed by a RESTful API

  • would be a disservice to your client.

    In my opinion the rest are either old-and-crusty technologies heading to the has-been dump (e.g. Grails, Rails), or niche technologies that few organizations will be able to easily accept handoff of (Scala, Clojure, other trendy but little-used languages).
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Bear Bibeault wrote:
    In my opinion the rest are either old-and-crusty technologies heading to the has-been dump (e.g. Grails, Rails), or niche technologies that few organizations will be able to easily accept handoff of (Scala, Clojure, other trendy but little-used languages).



    Rails going to the has-been dump? Do you have a proof of that?

    Rails has certainly gone down after the initial boom, but that was probably because of the GIL issues. Since then, it seems stable. (Also, I am leaning towards jRails so to speak, but don't know whether it's a good choice due to its strange obscurity)

    I say, speed of development is my top of priority. If it's true that Rest is faster than Play, then rest it is. But is it faster?
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Also, the client is in Seattle, so no shortage of programmers here. Microsoft, Amazon, Google, Expedia and many more are all here. Perhaps if the client was in a smaller town, manpower would have been a bigger issue.
     
    Bear Bibeault
    Marshal
    Posts: 67300
    170
    Mac Mac OS X IntelliJ IDE jQuery Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Jane Jukowsky wrote:
    Rails going to the has-been dump? Do you have a proof of that?


    Proof? Of course not. I'm judging from what I see happening in the market around me. Rails and Ruby was a "big thing" for a while, but I see its demand sharply waned. That you may be seeing something different is entirely possible.
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Looks like you are right:

    http://www.google.com/trends/explore#q=ruby%20tutorial%2C%20play%20tutorial&cmpt=q&tz=

    So it boils down to speed of development. Can someone attest to the development speed of Play vs Rails?
     
    Ranch Hand
    Posts: 10191
    3
    Mac PPC Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Developing Play with Scala is going to be tough if there is some backend intensive stuff. In that case, I would stick to Rails!
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Would you please elaborate on that? What does Rails do that Scala+Play does not?

    (Other than Ruby being a dynamic language; but that' OK, since historically I've been a static language person, so I like the advantages of a static language: compile-time errors, refactoring, autocomplete, etc.)
     
    Joe Harry
    Ranch Hand
    Posts: 10191
    3
    Mac PPC Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Scala as a programming language is a beast to learn and master. If you don't care about the specifics of Scala and want to create a simple web application with just the basic Scala features which literally in my terms means writing Java like Scala, you can build your app very quickly. I found the learning curve for Play relatively quick!
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you for your comment. You are right, I will be immersing in Scala very gradually, with the goal of learning it as I go, just using it as a slightly more elegant Java at first.

    What I need to know - how is Play vs. Ruby as far as development time goes? Especially initial development time, because I am a web newbie and need to get up to speed fast.
     
    Joe Harry
    Ranch Hand
    Posts: 10191
    3
    Mac PPC Eclipse IDE Ubuntu
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    If you already have experience developing web applications in Java, then Play + Scala is the way to go! I have never worked with Ruby or Rails, but I would go by the assumption that learning a totally new syntax and style would take more time!
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Lots of experience with Java; only basic experience with web. So whatever makes my work with web easier. Languages I think are less important.

    Also, whoever has a better ORM. Is it true that with Slick, you have to explicitly map fields to columns, it's not done for you automatically? That would be a major bummer!
     
    chris webster
    Bartender
    Posts: 2407
    36
    Scala Python Oracle Postgres Database Linux
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Like I said, I'm finding Play/Scala/Slick fun, but slower going than other MVC web app frameworks I've used in the past (e.g. Grails, Django). Slick is not really an ORM, more of a functional interface to SQL databases, i.e. it's lower-level than a conventional ORM and very much geared towards a functional approach, and yes, you do have to specify the table mappings explicitly. I'm also finding that once you start digging into Play, there's a lot of voodoo going on underneath - use of implicits, knowing how to work with Futures/Options etc - and it's still not particularly well documented. I'm keen to learn Play because I'm into Scala anyway and I think there is plenty of potential for developing scalable web apps more quickly with Play, once I've got the hang of it, but not right now (at least not for me!).

    So I'd say that if you're in a hurry and your client needs to be able to find people who can maintain this app when you're done, and you're looking at having to learn a new framework anyway, then Play/Scala might not be the ideal combination. You're probably going to deliver quicker (and dirtier!) with something like Rails, and even if Rails is no longer so popular, there are still a lot more Rails developers out there than Scala devs.

    Or follow Bear's advice and go for mainstream Java or JavaScript options.
     
    Jane Jukowsky
    Ranch Hand
    Posts: 157
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I am considering Java. My problem is that the only reasonable ORM Java comes with is eBeans (used in Play templates), and I can't figure out whether eBeans is alive or dead, as far as its market share goes.

    More precisely, I want something ActiveRecord-like (read: rails-like) and preferably not based on Hibernate. Hate Hibernate, and hate it when it shows its ugly head though attempts at encapsulation.

    Still, Java seems sensible and, of course, familiar. How would you compare the speed of development on Java/Play vs. Rails? I know you are not very familiar, so I am not sure why I am asking.. a gut feeling or a hearsay perhaps? You surely know more than me!
     
    I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
    Java file APIs (DOC, XLS, PDF, and many more)
    https://products.aspose.com/total/java
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!