SlideShare a Scribd company logo
1 of 20
March 6, 2014
Andrew Hart
TallyJS
Introduction to frameworks and best practices.
Examples with AngularJS.
About Me:
Studied Chemistry and Math – Graduated in 2013
Partner at Selenko
Front-end engineer and designer using AngularJS
OVERVIEW
• Brief history of JavaScript
• Best Practices
• Module Design Pattern
• AngularJS
POP QUIZ
Which company is credited with inventing JavaScript
• Google
• Amazon
• Netscape
• Mozilla
• Microsoft
POP QUIZ
Which company is credited with inventing JavaScript
• Google
• Amazon
• Netscape – in 1995
• Mozilla
• Microsoft
JavaScript was built by Brenden Eich in 10 days.
EARLY JAVASCRIPT
• Used to manipulate visual elements – EVENT DRIVEN DESIGN
IN 2008, GOOGLE SAID: ‘LET THERE BE V8’
Thanks, Denmark
MODERN DAY JS ENVIRONMENTS
• Browsers
• Servers
• Node.js
• Databases
• MongoDB
• Drones
• Complex 3D Games
• Oculus Rift
• Musical Instruments
• Operating Systems
• Chromium OS
BEST PRACTICES
• Whatever you think is a best practice – AUTOMATE IT - GruntJS
1. JSHint, JSLint
2. Modularize
3. Keep DOM access to a minimum
4. Don’t yield to the browser
5. Testing – Unit Test & e2e
• They’re DRY
• Makes your code easier to maintain, easier to change and easier to read
Why Modules?
• Transcends frameworks and libraries
• It is a way to structure your js code
• Create an anonymous function and execute it immediately
• All of the code that runs inside that function lives in a closure
• Provides: Privacy and State
What is a Module?
MODULE
PLUNKER EXAMPLE
WHAT IS A JAVASCRIPT FRAMEWORK?
• JS had a not-so-good wrap among developers
• Complex handling of browser differences
• jQuery
ANGULARJS
• Open Source JavaScript framework developed
and maintained by Google
• Initial release was in 2009
• Turns HTML in a declarative programming
language ready to serve up dynamic content
through two-way data binding
DESIGN GOALS
• Decouple DOM manipulation from application logic. This improves the testability of
the code.
• Regard application testing as equal in importance to application writing. Testing
difficulty is dramatically affected by the way the code is structured.
• Decouple the client side of an application from the server side. This allows
development work to progress in parallel, and allows for reuse of both sides.
• Guide developers through the entire journey of building an application: from
designing the UI, through writing the business logic, to testing.
FOUR KEY INGREDIENTS
CONTROLLER
• Sets up a new $scope
• An object that represents the application model
• Arranged hierarchically
var myApp = angular.module('myApp',[]);
myApp.controller('GreetingCtrl',
['$scope',function($scope) {
$scope.greeting = 'Hola!';
}]);
Script.js DOM
<div ng-app="myApp">
<div ng-
controller="GreetingCtrl">
{{ greeting }}
</div>
</div>
DIRECTIVE
• DOM things
• Custom elements, class and attributes
• Domain Logic
• There are some powerful directives provided for you
• You can also write your own custom directives – VERY POWERFUL
• Directives can also have their own scope – Plunker Example
• This is where the event listeners are declared
• Must pass everything you need into the directive
SERVICE
• Data things
• Factory Functions – Services are singletons
• Inject Services into Controllers, Directives and even other Services
var myModule = angular.module('myModule', []);
myModule.factory('serviceId', function() {
var shinyNewServiceInstance;
return shinyNewServiceInstance;
});
PUTTING IT ALL TOGETHER
• Plunker Example

More Related Content

What's hot

SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...Sébastien Levert
 
No More Cowboy Coding: Modern WordPress Development Workflow That Scales
No More Cowboy Coding: Modern WordPress Development Workflow That ScalesNo More Cowboy Coding: Modern WordPress Development Workflow That Scales
No More Cowboy Coding: Modern WordPress Development Workflow That ScalesTom Howard
 
