Thursday, May 8, 2014
Tuesday, April 15, 2014
Spray + Bootstrap
https://github.com/spray/spray-template
"Spray - Twirl - Twitter Bootstrap" Template Project
This project uses Git Flow.
- Git-clone this repository.
$ git clone git@bitbucket.org:diversit/spray-twirl-bootstrap.git my-project - Change directory into your clone:
$ cd my-project - Launch SBT:
$ sbt - Compile everything and run all tests:
> testNote: For the Selenium Chome test to be able to run, you need to install thechromedriver locally. Read my blogpost about how Selenium is setup for ScalaTest. And read the ScalaTest Selenium documentation for using Selenium in ScalaTests. - Start the application:
> re-start - Browse to http://localhost:8080/
- Start the application:
> re-stop - Learn more at http://www.spray.io/ , https://github.com/spray/twirl and http://twitter.github.com/bootstrap/
- Start hacking on
src/main/scala/com/example/MyService.scala
- spray-can, Scala 2.9 + Akka 2.0 + spray 1.0 (the
on_spray-can_1.0branch) - spray-can, Scala 2.10 + Akka 2.1 + spray 1.1 (the
on_spray-can_1.1branch) - spray-can, Scala 2.10 + Akka 2.2 + spray 1.2 (the
on_spray-can_1.2branch) - spray-can, Scala 2.10 + Akka 2.3 + spray 1.3 (the
on_spray-can_1.3branch) - Jetty, Scala 2.9 + Akka 2.0 + spray 1.0 (the
on_jetty_1.0branch) - Jetty, Scala 2.10 + Akka 2.1 + spray 1.1 (the
on_jetty_1.1branch) - Jetty, Scala 2.10 + Akka 2.2 + spray 1.2 (the
on_jetty_1.2branch) - Jetty, Scala 2.10 + Akka 2.3 + spray 1.3 (the
on_jetty_1.3branch)
on_spray-can_1.1 branch.> git clone git://github.com/spray/spray-template.git my-project -b on_spray-can_1.3
Wednesday, January 2, 2013
Sunday, January 1, 2012
CoffeeScript vs Google Dart
Learn Javascript
- The best way to learn (and debug) Coffeescript
- Dart is similar enough to JS but far less common. You will come across more JS than Dart.
- To understand why CoffeeScript exists, and how Dart differs.
Use Coffeescript
- CoffeeScript is out there in projects already, so there's community and experience.
- CoffeeScript might come up at work sooner than Dart (esp. with Rails).
- CoffeeScript is nice!
Check out Dart
If you understand Javascript, and use CoffeeScript, and have checked out Dart, you'll be in a good position to judge which hammer is best for the task. Most JS/CS knowledge should be transferrable to Dart, the other way around would be more difficult.
While Dart is pretty neat and backed by Google, it has not be absorbed into the web-applications development community like coffeescript has (coffeescript is the suggested front-end development language of the Rails core team and the preferred front-end language of the ruby community). Coffeescript also has wider support tools and, in my personal opinion, more readability. However, if that does not have you convinced then you can take a look at this ‘Hello World’ program written in Coffeescript and compiled to Javascript then Dart compiled to Javascript (taken from this gist).
Long story short, Dart supposedly offers enhanced security in your front-end (hence all the added junk?) and is more catered to large-scale projects but I won’t be reaching for Dart in the near future. The language syntax is cool and liken to Java but all the useless generated code really makes it hard for me to understand what is going on under the hood. Why use 17K lines of code when 11 will do?
http://blog.brandonmathis.me/blog/2011/10/11/dart-or-coffee/
Google Dart vs Javascript
The fundamental problem with HTML5 is JavaScript, which is not an ideal language for enterprise application development.
Google recognises this issue. An internal email from Nov 2010 that outlines their strategy for ‘Dart’, says:
“Complex web apps–the kind that Google specializes in–are struggling against the platform and working with a language that cannot be tooled and has inherent performance problems”
In the past Google has used Java to JavaScript compilation (GWT) and annotated-JavaScript to JavaScript compilation (Closure) to overcome these problems. In my previous blogpost I speculated that Microsoft could use a similar approach, offering a C# / VB.NET to JavaScript compiler, allowing HTML5 developers to use the full power of Visual Studio. However, with Dart Google are looking to go one step further:
“The goal of the Dash effort is ultimately to replace JavaScript as the lingua franca of web development on the open web platform.”
That’s quite an ambituous goal!
http://www.scottlogic.co.uk/blog/colin/2011/09/dart-will-google-make-html5-applications-viable/
