SlideShare a Scribd company logo
1 of 12
Download to read offline
Angular JS, Super-Heroic JavaScript
MVW Framework
A white paper on Fundamentals and Implementations of Angular JS with
renowned Technology Platforms
Angular JS with MVC Frameworks | Page 2
Contents
Abstract...................................................................................................................................................3
Overview on Angular JS ..........................................................................................................................4
Core Concepts of Angular JS ...............................................................................................................4
Why Angular JS?..................................................................................................................................5
MEAN Stack Concept ..............................................................................................................................5
Angular JS with MVC Frameworks and Technologies.............................................................................7
PHP Technology ..................................................................................................................................7
ROR Technology..................................................................................................................................8
.Net Technology..................................................................................................................................9
Java Technology................................................................................................................................10
Summary...............................................................................................................................................11
©2014 Optisol Business Solutions Private Limited. All rights reserved.
No part of this document may be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose without the written permission of Optisol Business Solutions. Any hard copies
of this document are to be regarded as temporary reference copies only.
Angular JS with MVC Frameworks | Page 3
Abstract
This white paper gives a brief overview of the web development using Angular JS through Single Page
Applications (SPA) technologies. The document also illustrates at high level on how to use Angular JS
with legacy technologies such as PHP, .Net, Ruby on Rails (ROR) and Java.
The major driving factor for client side script is the complexity to maintain the business logic in the
browser and trade off with a thin loading. As more and more logic ends up being executed in the
browser, front-end code bases grow larger and more difficult to maintain. To solve this issue, developers
have been turning to client-side MVC frameworks, which promise increased productivity and
maintainable code.
Before moving on to the detailed elaboration of the Angular JS frameworks, it is worth mentioning that
JavaScript has become the language of choice for development, especially for client-side development
due to following advantages:
Instant result with no
compile step
Rapid Development and great
User Interface
AJAX - Every web developer
knows and adores
Angular JS will act as the toolset based on extending the HTML vocabulary for our application. Based
on our experience of working on 200+ web application UIs, OptiSol strongly feels that Angular JS stand
out in terms of adoption readiness and value proposition. OptiSol is happy to work on this white paper
that summarizes the advantages of Angular.JS and how to make it work with other legacy programing
languages.
The document also shares a high level overview about MEAN stack
This whitepaper is intended for beginners and business level users and will be informative for advanced
users.
Angular JS with MVC Frameworks | Page 4
Overview on Angular JS
Angular JS – a Super Heroic JavaScript Framework which provides
Complete Client-Side Solution.
Angular JS is the Client Side Browser App framework supported and maintained by Google
The emergence of Angular JS coincides with the need for single page application development. The
single page web applications provides more fluid user experience as Desktop Application
Increase the browser based application with MVC (Model, View and Controller) which makes the
development and testing process simple and quick
The static HTML pages are transformed to process the dynamic content through 2-way binding for
automatic synchronization of models and views.
Provides robust, testable and flexible application with Professional Programming Practice and
browser compactible.
Implements the MVC pattern i.e., Model Object Oriented Design on the client side for uniquely
conceptualizing the core factors of presentation, data and logic components.
Provides structure for building application starting from UI Design, Business Logic till testing
Process.
 Everything you need to build a CRUD app in a cohesive set: data-binding, basic templates,
directives, form validation, routing, deep-linking, reusable components, dependency injection.
 Testability story: unit-testing, end-to-end testing, mocks, test harnesses.
 Seed application with directory layout and test scripts as a starting point.
Core Concepts of Angular JS
Templates
Module BasedBootstrapping
2-way Data
Binding
Dependency
Injection
Routing Directives
Unit Test
Angular JS with MVC Frameworks | Page 5
Why Angular JS?
Address Some Problems in Software Architecture
 Angular JS has ng-resource to create services that hook up to REST APIs and return back
that object in JSON and fully functional object.
 Angular JS encourages to also deal with models on client side just like on the server side.
Enable to Create Software quickly with Less Effort
 Angular JS provide ng-model and ng-class directives to cover common operations and
allows 2-way data binding and saving to the server.
 Reduces the code
