SlideShare ist ein Scribd-Unternehmen logo
1 von 55
Software Architect
Duncan Hunter
#DuncHunter
• .NET Developer
• Angular specialist
• Rock climber
Join the Conversation #DevSuperPowersIP @DuncHunter
“I want our front end code to be as solid
as our back end code”
6. Will you use a task runner?
5. Bower and NPM vs Nuget?
Agenda
2. Single page app or mini SPAs?
1. Should you use Angular?
3. How to structure your application?
4. Will you use TypeScript or ES6?
7. How will you secure your application?
8. Which 3rd party libraries will you use?
9. How will you get Angular 2.0 ready?
10. How to get and stay up to date?
A brief history of frontend development
1995 - Introduction to JavaScript
1997 - ECMA Script
2002 - XMLHttpRequest (XHR)
2004 - Google Maps - AJAX
2006 - JQuery
2008 - Chrome browser and V8 Engine – The web gets faster
2009 - Nodejs
2010 - Knockout JS
2011 - Angular JS by Google
2015-16 – Angular 2.0 and ES6
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Too much inline JavaScript
No separation of concerns
Poor code reuse
Create less responsive applications
= Difficult to maintain with too many page
refreshes!
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Life before frontend frameworks
Should you use Angular?
Routing
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.1 Complete Solution
MV* structure and guidance
View
ViewModel
Controller & Model
HTML
(template)
DOM
Directives
$Scope POJO
POJO
Controllers
Services
1.1 Complete Solution
Binding data to the DOM is painful
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Two way binding
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.1 Complete Solution
HTML
Controller
Server communication
$http service
$http.get(‘api/getSomething’).then(successCallBack);
$http interceptors
$httpBackend – unit testing
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.1 Complete Solution
Directives – custom components
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.1 Complete Solution
Dependency Injection
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.1 Complete Solution
1.2 Popularity
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.3 Quality Code - designed to be testable
Easy to make unit tests or spec files
ngMock
Great tools
- Protractor, Karma and Jasmine/Mocha
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
SEO based business model
Team experience
You have a simple UI that is easier to scaffold with MVC
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
1.4 When to not use Angular?
Save time and money
= $
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Single page app or mini SPAs
Greenfield
You have an existing API
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
2.1 When to do a full SPA with no MVC?
Existing .NET MVC application
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
2.1 When to do a mini SPA
var exportUrl = '@Url.Action("LegalFormDetailExport")';
How will you structure your
application?
A: The stuff that is difficult to change.
What is architecture?
3.1 Which folder
structure?
vs
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
3.2 Style Guides
Do you use an Angular style guide
Angular 2
None with TypeScript
Excess unnecessary code
Becomes redundant fast
Fast
Existing structure to copy
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
3.3 Why we do not use templates at SSW
Will you use TypeScript or ES6?
Will you use TypeScript or ES6 with Angular 2.0?
What is Typescript
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Typed superset of JavaScript
It compiles to JavaScript
Angular 1.x vs Angular 2.0
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Static types for compile time checking
Tooling – Rename, intellisense, got to definition etc
ES6+ features
Interfaces and non ES6 features
Angular 2.0 ready
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
4.2 At SSW we recommend TypeScript
How strictly you will type things
How to use integrate with 3rd party tools
Steep learning curve
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
4.3 Benefiting from TypeScript
Bower and NPM vs Nuget
Command line tools?
More set up the first time
Latest version
Great tooling for automation
Easy install
More control
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
5.1 Bower and NPM vs Nuget
5.2 At SSW we use these
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
NPM
Bower
Definitely typed package manager
Will you use a task runner like Gulpjs?
We now need a build process for our frontends not
just our backends.
Gulp JS
1. Stream based
2. Code over configuration
3. 1500+ plugins
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
6.1 Gulp versus Grunt
Grunt JS
1. File based
2. Configuration over code
3. 3000+ plugins
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
6.2 Visual Studio task runner explorer
How will you secure your application?
7.1 Angular security can be difficult
With no page refreshes you need tokens vs cookies
Security as a service or build your own?
There are a lot of things to consider
Refresh tokens, mobile apps etc…
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Which third party libraries will you
use?
8.1 At SSW we use
Kendo
Angular UI /Angular strap
Lodash
D3 charting and more
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
How to get Angular 2.0 ready?
Module loading
Less difficult directives
Better performance
Easier mental map
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
What is missing in angular 1.x
Faster
Simpler
Backed by Microsofts TypeScript team
Backed by Googles development team
= Confidence
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
Angular 2.0 improvements
TypeScript with ES6 classes
New router in 1.5 will be the same as 2.0
Components based project structure
Frontend build process with Gulpjs
Componentise your app
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
9.1 How to get AngularJS 2.0 ready
How to get and keep up to speed?
Build on a tested project set up by SSW
On site training
Watch Dev Super Powers
Pluralsight
Angular.io
Egghead.io
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
10.1 Some great resources
2 days of ASP.NET 5 and Angular 2
Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
6. Use GulgJS for your build process
5. Use Bower and NPM vs Nuget
Summary
2. Do SPAs where you can
1. You should you use Angular
3. Take time to get your architecture right
4. Use TypeScript
7. Allow extra time for security
8. Use Kendo, Angular UI and lodash
9. Be Angular 2.0 ready with TypeScript
10. Stay up to date with SSW’s help
“I want our front end code to be as
solid as our back end code”
Thank you!
info@ssw.com.au
www.ssw.com.au
Sydney | Melbourne | Brisbane | Adelaide

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2Trung Vo Tuan
 
