by papsosouid · 13y ago · 0 comments
I see the play people tout this all the time, and I assume it is in reaction to an assumption of dynamic language people that you have to manually compile every time you make a change. But it is really misleading. You make a change, refresh the page, and wait 10 seconds for it to compile and reload. Iteration speed was just as poor with play as it was with bloated J2EE monsters on jboss.
The refresh speed may indeed be annoying and could be better, but it's less of an issue with Play than in Rails or Django or whatever, because you're working with a static language and while writing code you feel less of a need to see what your new lines of code produce. In Scala, if you're using it as a functional language, all the code you write tends to be correct if it compiles and Play itself uses many functional idioms making it very suitable for a functional style.
It's worth noting what Play gives you when compared to Rails, Django and the like.
Remember that Rap Genius article from a few days ago, in which people complained about Heroku's Bamboo stack and having to work with over 70 Heroku dynos? I have a Scala module on top of Heroku that's processing 25,000 requests per second in under 100ms per request and that's running with just 8 Heroku dynos. And I'm actually dissatisfied because a high-CPU server on top of EC2 would be able to handle all 25K.
With Play you get the best of both worlds. A productive framework and the full power of the JVM. It's not easy to describe how it feels to get this combination, but it feels great, trust me.
Me too.
>but it's less of an issue with Play than in Rails or Django or whatever
>It's worth noting what Play gives you when compared to Rails, Django and the like.
Perhaps for some, but we have no interest in dynamic languages or frameworks written in them. We were evaluating frameworks for decent languages only. I was only commenting on the compilation speed issue because they constantly brag about fast iteration when it is no faster than a typical bloated J2EE monster.
It is? Are you building a war/ear and copying it to a server to deploy or something? I think every java IDE has support for locally building and deploying within the IDE, which is no slower than play's reloading.
True. Reloading pages on Play 1 (Java) took less than a second. It's about ten seconds now on Play 2 because of Scala.
The move to Scala feels like a mixed bag to me: it added both features and bloat to Play. Play 1 feels so light and fast in comparison.
It seems to me the Play developers moved to Scala more for personal fun than for their users (nothing wrong with that, just making an observation).
Maybe they moved to Scala because Scala is a superior language.
And where I work, we are users of Play specifically because it supports Scala well.
As you are probably aware, this is a highly controversial claim and there is certainly no widespread agreement on it.
There's a project out there somewhere for integrating Groovy with Play but it looks quite immature.
Play 2 stripped out all the Groovy code from Play 1. There must be a reason.
> Groovy 2.x offers pretty much all the benefits of static compilation and dynamic language features together
Groovy's dynamic compilation is reliable, but sloooooooooow. The static compilation added in Groovy 2 is much faster but still buggy e.g. http://stackoverflow.com/questions/14774709/groovy-2-1-0-wei... It was written by one developer, and first shipped in Grails only 2 months ago. And does Grails actually use any of Groovy's static compilation features? I haven't seen anywhere it's used: point me to somewhere in the Grails codebase if it does.
You don't get all the benefits of static compilation and dynamic compilation together, you can get bugfree (but sloooooooooow) code, or faster (but buggy) code.
https://github.com/robfig/revel
It didn't feel like idiomatic Go to me, but was a very nice, featureful, and complete framework.
One thing that comes to mind is ACID compliance. Any other pluses of using sql over an ORM would be appreciated. I have a friend who swears by it, who taught another friend that is now swearing by it.
When you use "sbt ~run", sbt compiles each file as soon as it changes. I.e., as soon as you save out the editor buffer. By the time you click on the reload button, sbt has usually already compiled all your changes, and it only takes a second or two for either your working page to reload, or for you to see a compiler error message.
It is not necessarily the case that you would use Play 2 for new projects.