Result in Software is more Maintainable
 Angular JS encourages using the model object oriented design on the client-side
 Object oriented design principle ensure software is more maintainable compared to
procedural.
Improve Testability of Software
 Angular JS provides dependency injection at its core making flexible testing
Encourage Good Programming Practices
 Features like Model, dependency injection and ability to create directives lends to
reusable and shareable components
 REST API connection to server and benefits through Angular JS usage
(From AngularJS.org)
Angular JS with MVC Frameworks | Page 6
MEAN Stack
Client Request or Display
results for end users
Handle Client or
Server request
Make request to Database
and return response
1. Make Request 2. Parse Request
3. Get Database
4. Return Database
5. Return Request6. Display Request
Retrieve Data
MEAN Stack is full-stack JavaScript Solution for developing fast, robust and maintainable web
applications using Mongo DB, Express, Angular JS and Node JS.
MEAN Stack enables building of organized application, maintain simple and readable open-source
solution.
Angular JS with MVC Frameworks | Page 7
Angular JS with MVC Frameworks and Technologies
PHP Technology
In many Angular JS web applications, each web page is really a single-page application (SPA), so the
role of the server-side is really an API consisting of a set of web services to interact with the server-side
databases. The web application created with Angular JS will have master detail structure consisting of
two pages such as Master (list of items) and Detail (item).
Database
Media or Image
Folder
CSS
Angular JS
Framework
Frontend Apache Server
MVC Framework
(Yii, CakePHP, etc.)
Items can be edited and saved in the details screen. Limited editing of items can be done in the master
screen. The application structure was built starting from the Angular-seed project with two pages at the
root as list.html and index.html. Each page was a SPA with separate services for interacting with server-
side for the pages respectively.
Angular JS with MVC Frameworks | Page 8
ROR Technology
Angular JS is the client side Java Script Framework whereas Ruby on Rails is server side application
framework but both the framework works based on MVC design pattern. The main key aspect of Angular
JS is that all client side data manipulations used for various User Interface Use Cases such as Lists, Refine
Search, and Graphical Data Representation etc. were provided to the user as Single Page Application.
Building the Single-Page Applications (SPA) using Angular JS and Ruby on Rail is a two-step process:
first we need to create a JSON API in Rails and then use that API in the JavaScript application.
HTML
CSS
VIEW MODEL
CONTROLLER
Javascript
Angular JS API
USER
Model (M) Controller (C)
View (V)
API Request (AJAX)
Database
JSON Data
The Angular JS Controllers interact with RAILS Controllers. The object data from the RAILS Model (M) is
passed to the Angular JS Controllers via Rails Controller(C) using Restful API services. The view part of
the application is the Angular JS framework in MVC design pattern, dropping the View in Rails.
This way the true potential of Angular JS is utilized for building the Single Page Application and Rails is
capitalized for its server side implementation using its Models and Controllers. The layers interact using
Restful JSON API services.
Angular JS with MVC Frameworks | Page 9
.Net Technology
In Single-Page Applications (SPAs), entire page is loaded in browser after initial request but subsequent
interactions take place through AJAX requests. This means that browser has to update only the portion
of the page that has changed; there is no need to reload the entire page. The SPA approach reduces
the time taken by the application to respond to user actions, resulting in more fluid experience.
The architecture of a SPA involves certain challenges that are not present in traditional web applications.
However, emerging technologies like ASP.NET Web API, JavaScript frameworks like Angular JS and new
styling features provided by CSS3 make it really easy to design and build SPAs through:
Create an ASP.NET Web API service to send and receive JSON data
Create a responsive UI using Angular JS
Enhance the UI experience with CSS3 transformations
HTML Rendering
jQuery + AJAX
ASP.Net MVC
HTML Rendering
Templating
(ng-view, directives, interpolation)
ASP.Net MVC + Angular JS
Routing
($route)
Client
View Request
(Dynamic View)
API Request
(AJAX)
Routing Engine Media Type Formatters
Response
(JSON)
View Engine
HTML Content
Controller
Controller
Dispatch
Model Data
Server
Angular JS with MVC Frameworks | Page 10
Java Technology
View Layer
Controller Layer
Manager Layer
Service Layer
Data Access object Layer
Database
Struts Action Layer
Angular JS is Modern, Sophisticated JavaScript Framework for building rich HTML applications. Here we
demonstrates how to test client-side code and integrate front-end logic with Spring-powered REST
controllers. Angular JS allows developer to specify custom and reusable HTML tags that moderate
behavior of certain elements these attributes are called ‘Directives’. Example: ng-app, ng-model etc.
Through Angular JS with Java (Springs/Struts/Hibernate), Application can be divided into five sub-tasks:
Application-util (Simple Java Classes)
Application-services (Hibernate + Springs)
Application-commons (POJO classes)
Application-apis (Spring Controllers)
Application-app (Angular JS + Struts + Spring)
Angular JS with MVC Frameworks | Page 11
Summary
The Angular JS which is deviated from the classical Java-script development, uses or introduces a new
paradigms for the development methodologies. Angular JS is the wise choose for those who need
comprehensive all-in-one solution with 2-way data binding and in-built directives or filters which will
allow teams to develop applications rapidly. This allows users to write less code, but note that Angular
requires significant effort and time to learn. It has good test integration, which is really useful.
Template
View
Model
Compile
Continuous updates model in
single source of truth
Change to view
updates model
Change to Model
updates View
Maturity: Angular JS have a stable API and it’s in application development for more than 2 decades.
Also provides support through good documentation and examples and huge community.
Size: Angular JS deployment scope is huge and makes the application fully functional and suitable for
mobile applications by limiting the size.
Out of the box solution: Angular JS is packed with lot of features so that a user has enough tools to
get going. It comes with Directives and Filters (custom and in-built). It has good support for module
dependencies and injections, along with services and factories which become reusable parts for apps.
Two-way data binding: Angular JS provides two way data binding upfront and reduces the complexity
to a large extent. User has to write less code which helps it make less error-prone.
Opinionated Development: Angular JS is strongly opinionated-implementation which are to be done
in the "Angular way", for example, angular.fromJSON
Interoperability: Angular JS work well with different technologies. Also Angular JS encourage
developers not to use libraries such as JQuery, but provides a subset jqLite.
Templating using HTML: Angular JS uses HTML to define the app's UI. Angular JS has an advantage
because HTML is intuitive and less convoluted compared to JavaScript for defining UI, but it forces the
UI developer to understand both HTML and Angular JS well to be productive.
Data Storage: Angular JS uses a manual method which accommodate different servers and can be
adapted to different server-side technologies.
Angular JS with MVC Frameworks | Page 12
About Optisol Business SolutionsAbout Optisol Business Solutions
Optisol is proficient service provider for Social, Mobile, Analytics and Cloud solutions and focusing on
building innovation for our clients in more than 20 countries. With 90+ smart employees, we act as the
reliable outsourcing services partner, providing optimized business solutions with delivery excellence to both
small and medium enterprises worldwide. Through our services on Consulting, Solutions, Mobility, Cloud
Computing and Big Data, we assist our clients to transform and thrive in a changing world.
We are equipped with creative engagement models and operations framework that suits outsourcing needs
from all gamut of customers – startup, Independent Software Vendor (ISV), small or mid-size companies and
Enterprises. It has been serving its customer base across breadth and width of technology outsourcing needs
that spans across
#87/4, Arcot Road, Vadapalani,
Chennai - 600026, Tamilnadu, India
Communicate with us…
Phone: +91 44 42136061 (India)
+1415-233-4737 | +1908-838-0191 (USA)
info@optisolbusiness.com | www.optisolbusiness.com