Angular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and WorkshopAngular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and WorkshopNitin Bhojwani
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSJonathan Meiss
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Max Klymyshyn
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2INader Debbabi
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JSKenzan
 
AngularJS Vs Angular: Understanding the Differences
AngularJS Vs Angular: Understanding the DifferencesAngularJS Vs Angular: Understanding the Differences
AngularJS Vs Angular: Understanding the DifferencesTechtic Solutions
 
Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs Nir Kaufman
 
Reason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web ApplicationReason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web ApplicationPriyanka Verma
 
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 DevelopmentDarin Dickey
 
Go live with angular 4
Go live with angular 4Go live with angular 4
Go live with angular 4Indra Gunawan
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIJim Lynch
 
Angular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxAngular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxDimcho Tsanov
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?Troy Miles
 
Angular 2 interview questions and answers
Angular 2 interview questions and answersAngular 2 interview questions and answers
Angular 2 interview questions and answersAnil Singh
 
ReactJS or Angular
ReactJS or AngularReactJS or Angular
ReactJS or Angularboyney123
 
Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?TechMagic
 

Was ist angesagt? (20)

Introduction to Angular 2
Introduction to Angular 2Introduction to Angular 2
Introduction to Angular 2
 
Angular 2
Angular 2Angular 2
Angular 2
 
Angular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and WorkshopAngular Meetup 1 - Angular Basics and Workshop
Angular Meetup 1 - Angular Basics and Workshop
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Developing a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2IDeveloping a Demo Application with Angular 4 - J2I
Developing a Demo Application with Angular 4 - J2I
 
Angular, the New Angular JS
Angular, the New Angular JSAngular, the New Angular JS
Angular, the New Angular JS
 
AngularJS Vs Angular: Understanding the Differences
AngularJS Vs Angular: Understanding the DifferencesAngularJS Vs Angular: Understanding the Differences
AngularJS Vs Angular: Understanding the Differences
 
Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs Angular js - 10 reasons to choose angularjs
Angular js - 10 reasons to choose angularjs
 
Reason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web ApplicationReason to choose Angular JS for your Web Application
Reason to choose Angular JS for your Web Application
 
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
 
Go live with angular 4
Go live with angular 4Go live with angular 4
Go live with angular 4
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
 
Angular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFxAngular vs React: Building modern SharePoint interfaces with SPFx
Angular vs React: Building modern SharePoint interfaces with SPFx
 
What is Angular version 4?
What is Angular version 4?What is Angular version 4?
What is Angular version 4?
 
Angular 2 interview questions and answers
Angular 2 interview questions and answersAngular 2 interview questions and answers
Angular 2 interview questions and answers
 
ReactJS or Angular
ReactJS or AngularReactJS or Angular
ReactJS or Angular
 
Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?
 
Angular 2 - Better or worse
Angular 2 - Better or worseAngular 2 - Better or worse
Angular 2 - Better or worse
 
