
Time: June 14, 2012 from 6pm to 9pm
Location: Xebia, Laapersveld building
Street: Laapersveld 55
City/Town: 1213 TL Hilversum
Website or Map: http://g.co/maps/am4xy
Event Type: meetup, duse
Organized By: Urs Peter
Latest Activity: Jun 18, 2012
Hi Scala enthousiasts,
I’m very pleased to announce DUSE meetup #18. Erik Bakker, co-author of the book Play for Scala, will reveal us some of the core internals of Play 2.0. His presentation is followed by a hands-on hacking session were you get the chance to transform his ‘revelations’ into working code.
One of Play’s distinguishing features is its reactive architecture that leverages the non-blocking and event-driven programming model as well as its scalability characteristics. Erik will introduce us to Play’s reactive programming model and show us how to use iteratees en enumerators combined with websockets. He will elaborate on the scalability features of Play such as its seamless integration with Akka, as well as on other advanced building blocks that make Play such an outstanding web framework.
Program
18:00 - 18:30: Food & Drinks
18:30 – 20:00: Presentation Core Play 2.0 by Erik Bakker
20:00 – 21:00: Hands-on session (Play with Play ;-))
I’m looking forward to seeing many of you for an insightful and mind-rocking evening with Scala’s ‘official’ web framework that is presented by one of the few Dutch insiders.
Cheers Urs
PS: The meetup is not in the usual main Xebia office but in their second office building in the street behind. See this Google maps link for how to get there.
Recently on a conference I did a live-coding presentation about Scala for Java developers. It worked out quite well and could easily be done over. So if you need an evangelist there is a whole pool available ;-)
Comment by Robby Pelssers on June 15, 2012 at 10:03am I have the goal to introduce scala at my customer and at my own company. And I finally found a compagnon (other consultant hired by my customer) who also is charmed from Scala. Once i finished Scala in depth and know best practices to manage a scala project i will make the switch. We use spring/maven a lot so i need to get a feeling if i need to abandon those two and stick with only xSBT (not used so far) and what about DI?
Comment by Wilfred Springer on June 15, 2012 at 10:11am We're using SBT. I like some parts of it, but not all of it. For DI, we did use the Cake pattern, but because of the way the cake pattern works, we get a lot of recompilation if only a single trait changes. With the size of our code base, that is starting to hurt us big time, and we decided to move away from it. (There are other painpoints as well, such as lazy vals being null at startup time; it can quickly get very yucky.)
You can even wonder if you need DI at all. Whoops, did I just say that? Yes I did! I am no longer convinced I need it. And I have to say, I did Spring for a loooooong time. In fact, I even rolled my own version of Spring (http://springframework.me/). Those DI frameworks get you into a certain state of mind; it seems that if you have that state of mind, you no longer need the framework.
Comment by Robby Pelssers on June 15, 2012 at 10:15am That kind of discussion is exactly what i need.. Scala in practise... do's vs dont's. What best practices from Java work, which one to skip. what issues did you run into, how did you solve them. All the above can be a showstopper for most developers using proven approaches like spring/maven/... It won't stop me however but i do need to understand these things right from the start i would say.
As Wilfred points out: The last word is not said about DI. I personally used the cake pattern, on a not very large code base (~3000 LOCs), which worked for me. Of course you can also use DI frameworks like Spring, Guice etc.
There are projects that still use Spring with Scala, even though I would not advice to do that. A good intro about DI & Scala can be found here: http://jonasboner.com/2008/10/06/real-world-scala-dependency-inject...
Comment by Wilfred Springer on June 15, 2012 at 10:20am Rob, feel free to shoot me a message if you need more ammo / information about the do's and don'ts: wilfredspringer@gmail.com
Comment by Remco Bos on June 15, 2012 at 10:44am And there's Dick Wall's subcut ofcourse.. have not tried it though
Comment by Wilfred Springer on June 15, 2012 at 10:56am I haven't looked it in detail, but I wonder how well it does on the power-to-weight scale. (How much does it buy you, versus the cognitive burden.)
For the interested ones: Here my solution of yesterday's exercise (use an Actor to distribute cpu load info to a series of websocket connections)
The interesting class is: https://github.com/upeter/core-play/blob/master/app/controllers/Cpu...
Additionally, I implemented logic to remove a pushee from the actor's distribution list in case a websocket disconnects.
To run the sample do the following:
git clone git@github.com:upeter/core-play.git
cd to core-play directory
run: sbt
in play-shell run: run
Open a browser and add url: http://localhost:9000/websockets
In the websocket address field enter: ws://localhost:9000/websockets/cpu-info
Repeat this in other tabs, connect and disconnect and see in the logs what happens. As you might have seen I do not acquire real cpu info, it's just a counter. But the idea should be clear.
Cool stuff ;-)
Comment by Remco Bos on June 15, 2012 at 2:17pm Cool!! It's working (just had to add it to the routes file, not commited?)
Comment
© 2013 Created by Age Mooij.
RSVP for Duse XVIII - Core Play 2.0 to add comments!
Join Dutch Scala Enthusiasts