I love Play!. Compared to other enterprise Java frameworks, it's incredibly simple for the developer to use. But, how does it do that? What makes the edit-refresh cycle possible with a compiled language like Java? What makes Play! work the way it works?
The Play framework is a web framework for the JVM that breaks away from the Servlet Specification. Play embraces a fully reactive programming model through the use of futures for asynchronous programming, work stealing for maximizing available threads, and Akka for distribution of work.
A Controller is a Java class, hosted by the controllers package, and subclassing play.
Play is rock-solid and used by hundreds of thousands of Java and Scala developers every month. Play is still extremely relevant to today's application and web development and has a passionate and very capable community around it ensuring that it has many good years left.
Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern. It is written in Scala and usable from other programming languages that are compiled to JVM bytecode, e.g. Java.
This article relies too much on references to primary sources. Please improve this by adding secondary or tertiary sources. Play Framework is an open-source web application framework which follows the model–view–controller (MVC) architectural pattern.
Asynchronous I/O: due to using Akka HTTP as its web server, Play can service long requests asynchronously rather than tying up HTTP threads doing business logic like Java EE frameworks that don't use the asynchronous support offered by Servlet 3.0. [20] Modular architecture: like Ruby on Rails and Django, Play comes with the concept of modules.
When you want to create a Play Framework template function, you can find some examples on the Scala Templates page. There you'll find these first two examples. First, assuming you have a Product model defined something like this:
Play is heavily inspired by ASP.NET MVC, Ruby on Rails and Django and is similar to this family of frameworks. Play web applications can be written in Scala or Java, in an environment that may be less Java Enterprise Edition-centric.
Play uses the Eclipse compiler to compile code at run-time.
Take a look at the following class, that is used by Play to perform the necessary compilation at run time.
https://github.com/playframework/play/blob/master/framework/src/play/classloading/ApplicationCompiler.java
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With