Hacker News new | ask | show | jobs
by alexAME 3683 days ago
I'd say go with the Play Framework with either Java or Scala.

The views are type checked as well, like in asp.net mvc. In fact, it's inspired by the razor template engine, you won't miss the magical @.

There are a ton of templates available[0], auth, websockets, upload etc..

Over the last few years, the Play framework improved a lot, Java is not a second class citizen anymore, like many people think.

> I am writing a new web application from scratch. It is not trivial - there will be a requirement to provide streaming video and also facilitate live video streams between users.

This is from the official docs:

Because of the way Play works, action code must be as fast as possible, i.e., non-blocking. So what should we return as result if we are not yet able to generate it? The response is a future result!

A Future[Result] will eventually be redeemed with a value of type Result. By giving a Future[Result] instead of a normal Result, we are able to quickly generate the result without blocking. Play will then serve the result as soon as the promise is redeemed.

The web client will be blocked while waiting for the response, but nothing will be blocked on the server, and server resources can be used to serve other clients.

Also make sure to checkout the streaming section of the docs[1].

If you are looking for a robust framework which embraces performance and developer productivity, Play is the way to go. I've never found a framework that could satisfy all my needs, like Play.

I didn't even mention all the awesome features but if you are interested check out the Play Philosophy[2].

Why am I so convinced about Play ? I have more than 5 apps in production, I couldn't be more happy about my decision to use Play. I wrote applications in asp.net mvc, Spring MVC/Boot, Rails for many years, they all failed me.

[0] http://www.lightbend.com/activator/templates

[1] https://www.playframework.com/documentation/2.5.x/ScalaStrea...

[2] https://www.playframework.com/documentation/2.5.x/Philosophy

1 comments

> I wrote applications in asp.net mvc, Spring MVC/Boot, Rails for many years, they all failed me.

Could you elaborate more on how these alternatives failed you?

I've been considering jumping into the Java/Play ecosystem for awhile but have been hesitant so far. Analysis paralysis at its worst!

Well first of all, all the mentioned frameworks are great frameworks, I do like all of time, it always depends what I'm trying to achieve, I decide the framework based on the project/customer and MONEY.

What asp.net MVC and Rails got in common, is that they are heavily opinionated how things should work, this can create many problems if you need a solution to a specific problem which is outside of the typical CRUD scope, it's very hard to break conventions and do things differently. This lead my many times to just start over the whole project.

Let's start with asp.net MVC, they open sourced it, that's good news, but the deployment options are still bad, as far as I know, there are a few community driven web servers, which aren't production ready in my opinion.

ASP.NET MVC:

works great, if you use the other MS tools like MSSQL, ISS etc, but if you are trying to replace one of those components, you are in a world of pain. So basically asp.net mvc, is on hold for a while.

Spring:

I'd love to sum up why I prefer Play over Spring but Yevgeniy Brikman did a great job doing that.

https://www.quora.com/Which-is-better-Play-Framework-or-Spri...

Rails:

is ... the perfect framework for smaller CRUD applications, that's all I can say.

> I've been considering jumping into the Java/Play ecosystem for awhile but have been hesitant so far. Analysis paralysis at its worst!

What's your background ?

Thanks for the detailed reply!

> What's your background ?

I went something like game dev (C++) -> enterprise client/server apps (C++/Qt) -> web dev (Python/Django)

Django, like Rails is fantastic for hashing out small-med sized apps, but I've been looking to add another tool to the box. Something statically typed, more performant relative to Python, and with a large ecosystem to draw from to get stuff done quick.

I've been using Java on and off since the late 90s... it's overly verbose but it seems like it's gotten a bit better w/ Java 8 and the code gen features available in IntelliJ. I've also avoided J2EE/JEE like the plague. Coming from Django, and not wanting anything to do with JEE makes Play a rather appealing choice on the surface.

Go seems like the only viable alternative as I do not want to switch to a MS hosting stack to host .NET.

Of course there are all of those other JVM languages to poke at!

> Django, like Rails is fantastic for hashing out small-med sized apps, but I've been looking to add another tool to the box. Something statically typed, more performant relative to Python, and with a large ecosystem to draw from to get stuff done quick.

I guess the JVM is your best bet at this point, there is a huge eco system out there, the best thing about it, is that it's very mature.

Well if you got any questions about Play, just drop me a line.