More Related Content

What's hot

AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
Maurice De Beijer [MVP]
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
Dima Maleev
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
Rishu Mehra
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
ejjavies
 
Edwin John.net
Edwin John.netEdwin John.net
Edwin John.net
Edwin John
 

What's hot (20)

Oracle ADF Overview for Beginners
Oracle ADF Overview for BeginnersOracle ADF Overview for Beginners
Oracle ADF Overview for Beginners
 
AngularJS = Browser applications on steroids
AngularJS = Browser applications on steroidsAngularJS = Browser applications on steroids
AngularJS = Browser applications on steroids
 
Resume
ResumeResume
Resume
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Mt ADF 001 adf-course outlines
Mt ADF 001 adf-course outlinesMt ADF 001 adf-course outlines
Mt ADF 001 adf-course outlines
 
Angular resolver tutorial
Angular resolver tutorialAngular resolver tutorial
Angular resolver tutorial
 
Angular js
Angular jsAngular js
Angular js
 
New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
 
Top Factors to Determine the Right Development Option In Between Angular & VueJS
Top Factors to Determine the Right Development Option In Between Angular & VueJSTop Factors to Determine the Right Development Option In Between Angular & VueJS
Top Factors to Determine the Right Development Option In Between Angular & VueJS
 
Angular JS training institute in Jaipur
           Angular JS training institute in Jaipur           Angular JS training institute in Jaipur