Berlin Selenium Meetup - Galen Framework
Berlin Selenium Meetup -  Galen FrameworkBerlin Selenium Meetup -  Galen Framework
Berlin Selenium Meetup - Galen FrameworkMichael Palotas
 
How we use Silverstripe CMS to deliver bilingual and accessible websites
How we use Silverstripe CMS to deliver bilingual and accessible websitesHow we use Silverstripe CMS to deliver bilingual and accessible websites
How we use Silverstripe CMS to deliver bilingual and accessible websitesMichaelPritchard21
 
Improve Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntImprove Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntDen Odell
 
Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Souvik Basu
 
The ABC of Coded Style Guides
The ABC of Coded Style GuidesThe ABC of Coded Style Guides
The ABC of Coded Style GuidesHenning Muszynski
 
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...Sébastien Levert
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworksSquash Apps Pvt Ltd
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20CodeValue
 
阳光书屋技术架构介绍
阳光书屋技术架构介绍阳光书屋技术架构介绍
阳光书屋技术架构介绍Xiaoping Feng
 
Advanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksAdvanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksJeremy Likness
 
How to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalHow to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalAcquia
 

What's hot (19)

SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
SharePoint Saturday Utah 2018 - SharePoint Framework, Angular and Azure Funct...
 
No More Cowboy Coding: Modern WordPress Development Workflow That Scales
No More Cowboy Coding: Modern WordPress Development Workflow That ScalesNo More Cowboy Coding: Modern WordPress Development Workflow That Scales
No More Cowboy Coding: Modern WordPress Development Workflow That Scales
 
Berlin Selenium Meetup - Galen Framework
Berlin Selenium Meetup -  Galen FrameworkBerlin Selenium Meetup -  Galen Framework
Berlin Selenium Meetup - Galen Framework
 
Mean stack
Mean stackMean stack
Mean stack
 
How we use Silverstripe CMS to deliver bilingual and accessible websites
How we use Silverstripe CMS to deliver bilingual and accessible websitesHow we use Silverstripe CMS to deliver bilingual and accessible websites
How we use Silverstripe CMS to deliver bilingual and accessible websites
 
Improve Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With GruntImprove Your Front-End Project Workflow With Grunt
Improve Your Front-End Project Workflow With Grunt
 
Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!Super tools to boost productivity in React dev env!
Super tools to boost productivity in React dev env!
 
The ABC of Coded Style Guides
The ABC of Coded Style GuidesThe ABC of Coded Style Guides
The ABC of Coded Style Guides
 
Devteach 2017
Devteach 2017Devteach 2017
Devteach 2017
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
 
ABC: Angular, Bazel, CLI
ABC: Angular, Bazel, CLIABC: Angular, Bazel, CLI
ABC: Angular, Bazel, CLI
 
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
North American Collaboration Summit 2018 - SharePoint Framework, Angular & Az...
 
Single page App
Single page AppSingle page App
Single page App
 
Hybrid app development frameworks
Hybrid app development frameworksHybrid app development frameworks
Hybrid app development frameworks
 
Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20Vered Flis: Because performance matters! Architecture Next 20
Vered Flis: Because performance matters! Architecture Next 20
 
阳光书屋技术架构介绍
阳光书屋技术架构介绍阳光书屋技术架构介绍
阳光书屋技术架构介绍
 
Advanced AngularJS Tips and Tricks
Advanced AngularJS Tips and TricksAdvanced AngularJS Tips and Tricks
Advanced AngularJS Tips and Tricks
 
How to Successfully Implement Headless Drupal
How to Successfully Implement Headless DrupalHow to Successfully Implement Headless Drupal
How to Successfully Implement Headless Drupal
 
Why Everyone else writes bad code
Why Everyone else writes bad codeWhy Everyone else writes bad code
Why Everyone else writes bad code
 

Viewers also liked

