SlideShare une entreprise Scribd logo
1  sur  14
Télécharger pour lire hors ligne
Angular and the ArcGIS API
for JavaScript
Seth Batterby, Esri UK
What am I going to cover?
• Angular
- What is it?
- Why we use it?
• Angular and the ArcGIS API for JavaScript
- Using the Esri loader
- Using Exclude and Require
- Esri webpack plugin
Esri UK Annual Conference 2018 | London
Angular – What is it?
• An open source web development framework
• Its more than just a framework!
- Develop across platforms
- End to end tooling
- Templating
- Routing
- Components
Esri UK Annual Conference 2018 | London
Angular – Why do we use it?
• Well suited for large and complex applications
• Makes it easy to implement complex requirements
• Write code in TypeScript, cutting down on bugs and errors
• Lots of tools to speed up development
Esri UK Annual Conference 2018 | London
Sweet AppBuilder
Esri UK Annual Conference 2018 | London
• Complex Angular application
• We use a lot of the Angular Framework
- Animations, Components, Reactive
Forms, Routing, Guards, Resolvers
• Use webpack for builds
• ArcGIS API for JS is used throughout
Angular and the ArcGIS API for JavaScript
- The ArcGIS API for JavaScript is written in Dojo
- It’s a large library of AMD modules
- Most module loaders implement AMD differently than Dojo
We need some workarounds to get Angular and the JS API working
together.
Esri UK Annual Conference 2018 | London
esri-loader
- A tiny library to help load modules
- Written and maintained by Esri
- Lets you control when the API is
loaded
- Can use with 3.x or 4.x versions of
the API
Esri UK Annual Conference 2018 | London
esri-loader
• Pros
- Allows for lazy loading modules, when you need them
- Zero configuration
- Can be used with other frameworks
• Cons
- Have to use complicated async patterns and callbacks
- Cant use import statements
Esri UK Annual Conference 2018 | London
Exclude and Require
Provides a slightly higher level of abstraction
There's a lot more configuration to handle
1. Configure webpack to exclude Dojo modules
2. Output bundles as AMD
3. Load ArcGIS API for JavaScript via a script tag
4. Use Dojo loader to require the bundles
Esri UK Annual Conference 2018 | London
Exclude and Require
• Pros
- Can use Imports for loading modules
- No need to use Promises or callbacks
• Cons
- Can slow down application startup
- Needs some configuration to get working
Esri UK Annual Conference 2018 | London
Esri webpack Plugin (New)
• Pros
- Same as the Exclude and Require pattern but in a handy plugin!
- Much less configuration needed
- Should be future proof
• Cons
- Only works with ArcGIS API >= v4.7
- Only works with webpack
Esri UK Annual Conference 2018 | London
Summary
- Angular
- Great for building complex applications
- There's a steep learning curve
- Wouldn’t recommend it for small applications
- ArcGIS API for JS
- 3 different patterns for loading
- esri-loader most popular
- New webpack plugin is the future!
Esri UK Annual Conference 2018 | London
Additional Resources
• Tom Wayson: How to load ArcGIS API for JavaScript modules
• Esri loader
- Esri loader repository
• Exclude and Require
- Tom Wayson: Using webpack
- Angular 2 with Esri API and webpack
• Webpack plugin
- Using the new webpack plugin for the ArcGIS API for JavaScript
- Webpack-plugin repository
Esri UK Annual Conference 2018 | London
All About Angular and ArcGIS - Developers Forum - AC18

Contenu connexe

Tendances

Esri Scotland Conf 2016 Web AppBuilder
Esri Scotland Conf 2016   Web AppBuilderEsri Scotland Conf 2016   Web AppBuilder
Esri Scotland Conf 2016 Web AppBuilder
Esri UK
 
Whats New in Serverless - Serverless Meetup AKL
Whats New in Serverless - Serverless Meetup AKLWhats New in Serverless - Serverless Meetup AKL
Whats New in Serverless - Serverless Meetup AKL
Elijah Astley
 
Arc2Earth - ESRI NYC Dev Meetup
Arc2Earth - ESRI NYC Dev MeetupArc2Earth - ESRI NYC Dev Meetup
Arc2Earth - ESRI NYC Dev Meetup
Arc2Earth
 

Tendances (19)

Enhance your maps with arcade - Esri UK
Enhance your maps with arcade - Esri UKEnhance your maps with arcade - Esri UK
Enhance your maps with arcade - Esri UK
 
Get Further by Being Mobile – A Look at Advanced Mobile Techniques in the Arc...
Get Further by Being Mobile – A Look at Advanced Mobile Techniques in the Arc...Get Further by Being Mobile – A Look at Advanced Mobile Techniques in the Arc...
Get Further by Being Mobile – A Look at Advanced Mobile Techniques in the Arc...
 