Angular overview
Angular overviewAngular overview
Angular overview
 

Ähnlich wie Angular From The Trenches - 10 Lessons

Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfBig Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfsarah david
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxBig Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxsarah david
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxsarah david
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfquantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfsarah david
 
Software that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsSoftware that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsKlaus Enzenhofer
 
AngularJS Training in Noida
AngularJS Training in NoidaAngularJS Training in Noida
AngularJS Training in NoidaRaj Sharma
 
Boilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessFibonalabs
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.jsSolution Analysts
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.jsSolution Analysts
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigueTobias Braner
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx75waytechnologies
 
Telerik Kendo UI vs. AngularJS
Telerik Kendo UI vs. AngularJSTelerik Kendo UI vs. AngularJS
Telerik Kendo UI vs. AngularJSRainer Stropek
 
Finjs - Angular 2 better faster stronger
Finjs - Angular 2 better faster strongerFinjs - Angular 2 better faster stronger
Finjs - Angular 2 better faster strongerChristoffer Noring
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020Katy Slemon
 
ATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD ApproachATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD ApproachAgile Testing Alliance
 
DevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsDevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsEmmanuel Gomes Brandão
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular applicationSuresh Patidar
 
Agileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarAgileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarRoberto Jr. Figueroa
 

Ähnlich wie Angular From The Trenches - 10 Lessons (20)

Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdfBig Improvement_ New AngularJS Tools Changing How We Develop.pdf
Big Improvement_ New AngularJS Tools Changing How We Develop.pdf
 
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptxBig Improvement_ New AngularJS Tools Changing How We Develop.pptx
Big Improvement_ New AngularJS Tools Changing How We Develop.pptx
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdfquantum_leap_angularjs_tools_redefining_development_in_2023.pdf
quantum_leap_angularjs_tools_redefining_development_in_2023.pdf
 
Software that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay BrusselsSoftware that eats the world! - PerformDay Brussels
Software that eats the world! - PerformDay Brussels
 
AngularJS Training in Noida
AngularJS Training in NoidaAngularJS Training in Noida
AngularJS Training in Noida
 
Boilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development Process
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.js
 
8 tips for mastering node.js
8 tips for mastering node.js8 tips for mastering node.js
8 tips for mastering node.js
 
Angular Js
Angular JsAngular Js
Angular Js
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
8 Node.js Frameworks Every Developer Should Know [UPDATED].pptx
 
Telerik Kendo UI vs. AngularJS
Telerik Kendo UI vs. AngularJSTelerik Kendo UI vs. AngularJS
Telerik Kendo UI vs. AngularJS
 
Finjs - Angular 2 better faster stronger
Finjs - Angular 2 better faster strongerFinjs - Angular 2 better faster stronger
Finjs - Angular 2 better faster stronger
 
Top 11 Front-End Web Development Tools To Consider in 2020
 Top 11 Front-End Web Development Tools To Consider in 2020 Top 11 Front-End Web Development Tools To Consider in 2020
Top 11 Front-End Web Development Tools To Consider in 2020
 
ATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD ApproachATAGTR2017 Protractor Cucumber BDD Approach
ATAGTR2017 Protractor Cucumber BDD Approach
 
Java script framework
Java script frameworkJava script framework
Java script framework
 
DevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOpsDevOps para Open Source com Azure DevOps
DevOps para Open Source com Azure DevOps
 
Web worker in your angular application
Web worker in your angular applicationWeb worker in your angular application
Web worker in your angular application
 
Agileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinarAgileand saas davepatterson_armandofox_050813webinar
Agileand saas davepatterson_armandofox_050813webinar
 