Angular JS training institute in Jaipur
 
uppada_kishore_resume (1)
uppada_kishore_resume (1)uppada_kishore_resume (1)
uppada_kishore_resume (1)
 
Angular JS, steal the idea
Angular JS, steal the ideaAngular JS, steal the idea
Angular JS, steal the idea
 
Angular webinar - Credo Systemz
Angular webinar - Credo SystemzAngular webinar - Credo Systemz
Angular webinar - Credo Systemz
 
Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010Mvc 4 0_jayant_jindal_28082010
Mvc 4 0_jayant_jindal_28082010
 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
Do You Want To Build Simple Webdynpro ABAP Application? Here It Is?
 
Edwin John.net
Edwin John.netEdwin John.net
Edwin John.net
 
Angular vs react
Angular vs reactAngular vs react
Angular vs react
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 

Viewers also liked (7)

Chandra Sekhar Cheekuru NET UI
Chandra Sekhar Cheekuru  NET UIChandra Sekhar Cheekuru  NET UI
Chandra Sekhar Cheekuru NET UI
 
tomtaila
tomtailatomtaila
tomtaila
 
UI DEVELOPER/ ANGULAR JS
UI DEVELOPER/ ANGULAR JSUI DEVELOPER/ ANGULAR JS
UI DEVELOPER/ ANGULAR JS
 
Amit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JSAmit Kumar Architect with Web and Angular JS
Amit Kumar Architect with Web and Angular JS
 
Mohamed new
Mohamed newMohamed new
Mohamed new
 
Manish Kumar
Manish KumarManish Kumar
Manish Kumar
 
Resume_Vaibhav_Bhargava_New
Resume_Vaibhav_Bhargava_NewResume_Vaibhav_Bhargava_New
Resume_Vaibhav_Bhargava_New
 

Similar to A white paper on Fundamentals and Implementations of Angular JS

Similar to A white paper on Fundamentals and Implementations of Angular JS (20)

The Growing Popularity of AngularJS
The Growing Popularity of AngularJSThe Growing Popularity of AngularJS
The Growing Popularity of AngularJS
 
AngularJS - A JavaScript Framework
AngularJS - A JavaScript FrameworkAngularJS - A JavaScript Framework
AngularJS - A JavaScript Framework
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
Difference Between Angular and AngularJS.pdf
Difference Between Angular and AngularJS.pdfDifference Between Angular and AngularJS.pdf
Difference Between Angular and AngularJS.pdf
 
What You Really Want To Be Aware (2).pptx
What You Really Want To Be Aware (2).pptxWhat You Really Want To Be Aware (2).pptx
What You Really Want To Be Aware (2).pptx
 
AngularJS Anatomy & Directives
AngularJS Anatomy & DirectivesAngularJS Anatomy & Directives
AngularJS Anatomy & Directives
 
Benefits of developing a Single Page Web Applications using AngularJS
Benefits of developing a Single Page Web Applications using AngularJSBenefits of developing a Single Page Web Applications using AngularJS
Benefits of developing a Single Page Web Applications using AngularJS
 
