SlideShare a Scribd company logo
1 of 27
Download to read offline
J O H N F I S C H E L L I - @ J O H N F I S C H E L L I
A P R A C T I C A L L O O K AT Y O U R
F I R S T L A R AV E L / A N G U L A R J S A P P
1
G O A L S F O R T H I S P R E S E N TAT I O N
• Give you the absolute basics on AngularJS
• Show some real life examples of AngularJS

(that are hopefully useful)
• Resources to get you started using AngularJS
yourselves
• Encouragement. (If I can do it, you can to.)
• Teach myself how to give these kinds of talks.
2
Q U A L I F I C AT I O N S ?
3
B U T S R S LY, Q U A L I F I C AT I O N S ?
• Web Developer for ~7 years
• Using Laravel for ~18 months
• Using AngularJS for ~8 months
• Made lots of messy apps with jQuery
• (P.S. I’m not really qualified, but thanks for listening anyway)
4
S O W H Y A N G U L A R J S ?
5
Honestly, I just picked one.
6
W H E N S H O U L D Y O U U S E A N G U L A R J S ?
• if you've ever said that you've built a client-side
application in jQuery
• when you're struggling to keep your app's UI in sync
with whats happening with javascript
7
M V W ( M O D E L , V I E W, W H AT E V E R )
• AngularJS has a router, views and controllers — also
models!
• wait, models typically mean database/server-side, etc.
How does this exist in a client-side app?
• to explain this let's look at an example
8
9
9
9
9
V I E W 

< D I V >
9
V I E W 

< D I V >
R O U T E R 

( J S )
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
C O N T R O L L E R 

( J S )
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
C O N T R O L L E R 

( J S )
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
C O N T R O L L E R 

( J S )
N A M E
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
C O N T R O L L E R 

( J S )
N A M E
E M A I L
9
V I E W 

< D I V >
R O U T E R 

( J S )
H T M L
C O N T R O L L E R 

( J S )
N A M E
E M A I L C O N T R O L L E R 

