News for hackers. Stuff that matters.
Re:Play on Heroku by lr on Monday August 29, 2011 @01:35PM (#2938016)
I will be saying this until I die, but WebObjects, originally created in Objective-C and then ported to Java, made Java web app development fun back in the days (late '90s early '00s) when people were killing themselves with Struts, Servlets, and J2EE. Even in its current, unsupported form, WebObjects runs circles around most web frameworks. Given that WO is not supported by Apple, I am really glad to see frameworks like Grails (awesome framework) and Play! gaining traction in the mainstream! So, yes, Java web app development should not be hard, doesn't have to be hard, and, actually, was never really hard at all (if you used the right framework in the first place).
Re:Play on Heroku by simonw on Monday August 29, 2011 @02:08PM (#2938149)
The WebObjects sites I've encountered in the wild all seem to have completely garbage URLs - is that a requirement of WebObjects, part of the culture surrounding it or just an unfortunate coincidence?
Re:Play on Heroku by jballanc on Monday August 29, 2011 @07:15PM (#2939432)
Unfortunate coincidence. WebObjects was created a good decade before your average programmer thought of REST being related to the web and not a nap. Similarly, template generation in WebObjects relied on layout tables, because it was created in a time before CSS. Ultimately, this is what did it in, but Enterprise Objects...oh, man! I still haven't met an ORM as capable or well designed as Enterprise Objects!
Re:Play on Heroku by lr on Tuesday August 30, 2011 @12:37PM (#2942150)
Steve introduces Enterprise Objects Framework (EOF) at about 25 minutes in: http://www.youtube.com/watch?v=j02b8Fuz73A

EOF was one of the key components of making NeXT such a powerful OS, and why it was so heavily used on Wall Street. When they created WebObjects, they, of course, put EOF behind it, and yes, it is by far the most impressive ORM I have ever used. Thankfully, a well known WO developer, Andrus Adamchik, has developed Cayanne using the same principals behind EOF: http://cayenne.apache.org/

Re:Play on Heroku by Torn on Tuesday August 30, 2011 @05:00AM (#2940643)
Play's URL mappings seem very close to Django's (i.e. restful and sensible): http://www.playframework.org/documentation/1.2.3/routes
Re:Play on Heroku by rkalla on Monday August 29, 2011 @02:03PM (#2938130)
I have used Play! on a few projects (my experience coming from the last 10 years of JSP/EJB, JSPX/EJB3/JPA, Struts, Spring, JSF, attempted suicide, etc.) and really enjoyed it.

It does a lot of magic and doesn't follow normal Java patterns, but you can look under the covers and the different programming style it uses is easy to grok.

If you are a Java dev that is sick of the architect-itus that Java developers typically suffer from, Play will feel great to you.

If you are coming from Spring MVC, JSF, Struts2 and any other large-scale framework with a lot of configuration and complex concepts, you will appreciate Play quite a bit more.

You can tell the creators are Java devs that played in the Rails arena for a while and brought a lot of that back to the Java world.

The mailing list is also quite active and releases are very methodical.

Play also works on Google App Engine, (obviously) AWS Elastic Beanstalk, Zenexity's own Playapps cloud hosting[1] and now Heroku... nice to see innovation!

[1] http://www.playapps.net/

Re:Play on Heroku by browep on Monday August 29, 2011 @01:14PM (#2937921)
Good to see they started from scratch instead of trying to simplify another heavier framework. It's a desperately needed reboot of Java web app development, very refreshing.
Re:Play on Heroku by BonoboBoner on Monday August 29, 2011 @03:23PM (#2938453)
The no-compromise "fix-the-bug-and-hit-reload-devlopment"-culture that Play enables has changed the way I work. I cannot go back to the old style of developing Java web apps. To hell with unnecessary self-imposed complexity.
Re:Play on Heroku by mark_l_watson on Monday August 29, 2011 @03:25PM (#2938463)
Awesome! For some types of applications, relying on PAAS for scaling out, logging, etc. is easier than dealing with containers like Java EE 6, etc.

Play! is great. I have used it on my own projects and easily running on Heroku is a nice bonus.

I am not an entrepreneur, instead spending most of my work time consulting (and writing) and I generally go with what customers want but I have been disappointed a few times when I could not convince customers to use a PAAS like Heroku or AppEngine in cases where it probably made the most sense to outsource platform, admin, etc.

Re:Play on Heroku by apl on Monday August 29, 2011 @01:29PM (#2937988)
Any info on whether the Scala version of Play! (http://scala.playframework.org) works without modification?
Re:Play on Heroku by lstoll on Monday August 29, 2011 @02:31PM (#2938239)
Seems to work fine: http://smooth-stream-686.herokuapp.com/

(code at https://github.com/lstoll/heroku-playframework-scala , basically a simple hello world app)

Re:Play on Heroku by apl on Monday August 29, 2011 @03:26PM (#2938466)
Beautiful!

Many thanks for confirming.

Re:Play on Heroku by brown9-2 on Monday August 29, 2011 @02:19PM (#2938192)
Play! applications are meant to be deployed, not packaged and distributed. This allows developers to throw away deeply nested Java package structures, control flow in XML, forget about packaging WAR files, and instead structure projects for optimal clarity and developer productivity.

Can anyone explain what this means in practical terms? Particularly the "meant to be deployed, not packaged and distributed" part.

Re:Play on Heroku by theballwatcher on Monday August 29, 2011 @02:48PM (#2938302)
Play! Framework does away with the Java EE convention of packaging application artifacts as a single file, for easy distribution, in compressed archive formats (WAR/EAR) for ease of distribution(Although you can still 'war' the artifacts and deploy it on some other EE servers like Glassfish). Play! ,in a manner similar to Django or Rails, creates a folder hierarchy as the skeleton for the application ,which can easily be added as a new project in an IDE, and Play!'s server(Play! ships with an inbuilt server) recognizes the same hierarchy for deployment. This takes a sometimes time-consuming step ( that of building the war/ear using something like Ant) out of the equation; usually shortening the development time;but on the other hand complicating the distribution part.
Re:Play on Heroku by mnutt on Monday August 29, 2011 @02:31PM (#2938241)
I'd imagine they mean the heroku style of tight coupling between the app and its environment, rather than the WAR file style of generating a package that can be deployed by somebody with no knowledge of its inner workings.
Re:Play on Heroku by shykes on Monday August 29, 2011 @05:50PM (#2939194)
Play is the most popular Java framework on dotCloud: http://docs.dotcloud.com/tutorials/java/play

It even has its own module: http://www.playframework.org/modules/dotcloud

Re:Play on Heroku by chaostheory on Monday August 29, 2011 @02:09PM (#2938150)
Play is great. Simple, fast, and easily scalable.

Play and Akka are my new favorite toys when I do Java.

Re:Play on Heroku by sujal on Monday August 29, 2011 @03:14PM (#2938415)
When you say scalable, what do you mean?

My buddy is looking into the framework and has run into some odd perm gen constraints because so much of the framework uses static members, etc.

I haven't talked to him about the details, and I wonder if those go away in production (since you're not reloading).

Basically, I guess I'm asking if you've seen it deployed in a largish installation?

Sujal

Re:Play on Heroku by dabeeeenster on Monday August 29, 2011 @03:23PM (#2938449)
Play uses a shared nothing architecture. That means that you can run a number of app servers and any one of them can receive any request and deal with it. Basically there is no server-based session state. The web server it uses is asynchronous too.

I've been running a fairly busy application for a couple of years with Play and have yet to encounter any of the standard JVM nightmares you get with Tomcat, e.g. Permgen space etc.

It's awesome.

Re:Play on Heroku by ayosec on Monday August 29, 2011 @01:20PM (#2937950)
Play! with Mirah can be a very nice combination.
Re:Play on Heroku by delano on Monday August 29, 2011 @01:30PM (#2937998)
Play is awesome. I'd been out of the Java biz for a couple years but I did a bit of work for a friend recently and took the opportunity to give Play a try. I prefer it over Rails.
Re:Play on Heroku by larrywright on Monday August 29, 2011 @02:25PM (#2938219)
Could you elaborate on why you prefer it over Rails?
Re:Play on Heroku by delano on Monday August 29, 2011 @03:02PM (#2938364)
I found Play easier to grok, it runs out of the box (and didn't require a bunch of dependencies that fubar'd my Ruby), and I really like how routes are defined in a text file:

http://www.playframework.org/documentation/1.2.3/routes

As a side note, I implemented a similar (but basic) routing for Rack apps in Ruby:

https://github.com/delano/otto

Re:Play on Heroku by gren on Monday August 29, 2011 @01:31PM (#2938003)
Good news! Thanks. Is play-scala compatible with?
Re:Play on Heroku by vijaykiran on Monday August 29, 2011 @03:54PM (#2938603)
Re:Play on Heroku by feydr on Monday August 29, 2011 @02:27PM (#2938228)
play kicks serious ass -- if I were to write any webapp in java/scala I'd most definitely use play -- see that they've been coming along a lot in the past year
Re:Play on Heroku by swGooF on Monday August 29, 2011 @12:24PM (#2937705)
Glad to see this. I am excited to try it out.