AngularJS Vs ReactJS_ What’s The Difference_.pdf
AngularJS Vs ReactJS_  What’s The Difference_.pdfAngularJS Vs ReactJS_  What’s The Difference_.pdf
AngularJS Vs ReactJS_ What’s The Difference_.pdf
 
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescriptangularjs-vs-angular-the-key-differences-between-javascript-and-typescript
angularjs-vs-angular-the-key-differences-between-javascript-and-typescript
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
Angular JS
Angular JSAngular JS
Angular JS
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptxangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pptx
 
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdfangularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
angularjs_vs_angular_the_key_differences_between_javascript_and_typescript.pdf
 
Single Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with AngularSingle Page Applications in SharePoint with Angular
Single Page Applications in SharePoint with Angular
 
The Pros and Cons of Angular Development: All You Need to Know
The Pros and Cons of Angular Development: All You Need to KnowThe Pros and Cons of Angular Development: All You Need to Know
The Pros and Cons of Angular Development: All You Need to Know
 
Getting Started with AngularJS
Getting Started with AngularJSGetting Started with AngularJS
Getting Started with AngularJS
 
Angular Vs React Vs Vue.pptx
Angular Vs React Vs Vue.pptxAngular Vs React Vs Vue.pptx
Angular Vs React Vs Vue.pptx
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 

