SlideShare a Scribd company logo
Javascript
From beginning to modern
Written By:
Prem Narain
History
JavaScript, not to be confused with Java, was created in 10 days in May 1995 by Brendan Eich, then working
at Netscape and now of Mozilla.
JavaScript was not always known as JavaScript: the original name was Mocha, a name chosen by Marc
Andreessen, founder of Netscape. In September of 1995 the name was changed to LiveScript, then in
December of the same year, upon receiving a trademark license from Sun, the name JavaScript was
adopted.
In 1996 - 1997 JavaScript was taken to ECMA to carve out a standard specification, which other browser
vendors could then implement based on the work done at Netscape.
In July of 2008 the disparate parties on either side came together in Oslo. This led to the eventual agreement
in early 2009 to rename ECMAScript 3.1 to ECMAScript 5 and drive the language forward using an agenda
that is known as Harmony.
2
Introduction
Javascript can be used as Client side either or Server side scripting language.
Javascript
Server Side
Javascript
Client Side
Javascript
3
Client Side Scripting
Client side scripting is used when the user's browser already has all the code and the page is altered on
the basis of the user's input.
Client side javascript comprises the basic language and predefined objects which are relevant to running
java script in a browser. The client side javascript is embedded directly by in the HTML pages. This script
is interpreted by the browser at run time.
Client side scripting cannot be used to connect to the databases on the web server.
Client side scripting can’t access the filesystem that resides at the web server.
Response from a client-side script is faster as compared to a server-side script because the scripts are
processed on the local computer.
Best client side javascript frameworks are :
Angular.js,Ember.js,React.js,Aurelia.js,Backbone.js,Reactive.js,POOF.js,Mercury.js etc
4
Server Side Scripting
Server-side scripting is a technique used in web development which involves employing scripts on a web
server which produce a response customized for each user's (client's) request to the website. The
alternative is for the web server itself to deliver a static web page. Scripts can be written in any of a
number of server-side scripting languages that are available.
Server side scripting is used to create dynamic pages based a number of conditions when the user's
browser makes a request to the server.
Server executes server-side scripts to send out a page but it does not execute client-side scripts.
Server-side JavaScript (SSJS) refers to JavaScript that runs on server-side and is therefore not
downloaded to the browser.
The first implementation of SSJS was Netscape's LiveWire, which was included in their Enterprise Server
2.0 back in 1996.
Examples are Node.js,Express.js,Total.js,Silk.js,Ejscript,Wakanda,Helma,etc.
5
Design Pattern and its Benefits
A pattern is a reusable solution that can be applied to commonly occurring problems in software design-
in our case - in writing JavaScript web applications. Another way of looking at patterns are as templates
for how we solve problems - ones which can be used in quite a few different situations.
A design pattern is a reusable software solution.
Patterns can be easily reused: A pattern usually reflects an out of the box solution that can be adapted
to suit our own needs. This feature makes them quite robust.
Patterns can be expressive: When we look at a pattern there’s generally a set structure and
vocabulary to the solution presented that can help express rather large solutions quite elegantly.
Design patterns are advanced object-oriented solutions to commonly occurring software problems.
Patterns exemplify a level of sophistication that can provide both performance boosts and reduction of
excess memory usage.
6
Structure Of Design Pattern
A pattern is initially presented in the form of a rule that establishes a relationship between:
A context
A system of forces that arises in that context and
A configuration that allows these forces to resolve themselves in context
A design pattern should have a:
Pattern name and a description.
Context outline – the contexts in which the pattern is effective in responding to the users needs.
Problem statement – a statement of the problem being addressed so we can understand the intent of
the pattern.
Solution – a description of how the user’s problem is being solved in an understandable list of steps
and perceptions. 7
Types of Design Patterns
Creational patterns focus on ways to create objects or classes. This may sound simple (and it is in some
cases), but large applications need to control the object creation process.Like Builder Pattern,Prototype
Pattern,Abstract, Prototype, Singleton .
Structural design patterns focus on ways to manage relationships between objects so that your
application is architected in a scalable way. A key aspect of structural patterns is to ensure that a
change in one part of your application does not affect all other parts.Like Composite Pattern,Facade
Pattern,Flyweight, Adapter and Proxy.
Behavioral patterns focus on communication between objects.Like Observer Pattern,Mediator
Pattern,Observer and Visitor.
8
Javascript MV* Patterns
There are three different patterns which are
● MVC (Model,View,Controller)
● MVP (Model,View,Presenter)
● MVVM (Model,View,ViewModel)
9
MVC and MVP
These design patterns are about separation of concerns:
Model: captures the business entities and business logic
for manipulating the entities. Model may be supported
with a service-oriented architecture. In that case, the
model may capture the client logic to interact with
various services.
View: captures the presentation and interaction logic of
individual screens. A particular view may be constructed
with a hierarchy of sub views.
Controller or presenter: captures the gluing logic that
would coordinate views and models to support the end-to-
end scenarios.Presenter does not control traffic like
Controller.
10
The major difference between MVC and MVP is that, in MVC, models and views can be directly bound; in
contrast, in MVP, models and views are not directly bound. Therefore, in MVC, a view can directly render from
the provided models in response to the initiation or changes. In contrast, in MVP, the presenter will be
responsible for getting data from the models to update the view in response to the initiation or changes. As
illustrated in the diagram, in MVC, views are coupled with the models; and yet, in MVP, the views are
separated from the models.
MVP is generally used most often in enterprise-level applications where it's necessary to reuse as much
presentation logic as possible. Applications with very complex views and a great deal of user interaction may
find that MVC doesn't quite fit the bill here as solving this problem may mean heavily relying on multiple
controllers. In MVP, all of this complex logic can be encapsulated in a presenter, which can simplify
maintenance greatly.
Depending on the implementation, MVP may be more easy to automatically unit test than MVC. The reason
often cited for this is that the presenter can be used as a complete mock of the user-interface and so it can be
unit tested independent of other components
11
MVC vs MVP
MVP vs MVVM
MVVM was originally defined by
Microsoft for use with Windows
Presentation Foundation (WPF) and
Silverlight, having been officially
announced in 2005 by John Grossman in
a blog post about Avalon (the codename
for WPF). It also found some popularity in
the Adobe Flex community as an
alternative to simply using MVC.
In recent years, MVVM has been
implemented in JavaScript in the form of
structural frameworks such as Knockout
JS, Kendo MVVM and Knockback.js, with
an overall positive response from the
community.
12
MVVM
A viewmodel in MVVM is a special type of presenter. The view model often has properties that directly
reflect the fields in the view. The properties and the fields stay in sync. Such synchronization is often
implemented with with some sort of observer framework.
Pros:MVVM Facilitates easier parallel development of a UI and the building blocks that power it.The
ViewModel can be easier to unit test than event-driven code.The ViewModel (being more Model than View)
can be tested without concerns of UI automation and interaction.
Cons:For simpler UIs, MVVM can be overkill.Whilst data-bindings can be declarative and nice to work
with, they can be harder to debug than imperative code where we simply set breakpoints.In larger
applications, it can be more difficult to design the ViewModel up front to get the necessary amount of
generalization.
13
14

