SlideShare a Scribd company logo
1 of 22
Consulting/Training
TypeScript and AngularJS
Consulting/Training
consulting
Wintellect helps you build better software,
faster, tackling the tough projects and solving
the software and technology questions that
help you transform your business.
 Architecture, Analysis and Design
 Full lifecycle software development
 Debugging and Performance tuning
 Database design and development
training
Wintellect's courses are written and taught by
some of the biggest and most respected names
in the Microsoft programming industry.
 Learn from the best. Access the same
training Microsoft’s developers enjoy
 Real world knowledge and solutions on
both current and cutting edge
technologies
 Flexibility in training options – onsite,
virtual, on demand
Founded by top experts on Microsoft – Jeffrey Richter, Jeff Prosise, and John Robbins – we pull
out all the stops to help our customers achieve their goals through advanced software-based
consulting and training solutions.
who we are
About Wintellect
Consulting/Training
 The Problem
 HTML5
 JavaScript
 Browsers
 A Solution
 TypeScript
 AngularJS
 Conclusion
Agenda
Consulting/Training
 Modern web apps run on the web’s
Operating System (did you watch the
keynote? This bullet was not added
after)
 That OS is HTML5 + JavaScript
 Part of problem is HTML5 (I’ll explain)
 The problem is JavaScript (Hang on…)
 Coding web apps with a large team can
be like hanging off the edge of a cliff
 But let me explain …
The Problem
Consulting/Training
 Yeah, saved us from “evil” plug-
ins! (cough) Silverlight (cough)
 Write once, run anywhere, right?
 Let’s check compatibility …
 Oops, looks like a traffic stop
 Looks like no one implements all
HTML5 features consistently, and
many are browser-specific
 We really want to keep it as structure
 Write once, suck everywhere!
The Problem: HTML5
Consulting/Training
The Problem: JavaScript
JavaScript
Consulting/Training
 Also not implemented consistently
between browsers (specifically DOM
interaction – and if you think HTML5 will
make a difference, the current standard has
been there since 1999)
 OK, there were a few tweaks in 2009
 JavaScript: The Definitive Guide is
1,100 pages
 JavaScript: The Good Parts is 127
pages
 Is there something wrong with that
