Scala Machine Learning Projects
上QQ阅读APP看书,第一时间看更新

Why RESTful architecture?

Well, Play’s architecture is RESTful by default. At its core, Play is based on the Model-View-Controller pattern. Each entry point, paired with an HTTP verb, maps to a Controller function. The controller enables views to be web pages, JSON, XML, or just about anything else.

Play’s stateless architecture enables horizontal scaling, ideal for serving many incoming requests without having to share resources (such as a session) between them. It is at the forefront of the Reactive programming trend, in which servers are event-based and parallel processing is used to cater to the ever-increasing demands of modern websites.

In certain configurations, Play enables fully asynchronous and non-blocking I/O throughout the entire application. The purpose is to reach new heights in terms of scalability on the web through efficient thread management and parallel processing, while avoiding the callback hell that JavaScript-based solutions tend to engender.

AngularJs is a JavaScript-based open-source front-end web application framework mainly maintained by Google and by a community of individuals and corporations to address many of the challenges encountered in developing single-page applications.

Now question would be why AngularJS? Well, HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.

Another question would be, are not there any alternatives? Well, other frameworks deal with HTML’s shortcomings by either abstracting away HTML, CSS, and/or JavaScript or by providing an imperative way for manipulating the DOM. Neither of these address the root problem that HTML was not designed for dynamic views.

Finally, what is about the extensibility? Well, AngularJS is a toolset for building the framework most suited to your application development. It is fully extensible and works well with other libraries. Every feature can be modified or replaced to suit your unique development workflow and feature needs. Read on to find out how.