More Related Content

What's hot

Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
Mudasir Qazi
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
rainynovember12
 
MVVM
MVVMMVVM
Slide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern ConceptSlide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern Concept
Bayu Wijaya Permana Putra
 
MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)
Yaroslav Voloshyn
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
Abhishek Yadav
 
MVC
MVCMVC
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
Gaurav Arora
 
IntroductionToMVC
IntroductionToMVCIntroductionToMVC
IntroductionToMVC
Akhil Mittal
 
MVVM Lights
MVVM LightsMVVM Lights
MVVM Lights
Denis Voituron
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
InnovationM
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
InnovationM
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
InnovationM
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
Wayne Tun Myint
 
ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
Dev Raj Gautam
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
Mike Melusky
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
Toushik Paul
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
Jitendra Kumar
 
MVVM In Use
MVVM In UseMVVM In Use
MVVM In Use
Chris Charabaruk
 
Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
Yury Kisliak
 

What's hot (20)

Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
Model View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In AspnetModel View Presenter (MVP) In Aspnet
Model View Presenter (MVP) In Aspnet
 
MVVM
MVVMMVVM
MVVM
 
Slide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern ConceptSlide Presentation of MVP Pattern Concept
Slide Presentation of MVP Pattern Concept
 
MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)MVx patterns in iOS (MVC, MVP, MVVM)
MVx patterns in iOS (MVC, MVP, MVVM)
 
