3 ms·
I recently installed Scala. I'm a PHP Dev, who plays around with Clojure on the side, but wants to be converted into the static typing camp. I also wanted to ke
by girvo 13y ago
I recently installed Scala. I'm a PHP Dev, who plays around with Clojure on the side, but wants to be converted into the static typing camp. I also wanted to keep things functional (hence my love of Clojure, and my PHP code keeps things as immutable as possible), but also have a language that is usable if I were to go and get another programming job.
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.
- shadowfiend 13y agoOn lightness, you'll have to evaluate. But Lift is an approach to web development that is relatively different from most out there, and which I've found tremendously refreshing, taking some really awesome approaches to separation of content and behavior and other stuff. It also embraces the benefits of static typing throughout and makes real-time stuff stupid easy. You can usually tune how many of Lift's more advanced features you use fairly easily—using it as a simple REST-based server is easy and still extremely pleasant, but going beyond that is also awesome. Disclaimer: I found it so refreshing and awesome that I'm now a Lift committer.
- dinduks 13y agoWe use Scala and Play to build (almost) any sort of web applications. The main reasons IMO are type safety in the code, the templates and the routes. The actors model allows doing side processing pretty easily too. Not mentioning the elegance of Scala itself. > 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.
- SkyMarshal 13y ago>but then Play as a framework looked very heavy for my usage. 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.
- girvo 13y agoIn my testing, I evaluated Play 2 (right on release), and Grails 2 (Groovy is nice). 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?
- virtualwhys 13y agoWas in same boat as you 3 years ago, new to the JVM. 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 ;-)
- hackerboos 13y ago>Play as a framework looked very heavy for my usage. Try Scalatra.
- bad_user 13y agoPlay version 2.x is not heavy, being pretty modular and elegant. Give it a try. 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.
- girvo 13y agoI just had a look at Scala jobs around Australia. $200k plus is the average salary. Time to start learning Scala properly, it seems. :|
- room271 13y agoI went from only doing PHP to working in Scala so it can be done. You'll need to do a fair bit of learning on the side if, like me, you were more of a 'PHP-developer' than 'developer' (by which I mean your CS knowledge and broader programming knowledge was lacking). 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.