SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Single Page Applications
Mónica Rodrigues
26/05/2017
Who am I?
26/05/2017Single Page Applications Mónica Rodrigues
Mónica Rodrigues
Degree in Computer Science Engineer at ISEL
Software Engineer since 2010
Keywords: Web Applications, ASP.NET MVC, ASP.NET Web Api, REST, Javascript,
Angular, Best practices, Design patterns, Clean Code, SQL Server
Contents
26/05/2017Single Page Applications Mónica Rodrigues
 What is SPA?
 Motivations / Considerations
 Multiple Page Applications vs Single Page Applications
 Frameworks Javascript / SPA Samples
 What I need to begin?
 Best practices / Recommendations
First page – Long time ago
26/05/2017Single Page Applications Mónica Rodrigues
Today
26/05/2017Single Page Applications Mónica Rodrigues
Challenge
26/05/2017Single Page Applications Mónica Rodrigues
Users want a central place to view or take
actions on most or all content so they don’t
have to waste time navigating between pages.
Solution
26/05/2017Single Page Applications Mónica Rodrigues
Go to a SPA
Solution
26/05/2017Single Page Applications Mónica Rodrigues
Use modern web development techniques to build a single-page app that doesn’t need to reload itself as
the user browses through it.
SPASingle Page Application
Motivations
26/05/2017Single Page Applications Mónica Rodrigues
Reach
Web app may be accessible on different platforms and devices
Round trip
Web app not require many round trips between client and server
Better user experience
Separation of responsibilities between client and server
Considerations
26/05/2017Single Page Applications Mónica Rodrigues
 The first time that the application loads is slow
 Maintain Navigation, Deep linking and History
 SEO (Search engine optimization) is complicated
Multiple page application
26/05/2017Single Page Applications Mónica Rodrigues
Page access
Returns
rendered page
Page
rendering
Single page application
26/05/2017Single Page Applications Mónica Rodrigues
Requests data
Returns data
DOM processing
and
manipulation
SPA and Multiple Page Application (Mix)
26/05/2017Single Page Applications Mónica Rodrigues
Products Page
Mini
SPA
Categories Page
Mini
SPA
Request Data
Request Data
Response Data
Response Data
Some Javascript Frameworks and Libraries
26/05/2017Single Page Applications Mónica Rodrigues
SPA Samples
26/05/2017Single Page Applications Mónica Rodrigues
What I need to begin?
26/05/2017Single Page Applications Mónica Rodrigues
 Choose a framework or library
 Depends, what do you want to do?
 Choose a IDE and structure your folders
 Think about your application, namely HTML structure and CSS
 Lets start with Javascript 
 Don’t forget the best practices !!!!
Recomendations
26/05/2017Single Page Applications Mónica Rodrigues
 Best practices in Javascript
 Join and minify CSS files and Javascript files
 Use a task runner like Gulp
 Learn MVVM pattern
App.js
App-users-controller.js
site.min.js
Javascript Patterns
26/05/2017Single Page Applications Mónica Rodrigues
 Functions as abstractions
 Functions to build modules
 Functions to avoid global variables
Functions as abstractions
26/05/2017Single Page Applications Mónica Rodrigues
Functions to build modules
26/05/2017Single Page Applications Mónica Rodrigues
Revealing module
pattern
Functions to build modules
26/05/2017Single Page Applications Mónica Rodrigues
 What’s the matter with previous code?
 There are two global variables
 worker
 createWorker
 There variables can be redefined in other files
Functions to avoid global variables
26/05/2017Single Page Applications Mónica Rodrigues
Reduce to 1 global
variable
But, how can I get 0
global variables?
Functions to avoid global variables
26/05/2017Single Page Applications Mónica Rodrigues
Thank You!
26/05/2017Single Page Applications Mónica Rodrigues
Mónica Rodrigues
Email: monica85rodrigues@gmail.com
Blog: http://mrodiguesblog.azurewebsites.net/
@Monica85Rodrig
https://pt.linkedin.com/in/monicascrodrigues
https://github.com/monica85rodrigues

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

node.js in action
node.js in actionnode.js in action
node.js in action
 
Building WordPress sites with AngularJS and the RESTful plugin JSON API
Building WordPress sites with AngularJS and the RESTful plugin JSON APIBuilding WordPress sites with AngularJS and the RESTful plugin JSON API
Building WordPress sites with AngularJS and the RESTful plugin JSON API
 
Single page application and Framework
Single page application and FrameworkSingle page application and Framework
Single page application and Framework
 
Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014
Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014
Building Single-page Web Applications with AngularJS @ TechCamp Sai Gon 2014
 
Getting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmetaGetting SEO performance in Angular Meteor with ngmeta
Getting SEO performance in Angular Meteor with ngmeta
 