Kürzlich hochgeladen

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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Kürzlich hochgeladen (20)

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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Angular From The Trenches - 10 Lessons

  • 1.
  • 2. Software Architect Duncan Hunter #DuncHunter • .NET Developer • Angular specialist • Rock climber Join the Conversation #DevSuperPowersIP @DuncHunter
  • 3. “I want our front end code to be as solid as our back end code”
  • 4. 6. Will you use a task runner? 5. Bower and NPM vs Nuget? Agenda 2. Single page app or mini SPAs? 1. Should you use Angular? 3. How to structure your application? 4. Will you use TypeScript or ES6? 7. How will you secure your application? 8. Which 3rd party libraries will you use? 9. How will you get Angular 2.0 ready? 10. How to get and stay up to date?
  • 5. A brief history of frontend development 1995 - Introduction to JavaScript 1997 - ECMA Script 2002 - XMLHttpRequest (XHR) 2004 - Google Maps - AJAX 2006 - JQuery 2008 - Chrome browser and V8 Engine – The web gets faster 2009 - Nodejs 2010 - Knockout JS 2011 - Angular JS by Google 2015-16 – Angular 2.0 and ES6 Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 6. Too much inline JavaScript No separation of concerns Poor code reuse Create less responsive applications = Difficult to maintain with too many page refreshes! Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan Life before frontend frameworks
  • 7. Should you use Angular?
  • 8. Routing Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.1 Complete Solution
  • 9. MV* structure and guidance View ViewModel Controller & Model HTML (template) DOM Directives $Scope POJO POJO Controllers Services 1.1 Complete Solution
  • 10. Binding data to the DOM is painful Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 11. Two way binding Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.1 Complete Solution HTML Controller
  • 12. Server communication $http service $http.get(‘api/getSomething’).then(successCallBack); $http interceptors $httpBackend – unit testing Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.1 Complete Solution
  • 13. Directives – custom components Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.1 Complete Solution
  • 14. Dependency Injection Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.1 Complete Solution
  • 15. 1.2 Popularity Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 16. 1.3 Quality Code - designed to be testable Easy to make unit tests or spec files ngMock Great tools - Protractor, Karma and Jasmine/Mocha Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 17. SEO based business model Team experience You have a simple UI that is easier to scaffold with MVC Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 1.4 When to not use Angular?
  • 18. Save time and money = $ Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 19. Single page app or mini SPAs
  • 20. Greenfield You have an existing API Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 2.1 When to do a full SPA with no MVC?
  • 21. Existing .NET MVC application Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 2.1 When to do a mini SPA var exportUrl = '@Url.Action("LegalFormDetailExport")';
  • 22. How will you structure your application?
  • 23. A: The stuff that is difficult to change. What is architecture?
  • 24. 3.1 Which folder structure? vs Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 25. Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 26. 3.2 Style Guides Do you use an Angular style guide
  • 27. Angular 2 None with TypeScript Excess unnecessary code Becomes redundant fast Fast Existing structure to copy Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 3.3 Why we do not use templates at SSW
  • 28. Will you use TypeScript or ES6?
  • 29. Will you use TypeScript or ES6 with Angular 2.0?
  • 30. What is Typescript Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan Typed superset of JavaScript It compiles to JavaScript
  • 31. Angular 1.x vs Angular 2.0 Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 32. Static types for compile time checking Tooling – Rename, intellisense, got to definition etc ES6+ features Interfaces and non ES6 features Angular 2.0 ready Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 4.2 At SSW we recommend TypeScript
  • 33. How strictly you will type things How to use integrate with 3rd party tools Steep learning curve Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 4.3 Benefiting from TypeScript
  • 34. Bower and NPM vs Nuget
  • 35. Command line tools? More set up the first time Latest version Great tooling for automation Easy install More control Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 5.1 Bower and NPM vs Nuget
  • 36. 5.2 At SSW we use these Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan NPM Bower Definitely typed package manager
  • 37. Will you use a task runner like Gulpjs?
  • 38. We now need a build process for our frontends not just our backends.
  • 39. Gulp JS 1. Stream based 2. Code over configuration 3. 1500+ plugins Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 6.1 Gulp versus Grunt Grunt JS 1. File based 2. Configuration over code 3. 3000+ plugins
  • 40. Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 6.2 Visual Studio task runner explorer
  • 41. How will you secure your application?
  • 42. 7.1 Angular security can be difficult With no page refreshes you need tokens vs cookies Security as a service or build your own? There are a lot of things to consider Refresh tokens, mobile apps etc… Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 43. Which third party libraries will you use?
  • 44. 8.1 At SSW we use Kendo Angular UI /Angular strap Lodash D3 charting and more Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 45. How to get Angular 2.0 ready?
  • 46. Module loading Less difficult directives Better performance Easier mental map Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan What is missing in angular 1.x
  • 47. Faster Simpler Backed by Microsofts TypeScript team Backed by Googles development team = Confidence Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan Angular 2.0 improvements
  • 48. TypeScript with ES6 classes New router in 1.5 will be the same as 2.0 Components based project structure Frontend build process with Gulpjs Componentise your app Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 9.1 How to get AngularJS 2.0 ready
  • 49. How to get and keep up to speed?
  • 50. Build on a tested project set up by SSW On site training Watch Dev Super Powers Pluralsight Angular.io Egghead.io Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan 10.1 Some great resources
  • 51.
  • 52. 2 days of ASP.NET 5 and Angular 2 Join the Conversation #DevSuperPowersIP @DuncHunter @AdamCogan
  • 53. 6. Use GulgJS for your build process 5. Use Bower and NPM vs Nuget Summary 2. Do SPAs where you can 1. You should you use Angular 3. Take time to get your architecture right 4. Use TypeScript 7. Allow extra time for security 8. Use Kendo, Angular UI and lodash 9. Be Angular 2.0 ready with TypeScript 10. Stay up to date with SSW’s help
  • 54. “I want our front end code to be as solid as our back end code”
  • 55. Thank you! info@ssw.com.au www.ssw.com.au Sydney | Melbourne | Brisbane | Adelaide

