News for hackers. Stuff that matters.
Re:Introducing Play 2.0 by Uchikoma on Wednesday September 07, 2011 @07:29AM (#2969155)
What prevented me from using Playframework and going with Lift: 1. Play 1.0 (2.0 too?) used exceptions for flow control. I don't think this works for high traffic web sites. 2. Lift's CSS selector templating is slick, I would not like to go back to PHP/JSP/... style templating.

Very nice website.

[update: 2.0 has no more exception work flow]

Re:Introducing Play 2.0 by mrspeaker on Wednesday September 07, 2011 @07:40AM (#2969171)
2.0 doesn't use exceptions for flow control - but out of interest, what do you mean "I don't think this works for high traffic web sites"? 1 exception for a request won't affect performance, right?
Re:Introducing Play 2.0 by Uchikoma on Wednesday September 07, 2011 @07:47AM (#2969191)
Although exceptions have become faster, and you can speed them up (overwrite stack generation code), they are slow mostly due to filling the stack trace. Mostly based on this:

http://www.javaspecialists.eu/archive/Issue187.html

Re:Introducing Play 2.0 by axiak on Wednesday September 07, 2011 @08:01AM (#2969211)
That article mentions that the performance is dependent on the fillInStackTrace() method, which play framework overrides to do nothing.
Re:Introducing Play 2.0 by rkalla on Wednesday September 07, 2011 @01:44PM (#2970534)
Was not familiar with this method, appreciate the heads up guys. Did some quick micro benchmarks and it looks like I got an 11.5x speedup in some code that was using Exceptions for flow control.
Re:Introducing Play 2.0 by noelwelsh on Wednesday September 07, 2011 @08:47AM (#2969311)
A small nitpick: Lift does (typically) use exceptions for control flow, for redirects.
Re:Introducing Play 2.0 by scompt on Wednesday September 07, 2011 @07:41AM (#2969173)
Where did you find the reference to no more exception work flow? That seemed to be everywhere in the framework.
Re:Introducing Play 2.0 by mrspeaker on Wednesday September 07, 2011 @07:50AM (#2969196)
From the source code... the controller actions are all returning values: https://github.com/playframework/Play20/blob/master/samples/...
Re:Introducing Play 2.0 by hadashi on Wednesday September 07, 2011 @07:50AM (#2969197)
'grep -R throw .'

or you could just look at controller code...

Re:Introducing Play 2.0 by Uchikoma on Wednesday September 07, 2011 @07:48AM (#2969192)
"Yes no more exception for flow control." via Twitter.