Using WordPress as a Headless CMS
Using WordPress as a Headless CMSUsing WordPress as a Headless CMS
Using WordPress as a Headless CMS
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Web technologies practical guide
Web technologies practical guideWeb technologies practical guide
Web technologies practical guide
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
Single Page Application presentation
Single Page Application presentationSingle Page Application presentation
Single Page Application presentation
 
Sexy React Stack
Sexy React StackSexy React Stack
Sexy React Stack
 
End to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJSEnd to-End SPA Development Using ASP.NET and AngularJS
End to-End SPA Development Using ASP.NET and AngularJS
 
Building great spa’s with angular js, asp.net mvc and webapi
Building great spa’s with angular js, asp.net mvc and webapiBuilding great spa’s with angular js, asp.net mvc and webapi
Building great spa’s with angular js, asp.net mvc and webapi
 
Mean stack
Mean stackMean stack
Mean stack
 
Jquery
JqueryJquery
Jquery
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?
 
Building JavaScript Apps for Force.com with EmberJS
Building JavaScript Apps for Force.com with EmberJSBuilding JavaScript Apps for Force.com with EmberJS
Building JavaScript Apps for Force.com with EmberJS
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3Modern Applications With Asp.net Core 5 and Vue JS 3
Modern Applications With Asp.net Core 5 and Vue JS 3
 
MEAN Stack
MEAN Stack MEAN Stack
MEAN Stack
 

Ähnlich wie Iseltech17 - Single Page Applications