A white paper on Fundamentals and Implementations of Angular JS

  • 1. Angular JS, Super-Heroic JavaScript MVW Framework A white paper on Fundamentals and Implementations of Angular JS with renowned Technology Platforms
  • 2. Angular JS with MVC Frameworks | Page 2 Contents Abstract...................................................................................................................................................3 Overview on Angular JS ..........................................................................................................................4 Core Concepts of Angular JS ...............................................................................................................4 Why Angular JS?..................................................................................................................................5 MEAN Stack Concept ..............................................................................................................................5 Angular JS with MVC Frameworks and Technologies.............................................................................7 PHP Technology ..................................................................................................................................7 ROR Technology..................................................................................................................................8 .Net Technology..................................................................................................................................9 Java Technology................................................................................................................................10 Summary...............................................................................................................................................11 ©2014 Optisol Business Solutions Private Limited. All rights reserved. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose without the written permission of Optisol Business Solutions. Any hard copies of this document are to be regarded as temporary reference copies only.
  • 3. Angular JS with MVC Frameworks | Page 3 Abstract This white paper gives a brief overview of the web development using Angular JS through Single Page Applications (SPA) technologies. The document also illustrates at high level on how to use Angular JS with legacy technologies such as PHP, .Net, Ruby on Rails (ROR) and Java. The major driving factor for client side script is the complexity to maintain the business logic in the browser and trade off with a thin loading. As more and more logic ends up being executed in the browser, front-end code bases grow larger and more difficult to maintain. To solve this issue, developers have been turning to client-side MVC frameworks, which promise increased productivity and maintainable code. Before moving on to the detailed elaboration of the Angular JS frameworks, it is worth mentioning that JavaScript has become the language of choice for development, especially for client-side development due to following advantages: Instant result with no compile step Rapid Development and great User Interface AJAX - Every web developer knows and adores Angular JS will act as the toolset based on extending the HTML vocabulary for our application. Based on our experience of working on 200+ web application UIs, OptiSol strongly feels that Angular JS stand out in terms of adoption readiness and value proposition. OptiSol is happy to work on this white paper that summarizes the advantages of Angular.JS and how to make it work with other legacy programing languages. The document also shares a high level overview about MEAN stack This whitepaper is intended for beginners and business level users and will be informative for advanced users.
  • 4. Angular JS with MVC Frameworks | Page 4 Overview on Angular JS Angular JS – a Super Heroic JavaScript Framework which provides Complete Client-Side Solution. Angular JS is the Client Side Browser App framework supported and maintained by Google The emergence of Angular JS coincides with the need for single page application development. The single page web applications provides more fluid user experience as Desktop Application Increase the browser based application with MVC (Model, View and Controller) which makes the development and testing process simple and quick The static HTML pages are transformed to process the dynamic content through 2-way binding for automatic synchronization of models and views. Provides robust, testable and flexible application with Professional Programming Practice and browser compactible. Implements the MVC pattern i.e., Model Object Oriented Design on the client side for uniquely conceptualizing the core factors of presentation, data and logic components. Provides structure for building application starting from UI Design, Business Logic till testing Process.  Everything you need to build a CRUD app in a cohesive set: data-binding, basic templates, directives, form validation, routing, deep-linking, reusable components, dependency injection.  Testability story: unit-testing, end-to-end testing, mocks, test harnesses.  Seed application with directory layout and test scripts as a starting point. Core Concepts of Angular JS Templates Module BasedBootstrapping 2-way Data Binding Dependency Injection Routing Directives Unit Test
  • 5. Angular JS with MVC Frameworks | Page 5 Why Angular JS? Address Some Problems in Software Architecture  Angular JS has ng-resource to create services that hook up to REST APIs and return back that object in JSON and fully functional object.  Angular JS encourages to also deal with models on client side just like on the server side. Enable to Create Software quickly with Less Effort  Angular JS provide ng-model and ng-class directives to cover common operations and allows 2-way data binding and saving to the server.  Reduces the code Result in Software is more Maintainable  Angular JS encourages using the model object oriented design on the client-side  Object oriented design principle ensure software is more maintainable compared to procedural. Improve Testability of Software  Angular JS provides dependency injection at its core making flexible testing Encourage Good Programming Practices  Features like Model, dependency injection and ability to create directives lends to reusable and shareable components  REST API connection to server and benefits through Angular JS usage (From AngularJS.org)
  • 6. Angular JS with MVC Frameworks | Page 6 MEAN Stack Client Request or Display results for end users Handle Client or Server request Make request to Database and return response 1. Make Request 2. Parse Request 3. Get Database 4. Return Database 5. Return Request6. Display Request Retrieve Data MEAN Stack is full-stack JavaScript Solution for developing fast, robust and maintainable web applications using Mongo DB, Express, Angular JS and Node JS. MEAN Stack enables building of organized application, maintain simple and readable open-source solution.
  • 7. Angular JS with MVC Frameworks | Page 7 Angular JS with MVC Frameworks and Technologies PHP Technology In many Angular JS web applications, each web page is really a single-page application (SPA), so the role of the server-side is really an API consisting of a set of web services to interact with the server-side databases. The web application created with Angular JS will have master detail structure consisting of two pages such as Master (list of items) and Detail (item). Database Media or Image Folder CSS Angular JS Framework Frontend Apache Server MVC Framework (Yii, CakePHP, etc.) Items can be edited and saved in the details screen. Limited editing of items can be done in the master screen. The application structure was built starting from the Angular-seed project with two pages at the root as list.html and index.html. Each page was a SPA with separate services for interacting with server- side for the pages respectively.
  • 8. Angular JS with MVC Frameworks | Page 8 ROR Technology Angular JS is the client side Java Script Framework whereas Ruby on Rails is server side application framework but both the framework works based on MVC design pattern. The main key aspect of Angular JS is that all client side data manipulations used for various User Interface Use Cases such as Lists, Refine Search, and Graphical Data Representation etc. were provided to the user as Single Page Application. Building the Single-Page Applications (SPA) using Angular JS and Ruby on Rail is a two-step process: first we need to create a JSON API in Rails and then use that API in the JavaScript application. HTML CSS VIEW MODEL CONTROLLER Javascript Angular JS API USER Model (M) Controller (C) View (V) API Request (AJAX) Database JSON Data The Angular JS Controllers interact with RAILS Controllers. The object data from the RAILS Model (M) is passed to the Angular JS Controllers via Rails Controller(C) using Restful API services. The view part of the application is the Angular JS framework in MVC design pattern, dropping the View in Rails. This way the true potential of Angular JS is utilized for building the Single Page Application and Rails is capitalized for its server side implementation using its Models and Controllers. The layers interact using Restful JSON API services.
  • 9. Angular JS with MVC Frameworks | Page 9 .Net Technology In Single-Page Applications (SPAs), entire page is loaded in browser after initial request but subsequent interactions take place through AJAX requests. This means that browser has to update only the portion of the page that has changed; there is no need to reload the entire page. The SPA approach reduces the time taken by the application to respond to user actions, resulting in more fluid experience. The architecture of a SPA involves certain challenges that are not present in traditional web applications. However, emerging technologies like ASP.NET Web API, JavaScript frameworks like Angular JS and new styling features provided by CSS3 make it really easy to design and build SPAs through: Create an ASP.NET Web API service to send and receive JSON data Create a responsive UI using Angular JS Enhance the UI experience with CSS3 transformations HTML Rendering jQuery + AJAX ASP.Net MVC HTML Rendering Templating (ng-view, directives, interpolation) ASP.Net MVC + Angular JS Routing ($route) Client View Request (Dynamic View) API Request (AJAX) Routing Engine Media Type Formatters Response (JSON) View Engine HTML Content Controller Controller Dispatch Model Data Server
  • 10. Angular JS with MVC Frameworks | Page 10 Java Technology View Layer Controller Layer Manager Layer Service Layer Data Access object Layer Database Struts Action Layer Angular JS is Modern, Sophisticated JavaScript Framework for building rich HTML applications. Here we demonstrates how to test client-side code and integrate front-end logic with Spring-powered REST controllers. Angular JS allows developer to specify custom and reusable HTML tags that moderate behavior of certain elements these attributes are called ‘Directives’. Example: ng-app, ng-model etc. Through Angular JS with Java (Springs/Struts/Hibernate), Application can be divided into five sub-tasks: Application-util (Simple Java Classes) Application-services (Hibernate + Springs) Application-commons (POJO classes) Application-apis (Spring Controllers) Application-app (Angular JS + Struts + Spring)
  • 11. Angular JS with MVC Frameworks | Page 11 Summary The Angular JS which is deviated from the classical Java-script development, uses or introduces a new paradigms for the development methodologies. Angular JS is the wise choose for those who need comprehensive all-in-one solution with 2-way data binding and in-built directives or filters which will allow teams to develop applications rapidly. This allows users to write less code, but note that Angular requires significant effort and time to learn. It has good test integration, which is really useful. Template View Model Compile Continuous updates model in single source of truth Change to view updates model Change to Model updates View Maturity: Angular JS have a stable API and it’s in application development for more than 2 decades. Also provides support through good documentation and examples and huge community. Size: Angular JS deployment scope is huge and makes the application fully functional and suitable for mobile applications by limiting the size. Out of the box solution: Angular JS is packed with lot of features so that a user has enough tools to get going. It comes with Directives and Filters (custom and in-built). It has good support for module dependencies and injections, along with services and factories which become reusable parts for apps. Two-way data binding: Angular JS provides two way data binding upfront and reduces the complexity to a large extent. User has to write less code which helps it make less error-prone. Opinionated Development: Angular JS is strongly opinionated-implementation which are to be done in the "Angular way", for example, angular.fromJSON Interoperability: Angular JS work well with different technologies. Also Angular JS encourage developers not to use libraries such as JQuery, but provides a subset jqLite. Templating using HTML: Angular JS uses HTML to define the app's UI. Angular JS has an advantage because HTML is intuitive and less convoluted compared to JavaScript for defining UI, but it forces the UI developer to understand both HTML and Angular JS well to be productive. Data Storage: Angular JS uses a manual method which accommodate different servers and can be adapted to different server-side technologies.
  • 12. Angular JS with MVC Frameworks | Page 12 About Optisol Business SolutionsAbout Optisol Business Solutions Optisol is proficient service provider for Social, Mobile, Analytics and Cloud solutions and focusing on building innovation for our clients in more than 20 countries. With 90+ smart employees, we act as the reliable outsourcing services partner, providing optimized business solutions with delivery excellence to both small and medium enterprises worldwide. Through our services on Consulting, Solutions, Mobility, Cloud Computing and Big Data, we assist our clients to transform and thrive in a changing world. We are equipped with creative engagement models and operations framework that suits outsourcing needs from all gamut of customers – startup, Independent Software Vendor (ISV), small or mid-size companies and Enterprises. It has been serving its customer base across breadth and width of technology outsourcing needs that spans across #87/4, Arcot Road, Vadapalani, Chennai - 600026, Tamilnadu, India Communicate with us… Phone: +91 44 42136061 (India) +1415-233-4737 | +1908-838-0191 (USA) info@optisolbusiness.com | www.optisolbusiness.com