Hinweis der Redaktion

  1. This is the talk I wish someone gave me when we started with Angular at SSW
  2. This is actually me in Jervis Bay south of Sydney Follow me on twitter
  3. This is my goal for this presentation which Adam thinks is a very ambitious goal
  4. Approx. 45min for the 10 qu and the Q&A
  5. Lets start with a walk down memory lane
  6. TODO: Add spaghetti code image
  7. Because it is not always yes or is it?
  8. Angular really is a big html compiler at its core The HTML drive angular to instantiate your angular code It will compile your html looking for key attribute ng-app Then it looks for ng-controller and reads its value so main Angular will then go looking for your controller main Then it looks for every element like a button click Another example is the {{}} double curlies Another example is a directive to combine logic and html for example a menu
  9. This is an example of how I would might show a message box with Jquery in an MVC application
  10. This shows you how much more structured your code is in Angular vs mvc
  11. TODO: show image of history in browser TODO: One page a view TODO: Discuss more about routing any alternatives in other frameworks
  12. TODO: show image of history in browser TODO: One page a view TODO: Discuss more about routing any alternatives in other frameworks
  13. Helps with code reuse, and unit testing your application and make development on the front end a real pleasure to write and read.
  14. Dominate the frontend space Google use it and so many companies have vested interest it is not going any where
  15. Angular started as a testing tool Karma and protractor
  16. Faster and more enjoyable for the devs which means save money and better product
  17. Should you do a full single page app with all angular routing and a api backend or should you use a hybrid or just MVC We do a lot of both but the main decision now is if ti is a new greenfield project or not
  18. Move to next slide after reading this
  19. Left is by feature Right by folder Hybrid
  20. Keep everything for the app in the app folder even our initial index.html just has an ng-include to pull in the layout page from the app folder
  21. If you have not seen this check it out More starts in 10 months than Typescript has in years but that is changing
  22. TODO: picture with volume dial
  23. Ok another decision that my colleague says is a no brainer well it is kind of points 5 and six but nugget versus bower and the whole package manager build process story
  24. These are what we use
  25. This is what my colleague and many are saying is a no brainer these days for a new project. Another way of saying this is to have a build process We have been building our server side code for ages but now we have to build our client side code - minify, rename, concat and rearrange etc The Microsoft and Visual Studio is going Automate processes More time to set up It gets easier
  26. You write code versus config files
  27. We use the task runner explorer for 2015 but Currently can not do both 2015 and 2013 but will be fixed
  28. This is always a time sink the first time but it is very simple once you have done it a couple of times But always lose a day or two or three with the customisation This is a massive problem that people underestimate and its likely another point that you
  29. Cookies are difficult to use across domains and more susceptible to CSRF cross site request forgery Tokens have more control and work across domains but require more code Have to write code on the client to get, save and send tokens on request
  30. Big benefit of Angular is the wealth of third party
  31. We use these two a lot
  32. You can not get a week with out breaking changes
  33. It changes so fast and if you are not always starting new projects you may miss some of the changes
  34. NOTE agenda same as finish Approx. 45min for the 10 qu and the Q&A