[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
Stowarzyszenie Jakości Systemów Informatycznych (SJSI)
 
Asad Rauf CV
Asad Rauf CVAsad Rauf CV
Asad Rauf CV
Asad Rauf
 
MVA Transcript with Certificate - 2017-Jan-27
MVA Transcript with Certificate - 2017-Jan-27MVA Transcript with Certificate - 2017-Jan-27
MVA Transcript with Certificate - 2017-Jan-27
Mohammed Subbirul Muksud
 
Microsoft project (msp) group 6
Microsoft project (msp)  group 6Microsoft project (msp)  group 6
Microsoft project (msp) group 6
Asish Verma
 
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
MongoDB
 

Ähnlich wie Iseltech17 - Single Page Applications (20)

Relax, it's spa time
Relax, it's spa timeRelax, it's spa time
Relax, it's spa time
 
Learn Web Development Online: Best Courses for Beginners
Learn Web Development Online: Best Courses for BeginnersLearn Web Development Online: Best Courses for Beginners
Learn Web Development Online: Best Courses for Beginners
 
MongoDB: Agile Combustion Engine
MongoDB: Agile Combustion EngineMongoDB: Agile Combustion Engine
MongoDB: Agile Combustion Engine
 
ASAS 2015 - Norberto Leite
ASAS 2015 - Norberto LeiteASAS 2015 - Norberto Leite
ASAS 2015 - Norberto Leite
 
7 effective reasons why you should use angular js for mobile app development
7 effective reasons why you should use angular js for mobile app development7 effective reasons why you should use angular js for mobile app development
7 effective reasons why you should use angular js for mobile app development
 
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
[TestWarez 2017] Automated Testing for Common Errors and Difference Recogniti...
 
Asad Rauf CV
Asad Rauf CVAsad Rauf CV
Asad Rauf CV
 
MVA Transcript with Certificate - 2017-Jan-27
MVA Transcript with Certificate - 2017-Jan-27MVA Transcript with Certificate - 2017-Jan-27
MVA Transcript with Certificate - 2017-Jan-27
 
What’s New for IT Professionals in Microsoft® SharePoint® Server 2013 Day 2
What’s New for IT Professionals in Microsoft® SharePoint® Server 2013 Day 2What’s New for IT Professionals in Microsoft® SharePoint® Server 2013 Day 2
What’s New for IT Professionals in Microsoft® SharePoint® Server 2013 Day 2
 
AngularJS : Superheroic Javascript MVW Framework
AngularJS : Superheroic Javascript MVW FrameworkAngularJS : Superheroic Javascript MVW Framework
AngularJS : Superheroic Javascript MVW Framework
 
Case Study: Building the Roadrunner public website site + Bonus: Deep dive bu...
Case Study: Building the Roadrunner public website site + Bonus: Deep dive bu...Case Study: Building the Roadrunner public website site + Bonus: Deep dive bu...
Case Study: Building the Roadrunner public website site + Bonus: Deep dive bu...
 
Microsoft project (msp) group 6
Microsoft project (msp)  group 6Microsoft project (msp)  group 6
Microsoft project (msp) group 6
 
SharePoint for Building Public Facing Websites
SharePoint for Building Public Facing WebsitesSharePoint for Building Public Facing Websites
SharePoint for Building Public Facing Websites
 
Best Practices - By Lofi Dewanto
Best Practices - By Lofi DewantoBest Practices - By Lofi Dewanto
Best Practices - By Lofi Dewanto
 
The Power Of SPA - ISCTE
The Power Of SPA - ISCTEThe Power Of SPA - ISCTE
The Power Of SPA - ISCTE
 
Nitin resume
Nitin resumeNitin resume
Nitin resume
 
The world of enterprise solution development with asp.net and C#
The world of enterprise solution development with asp.net and C#The world of enterprise solution development with asp.net and C#
The world of enterprise solution development with asp.net and C#
 
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
Business Track: Building a Personalized Mobile App Experience Using MongoDB a...
 
Single Page Apps
Single Page AppsSingle Page Apps
Single Page Apps
 
Single page applications with AngularJS
Single page applications with AngularJSSingle page applications with AngularJS
Single page applications with AngularJS
 

Kürzlich hochgeladen

scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
MsecMca
 

Kürzlich hochgeladen (20)

data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 

Iseltech17 - Single Page Applications

  • 1. Single Page Applications Mónica Rodrigues 26/05/2017
  • 2. Who am I? 26/05/2017Single Page Applications Mónica Rodrigues Mónica Rodrigues Degree in Computer Science Engineer at ISEL Software Engineer since 2010 Keywords: Web Applications, ASP.NET MVC, ASP.NET Web Api, REST, Javascript, Angular, Best practices, Design patterns, Clean Code, SQL Server
  • 3. Contents 26/05/2017Single Page Applications Mónica Rodrigues  What is SPA?  Motivations / Considerations  Multiple Page Applications vs Single Page Applications  Frameworks Javascript / SPA Samples  What I need to begin?  Best practices / Recommendations
  • 4. First page – Long time ago 26/05/2017Single Page Applications Mónica Rodrigues
  • 6. Challenge 26/05/2017Single Page Applications Mónica Rodrigues Users want a central place to view or take actions on most or all content so they don’t have to waste time navigating between pages.
  • 7. Solution 26/05/2017Single Page Applications Mónica Rodrigues Go to a SPA
  • 8. Solution 26/05/2017Single Page Applications Mónica Rodrigues Use modern web development techniques to build a single-page app that doesn’t need to reload itself as the user browses through it. SPASingle Page Application
  • 9. Motivations 26/05/2017Single Page Applications Mónica Rodrigues Reach Web app may be accessible on different platforms and devices Round trip Web app not require many round trips between client and server Better user experience Separation of responsibilities between client and server
  • 10. Considerations 26/05/2017Single Page Applications Mónica Rodrigues  The first time that the application loads is slow  Maintain Navigation, Deep linking and History  SEO (Search engine optimization) is complicated
  • 11. Multiple page application 26/05/2017Single Page Applications Mónica Rodrigues Page access Returns rendered page Page rendering
  • 12. Single page application 26/05/2017Single Page Applications Mónica Rodrigues Requests data Returns data DOM processing and manipulation
  • 13. SPA and Multiple Page Application (Mix) 26/05/2017Single Page Applications Mónica Rodrigues Products Page Mini SPA Categories Page Mini SPA Request Data Request Data Response Data Response Data
  • 14. Some Javascript Frameworks and Libraries 26/05/2017Single Page Applications Mónica Rodrigues
  • 15. SPA Samples 26/05/2017Single Page Applications Mónica Rodrigues
  • 16. What I need to begin? 26/05/2017Single Page Applications Mónica Rodrigues  Choose a framework or library  Depends, what do you want to do?  Choose a IDE and structure your folders  Think about your application, namely HTML structure and CSS  Lets start with Javascript   Don’t forget the best practices !!!!
  • 17. Recomendations 26/05/2017Single Page Applications Mónica Rodrigues  Best practices in Javascript  Join and minify CSS files and Javascript files  Use a task runner like Gulp  Learn MVVM pattern App.js App-users-controller.js site.min.js
  • 18. Javascript Patterns 26/05/2017Single Page Applications Mónica Rodrigues  Functions as abstractions  Functions to build modules  Functions to avoid global variables
  • 19. Functions as abstractions 26/05/2017Single Page Applications Mónica Rodrigues
  • 20. Functions to build modules 26/05/2017Single Page Applications Mónica Rodrigues Revealing module pattern
  • 21. Functions to build modules 26/05/2017Single Page Applications Mónica Rodrigues  What’s the matter with previous code?  There are two global variables  worker  createWorker  There variables can be redefined in other files
  • 22. Functions to avoid global variables 26/05/2017Single Page Applications Mónica Rodrigues Reduce to 1 global variable But, how can I get 0 global variables?
  • 23. Functions to avoid global variables 26/05/2017Single Page Applications Mónica Rodrigues
  • 24. Thank You! 26/05/2017Single Page Applications Mónica Rodrigues Mónica Rodrigues Email: monica85rodrigues@gmail.com Blog: http://mrodiguesblog.azurewebsites.net/ @Monica85Rodrig https://pt.linkedin.com/in/monicascrodrigues https://github.com/monica85rodrigues