NodeJS vs. Play Framework for a major project

I am really torn between two different stacks with which to create a large application. On the one hand, there is this option:

  • Node.js
    • to express
    • coffee script
    • coffeekup
    • mongoose / MongoDB or
    • preservationjs / mysql


  • Play framework w / scala
    • Anorm w / mysql
    • or mongodb

The node.js path is attractive to me because I can write all the server side code, views and client side code in the coffeescript file that I already know. If I go along this road, I'm still not 100% sure which db path I would take. mongoose makes data storage quick and easy, but the lack of a true relationship can be more difficult to work with given the data model that I have in mind (very SQLish).

The path to the Play Framework is also attractive because I know the framework well when using Java, but I know little about Scala, so there will be a performance hit for working with this language. The Anorm database access level is attractive because I can write SQL manually, which I would prefer, and automatically display the results that are mapped to objects, which saves a lot of effort.

I'm leaning towards node.js all the time, but I'm not selling at the best db access level to use. Does anyone have any experience in this regard and can you share it with understanding?

+56
mongodb coffeescript playframework anorm
Oct 03 '11 at 19:32
source share
2 answers

The stack you choose should depend on the needs of your application. Let's look at a game against Node for our strengths:

Node

  • Real-time applications (chat, channels)
  • Event Driven Architecture
  • It can perform client-server duties (for example, maintain files), but is not suitable for this
  • Database management, testing tools, etc., available as additional packages

Play!

  • Client-server applications (website, services)
  • Shared Architecture
  • Can perform duties in real time (e.g. Websockets), but not suitable for this
  • Database management (including migration!), Testing tools, etc., built into the kernel

If your application more closely matches the traditional web model, Play is probably your best bet. If you need immediate feedback and real-time dynamic messaging, Node is the best choice.

For large, traditional applications, seriously consider Play! Framework due to built-in module and functional testing along with database migrations. If they are included in the development process, they go a long way towards a final product that works as expected and is stable and error-free.

+46
Oct 03 '11 at 23:21
source share

When comparing web frameworks, there are 10 main categories to consider:

  • Learn : getting started, building up, general learning curve.
  • Development : routing, templates, i18n, forms, json, xml, access to the data warehouse in real time.
  • Test : unit tests, functional tests, integration tests, test coverage.
  • Safe : CSRF, XSS, code entry, headers, authentication, security tips.
  • Build : compilation, running tests, static preprocess content (sass / less / CoffeScript), package.
  • Expand : hosting, monitoring, configuration.
  • Debugging : step-by-step debugger, profilers, logging,
  • Scale : bandwidth, latency, concurrency.
  • Maintain : code reuse, stability, maturity, type safety, IDE.
  • Share : open source activity, mailing lists, popularity, plugins, commercial support, assignments.

Check out my discussion of Node.js vs Play Framework for a detailed breakdown of how these two structures compare in these 10 dimensions.

+13
Sep 29 '14 at 19:01
source share



All Articles