0% found this document useful (0 votes)
28 views21 pages

Lecture 7 Web App Frameworks

Uploaded by

fadila
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
28 views21 pages

Lecture 7 Web App Frameworks

Uploaded by

fadila
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 21

Web Application

Framework
Lecture 7
ISM301 – Web Technology and Applications
Web Application Framework

► What does this code do?


► What happens when multiple pages need to connect to database?
► Should a developer really have to worry about printing the Content-type?
► Is this code reusable in multiple environments with different DB connection parameters?
Web Application Framework
► These problems are exactly what a web
frameworks tries to solve
► Web frameworks provides a programming
infrastructure for applications
► Focus on developing code without having to
reinvent the wheel
Web Application Framework
• Web Application Framework or simply “web framework” is a software
framework that is designed to support the development of web
applications including web services, web resources, and web APIs.
• The framework aims to alleviate the overhead associated with common
activities performed in web development
• Frameworks are a special case of software libraries in that they are
reusable abstractions of code wrapped in a well-defined Application
programming interface (API), yet they contain some key distinguishing
features that separate them from normal libraries.
• Many frameworks follow the Model-View-Controller (MVC) design
pattern
• Frameworks help you develop your application faster and smarter!
• There exist dozens of web application frameworks.
Why do we need framework?
• Virtually all web applications have a common set of basic requirements,
such as user management e.g., secure user login, password recovery),
group management, and access authorization.
• A Web Application Framework usually includes all these functionalities,
refined through hundreds of production deployments, freeing
developers to focus on the needs of their specific application.
• In high traffic web application like social sites , registration sites etc., web
frameworks provide excellent support for developing application having
good traffic handling capacity by applying pooling techniques.
• They store important data in a relational database and interact with
users via a web-based user interface.
Framework Pattern
• MVC Design Pattern-:
View is the user interface (e.g. button)
Controller is the code (e.g. call-back for button)
Model is the database Framework Pattern
Web Application Frameworks
• Ruby • PHP
Ruby on Rails  Laravel
• Python  CodeIgniter
Django
• .NET (C#, Visual Basic)
ASP.NET
• JavaScript
Node.js
Express
Angular
• Java
Apache Struts 2
Spring
Ruby on Rails
• Open source web application framework.
• One can develop an application at least ten times faster with Rails than a typical
Java framework.
• Includes everything needed to create a database-driven web application, using
the Model-View-Controller pattern.
• Combination of
dynamic, reflective, object-oriented programming language Ruby
web application framework Rail
• The scaffolding feature offered by Rails can automatically generate some of the
models and views that are required for a website
developer has to run an external command to generate the code
• Websites using Ruby on Rails are GroupOn, UrbanDictionary, AirBnb, Shopify.
• Framework Link: http://rubyonrails.org
Django
• Django is a high-level Python web framework that encourages rapid
development and clean, pragmatic design.
• MVC architectural pattern
• Fast, secure, scalable, and versatile.
• For perfectionist with deadline
• Primary Focus
Dynamic and database driven website
Content based websites
• Websites using Django are Pinterest, Instagram, Quora, etc.
• Framework Link: https://www.djangoproject.com
ASP.NET
• ASP.NET is a framework developed by Microsoft, which helps us to
build robust web applications for PC, as well as mobile devices.
• MVC architectural pattern
• It is a high performance and lightweight framework for building Web
Applications using .NET.
• Can generate some of the client-side JavaScript for you
- form validation
- dynamic updates using Ajax
• Power, Productivity, and Speed.
• Websites using ASP.NET are GettyImages, TacoBell, StackOverflow,
etc.
• Framework Link: http://www.asp.net/
Node.js
• Server-side JavaScript
low-level, comparable to functionality offered by Servlets
handling post/get requests, database, sessions, …
• Write your entire app in one language
however, server-side and client-side code still separated
• Built-in web server (no need for Apache, Tomcat, etc.)
• High modularity
packages can be added for additional functionality (via npm)
• Other more powerful frameworks such as Express.js build on top of
Node.js
Express
• Express or Express.js is a minimal and flexible framework that
provides a robust set of features for web and mobile applications.
• It is relatively minimal meaning many features are available as plugins.
• Express facilitates the rapid development of Node.js based Web
applications.
• Express is also one major component of the MEAN software bundle.
• Websites using Express are Storify, Myspace, LearnBoost, etc.
• Framework Link: http://expressjs.com/
Angular
• Angular is a framework by Google (originally developed by Misko
Hevery and Adam Abrons) which helps us in building powerful Web
Apps.
• It is a framework to build large scale and high-performance web
applications while keeping them as easy-to-maintain.
• Language: JavaScript
• Framework Link: https://angular.io/
• Websites using Angular are Youtube on PS3, Weather, Netflix, etc.
Apache Struts 2
• Free open source framework for creating enterprise- ready Java-based
web applications
• Action-based MVC Model 2 (Pull MVC) framework combining Java
Servlets and JSP technology
• model
- action (basic building blocks) from which the view can pull information via the ValueStack
- action represented by POJO (Plain Old Java Object) following the JavaBean paradigm and
optional helper classes
• view
- template-based approach often based on JavaServer Pages (JSP) in combination with tag
libraries (collection of custom tags)
• controller
- based on Java Servlet filter in combination with interceptors
MVC Model 2 (MVC 2) in Struts 2
Spring
• Spring is the most popular application development framework for
enterprise Java.
• Developers around the globe use Spring to create high performance and
robust Web apps.
• Spring helps in creating simple, portable, fast, and flexible JVM-based
systems and applications.
• Modules
 model-view-controller
 data access
 remote access framework
 transaction management
 authentication and authorisation
• Websites using spring are Mascus, Allocine, etc.
PLAY
• Play is one of the modern web application framework written in Java
and Scala.
• It follows the MVC architecture
• Aims to optimize developer productivity by using convention over
configuration, hot code reloading, and display of errors in the
browser.
• Play quotes itself as “The High-Velocity Web Framework”.
• Websites using PLAY are LinkedIn, Coursera, LendUp, etc.
• Framework Link: https://www.playframework.com/
Laravel
• Laravel is a framework created by Taylor Otwell in 2011 and like all
other modern frameworks, it also follows the MVC architectural
pattern.
• Laravel values Elegance, Simplicity, and Readability.
• Can learn and develop Laravel with Laracasts which has hundreds of
tutorials in it.
• Language: PHP
• Framework Link: https://laravel.com/
• Websites using Laravel are Deltanet Travel, Neighbourhood Lender,
etc.
CodeIgniter
• CodeIgniter, developed by EllisLab, is a famous web application
framework to build dynamic websites.
• Loosely based on MVC architecture since Controller classes are
necessary but models and views are optional.
• Exceptional performance, nearly zero-configuration, and no large-
scale monolithic libraries.
• Language: PHP
• Framework Link: https://codeigniter.com/
• Websites using CodeIgnitor are Bufferapp, The Mail and Guardian,
etc.
Advantages of using a framework
• Reuse of working code that has already been built, tested, and used
by other developers increases reliability and reduces developing time.
• Sufficient tech support. By letting others (the framework) take care of
common issues, like security, internalization, localization, etc., one will
get (free) "outsourcing" from skilled developers.
• Improved efficiency
• Easy scalability
• By upgrading one's framework it might give extra features without
extra implementation..
• Easily afforded
Disadvantage of using a framework
• To be able to use the framework at its best, it often requires
significant knowledge and experience.
• If a bug or a security risk in the framework is found it will affect
applications using the framework. Some frameworks are very stiff and
do not give the developer enough flexibility needed for some
applications.

You might also like