Over the past years, web technologies have progressed a lot. Gone are the days where websites were simple, non-interactive and with static content. With the rise of Web 2.0 years ago, the internet was introduced to forums, personal blogs and a whole universe of interactive media. Anybody could build their own website in a matter of minutes thanks to platforms like WordPress, Joomla or Drupal. And with the decrease in pricing for web hosting as well as many free services, the financial burden of owning your own site was no more. You only had to invest time to write good quality articles and to promote your newly-formed site to attract visitors.
With the rise in web technologies and processing power, other platforms managed to emerge, platforms that do more than just personal blogs or forums. ASP.NET and JavaEE (combined with Java Servlets) offered the possibility to create complex applications capable of much more complex operations and a higher level of security. These helped create complex online payment processing engines, chat systems, high-end portals and many more applications that require intense background processing and more than just a database connection.
When it came to Java as the main programming language, Spring with JavaEE deployed in Tomcat or Glassfish was considered the norm. In recent years though, a new framework started to appear that offered higher speed, a more modern programming paradigm and it was not tied to a web container or application servers like Tomcat or Glassfish. Should you use this new-ish framework called Play for your next web project? Let’s take a look over some advantages and disadvantages it has to offer.
Play is a web-application framework that is built on top of Akka to provide fast, reliable and predictable resource consumptions for high-scalable applications. It uses a fully asynchronous model and is RESTful by default, allowing easy deployment across multiple nodes, making it scalable. Furthermore, it offers Websocket, Comet and EventSource support out of the box as well as integration with multiple databases, including NoSQL ones for Big Data processing.
All sounds good, but should you use Play Framework for your next web project? If you are planning to create a simple website, then no. Play is not meant for blogs or forums, even though you could make one if you wanted. It is not a CMS so you will have to do the coding to have something functional. This is meant to be used by professional programmers in order to create complex applications that do a lot of background processing, not just storing content and displaying it to the end user.
Even though play offers many advantages, it is not suitable for all web applications. Even if you want to make a platform from scratch and have the knowledge to do it, you should carefully analyze if Play is for you. I own a smartphone news and reviews website and Play is not suitable for that. Play is written in Java or Scala and require the JVM for deployment. You will need more complex hosting that traditional shared hosts to be able to deploy your creation. Normally a VPS or cloud hosting from Amazon AWS or Google Cloud Engine is needed to be able to take advantage of Play’s ower, hosting options that cost more compared to shared PHP hosting.
However, if you are planning to make an application that requires fast processing and high scalability, Play may be the right choice. When building such a system, server cost is usually not hte main concern. Here it is more important to have high availability and fast processing speed, niches that Play certainly excels.
Tomcat and Glassfish are still alive and improved a lot. Spring Framework certainly evolved from a simple dependency injection framework and together with Struts or other UI frameworks, it could offer a great alternative to Play. It has the advantage that it is more widely used and has premium support if ever needed.
Another option would be Node.JS, however, it does not offer the high-scalability options that the others do. Furthermore, it uses Javascript as the main programming language, a language that is not suitable for multi-threaded workloads. Still, Node.JS is recommended for fast prototyping. You can put together a proof of concept quite fast and later, once you are satisfied with the direction the project is going, you could switch to Play, even though you will have to re-write the application.
Write a Reply or Comment