18
RAD with MEAN A New Approach to Application Development

Rapid Application Development with MEAN Stack

Embed Size (px)

DESCRIPTION

Benefits of adopting MEAN stack (Mongo DB, ExpressJS, AngularJS and NodeJS) for application development A scalable todo list application has been developed using the MEAN stack in a weekend (15hrs) to explore the benefits and speed of development claims A comparison between traditional Software Development Lifecycle vs the new approach with MEAN stack

Citation preview

Page 1: Rapid Application Development with MEAN Stack

RAD with MEAN

A New Approach to

Application Development

Page 2: Rapid Application Development with MEAN Stack

We are a bunch of nerds who love technology and problem solving

Our Mission is to:

• Identify the problem that customer is trying to solve• Help choose the best approach for his situation• Solve the problem with in the iron triangle constraints• Have Fun doing all the above steps

We challenged ourselves to build a TODO application over a weekend with two of the most talked about full stack technologies

After analyzing the results and code extensibility, we picked a winner

Page 3: Rapid Application Development with MEAN Stack

• Business has an idea that needs to be market tested without having to spend a million dollars in development cost

• Traditional SDLCs take considerable story writing, planning, design, development, testing and stabilization efforts

• Also any change will mean all the above phases. Traditional application or product development approach is not very forgiving when it comes to changing requirements

• We need an approach where we can create a mobile ready web application in a short amount of time and still be very flexible in changing it without impacting existing data or having to do significant code refactor in all layers

• New approach we are proposing here will allow developers to build in small chunks, test and validate with business and customers before building next chunk and the cost of changing the design or architecture at any point is negligible

• We need something which enables businesses to decide as late as possible and development team to deliver as fast as possible

New Approach vs Traditional

Page 4: Rapid Application Development with MEAN Stack

An App in a Weekend

• Mobile ready, works on small / big screens

• User can have his todo list displayed + ability to add/remove/modify items

• User can Assign priorities and due dates to the items

• User can sort his list using due date or priority

• User can mark an entry as completed

• Every client operation is done using JavaScript, reloading the page is not an option (for future offline capabilities)

• RESTful API which will allow a third-party application to trigger actions on this app (same actions available on the webpage)

• Ability to pass credentials to both the webpage and the API

• Ability to create users in the system via an interface, a signup/register screen

Page 5: Rapid Application Development with MEAN Stack

Login Screen

Page 6: Rapid Application Development with MEAN Stack

Rest Services

Page 7: Rapid Application Development with MEAN Stack

Signup Screen

Sign Up Screen | Client side validations | Server side validations

Page 8: Rapid Application Development with MEAN Stack

TODO Screen

Page 9: Rapid Application Development with MEAN Stack

TODO ScreenTask updated in DB as soon as user checks it on client

Page 10: Rapid Application Development with MEAN Stack

Edit Mode

Page 11: Rapid Application Development with MEAN Stack

Validations

Page 12: Rapid Application Development with MEAN Stack

Usability on phone

Page 13: Rapid Application Development with MEAN Stack

Add Male/Female flag to User.profile

• Add drop down in SignUp screen and VO – 30mins

• Add flag to User schema in db.js – 10mins

Add ability to update/delete existing user

• Add link from TODOs, new save & delete buttons, add $resource.put & delete – 2hrs

• Add Rest put and delete methods in services.js– 30mins

• Unit Testing – 20mins

Add two fields to Tasks collection (table)

• Add to schema (existing documents will be intact) – 20mins

• No changes needed to api or service codes -- 0

• Add to New, Edit, and View divs in UI any styling issues– 2hrs

• Unit Testing – 20mins

Is this extensible or just prototype

Page 14: Rapid Application Development with MEAN Stack

“MEAN” stack (or “AMEN” stack ;-)

• Mongo DB– http://www.mongodb.org/

• ExpressJS– http://expressjs.com/

• AngularJS– http://angularjs.org/

• NodeJS– http://nodejs.org/

• Knowledge of JavaScript is the only skill required to code, maintain and extend this application

Page 15: Rapid Application Development with MEAN Stack

Mongo DBhttp://www.mongodb.com/customers/

• eBay: with 250M writes/day, 10M updates, 500M to 1B reads, 2ms (yes, millisecond) response time 24/7/365

• Craigslist: Initial MongoDB deployment was designed to hold over 5 billion documents and 10TB of data

ExpressJShttp://expressjs.com/applications.html

• MySpace

• Yummly

NodeJShttp://nodejs.org/industry/

• Microsoft Azure

• Yahoo

• eBay, Walmart etc…

AngularJS [by Google]

http://builtwith.angularjs.org/

Adoption Risk

Page 16: Rapid Application Development with MEAN Stack

Rapid Development

• The skillset is simple, a developer who understands JavaScript is good to go on all layers, no UI developer vs business layer vs db layer

• Communication between front-end to business to db layer is all happening through JavaScript objects which is the reason for so much gain in development speed

• MongoDB gives us NoSQL speed without constraining us to name value pairs, each document in MongoDB can store information of up to 16MB

• MongoDB’s schema agility allows storage of differently structured documents in same collection. So if the structure of a table has changed, no need to worry about existing data, it will work fine

• ExpressJS and AngularJS abstract and give us most of the common classes that we have to code in all applications so developers write and maintain less code

Page 17: Rapid Application Development with MEAN Stack

Scalable Application

• NodeJS is an event-driven server-side JavaScript environment. Node runs JavaScript using Google Chrome’s V8 Engine which means three very important things

– JavaScript runs extremely fast on Node

– Node can render client side pages on server side for mobile applications when needed or for old browsers which have issue with JS speed on client side

– Node is even-driven which means no threads are required like for Java and .Netapplications, it is more natural multi threaded IO with Node

• MongoDB is one of the best and easy to master horizontally scalable NoSQL database around. Sharding with MongoDB is very easy and its document model gives us schema agility which is a super power in app development world

Page 18: Rapid Application Development with MEAN Stack

If traditional application development is not working for you anymore and you are thinking of alternative approaches, we can help you

Feel free to contact us