by girvo · 13y ago · 0 comments
Scala seemed a perfect fit. Until I looked at job boards for Brisbane :(
For those that use it regularly, what sort of things do you build in.it? I really want to replace PHP with something, but between Enterprise Language Java and just-as-dynamic-as-PHP Ruby and Python, Scala looks like the only language that might fit... but then Play as a framework looked very heavy for my usage.
Disclaimer: I found it so refreshing and awesome that I'm now a Lift committer.
> Play as a framework looked very heavy for my usage
What do you exactly mean by heavy? Actually I think it's quite simple since you only have to download an archive, unzip it, and start writing code as you would in any MVC Web framework.
Spray.io is great for building API. It usually has better performance than Play.
Scalatra is Scala's Sinatra, but the compiling times take out all the joy in using this kind of frameworks.
Another Scala Web framework is Lift, but I don't know much about it.
On the job boards problem - the funny thing in this industry is that you're more likely to find jobs because you use a certain language that's not as popular as Java or PHP.
It's a supply and demand issue. Yes, there are many jobs for Java and PHP. But there are also many PHP and Java developers. And as a general rule of thumb, for finding good jobs smart developers focus on skill-sets that are much narrow and harder to practice than usage of a programming language.
Focus on scalability issues, on design, on social skills, on data analysis - people that are good at such things are worth their weight in gold.
Time to start learning Scala properly, it seems. :|
The terms "lightweight" and "heavyweight" and variants get thrown around alot describing frameworks, but can mean different things to different people:
- size of framework codebase
- size of app codebase
- amount of code it takes to accomplish common tasks
- memory footprint
- deployment system
- learning curve
- feature list (barebones vs kitchen sink)
etc etc. If you could elaborate a little on what heavy and lightweight you're referring to, the Lift/Play/Scalatra/etc experts might be able to better address that.
My thing is, Play seemed to do literally everything. I think it would be brilliant if I knew Scala well, but my problem is I dont even know Java! Ill use that as a segue: I had the same issue with Groovy/Grails -- great framework, nice language, but my lack of Java experience hasn't.made things as productive as I expected based on the hype I've seen.
Play simply seemed like I was learning Play, not Scala. I felt the same way when using Rails, which I never took too. The only larger more fully featured framework I've used and enjoyed is Symfony2, and that is solely due to my expertise in PHP.
I hope that helps explain what I meant. What should I do?
Started with a few pleasant months of pure Groovy, followed by 6 painful months with Grails (during the pre 2.x days). At that point I had my feet wet and realized that Groovy, as language, was not going to cut it (tried building a CRUD layer on top of Grails and Groovy's lack of static typing became a real thorn).
At the time James Strachan had ditched Groovy (the very language he had created, mind you) and was raving about the wonders of Scala. Interested I picked up the stairway book, Programming in Scala.
That changed my life as a programmer. Checked out Scalatra, Spray, Lift, and Play. Play wound up being the best fit.
I still get JIRA notifications for bug requests I created with Grails -- each one the devs just kick the can down the road (fix) to the next version, glad I left ;-)
"Shared constraints not working in URL mappings Fix Version/s: 2.3-RC1 (struck through) Fix Version/s: 2.3-RC2 (the kicked can)" ;-)
As for not knowing Java, there's not a whole lot of carryover from Java at the language level. There is at the JVM level obviously, but you can ignore JVM tuning and bytecode and whatnot till later.
In fact, I actually found learning Haskell to be more valuable than Java in understanding Scala. Learn You A Haskell [2] is one of the best general programming books I've read, Lipovaca is excellent at explaining complicated functional programming concepts.
[1]: http://scalatra.org/
But if you are already familiar with functional programming, data structures, etc., then it will be straightforward as Scala has a nice syntax - at least, it does for a C-style language.
On the frameworks debate, I've found in the past that trying to use a large framework and learn a language at the same time is just too difficult because you are overloading the learning. Sticking to Scalatra here might help because you don't need to work hard to understand the framework, so you can focus on making your app and learning Scala. Play is probably nice once you understand it, but they'll be a lot more domain knowledge needed to use it effectively.
Try Scalatra.