SlideShare a Scribd company logo
1 of 19
Download to read offline
Patterns Are Good For Managers 
Presented by Michael Cooper, Senior Consultant
Not all of your devscan be like him. 
Without a Superman, you need: 
•Team Productivity 
•On Boarding 
•Standardized Code & Patterns 
•Code Documentation 
•Test Coverage 
•Quality 
www.agilethought.com 2 
http://moviepilot.com/posts/2014/07/04/those-batman-v-superman-rumors-faked-by- warner-bros-1673661?lt_source=external,manual
These require a disciplined approach. 
www.agilethought.com 3
Making Swim Lanes … Your devsknow MVC 
.NET MVC, Java Spring, around since 1970s 
www.agilethought.com 4
MVC encourages SOLID code. 
www.agilethought.com 5 
Models 
Views 
Controllers 
ServiceLayer 
MVC 
Model classes 
View templates, 
Html Helpers 
MVC Razor code 
Controller 
Service Layer code 
Angular 
Model factory classes 
View templates 
Directives 
Moustache code 
Controllers 
Services
The pattern allows us to have many people working on the same project. 
www.agilethought.com 6 
Dev A 
DevsB&C 
DevsB&C 
Dev D 
And new-to-Angular devsneed to only learn one area / pattern … allowing them to be productive within one week. 
Models 
Views 
Controllers 
ServiceLayer
The pattern allows our test patterns to be standardized, giving us high coverage. 
www.agilethought.com 7 
Model Unit Tests 
Functional Tests 
Controller Unit Tests 
Service Unit Tests 
Integration Tests 
Karma/Jasmine 
Protractor, Frisby 
Models 
Views 
Controllers 
ServiceLayer
An eco-system to support the Angular pattern. 
•Project template 
•Automated test setup 
•Live templates (Intellij) that build models, controllers, services and their tests 
•Lots of examples 
•Proof it works! 
•Recently completed project: 83% UI code coverage 
www.agilethought.com 8
Code Samples –MVC Angular 
www.agilethought.com 9
Named Spaced Modules 
www.agilethought.com 10
Templates, Partial Views 
www.agilethought.com 11
Controller 
www.agilethought.com 12 
.NET MVC 
Angular 
public classHomeController: Controller{ 
public ActionResultAbout() 
{ 
ViewBag[“name"] = “Dolly"; 
return View(); 
} 
} 
[HttpPost] 
public ActionResultAbout(form){ 
//something 
} 
.config(function config( $stateProvider) { 
$stateProvider.state( 'about', { 
url: '/about', 
views: { 
"main": { 
controller: HomeAboutController', 
templateUrl: 'about/about.tpl.html' 
} 
}) 
.controller(‘HomeAboutController', 
function HomeAboutController( $scope ) { 
$scope.name = ‘Dolly’; 
$state.go(‘about’); 
$scope.respond= function(){ //something } ; 
});
HTML Helpers/Directives 
www.agilethought.com 13 
.NET MVC 
Angular 
public static class HtmlHelperExtensions{ public static MvcHtmlStringCustomTextBox(this 
HtmlHelperhtmlHelper, 
string name, string value) { varbuilder = new TagBuilder(“input”); builder.MergeAttribute(“type”, “text”); builder.MergeAttribute(“name”, name); builder.MergeAttribute(“value”, value); return MvcHtmlString 
.Create(builder.ToString( 
TagRenderMode.SelfClosing)); } } 
.directive(“CustomTextBox”, function(){ 
return { 
template:‘<input type=“text” name={{name}} 
value={{value}} />’, 
restrict: ‘E’, 
scope: { 
name: ‘=‘, 
value: ‘=‘ 
} 
} 
}); 
use:@Html.CustomTextBox(“custom_txtbox”,”Custom Helper Method”) 
use:<custom-text-box name=“custom_txtbox” 
value=“Custom Helper Method”/>
Models 
www.agilethought.com 14 
.NET MVC 
Angular 
public class Animal{ publicAnimal(); 
public string name {get;set;} 
public void Run(speed){ 
// do something 
} } 
.factory(“Animal”, function(){ 
varAnimal= function(){ 
this.name = ‘’; 
} 
Animal.prototype.Run= function(){ 
// do something 
} 
return Animal; 
}); 
use: 
varhorse= new Animal(); 
horse.name = “George”; 
horse.Run(); 
use: 
varhorse= new Animal(); 
horse.name = ‘George’; 
horse.Run();
Services Persistence 
www.agilethought.com 15 
.NET MVC 
Angular 
public staticclass StoreAnimals{ private AnimalStorebarn; 
public void Save(Animal animal){ 
barn.Animals.add(animal); 
} } 
.service(“StoreAnimals”, function($http){ 
varsave = function(animal){ 
return $http.POST( 
AnimalStore, 
angular.toJSON(animal)); 
} 
return:{ 
save: save 
} 
}); 
use: 
varhorse= new Animal(); 
horse.name = “George”; 
StoreAnimals.Save(horse); 
use: 
varhorse= new Animal(); 
horse.name = ‘George’; 
StoreAnimals.save(horse).promise.then(function(){ 
//next thing 
});
Dependency Injection 
www.agilethought.com 16 
.NET MVC 
Angular 
public staticclass StoreAnimals{ 
vardb; publicStoreAnimals(db){ 
this.db= db 
} 
public void Save(Animalanimal){ 
db.Save(animal); 
} } 
angular.module(‘myApp.store’, [ 
‘myApp.database’]) 
.service(“StoreAnimals”, function(db){ 
varsave = function(animal){ 
return db.Save(animal); 
} 
return:{ 
save: save 
} 
});
Code Documentation 
www.agilethought.com 17 
.NET MVC 
Angular 
public staticclass StoreAnimals{ 
vardb; 
publicStoreAnimals(db){ 
this.db= db 
} 
/// <summary> 
/// Stores an animal 
/// </summary> 
/// <paramname=“animal">the one to 
/// persist</param> 
/// <returns></returns> 
public void Save(Animalanimal){ 
db.Save(animal); 
} } 
angular.module(‘myApp.store’, [ 
‘myApp.database’]) 
.service(“StoreAnimals”, function(db){ 
/** 
* @method Save -Stores an animal 
* @param{Animal}animal –the one to persist 
*/ 
varsave = function(animal){ 
return db.Save(animal); 
} 
return:{ 
save: save 
} 
});
Visit our library of free webinar videos! 
Previous Webinars: 
•Azure + Visual Studio Online: How to build, test, deploy and monitor seamlessly 
•6 Steps To Achieving Predictable Release Management With Visual Studio 2013 
•How To Create High Value Development Teams 
•5 TFS Features That Will Dramatically Improve Your Team's Performance 
18
About Michael 
19 
Mike Cooper spent much of his career in software sales, development and general management, with large firms like Reuters and Pitney Bowes, and a series of start-ups. His true love is making great software, and he has built software for television, finance, construction and government, and co-founded a number of veteran–owned businesses.He is a consultant at AgileThought, specializing in AngularJS. 
Thank You 
@mbcoop 
Questions about AngularJS? Email me at Michael.Cooper@agilethought.com 
linkedin.com/in/michaelcooper

More Related Content

What's hot

AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS InternalEyal Vardi
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS DirectivesChristian Lilley
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 
GDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSGDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSNicolas Embleton
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIVisual Engineering
 
Building a Startup Stack with AngularJS
Building a Startup Stack with AngularJSBuilding a Startup Stack with AngularJS
Building a Startup Stack with AngularJSFITC
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesRainer Stropek
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications Juliana Lucena
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular jsAndrew Alpert
 
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeTop 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeMark Meyer
 
Angularjs Anti-patterns
Angularjs Anti-patternsAngularjs Anti-patterns
Angularjs Anti-patternsSteven Lambert
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular jscodeandyou forums
 
Backbone.js and friends
Backbone.js and friendsBackbone.js and friends
Backbone.js and friendsGood Robot
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IVisual Engineering
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPressCaldera Labs
 

What's hot (20)

AngularJS Framework
AngularJS FrameworkAngularJS Framework
AngularJS Framework
 
AngularJS Internal
AngularJS InternalAngularJS Internal
AngularJS Internal
 
Angularjs Performance
Angularjs PerformanceAngularjs Performance
Angularjs Performance
 
Intro to Angular.JS Directives
Intro to Angular.JS DirectivesIntro to Angular.JS Directives
Intro to Angular.JS Directives
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
AngularJs
AngularJsAngularJs
AngularJs
 
AngularJS Basics with Example
AngularJS Basics with ExampleAngularJS Basics with Example
AngularJS Basics with Example
 
GDayX - Advanced Angular.JS
GDayX - Advanced Angular.JSGDayX - Advanced Angular.JS
GDayX - Advanced Angular.JS
 
Workshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte IIIWorkshop 14: AngularJS Parte III
Workshop 14: AngularJS Parte III
 
Building a Startup Stack with AngularJS
Building a Startup Stack with AngularJSBuilding a Startup Stack with AngularJS
Building a Startup Stack with AngularJS
 
AngularJs Crash Course
AngularJs Crash CourseAngularJs Crash Course
AngularJs Crash Course
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile Services
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications
 
Building scalable applications with angular js
Building scalable applications with angular jsBuilding scalable applications with angular js
Building scalable applications with angular js
 
Top 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers MakeTop 10 Mistakes AngularJS Developers Make
Top 10 Mistakes AngularJS Developers Make
 
Angularjs Anti-patterns
Angularjs Anti-patternsAngularjs Anti-patterns
Angularjs Anti-patterns
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular js
 
Backbone.js and friends
Backbone.js and friendsBackbone.js and friends
Backbone.js and friends
 
Workshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte IWorkshop 12: AngularJS Parte I
Workshop 12: AngularJS Parte I
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPress
 

Viewers also liked

Rethinking Mobile with Ionic
Rethinking Mobile with IonicRethinking Mobile with Ionic
Rethinking Mobile with IonicMike Hartington
 
Native vs. Hybrid Applications
Native vs. Hybrid ApplicationsNative vs. Hybrid Applications
Native vs. Hybrid ApplicationsCihad Horuzoğlu
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftWan Muzaffar Wan Hashim
 
Cross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreCross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreSwaminathan Vetri
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Mark Leusink
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkSwaminathan Vetri
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebMike Hartington
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkCihad Horuzoğlu
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksJuarez Filho
 

Viewers also liked (13)

Angular2 for Beginners
Angular2 for BeginnersAngular2 for Beginners
Angular2 for Beginners
 
Rethinking Mobile with Ionic
Rethinking Mobile with IonicRethinking Mobile with Ionic
Rethinking Mobile with Ionic
 
Native vs. Hybrid Applications
Native vs. Hybrid ApplicationsNative vs. Hybrid Applications
Native vs. Hybrid Applications
 
Cocoapods and Most common used library in Swift
Cocoapods and Most common used library in SwiftCocoapods and Most common used library in Swift
Cocoapods and Most common used library in Swift
 
Ionic
IonicIonic
Ionic
 
Cross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet coreCross platform dotnet development using dotnet core
Cross platform dotnet development using dotnet core
 
Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)Creating mobile apps - an introduction to Ionic (Engage 2016)
Creating mobile apps - an introduction to Ionic (Engage 2016)
 
Rapid mobile app development using Ionic framework
Rapid mobile app development using Ionic frameworkRapid mobile app development using Ionic framework
Rapid mobile app development using Ionic framework
 
Hybrid app development with ionic
Hybrid app development with ionicHybrid app development with ionic
Hybrid app development with ionic
 
Ionic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the WebIonic 2: Mobile apps with the Web
Ionic 2: Mobile apps with the Web
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
Hybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic FrameworkHybrid Apps with Angular & Ionic Framework
Hybrid Apps with Angular & Ionic Framework
 
Ionic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocksIonic adventures - Hybrid Mobile App Development rocks
Ionic adventures - Hybrid Mobile App Development rocks
 

Similar to Patterns Are Good For Managers

Viking academy backbone.js
Viking academy  backbone.jsViking academy  backbone.js
Viking academy backbone.jsBert Wijnants
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-finalDavid Lapsley
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersCaldera Labs
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Eric Palakovich Carr
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Patterngoodfriday
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)Chris Clarke
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress DevelopmentAdam Tomat
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJSJacopo Nardiello
 

Similar to Patterns Are Good For Managers (20)

Intro to Laravel 4
Intro to Laravel 4Intro to Laravel 4
Intro to Laravel 4
 
The Rails Way
The Rails WayThe Rails Way
The Rails Way
 
AngularJS Basic Training
AngularJS Basic TrainingAngularJS Basic Training
AngularJS Basic Training
 
Viking academy backbone.js
Viking academy  backbone.jsViking academy  backbone.js
Viking academy backbone.js
 
20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final20141002 delapsley-socalangularjs-final
20141002 delapsley-socalangularjs-final
 
Basics of AngularJS
Basics of AngularJSBasics of AngularJS
Basics of AngularJS
 
PHP MVC
PHP MVCPHP MVC
PHP MVC
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
 
AngularJs-training
AngularJs-trainingAngularJs-training
AngularJs-training
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
 
Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!Django Rest Framework and React and Redux, Oh My!
Django Rest Framework and React and Redux, Oh My!
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
Developing ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller PatternDeveloping ASP.NET Applications Using the Model View Controller Pattern
Developing ASP.NET Applications Using the Model View Controller Pattern
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)
 
[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development[Bristol WordPress] Supercharging WordPress Development
[Bristol WordPress] Supercharging WordPress Development
 
Fatc
FatcFatc
Fatc
 
Ultimate Introduction To AngularJS
Ultimate Introduction To AngularJSUltimate Introduction To AngularJS
Ultimate Introduction To AngularJS
 
Backbone Basics with Examples
Backbone Basics with ExamplesBackbone Basics with Examples
Backbone Basics with Examples
 

More from AgileThought

Control Freak: Risk and Control in Azure DevOps
Control Freak: Risk and Control in Azure DevOpsControl Freak: Risk and Control in Azure DevOps
Control Freak: Risk and Control in Azure DevOpsAgileThought
 
Adventures in Agile Testing
Adventures in Agile TestingAdventures in Agile Testing
Adventures in Agile TestingAgileThought
 
From Device To Cloud
From Device To CloudFrom Device To Cloud
From Device To CloudAgileThought
 
Operationalizing Machine Learning
Operationalizing Machine LearningOperationalizing Machine Learning
Operationalizing Machine LearningAgileThought
 

More from AgileThought (6)

Control Freak: Risk and Control in Azure DevOps
Control Freak: Risk and Control in Azure DevOpsControl Freak: Risk and Control in Azure DevOps
Control Freak: Risk and Control in Azure DevOps
 
Adventures in Agile Testing
Adventures in Agile TestingAdventures in Agile Testing
Adventures in Agile Testing
 
From Device To Cloud
From Device To CloudFrom Device To Cloud
From Device To Cloud
 
Operationalizing Machine Learning
Operationalizing Machine LearningOperationalizing Machine Learning
Operationalizing Machine Learning
 
The Agile Journey
The Agile JourneyThe Agile Journey
The Agile Journey
 
Psychology In UX
Psychology In UXPsychology In UX
Psychology In UX
 

Recently uploaded

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
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
 

Recently uploaded (20)

Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
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
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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...
 
+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...
 

Patterns Are Good For Managers

  • 1. Patterns Are Good For Managers Presented by Michael Cooper, Senior Consultant
  • 2. Not all of your devscan be like him. Without a Superman, you need: •Team Productivity •On Boarding •Standardized Code & Patterns •Code Documentation •Test Coverage •Quality www.agilethought.com 2 http://moviepilot.com/posts/2014/07/04/those-batman-v-superman-rumors-faked-by- warner-bros-1673661?lt_source=external,manual
  • 3. These require a disciplined approach. www.agilethought.com 3
  • 4. Making Swim Lanes … Your devsknow MVC .NET MVC, Java Spring, around since 1970s www.agilethought.com 4
  • 5. MVC encourages SOLID code. www.agilethought.com 5 Models Views Controllers ServiceLayer MVC Model classes View templates, Html Helpers MVC Razor code Controller Service Layer code Angular Model factory classes View templates Directives Moustache code Controllers Services
  • 6. The pattern allows us to have many people working on the same project. www.agilethought.com 6 Dev A DevsB&C DevsB&C Dev D And new-to-Angular devsneed to only learn one area / pattern … allowing them to be productive within one week. Models Views Controllers ServiceLayer
  • 7. The pattern allows our test patterns to be standardized, giving us high coverage. www.agilethought.com 7 Model Unit Tests Functional Tests Controller Unit Tests Service Unit Tests Integration Tests Karma/Jasmine Protractor, Frisby Models Views Controllers ServiceLayer
  • 8. An eco-system to support the Angular pattern. •Project template •Automated test setup •Live templates (Intellij) that build models, controllers, services and their tests •Lots of examples •Proof it works! •Recently completed project: 83% UI code coverage www.agilethought.com 8
  • 9. Code Samples –MVC Angular www.agilethought.com 9
  • 10. Named Spaced Modules www.agilethought.com 10
  • 11. Templates, Partial Views www.agilethought.com 11
  • 12. Controller www.agilethought.com 12 .NET MVC Angular public classHomeController: Controller{ public ActionResultAbout() { ViewBag[“name"] = “Dolly"; return View(); } } [HttpPost] public ActionResultAbout(form){ //something } .config(function config( $stateProvider) { $stateProvider.state( 'about', { url: '/about', views: { "main": { controller: HomeAboutController', templateUrl: 'about/about.tpl.html' } }) .controller(‘HomeAboutController', function HomeAboutController( $scope ) { $scope.name = ‘Dolly’; $state.go(‘about’); $scope.respond= function(){ //something } ; });
  • 13. HTML Helpers/Directives www.agilethought.com 13 .NET MVC Angular public static class HtmlHelperExtensions{ public static MvcHtmlStringCustomTextBox(this HtmlHelperhtmlHelper, string name, string value) { varbuilder = new TagBuilder(“input”); builder.MergeAttribute(“type”, “text”); builder.MergeAttribute(“name”, name); builder.MergeAttribute(“value”, value); return MvcHtmlString .Create(builder.ToString( TagRenderMode.SelfClosing)); } } .directive(“CustomTextBox”, function(){ return { template:‘<input type=“text” name={{name}} value={{value}} />’, restrict: ‘E’, scope: { name: ‘=‘, value: ‘=‘ } } }); use:@Html.CustomTextBox(“custom_txtbox”,”Custom Helper Method”) use:<custom-text-box name=“custom_txtbox” value=“Custom Helper Method”/>
  • 14. Models www.agilethought.com 14 .NET MVC Angular public class Animal{ publicAnimal(); public string name {get;set;} public void Run(speed){ // do something } } .factory(“Animal”, function(){ varAnimal= function(){ this.name = ‘’; } Animal.prototype.Run= function(){ // do something } return Animal; }); use: varhorse= new Animal(); horse.name = “George”; horse.Run(); use: varhorse= new Animal(); horse.name = ‘George’; horse.Run();
  • 15. Services Persistence www.agilethought.com 15 .NET MVC Angular public staticclass StoreAnimals{ private AnimalStorebarn; public void Save(Animal animal){ barn.Animals.add(animal); } } .service(“StoreAnimals”, function($http){ varsave = function(animal){ return $http.POST( AnimalStore, angular.toJSON(animal)); } return:{ save: save } }); use: varhorse= new Animal(); horse.name = “George”; StoreAnimals.Save(horse); use: varhorse= new Animal(); horse.name = ‘George’; StoreAnimals.save(horse).promise.then(function(){ //next thing });
  • 16. Dependency Injection www.agilethought.com 16 .NET MVC Angular public staticclass StoreAnimals{ vardb; publicStoreAnimals(db){ this.db= db } public void Save(Animalanimal){ db.Save(animal); } } angular.module(‘myApp.store’, [ ‘myApp.database’]) .service(“StoreAnimals”, function(db){ varsave = function(animal){ return db.Save(animal); } return:{ save: save } });
  • 17. Code Documentation www.agilethought.com 17 .NET MVC Angular public staticclass StoreAnimals{ vardb; publicStoreAnimals(db){ this.db= db } /// <summary> /// Stores an animal /// </summary> /// <paramname=“animal">the one to /// persist</param> /// <returns></returns> public void Save(Animalanimal){ db.Save(animal); } } angular.module(‘myApp.store’, [ ‘myApp.database’]) .service(“StoreAnimals”, function(db){ /** * @method Save -Stores an animal * @param{Animal}animal –the one to persist */ varsave = function(animal){ return db.Save(animal); } return:{ save: save } });
  • 18. Visit our library of free webinar videos! Previous Webinars: •Azure + Visual Studio Online: How to build, test, deploy and monitor seamlessly •6 Steps To Achieving Predictable Release Management With Visual Studio 2013 •How To Create High Value Development Teams •5 TFS Features That Will Dramatically Improve Your Team's Performance 18
  • 19. About Michael 19 Mike Cooper spent much of his career in software sales, development and general management, with large firms like Reuters and Pitney Bowes, and a series of start-ups. His true love is making great software, and he has built software for television, finance, construction and government, and co-founded a number of veteran–owned businesses.He is a consultant at AgileThought, specializing in AngularJS. Thank You @mbcoop Questions about AngularJS? Email me at Michael.Cooper@agilethought.com linkedin.com/in/michaelcooper