Introduction to ArcGIS Developer Tools - Smart Development - Esri UK Annual C...
Introduction to ArcGIS Developer Tools - Smart Development - Esri UK Annual C...Introduction to ArcGIS Developer Tools - Smart Development - Esri UK Annual C...
Introduction to ArcGIS Developer Tools - Smart Development - Esri UK Annual C...
 
ArcGIS Developer Program - Smart Development - Esri UK Annual Conference 2017
ArcGIS Developer Program - Smart Development - Esri UK Annual Conference 2017ArcGIS Developer Program - Smart Development - Esri UK Annual Conference 2017
ArcGIS Developer Program - Smart Development - Esri UK Annual Conference 2017
 
Advanced Development Techniques with ArcPy and Python API - Smart Development...
Advanced Development Techniques with ArcPy and Python API - Smart Development...Advanced Development Techniques with ArcPy and Python API - Smart Development...
Advanced Development Techniques with ArcPy and Python API - Smart Development...
 
Esri Scotland Conf 2016 Web AppBuilder
Esri Scotland Conf 2016   Web AppBuilderEsri Scotland Conf 2016   Web AppBuilder
Esri Scotland Conf 2016 Web AppBuilder
 
Whats New in Serverless - Serverless Meetup AKL
Whats New in Serverless - Serverless Meetup AKLWhats New in Serverless - Serverless Meetup AKL
Whats New in Serverless - Serverless Meetup AKL
 
Wonders of GIS
Wonders of GISWonders of GIS
Wonders of GIS
 
Presentation may30th
Presentation may30thPresentation may30th
Presentation may30th
 
AGI Presentation 2013
AGI Presentation 2013AGI Presentation 2013
AGI Presentation 2013
 
Taking Advantage of ArcGIS Online to Push a Mobile Agenda
Taking Advantage of ArcGIS Online to Push a Mobile AgendaTaking Advantage of ArcGIS Online to Push a Mobile Agenda
Taking Advantage of ArcGIS Online to Push a Mobile Agenda
 
Gis without the_box_may2012
Gis without the_box_may2012Gis without the_box_may2012
Gis without the_box_may2012
 
Arc2Earth - ESRI NYC Dev Meetup
Arc2Earth - ESRI NYC Dev MeetupArc2Earth - ESRI NYC Dev Meetup
Arc2Earth - ESRI NYC Dev Meetup
 
Taking Advantage of ArcGIS Online to Push a Mobile Agenda (Esri UC 2013 Edition)
Taking Advantage of ArcGIS Online to Push a Mobile Agenda (Esri UC 2013 Edition)Taking Advantage of ArcGIS Online to Push a Mobile Agenda (Esri UC 2013 Edition)
Taking Advantage of ArcGIS Online to Push a Mobile Agenda (Esri UC 2013 Edition)
 
Getting to Know ArcGIS Pro
Getting to Know ArcGIS ProGetting to Know ArcGIS Pro
Getting to Know ArcGIS Pro
 
Ai lifecycle and navigator
Ai lifecycle and navigatorAi lifecycle and navigator
Ai lifecycle and navigator
 
Imagery Bundles for ArcGIS
 Imagery Bundles for ArcGIS Imagery Bundles for ArcGIS
Imagery Bundles for ArcGIS
 
GraphQL API on a Serverless Environment
GraphQL API on a Serverless EnvironmentGraphQL API on a Serverless Environment
GraphQL API on a Serverless Environment
 
React Native+Expoで作るARアプリ
React Native+Expoで作るARアプリReact Native+Expoで作るARアプリ
React Native+Expoで作るARアプリ
 

Similaire à All About Angular and ArcGIS - Developers Forum - AC18

SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
Sébastien Levert
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
Sébastien Levert
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
Sébastien Levert
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
Sébastien Levert
 

Similaire à All About Angular and ArcGIS - Developers Forum - AC18 (20)

SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Twin Cities - SharePoint Framework, Angular & Azure Funct...
 
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Vancouver - SharePoint Framework, Angular and Azure Funct...
 
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure FunctionsSharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
SharePoint Fest DC - SharePoint Framework, Angular and Azure Functions
 
Angular 2
Angular 2Angular 2
Angular 2
 
Angular2.0@Shanghai0319
Angular2.0@Shanghai0319Angular2.0@Shanghai0319
Angular2.0@Shanghai0319
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
Angular, ASP.NET Core, and Visual Studio Code - Oh My!
Angular, ASP.NET Core, and Visual Studio Code - Oh My!Angular, ASP.NET Core, and Visual Studio Code - Oh My!
Angular, ASP.NET Core, and Visual Studio Code - Oh My!
 
Building CI from scratch
Building CI from scratchBuilding CI from scratch
Building CI from scratch
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
 