( J S )
!
N A M E
E M A I L
M O D E L S S I M P L I F I E D
• In a JS client side app, models tend to be the data
that you would post to a server for persistence.
• Models exist inside views (let that sink in).
• Data binding makes getting values to post to the
server really easy.
• It also makes outputting the value of a specific model
really easy. No more $(“#someID”).val();
10
L E T ’ S L O O K AT T H I S A G A I N !
11
T I M E F O R A R E A L - L I F E E X A M P L E !
12
T I M E F O R A R E A L - L I F E E X A M P L E !
12
PA R A D I G M S H I F T S Y O U M U S T M A K E
13
• the server is no longer the single source of truth to
your app
• don't use jQuery with Angular (technically you can)
• jQuery is a crutch that prevents you from doing things
the angular way
• don't muck with the DOM outside of angular! it will
make life harder.
T I P S T O M A K E Y O U R L I F E E A S I E R
• don't use the built-in router -- use the ui-router, its much
more powerful

https://github.com/angular-ui/ui-router
• if you must auth users do it outside of the angular world
— if you must auth in angular use token-based
authorization

https://github.com/tappleby/laravel-auth-token
• Angular has these cool extensions people have written -
like composer packages - use them!
14
R E S O U R C E S T H AT H E L P E D M E
• Intro to Angular JS: https://www.youtube.com/watch?
v=8ILQOFAgaXE
• End to End with AngularJS: https://www.youtube.com/
watch?v=hqAyiqUs93c
• Credit Dave Mosher @dmosher
15
Fin
16

More Related Content

Similar to A practical look at your first laravel angular js app

SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindChris Johnson
 
Functional Reactive with Core Java - Workshop - Slides
Functional Reactive with Core Java - Workshop - SlidesFunctional Reactive with Core Java - Workshop - Slides
Functional Reactive with Core Java - Workshop - SlidesSven Ruppert
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Great Wide Open
 
Using React for the Mobile Web
Using React for the Mobile WebUsing React for the Mobile Web
Using React for the Mobile WebC4Media
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5Dinis Cruz
 
UX? No thanks it just costs more money
UX? No thanks it just costs more moneyUX? No thanks it just costs more money
UX? No thanks it just costs more moneyIIBA UK Chapter
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Manoj Ellappan
 
React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at StripeSashko Stubailo
 
An Introduction to React -- FED Date -- IBM Design
An Introduction to React -- FED Date -- IBM DesignAn Introduction to React -- FED Date -- IBM Design
An Introduction to React -- FED Date -- IBM DesignJosh Black
 
Release Engineering & Rugged DevOps: An Intersection - J. Paul Reed
Release Engineering & Rugged DevOps: An Intersection - J. Paul ReedRelease Engineering & Rugged DevOps: An Intersection - J. Paul Reed
Release Engineering & Rugged DevOps: An Intersection - J. Paul ReedSeniorStoryteller
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet CodeDavid Danzilio
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at ScaleDavid Simons
 
100% Visibility - Jason Yee - Codemotion Amsterdam 2018
100% Visibility - Jason Yee - Codemotion Amsterdam 2018100% Visibility - Jason Yee - Codemotion Amsterdam 2018
100% Visibility - Jason Yee - Codemotion Amsterdam 2018Codemotion
 
Build a production ready PWA with Angular and Firebase
Build a production ready PWA with Angular and FirebaseBuild a production ready PWA with Angular and Firebase
Build a production ready PWA with Angular and FirebaseÖnder Ceylan
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description LanguagesAkana
 

Similar to A practical look at your first laravel angular js app (20)

SharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mindSharePoint Saturday Redmond - Building solutions with the future in mind
SharePoint Saturday Redmond - Building solutions with the future in mind
 
Functional Reactive with Core Java - Workshop - Slides
Functional Reactive with Core Java - Workshop - SlidesFunctional Reactive with Core Java - Workshop - Slides
Functional Reactive with Core Java - Workshop - Slides
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
 
JavaFX Enterprise
JavaFX EnterpriseJavaFX Enterprise
JavaFX Enterprise
 
Using React for the Mobile Web
Using React for the Mobile WebUsing React for the Mobile Web
Using React for the Mobile Web
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5
 
UX? No thanks it just costs more money
UX? No thanks it just costs more moneyUX? No thanks it just costs more money
UX? No thanks it just costs more money
 
Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1Basic iOS Training with SWIFT - Part 1
Basic iOS Training with SWIFT - Part 1
 
React and GraphQL at Stripe
React and GraphQL at StripeReact and GraphQL at Stripe
React and GraphQL at Stripe
 
An Introduction to React -- FED Date -- IBM Design
An Introduction to React -- FED Date -- IBM DesignAn Introduction to React -- FED Date -- IBM Design
An Introduction to React -- FED Date -- IBM Design
 
Release Engineering & Rugged DevOps: An Intersection - J. Paul Reed
Release Engineering & Rugged DevOps: An Intersection - J. Paul ReedRelease Engineering & Rugged DevOps: An Intersection - J. Paul Reed
Release Engineering & Rugged DevOps: An Intersection - J. Paul Reed
 
Meteor WWNRW Intro
Meteor WWNRW IntroMeteor WWNRW Intro
Meteor WWNRW Intro
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code
 
UCLA HACKU'11
UCLA HACKU'11UCLA HACKU'11
UCLA HACKU'11
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at Scale
 
Angular js
Angular jsAngular js
Angular js
 
100% Visibility - Jason Yee - Codemotion Amsterdam 2018
100% Visibility - Jason Yee - Codemotion Amsterdam 2018100% Visibility - Jason Yee - Codemotion Amsterdam 2018
100% Visibility - Jason Yee - Codemotion Amsterdam 2018
 
Build a production ready PWA with Angular and Firebase
Build a production ready PWA with Angular and FirebaseBuild a production ready PWA with Angular and Firebase
Build a production ready PWA with Angular and Firebase
 
SOA Latam 2015
SOA Latam 2015SOA Latam 2015
SOA Latam 2015
 
API Description Languages
API Description LanguagesAPI Description Languages
API Description Languages
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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...apidays
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
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 WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
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 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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 CVKhem
 
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.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 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...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

A practical look at your first laravel angular js app

  • 1. J O H N F I S C H E L L I - @ J O H N F I S C H E L L I A P R A C T I C A L L O O K AT Y O U R F I R S T L A R AV E L / A N G U L A R J S A P P 1
  • 2. G O A L S F O R T H I S P R E S E N TAT I O N • Give you the absolute basics on AngularJS • Show some real life examples of AngularJS
 (that are hopefully useful) • Resources to get you started using AngularJS yourselves • Encouragement. (If I can do it, you can to.) • Teach myself how to give these kinds of talks. 2
  • 3. Q U A L I F I C AT I O N S ? 3
  • 4. B U T S R S LY, Q U A L I F I C AT I O N S ? • Web Developer for ~7 years • Using Laravel for ~18 months • Using AngularJS for ~8 months • Made lots of messy apps with jQuery • (P.S. I’m not really qualified, but thanks for listening anyway) 4
  • 5. S O W H Y A N G U L A R J S ? 5 Honestly, I just picked one.
  • 6. 6
  • 7. W H E N S H O U L D Y O U U S E A N G U L A R J S ? • if you've ever said that you've built a client-side application in jQuery • when you're struggling to keep your app's UI in sync with whats happening with javascript 7
  • 8. M V W ( M O D E L , V I E W, W H AT E V E R ) • AngularJS has a router, views and controllers — also models! • wait, models typically mean database/server-side, etc. How does this exist in a client-side app? • to explain this let's look at an example 8
  • 9. 9
  • 10. 9
  • 11. 9
  • 12. 9 V I E W 
 < D I V >
  • 13. 9 V I E W 
 < D I V > R O U T E R 
 ( J S )
  • 14. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L
  • 15. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L C O N T R O L L E R 
 ( J S )
  • 16. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L C O N T R O L L E R 
 ( J S )
  • 17. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L C O N T R O L L E R 
 ( J S ) N A M E
  • 18. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L C O N T R O L L E R 
 ( J S ) N A M E E M A I L
  • 19. 9 V I E W 
 < D I V > R O U T E R 
 ( J S ) H T M L C O N T R O L L E R 
 ( J S ) N A M E E M A I L C O N T R O L L E R 
 ( J S ) ! N A M E E M A I L
  • 20. M O D E L S S I M P L I F I E D • In a JS client side app, models tend to be the data that you would post to a server for persistence. • Models exist inside views (let that sink in). • Data binding makes getting values to post to the server really easy. • It also makes outputting the value of a specific model really easy. No more $(“#someID”).val(); 10
  • 21. L E T ’ S L O O K AT T H I S A G A I N ! 11
  • 22. T I M E F O R A R E A L - L I F E E X A M P L E ! 12
  • 23. T I M E F O R A R E A L - L I F E E X A M P L E ! 12
  • 24. PA R A D I G M S H I F T S Y O U M U S T M A K E 13 • the server is no longer the single source of truth to your app • don't use jQuery with Angular (technically you can) • jQuery is a crutch that prevents you from doing things the angular way • don't muck with the DOM outside of angular! it will make life harder.
  • 25. T I P S T O M A K E Y O U R L I F E E A S I E R • don't use the built-in router -- use the ui-router, its much more powerful
 https://github.com/angular-ui/ui-router • if you must auth users do it outside of the angular world — if you must auth in angular use token-based authorization
 https://github.com/tappleby/laravel-auth-token • Angular has these cool extensions people have written - like composer packages - use them! 14
  • 26. R E S O U R C E S T H AT H E L P E D M E • Intro to Angular JS: https://www.youtube.com/watch? v=8ILQOFAgaXE • End to End with AngularJS: https://www.youtube.com/ watch?v=hqAyiqUs93c • Credit Dave Mosher @dmosher 15