Client Side MVC & Angular
Client Side MVC & AngularClient Side MVC & Angular
Client Side MVC & AngularAlexe Bogdan
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server ArchitecturesPedro Melo Pereira
 
ORM을 활용할 경우의 설계, 개발 과정
ORM을 활용할 경우의 설계, 개발 과정ORM을 활용할 경우의 설계, 개발 과정
ORM을 활용할 경우의 설계, 개발 과정Javajigi Jaesung
 
JavaScript 프레임워크 살펴보기
JavaScript 프레임워크 살펴보기JavaScript 프레임워크 살펴보기
JavaScript 프레임워크 살펴보기항희 이
 

Viewers also liked (7)

Client Side MVC & Angular
Client Side MVC & AngularClient Side MVC & Angular
Client Side MVC & Angular
 
лек7
лек7лек7
лек7
 
Javascript Client & Server Architectures
Javascript Client & Server ArchitecturesJavascript Client & Server Architectures
Javascript Client & Server Architectures
 
Client side scripting
Client side scriptingClient side scripting
Client side scripting
 
Apresentação angular js
Apresentação angular jsApresentação angular js
Apresentação angular js
 
ORM을 활용할 경우의 설계, 개발 과정
ORM을 활용할 경우의 설계, 개발 과정ORM을 활용할 경우의 설계, 개발 과정
ORM을 활용할 경우의 설계, 개발 과정
 
JavaScript 프레임워크 살펴보기
JavaScript 프레임워크 살펴보기JavaScript 프레임워크 살펴보기
JavaScript 프레임워크 살펴보기
 

Similar to TallyJS #1 - Intro to AngularJS

Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
Internship softwaretraining@ijse
Internship softwaretraining@ijseInternship softwaretraining@ijse
Internship softwaretraining@ijseJinadi Rashmika
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularMark Leusink
 
Narendran Namachivayam
Narendran NamachivayamNarendran Namachivayam
Narendran NamachivayamNarendran N
 
SadikulIslamDotNetResume
SadikulIslamDotNetResumeSadikulIslamDotNetResume
SadikulIslamDotNetResumeSadikul Islam
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)Alex Ross
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptTroy Miles
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stackAshok Raj
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupGoutam Dey
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...Mark Leusink
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...Mark Roden
 
Curriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyCurriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyHai Quy Nguyen
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
An Introduction to AngularJS
An Introduction to AngularJSAn Introduction to AngularJS
An Introduction to AngularJSFalk Hartmann
 
Net, MVC 3+ years Experience
Net, MVC 3+ years ExperienceNet, MVC 3+ years Experience
Net, MVC 3+ years ExperienceMadhava B
 

Similar to TallyJS #1 - Intro to AngularJS (20)

Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Internship softwaretraining@ijse
Internship softwaretraining@ijseInternship softwaretraining@ijse
Internship softwaretraining@ijse
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
Narendran Namachivayam
Narendran NamachivayamNarendran Namachivayam
Narendran Namachivayam
 
Mean stack
Mean stackMean stack
Mean stack
 
SadikulIslamDotNetResume
SadikulIslamDotNetResumeSadikulIslamDotNetResume
SadikulIslamDotNetResume
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
Enterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScriptEnterprise Strength Mobile JavaScript
Enterprise Strength Mobile JavaScript
 
FULL stack -> MEAN stack
FULL stack -> MEAN stackFULL stack -> MEAN stack
FULL stack -> MEAN stack
 
Eureko frameworks
Eureko frameworksEureko frameworks
Eureko frameworks
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetup
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...The future of web development write once, run everywhere with angular.js and ...
The future of web development write once, run everywhere with angular.js and ...
 
Curriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyCurriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quy
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
An Introduction to AngularJS
An Introduction to AngularJSAn Introduction to AngularJS
An Introduction to AngularJS
 
Net, MVC 3+ years Experience
Net, MVC 3+ years ExperienceNet, MVC 3+ years Experience
Net, MVC 3+ years Experience
 