Esriuk_track6_java_script unleashed
Esriuk_track6_java_script unleashedEsriuk_track6_java_script unleashed
Esriuk_track6_java_script unleashed
 
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр ШевнинAzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
AzovDevMeetup 2016 | Angular 2: обзор | Александр Шевнин
 
React or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework DevelopmentReact or Angular and SharePoint Framework Development
React or Angular and SharePoint Framework Development
 
Angular.ppt
Angular.pptAngular.ppt
Angular.ppt
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Angular vs React vs Vue
Angular vs React vs VueAngular vs React vs Vue
Angular vs React vs Vue
 
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platformIntroducing ASP.NET vNext - A tour of the new ASP.NET platform
Introducing ASP.NET vNext - A tour of the new ASP.NET platform
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
Ionic vancouver 201604
Ionic vancouver 201604Ionic vancouver 201604
Ionic vancouver 201604
 
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure FunctionsEuropean Collaboration Summit - SharePoint Framework Angular & Azure Functions
European Collaboration Summit - SharePoint Framework Angular & Azure Functions
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 

Plus de Esri UK

Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
Update on ArcGIS Online for Schools - Smart Education - Schools - AC18Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
Esri UK
 

Plus de Esri UK (20)

Welsh Conference 2023 - The Road Ahead
Welsh Conference 2023 - The Road AheadWelsh Conference 2023 - The Road Ahead
Welsh Conference 2023 - The Road Ahead
 
Welsh Conference 2023 Opening Plenary
Welsh Conference 2023 Opening PlenaryWelsh Conference 2023 Opening Plenary
Welsh Conference 2023 Opening Plenary
 
Solving sustainability challenges with geospatial information
Solving sustainability challenges with geospatial informationSolving sustainability challenges with geospatial information
Solving sustainability challenges with geospatial information
 
Streamlining the design and operation of infrastructure in Wales
Streamlining the design and operation of infrastructure in WalesStreamlining the design and operation of infrastructure in Wales
Streamlining the design and operation of infrastructure in Wales
 
Ecological monitoring in Wales: data capture in the ERAMMP field survey
Ecological monitoring in Wales: data capture in the ERAMMP field surveyEcological monitoring in Wales: data capture in the ERAMMP field survey
Ecological monitoring in Wales: data capture in the ERAMMP field survey
 
Planning a brighter future with a GIS of the World
Planning a brighter future with a GIS of the WorldPlanning a brighter future with a GIS of the World
Planning a brighter future with a GIS of the World
 
Help create a national walking network
Help create a national walking networkHelp create a national walking network
Help create a national walking network
 
Bringing ArcGIS spatial analysis to bear on IoT data
Bringing ArcGIS spatial analysis to bear on IoT dataBringing ArcGIS spatial analysis to bear on IoT data
Bringing ArcGIS spatial analysis to bear on IoT data
 
How climate data can help address the climate challenge
How climate data can help address the climate challengeHow climate data can help address the climate challenge
How climate data can help address the climate challenge
 
Esri UK Road Ahead Welsh Conference
Esri UK Road Ahead Welsh ConferenceEsri UK Road Ahead Welsh Conference
Esri UK Road Ahead Welsh Conference
 
GIS Under the Radar - Smart Education - Higher - AC18
GIS Under the Radar - Smart Education - Higher - AC18GIS Under the Radar - Smart Education - Higher - AC18
GIS Under the Radar - Smart Education - Higher - AC18
 
Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
Update on ArcGIS Online for Schools - Smart Education - Schools - AC18Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
Update on ArcGIS Online for Schools - Smart Education - Schools - AC18
 
Knowing Your Place - Smart Education - Schools - AC18
Knowing Your Place - Smart Education - Schools - AC18Knowing Your Place - Smart Education - Schools - AC18
Knowing Your Place - Smart Education - Schools - AC18
 
TACP - Cycling Jersey with ArcGIS - Analytical Insights - Esri UK Annual Conf...
TACP - Cycling Jersey with ArcGIS - Analytical Insights - Esri UK Annual Conf...TACP - Cycling Jersey with ArcGIS - Analytical Insights - Esri UK Annual Conf...
TACP - Cycling Jersey with ArcGIS - Analytical Insights - Esri UK Annual Conf...
 
TfL - How GIS is Helping to Deliver Healthy Streets for Londoners - Enterpris...
TfL - How GIS is Helping to Deliver Healthy Streets for Londoners - Enterpris...TfL - How GIS is Helping to Deliver Healthy Streets for Londoners - Enterpris...
TfL - How GIS is Helping to Deliver Healthy Streets for Londoners - Enterpris...
 
Highways England - Improved Road Scheme Planning - Smart Infrastructure - Esr...
Highways England - Improved Road Scheme Planning - Smart Infrastructure - Esr...Highways England - Improved Road Scheme Planning - Smart Infrastructure - Esr...
Highways England - Improved Road Scheme Planning - Smart Infrastructure - Esr...
 