MVC Seminar Presantation
MVC Seminar PresantationMVC Seminar Presantation
MVC Seminar Presantation
 
MVC
MVCMVC
MVC
 
Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1Asp net mvc series for beginers part 1
Asp net mvc series for beginers part 1
 
IntroductionToMVC
IntroductionToMVCIntroductionToMVC
IntroductionToMVC
 
MVVM Lights
MVVM LightsMVVM Lights
MVVM Lights
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
 
Model View Presenter For Android
Model View Presenter For AndroidModel View Presenter For Android
Model View Presenter For Android
 
Why MVC?
Why MVC?Why MVC?
Why MVC?
 
ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines  ASP .NET MVC Introduction & Guidelines
ASP .NET MVC Introduction & Guidelines
 
Building xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvmBuilding xamarin.forms apps with prism and mvvm
Building xamarin.forms apps with prism and mvvm
 
A report on mvc using the information
A report on mvc using the informationA report on mvc using the information
A report on mvc using the information
 
Architectural Design Pattern: Android
Architectural Design Pattern: AndroidArchitectural Design Pattern: Android
Architectural Design Pattern: Android
 
MVVM In Use
MVVM In UseMVVM In Use
MVVM In Use
 
Mvc, mvp, mvvm...
Mvc, mvp, mvvm...Mvc, mvp, mvvm...
Mvc, mvp, mvvm...
 

Similar to Javascript from beginning to modern

Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
RapidValue
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
Pedro Melo Pereira
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
Puguh Rismadi
 
Month 2 report
Month 2 reportMonth 2 report
Month 2 report
PRIYANKA FNU
 
AngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web ApplicationsAngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web Applications
Idexcel Technologies
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
People Strategists
 
Top 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web DevelopmentTop 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web Development
Technostacks Infotech Pvt. Ltd.
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
Lanate Drummond
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
CrimsonpublishersPRSP
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
JohnTaieb
 
Best JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptxBest JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptx
Codenance
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Concetto Labs
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
RajkumarJangid7
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
QuickwayInfoSystems3
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
75waytechnologies
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
naral
 
Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?
Mike Brown
 

Similar to Javascript from beginning to modern (20)

Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
Choosing the Right HTML5 Framework to Build your Mobile Web Application White...
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
 
Learning Single page Application chapter 1
Learning Single page Application chapter 1Learning Single page Application chapter 1
Learning Single page Application chapter 1
 
Month 2 report
Month 2 reportMonth 2 report
Month 2 report
 
AngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web ApplicationsAngularJS - A Powerful Framework For Web Applications
AngularJS - A Powerful Framework For Web Applications
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Top 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web DevelopmentTop 10 Javascript Frameworks For Easy Web Development
Top 10 Javascript Frameworks For Easy Web Development
 
A Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing EssayA Brief Note On Asp.Net And Cloud Computing Essay
A Brief Note On Asp.Net And Cloud Computing Essay
 
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
MVC Architecture: A Detailed Insight to the Modern Web Applications Developme...
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Best JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptxBest JavaScript Frameworks for Web Development in 2023.pptx
Best JavaScript Frameworks for Web Development in 2023.pptx
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
 
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
Mvc vs mvp vs mvvm  a guide on architecture presentation patternsMvc vs mvp vs mvvm  a guide on architecture presentation patterns
Mvc vs mvp vs mvvm a guide on architecture presentation patterns
 
