CSC/ECE 517 Fall 2014/ch1b 34 kr
AngularJS + Rails
Overview
AngularJS is an open source client-side Javascript framework for creating web applications with dynamic web pages and is maintained by Google. AngularJS has extended HTML's syntax and implemented it with Model-View-Controller architecture so that the various components of Javascript can be expressed clearly. It provides functionalities like data binding and dependency injection which helps shorten the crude javascript code. It has a simple object model that supports testability and clean code organization.
Rails is an open source web application framework written in Ruby by David Heinemeier Hansson. It is extremely productive for developing database-backed web applications. It uses Model-View-Controller architecture and requires fewer total lines of code than other frameworks thus making it atleast ten times faster.
Background
AngularJS
AngularJS was developed by Misko Hevery and Adam Abrons at Brat Tech LLC in 2009 as the software behind an oline JSON storage service. Later, it was released as an open source library. The library is being developed and maintained by Hevery with his fellow Google employees.
Rails
Rails was extracted from Basecamp, a project management tool by 37signals but it was released as an open source project in July 2004. It gained fame after Apple decided to ship it with Mac OS X, which was released in October 2007.
Why AngularJS + Rails?
One of the key reasons of using AngularJs is Atomicity, i.e. seperation of User Interface from Rails back-end. It provides an opportunity to build a front-end API along with your application, it means front-end exposes its methods to the back-end and the front-end API can be clubbed with any back-end without any need for re-configuration.
So the question is why to club AngularJS with Rails and what are its advantages? AngularJS is a frontend framework, what this means is, it is designed to run on the client side, therefore for any real application requiring CRUD operations a back-end is necessary. This is where Rails comes into picture, it provides a back-end to the AngularJS application so that large amount of data can be stored in database. Another issue with using standalone AngularJS application is that it re-renders a single page web applications, i.e. the same page or components on the page gets refreshed, which makes Search Engine Optimization extremely tricky, as a result the possibility of making the web page searchable reduces drastically. Whereas in case of Rails the web pages are rendered by Rails on the server, which makes them available to Google for SEO based search.
Getting Started
References
<references/>
Name | AngularJS + Rails |
Category | Open Source Software |
Type | Web Application Framework |