Mott MacDonald - BIM and the Environment - Smart Infrastructure - Esri UK Ann...
Mott MacDonald - BIM and the Environment - Smart Infrastructure - Esri UK Ann...Mott MacDonald - BIM and the Environment - Smart Infrastructure - Esri UK Ann...
Mott MacDonald - BIM and the Environment - Smart Infrastructure - Esri UK Ann...
 
GWP - Flood Hazard Mapping for Small Island Developing States using GIS and L...
GWP - Flood Hazard Mapping for Small Island Developing States using GIS and L...GWP - Flood Hazard Mapping for Small Island Developing States using GIS and L...
GWP - Flood Hazard Mapping for Small Island Developing States using GIS and L...
 
ONS - Leaving No-one Behind - Data in Action - Esri UK Annual Conference 2018
ONS - Leaving No-one Behind - Data in Action - Esri UK Annual Conference 2018ONS - Leaving No-one Behind - Data in Action - Esri UK Annual Conference 2018
ONS - Leaving No-one Behind - Data in Action - Esri UK Annual Conference 2018
 
The Environment Agency - Improving Incident Response - Collaborative Working ...
The Environment Agency - Improving Incident Response - Collaborative Working ...The Environment Agency - Improving Incident Response - Collaborative Working ...
The Environment Agency - Improving Incident Response - Collaborative Working ...
 

Dernier

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Dernier (20)

Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 

All About Angular and ArcGIS - Developers Forum - AC18

  • 1. Angular and the ArcGIS API for JavaScript Seth Batterby, Esri UK
  • 2. What am I going to cover? • Angular - What is it? - Why we use it? • Angular and the ArcGIS API for JavaScript - Using the Esri loader - Using Exclude and Require - Esri webpack plugin Esri UK Annual Conference 2018 | London
  • 3. Angular – What is it? • An open source web development framework • Its more than just a framework! - Develop across platforms - End to end tooling - Templating - Routing - Components Esri UK Annual Conference 2018 | London
  • 4. Angular – Why do we use it? • Well suited for large and complex applications • Makes it easy to implement complex requirements • Write code in TypeScript, cutting down on bugs and errors • Lots of tools to speed up development Esri UK Annual Conference 2018 | London
  • 5. Sweet AppBuilder Esri UK Annual Conference 2018 | London • Complex Angular application • We use a lot of the Angular Framework - Animations, Components, Reactive Forms, Routing, Guards, Resolvers • Use webpack for builds • ArcGIS API for JS is used throughout
  • 6. Angular and the ArcGIS API for JavaScript - The ArcGIS API for JavaScript is written in Dojo - It’s a large library of AMD modules - Most module loaders implement AMD differently than Dojo We need some workarounds to get Angular and the JS API working together. Esri UK Annual Conference 2018 | London
  • 7. esri-loader - A tiny library to help load modules - Written and maintained by Esri - Lets you control when the API is loaded - Can use with 3.x or 4.x versions of the API Esri UK Annual Conference 2018 | London
  • 8. esri-loader • Pros - Allows for lazy loading modules, when you need them - Zero configuration - Can be used with other frameworks • Cons - Have to use complicated async patterns and callbacks - Cant use import statements Esri UK Annual Conference 2018 | London
  • 9. Exclude and Require Provides a slightly higher level of abstraction There's a lot more configuration to handle 1. Configure webpack to exclude Dojo modules 2. Output bundles as AMD 3. Load ArcGIS API for JavaScript via a script tag 4. Use Dojo loader to require the bundles Esri UK Annual Conference 2018 | London
  • 10. Exclude and Require • Pros - Can use Imports for loading modules - No need to use Promises or callbacks • Cons - Can slow down application startup - Needs some configuration to get working Esri UK Annual Conference 2018 | London
  • 11. Esri webpack Plugin (New) • Pros - Same as the Exclude and Require pattern but in a handy plugin! - Much less configuration needed - Should be future proof • Cons - Only works with ArcGIS API >= v4.7 - Only works with webpack Esri UK Annual Conference 2018 | London
  • 12. Summary - Angular - Great for building complex applications - There's a steep learning curve - Wouldn’t recommend it for small applications - ArcGIS API for JS - 3 different patterns for loading - esri-loader most popular - New webpack plugin is the future! Esri UK Annual Conference 2018 | London
  • 13. Additional Resources • Tom Wayson: How to load ArcGIS API for JavaScript modules • Esri loader - Esri loader repository • Exclude and Require - Tom Wayson: Using webpack - Angular 2 with Esri API and webpack • Webpack plugin - Using the new webpack plugin for the ArcGIS API for JavaScript - Webpack-plugin repository Esri UK Annual Conference 2018 | London