5 ms·
Speaking of Sinatra-inspired web frameworks on the JVM have a look at Scalatra: http://scalatra.org/ http://scalatra.org/ https://github.com/scalatra/scalatra
by trailfox 13y ago
Speaking of Sinatra-inspired web frameworks on the JVM have a look at Scalatra:
http://scalatra.org/ http://scalatra.org/
https://github.com/scalatra/scalatra https://github.com/scalatra/scalatra
- k__ 13y agoI liked most of it. But when it came to this atmosphere stuff, it was vietnam all over again! What's wrong with those Scala developers? They could make beautiful frameworks and APIs, always start to create crazy method names. > "org.scalatra" %% "scalatra-atmosphere" % "2.2.1", > send(("author" -> "system") ~ ("message" -> "Only json is allowed") ~ ("time" -> (new Date().getTime.toString ))) What's wrong with them?!
- dscrd 13y agoSame symptom is shown in Haskell circles. I suspect it might be due to the enthusiasts of these languages often being mathematicians. And mathematicians love crazy sigils, as we know.
- k__ 13y agoprobably :\ And this is rather sad. You got a language which allows you to write nearly litteral code and still build stuff only mathematicans can understand.
- the1 13y agoyah they should've done something like: send(JSONSerialization.with(StringSerializer.class, DateTimeSerializer.class).serialize(JSONObjectFactory.put(PairFactory.of(String.class, String.class).getInstance("author", "system"), PairFactory.of(String.class, String.class).getInstance("message", "Only json is allowed"), PairFactory.of(String.class, DateTime.class).getInstance("time", new Date())).getInstance())) no, it's just json4s dsl for constructing json. If you wanted, you could've used constructors yourself: send(pretty(render(JObject(List(JField("author", JString("system")), JField("message", JString("Only json allowed")), JField("time", JString(new DateTime().getTime().toString())))) usually scala libraries come with an easy to read/write DSL version of the API along with a more verbose java-style API shown above. Many libraries don't document with a plenty of examples. But, it really takes 10 minutes to learn DSL version in many cases. And, it gives you wings. There are plenty of benefits of DSL. You can research online about them.
- k__ 13y agoI hate the Java style as much as this nonsense-operator-like-function-name style of Scala. Why do they have to name them ~ % %%, if they can name them ANYTHING. Just to make the writing shorter? It's like using variable names like a, b, c, data, value etc. I want readable code, not short code by hook or by crook...
- the1 13y agooperators like +, -, /, %, ^, ... read much better once you learn their meanings and how to use them. it's okay to learn things.
- noelherrick 13y agoScalatra had some good features, but the installation instructions required an entirely new build or package system, giter8, which in turn requires another package, conscript. Two packages to install another package? This is just an unnecessary barrier to entry.
- hackerboos 13y agoThe problem I have with Scalatra is that they seemed to be more focused on their Manning book than getting the core docs up to a good standard.
- pjmlp 13y agoOpen source software developers also need to pay bills. Free documentation does not pay bills, books do. Assuming people don't pirate them.
- the1 13y agoyah, it required me to install a JVM. And JVM required me to purchase a personal computer that can host the JVM. And electricity and stuff. Such an unnecessary barrier to entry.
- deleted 13y ago[deleted]