Javascript frameworks
Javascript frameworksJavascript frameworks
Javascript frameworks
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptxWhat Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
What Are The Benefits Of Using MVC Framework In ASP.NET Development.pptx
 
5 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 20225 Powerful Backend Frameworks for Web App Development in 2022
5 Powerful Backend Frameworks for Web App Development in 2022
 
MVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,MobileMVC(Model View Controller),Web,Enterprise,Mobile
MVC(Model View Controller),Web,Enterprise,Mobile
 
Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?Avigma Tech LLC- Why the MVC pattern so popular?
Avigma Tech LLC- Why the MVC pattern so popular?
 

Recently uploaded

Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Tatiana Kojar
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 

Recently uploaded (20)

Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...
 
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 

Javascript from beginning to modern

  • 1. Javascript From beginning to modern Written By: Prem Narain
  • 2. History JavaScript, not to be confused with Java, was created in 10 days in May 1995 by Brendan Eich, then working at Netscape and now of Mozilla. JavaScript was not always known as JavaScript: the original name was Mocha, a name chosen by Marc Andreessen, founder of Netscape. In September of 1995 the name was changed to LiveScript, then in December of the same year, upon receiving a trademark license from Sun, the name JavaScript was adopted. In 1996 - 1997 JavaScript was taken to ECMA to carve out a standard specification, which other browser vendors could then implement based on the work done at Netscape. In July of 2008 the disparate parties on either side came together in Oslo. This led to the eventual agreement in early 2009 to rename ECMAScript 3.1 to ECMAScript 5 and drive the language forward using an agenda that is known as Harmony. 2
  • 3. Introduction Javascript can be used as Client side either or Server side scripting language. Javascript Server Side Javascript Client Side Javascript 3
  • 4. Client Side Scripting Client side scripting is used when the user's browser already has all the code and the page is altered on the basis of the user's input. Client side javascript comprises the basic language and predefined objects which are relevant to running java script in a browser. The client side javascript is embedded directly by in the HTML pages. This script is interpreted by the browser at run time. Client side scripting cannot be used to connect to the databases on the web server. Client side scripting can’t access the filesystem that resides at the web server. Response from a client-side script is faster as compared to a server-side script because the scripts are processed on the local computer. Best client side javascript frameworks are : Angular.js,Ember.js,React.js,Aurelia.js,Backbone.js,Reactive.js,POOF.js,Mercury.js etc 4
  • 5. Server Side Scripting Server-side scripting is a technique used in web development which involves employing scripts on a web server which produce a response customized for each user's (client's) request to the website. The alternative is for the web server itself to deliver a static web page. Scripts can be written in any of a number of server-side scripting languages that are available. Server side scripting is used to create dynamic pages based a number of conditions when the user's browser makes a request to the server. Server executes server-side scripts to send out a page but it does not execute client-side scripts. Server-side JavaScript (SSJS) refers to JavaScript that runs on server-side and is therefore not downloaded to the browser. The first implementation of SSJS was Netscape's LiveWire, which was included in their Enterprise Server 2.0 back in 1996. Examples are Node.js,Express.js,Total.js,Silk.js,Ejscript,Wakanda,Helma,etc. 5
  • 6. Design Pattern and its Benefits A pattern is a reusable solution that can be applied to commonly occurring problems in software design- in our case - in writing JavaScript web applications. Another way of looking at patterns are as templates for how we solve problems - ones which can be used in quite a few different situations. A design pattern is a reusable software solution. Patterns can be easily reused: A pattern usually reflects an out of the box solution that can be adapted to suit our own needs. This feature makes them quite robust. Patterns can be expressive: When we look at a pattern there’s generally a set structure and vocabulary to the solution presented that can help express rather large solutions quite elegantly. Design patterns are advanced object-oriented solutions to commonly occurring software problems. Patterns exemplify a level of sophistication that can provide both performance boosts and reduction of excess memory usage. 6
  • 7. Structure Of Design Pattern A pattern is initially presented in the form of a rule that establishes a relationship between: A context A system of forces that arises in that context and A configuration that allows these forces to resolve themselves in context A design pattern should have a: Pattern name and a description. Context outline – the contexts in which the pattern is effective in responding to the users needs. Problem statement – a statement of the problem being addressed so we can understand the intent of the pattern. Solution – a description of how the user’s problem is being solved in an understandable list of steps and perceptions. 7
  • 8. Types of Design Patterns Creational patterns focus on ways to create objects or classes. This may sound simple (and it is in some cases), but large applications need to control the object creation process.Like Builder Pattern,Prototype Pattern,Abstract, Prototype, Singleton . Structural design patterns focus on ways to manage relationships between objects so that your application is architected in a scalable way. A key aspect of structural patterns is to ensure that a change in one part of your application does not affect all other parts.Like Composite Pattern,Facade Pattern,Flyweight, Adapter and Proxy. Behavioral patterns focus on communication between objects.Like Observer Pattern,Mediator Pattern,Observer and Visitor. 8
  • 9. Javascript MV* Patterns There are three different patterns which are ● MVC (Model,View,Controller) ● MVP (Model,View,Presenter) ● MVVM (Model,View,ViewModel) 9
  • 10. MVC and MVP These design patterns are about separation of concerns: Model: captures the business entities and business logic for manipulating the entities. Model may be supported with a service-oriented architecture. In that case, the model may capture the client logic to interact with various services. View: captures the presentation and interaction logic of individual screens. A particular view may be constructed with a hierarchy of sub views. Controller or presenter: captures the gluing logic that would coordinate views and models to support the end-to- end scenarios.Presenter does not control traffic like Controller. 10
  • 11. The major difference between MVC and MVP is that, in MVC, models and views can be directly bound; in contrast, in MVP, models and views are not directly bound. Therefore, in MVC, a view can directly render from the provided models in response to the initiation or changes. In contrast, in MVP, the presenter will be responsible for getting data from the models to update the view in response to the initiation or changes. As illustrated in the diagram, in MVC, views are coupled with the models; and yet, in MVP, the views are separated from the models. MVP is generally used most often in enterprise-level applications where it's necessary to reuse as much presentation logic as possible. Applications with very complex views and a great deal of user interaction may find that MVC doesn't quite fit the bill here as solving this problem may mean heavily relying on multiple controllers. In MVP, all of this complex logic can be encapsulated in a presenter, which can simplify maintenance greatly. Depending on the implementation, MVP may be more easy to automatically unit test than MVC. The reason often cited for this is that the presenter can be used as a complete mock of the user-interface and so it can be unit tested independent of other components 11 MVC vs MVP
  • 12. MVP vs MVVM MVVM was originally defined by Microsoft for use with Windows Presentation Foundation (WPF) and Silverlight, having been officially announced in 2005 by John Grossman in a blog post about Avalon (the codename for WPF). It also found some popularity in the Adobe Flex community as an alternative to simply using MVC. In recent years, MVVM has been implemented in JavaScript in the form of structural frameworks such as Knockout JS, Kendo MVVM and Knockback.js, with an overall positive response from the community. 12
  • 13. MVVM A viewmodel in MVVM is a special type of presenter. The view model often has properties that directly reflect the fields in the view. The properties and the fields stay in sync. Such synchronization is often implemented with with some sort of observer framework. Pros:MVVM Facilitates easier parallel development of a UI and the building blocks that power it.The ViewModel can be easier to unit test than event-driven code.The ViewModel (being more Model than View) can be tested without concerns of UI automation and interaction. Cons:For simpler UIs, MVVM can be overkill.Whilst data-bindings can be declarative and nice to work with, they can be harder to debug than imperative code where we simply set breakpoints.In larger applications, it can be more difficult to design the ViewModel up front to get the necessary amount of generalization. 13
  • 14. 14

Editor's Notes

  1. Written By: Prem Narain