Why choose Angular 6?
Why choose Angular 6?Why choose Angular 6?
Why choose Angular 6?
 
SatyaMadhuKiran Software Developer
SatyaMadhuKiran Software DeveloperSatyaMadhuKiran Software Developer
SatyaMadhuKiran Software Developer
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
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
 
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
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
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
 
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
 
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
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

TallyJS #1 - Intro to AngularJS

  • 1. March 6, 2014 Andrew Hart TallyJS Introduction to frameworks and best practices. Examples with AngularJS.
  • 2. About Me: Studied Chemistry and Math – Graduated in 2013 Partner at Selenko Front-end engineer and designer using AngularJS
  • 3. OVERVIEW • Brief history of JavaScript • Best Practices • Module Design Pattern • AngularJS
  • 4. POP QUIZ Which company is credited with inventing JavaScript • Google • Amazon • Netscape • Mozilla • Microsoft
  • 5. POP QUIZ Which company is credited with inventing JavaScript • Google • Amazon • Netscape – in 1995 • Mozilla • Microsoft JavaScript was built by Brenden Eich in 10 days.
  • 6. EARLY JAVASCRIPT • Used to manipulate visual elements – EVENT DRIVEN DESIGN
  • 7. IN 2008, GOOGLE SAID: ‘LET THERE BE V8’ Thanks, Denmark
  • 8. MODERN DAY JS ENVIRONMENTS • Browsers • Servers • Node.js • Databases • MongoDB • Drones • Complex 3D Games • Oculus Rift • Musical Instruments • Operating Systems • Chromium OS
  • 9. BEST PRACTICES • Whatever you think is a best practice – AUTOMATE IT - GruntJS 1. JSHint, JSLint 2. Modularize 3. Keep DOM access to a minimum 4. Don’t yield to the browser 5. Testing – Unit Test & e2e
  • 10. • They’re DRY • Makes your code easier to maintain, easier to change and easier to read Why Modules? • Transcends frameworks and libraries • It is a way to structure your js code • Create an anonymous function and execute it immediately • All of the code that runs inside that function lives in a closure • Provides: Privacy and State What is a Module?
  • 12. WHAT IS A JAVASCRIPT FRAMEWORK? • JS had a not-so-good wrap among developers • Complex handling of browser differences • jQuery
  • 13. ANGULARJS • Open Source JavaScript framework developed and maintained by Google • Initial release was in 2009 • Turns HTML in a declarative programming language ready to serve up dynamic content through two-way data binding
  • 14.
  • 15. DESIGN GOALS • Decouple DOM manipulation from application logic. This improves the testability of the code. • Regard application testing as equal in importance to application writing. Testing difficulty is dramatically affected by the way the code is structured. • Decouple the client side of an application from the server side. This allows development work to progress in parallel, and allows for reuse of both sides. • Guide developers through the entire journey of building an application: from designing the UI, through writing the business logic, to testing.
  • 17. CONTROLLER • Sets up a new $scope • An object that represents the application model • Arranged hierarchically var myApp = angular.module('myApp',[]); myApp.controller('GreetingCtrl', ['$scope',function($scope) { $scope.greeting = 'Hola!'; }]); Script.js DOM <div ng-app="myApp"> <div ng- controller="GreetingCtrl"> {{ greeting }} </div> </div>
  • 18. DIRECTIVE • DOM things • Custom elements, class and attributes • Domain Logic • There are some powerful directives provided for you • You can also write your own custom directives – VERY POWERFUL • Directives can also have their own scope – Plunker Example • This is where the event listeners are declared • Must pass everything you need into the directive
  • 19. SERVICE • Data things • Factory Functions – Services are singletons • Inject Services into Controllers, Directives and even other Services var myModule = angular.module('myModule', []); myModule.factory('serviceId', function() { var shinyNewServiceInstance; return shinyNewServiceInstance; });
  • 20. PUTTING IT ALL TOGETHER • Plunker Example