picture?
The Problem: JavaScript
Consulting/Training
Wow! This is a lot of work and
what if my UI changes to use
different ids?
$(document).ready(function() {
$('#firstName').attr('data-bind','value: firstName, valueUpdate:
"afterkeydown"');
$('#lastName').attr('data-bind','value: lastName, valueUpdate:
"afterkeydown"');
$('#fullName').attr('data-bind', 'text: fullName');
$('#firstNameValidation')
.attr('data-bind','visible: firstName.hasError, text:
firstName.validationMessage');
$('#lastNameValidation')
.attr('data-bind','visible: lastName.hasError, text:
lastName.validationMessage');
$('form').attr('data-bind', 'submit: saveName');
});
jQuery Can Help ….
Consulting/Training
function NameViewModel() {
var self = this;
this.firstName = ko.observable('Jeremy');
this.lastName = ko.observable('');
this.fullName = ko.computed(function() {
if (self.lastName()) {
if (self.firstName()) {
return self.lastName() + ', ' + self.firstName();
}
return self.lastName();
}
return self.firstName();
});
}
var viewModel = new NameViewModel();
Do I really need all of this
ceremony? What if I am using
data I just retrieved from a
web service call, do I have to
do all of this?
KnockoutJS Can Help ….
Consulting/Training
 Encapsulation without obfuscation
 Discovery without guessing
 Type safety without killing ducks
 Modularity
 Inheritance
 Separation of concerns
 Designer/developer workflow
 Unit testing
 Data-binding
 Code reuse
 Extensibility
There IS a BETTER way!
“It keeps the cold liquids
cold and the hot liquids
hot. How does it know?”
Consulting/Training
(In which one finds TypeScript and AngularJS with Jasmine working together)
The 6502 “Because I Can” Written in JavaScript runs on my Phone
Simulator: http://apps.jeremylikness.com/t6502
Source: http://t6502.codeplex.com/
Consulting/Training
 Encapsulation with classes
 Minimize “ritual” with inheritance
 Discovery with interfaces
 Type safety that doesn’t take away our right
to duck-type
 Modular code
TypeScript
Consulting/Training
Interfaces Example
Whoah IntelliSenseless! Where
are my properties buried in all
this mess? You’re giving me
the whole universe!
Consulting/Training
Interfaces Example
That’s more like it. And
IAmSomeone doesn’t appear
anywhere in my JavaScript
code.
Consulting/Training
Generics
Consulting/Training
Classes
Consulting/Training
Inheritance
Consulting/Training
Inheritance (cont.)
“I get by with a little
help from my TypeScript
compiler. It’s magic.”
Consulting/Training
 “XAML” for the web
 Declarative (like HTML is)
 Directives = “user controls”
 Filters = “value converters”
 Controllers = “view models”
 Teach HTML new tricks (with a lot of tricks already in
the bag)
 Dependency Injection
 Very test-friendly
AngularJS
“It’s a conspiracy by
XAML developers to make
the web look like
Silverlight”
“Nah, Dawg.
Angular was
cooked up by
Google.”
Consulting/Training
Example App with AngularJS and TypeScript
Consulting/Training
Subscribers Enjoy
 Expert Instructors
 Quality Content
 Practical Application
 All Devices
Wintellect’s On-Demand
Video Training Solution
Individuals | Businesses | Enterprise Organizations
http://bit.ly/angularintro
Authors Enjoy
 Royalty Income
 Personal Branding
 Free Library Access
 Cross-Sell
Opportunities
Try It Free!
Use Promo Code:
LIKNESS-13
Consulting/Training
Questions?
http://sdrv.ms/1dUgIb1
jlikness@Wintellect.com

More Related Content

Recently uploaded

Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
🐬 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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 

Recently uploaded (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
 
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
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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...
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationErica Santiago
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

AngularJS and TypeScript for Modern Web App Development

  • 2. Consulting/Training consulting Wintellect helps you build better software, faster, tackling the tough projects and solving the software and technology questions that help you transform your business.  Architecture, Analysis and Design  Full lifecycle software development  Debugging and Performance tuning  Database design and development training Wintellect's courses are written and taught by some of the biggest and most respected names in the Microsoft programming industry.  Learn from the best. Access the same training Microsoft’s developers enjoy  Real world knowledge and solutions on both current and cutting edge technologies  Flexibility in training options – onsite, virtual, on demand Founded by top experts on Microsoft – Jeffrey Richter, Jeff Prosise, and John Robbins – we pull out all the stops to help our customers achieve their goals through advanced software-based consulting and training solutions. who we are About Wintellect
  • 3. Consulting/Training  The Problem  HTML5  JavaScript  Browsers  A Solution  TypeScript  AngularJS  Conclusion Agenda
  • 4. Consulting/Training  Modern web apps run on the web’s Operating System (did you watch the keynote? This bullet was not added after)  That OS is HTML5 + JavaScript  Part of problem is HTML5 (I’ll explain)  The problem is JavaScript (Hang on…)  Coding web apps with a large team can be like hanging off the edge of a cliff  But let me explain … The Problem
  • 5. Consulting/Training  Yeah, saved us from “evil” plug- ins! (cough) Silverlight (cough)  Write once, run anywhere, right?  Let’s check compatibility …  Oops, looks like a traffic stop  Looks like no one implements all HTML5 features consistently, and many are browser-specific  We really want to keep it as structure  Write once, suck everywhere! The Problem: HTML5
  • 7. Consulting/Training  Also not implemented consistently between browsers (specifically DOM interaction – and if you think HTML5 will make a difference, the current standard has been there since 1999)  OK, there were a few tweaks in 2009  JavaScript: The Definitive Guide is 1,100 pages  JavaScript: The Good Parts is 127 pages  Is there something wrong with that picture? The Problem: JavaScript
  • 8. Consulting/Training Wow! This is a lot of work and what if my UI changes to use different ids? $(document).ready(function() { $('#firstName').attr('data-bind','value: firstName, valueUpdate: "afterkeydown"'); $('#lastName').attr('data-bind','value: lastName, valueUpdate: "afterkeydown"'); $('#fullName').attr('data-bind', 'text: fullName'); $('#firstNameValidation') .attr('data-bind','visible: firstName.hasError, text: firstName.validationMessage'); $('#lastNameValidation') .attr('data-bind','visible: lastName.hasError, text: lastName.validationMessage'); $('form').attr('data-bind', 'submit: saveName'); }); jQuery Can Help ….
  • 9. Consulting/Training function NameViewModel() { var self = this; this.firstName = ko.observable('Jeremy'); this.lastName = ko.observable(''); this.fullName = ko.computed(function() { if (self.lastName()) { if (self.firstName()) { return self.lastName() + ', ' + self.firstName(); } return self.lastName(); } return self.firstName(); }); } var viewModel = new NameViewModel(); Do I really need all of this ceremony? What if I am using data I just retrieved from a web service call, do I have to do all of this? KnockoutJS Can Help ….
  • 10. Consulting/Training  Encapsulation without obfuscation  Discovery without guessing  Type safety without killing ducks  Modularity  Inheritance  Separation of concerns  Designer/developer workflow  Unit testing  Data-binding  Code reuse  Extensibility There IS a BETTER way! “It keeps the cold liquids cold and the hot liquids hot. How does it know?”
  • 11. Consulting/Training (In which one finds TypeScript and AngularJS with Jasmine working together) The 6502 “Because I Can” Written in JavaScript runs on my Phone Simulator: http://apps.jeremylikness.com/t6502 Source: http://t6502.codeplex.com/
  • 12. Consulting/Training  Encapsulation with classes  Minimize “ritual” with inheritance  Discovery with interfaces  Type safety that doesn’t take away our right to duck-type  Modular code TypeScript
  • 13. Consulting/Training Interfaces Example Whoah IntelliSenseless! Where are my properties buried in all this mess? You’re giving me the whole universe!
  • 14. Consulting/Training Interfaces Example That’s more like it. And IAmSomeone doesn’t appear anywhere in my JavaScript code.
  • 18. Consulting/Training Inheritance (cont.) “I get by with a little help from my TypeScript compiler. It’s magic.”
  • 19. Consulting/Training  “XAML” for the web  Declarative (like HTML is)  Directives = “user controls”  Filters = “value converters”  Controllers = “view models”  Teach HTML new tricks (with a lot of tricks already in the bag)  Dependency Injection  Very test-friendly AngularJS “It’s a conspiracy by XAML developers to make the web look like Silverlight” “Nah, Dawg. Angular was cooked up by Google.”
  • 20. Consulting/Training Example App with AngularJS and TypeScript
  • 21. Consulting/Training Subscribers Enjoy  Expert Instructors  Quality Content  Practical Application  All Devices Wintellect’s On-Demand Video Training Solution Individuals | Businesses | Enterprise Organizations http://bit.ly/angularintro Authors Enjoy  Royalty Income  Personal Branding  Free Library Access  Cross-Sell Opportunities Try It Free! Use Promo Code: LIKNESS-13

Editor's Notes

  1. Author Opportunity Passive incomeClear marketing commitments to help grow your personal brand and your coursesInternational presence & exposureCross sell opportunities – instructor led classes, consulting opportunities, and conference speaking opportunitiesOpportunity to be the subject matter expert and to carve out a niche for yourself in this new businessAssociation with Wintellect