SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Enterprise JavaScript Development: Oxymoron?
 Part 2 of 2




                            Jeremy Likness (@JeremyLikness)
                            Principal Consultant
                            jlikness@wintellect.com
                                                                Copyright © 2012




consulting   training   design   debugging                    wintellect.com
Agenda
 •   JSLint / JSHint – personal style is for fashion, not code
 •   jQuery – one API to bind them all
 •   JSON and Web API – flexible information on demand
 •   Twitter Bootstrap – one layout to rule them all
 •   Underscore.js – the Swiss army knife of JavaScript
 •   Backbone.js – MVC on the client
 •   RequireJS – dependency resolution
 •   MVVM (for example, Kendo UI) – “Gotta keep „em separated”
 •   Amplify.js – publisher/subscriber for the client
 •   … and many more great projects we won‟t have time to discuss today




consulting   training   design   debugging                    wintellect.com
JSLint / JSHint
 • JSLint – JavaScript code that checks for problems in JavaScript code
 • Authored by Douglas Crockford, who helped develop the JavaScript
   language, pioneered JSON and wrote The Good Parts
 • Very restrictive – many debates over whether it is the right tool or not
 • JSHint – code quality tool, open source project
      – Fork of JSLint
      – More flexible
      – Help avoid typos and language “gotchas”
 • Available as a Visual Studio extension
      – Install from Tools -> Extensions and Updates
      – Configure – you can even error builds based on the results
      – Start early because existing code can be a bear to fix




consulting    training   design     debugging                        wintellect.com
demo
   JSLint and JSHint




consulting   training   design   debugging   wintellect.com
jQuery
 • Very “recent” API – released in 2006
 • Most popular JavaScript library in use
 • Designed to make it easier to perform client-side scripting without
   worrying about browser-specific idioms
 • Bundled with the Visual Studio 2012 MVC templates
 • Support for current Firefox, Safari, Opera, and Chrome versions, and
   Internet Explorer 6 and above
 • Support for plug-ins
      – jQuery UI
      – jQuery grid
      – jQuery mobile




consulting   training   design   debugging                     wintellect.com
demo
   jQuery




consulting   training   design   debugging   wintellect.com
JSON and Web API
 •   JSON is client-side data “for free”
 •   JSON is very human readable
 •   JSON is more compact than XML
 •   JSON is a popular format for REST
 •   Web API makes it extremely easy to stand up REST end points
 •   Web API provides true “negotiation” of content types
 •   Web API gives control over response codes
 •   Very easy syntax with jQuery




consulting   training   design   debugging                    wintellect.com
demo
   JSON and Web API




consulting   training   design   debugging   wintellect.com
Twitter Bootstrap
 •   Fixed and fluid layouts
 •   Browser compatibility
 •   Tablet and smartphone support (responsive CSS)
 •   Provides tons of CSS for existing components:
      –   Forms
      –   Labels
      –   Alert boxes
      –   Typographical sections
 • Also includes JavaScript extensions for various features
      – Alert, Tooltip, Modal, etc.
 • Great way to baseline your application
 • Completely customizable CSS




consulting    training    design      debugging               wintellect.com
demo
   Twitter Bootstrap




consulting   training   design   debugging   wintellect.com
Underscore.js
 • Swiss Army Knife
 • Lots of great collection-based functions
      –   Each
      –   Find
      –   Filter
      –   Map
      –   Reduce
      –   Pluck
 • Testers
      – Is Empty?
      – Has?
      – Etc.
 • Templates
 • Helpers i.e. bind = no more self-invoking function


consulting    training   design   debugging             wintellect.com
demo
   Underscore.js




consulting   training   design   debugging   wintellect.com
Backbone.js
 • MVC on the client (C = Collection, not Controller!)
 • Models
      –   Constructors
      –   Defaults
      –   Change notification
      –   Initialization
 • Collections
      – Auto-binding to REST end points
      – Change notification
 • Views
      – Bind to tags
      – Support for templates
 • Events
 • Navigation / Browser journal
 • Great for “data over forms” style applications

consulting     training   design   debugging             wintellect.com
demo
   Backbone.js




consulting   training   design   debugging   wintellect.com
Require.js
 •   Script file / module loader
 •   In-browser dynamic assembly of components
 •   Designed to improve speed and quality
 •   Load modules only if/when/as needed
 •   Optimizer tool can compress JavaScript into single file
 •   In each file, you use this to load other scripts that are dependencies:
     require(["app/services"], function(services) { ...




consulting   training   design   debugging                         wintellect.com
demo
   Require.js




consulting   training   design   debugging   wintellect.com
MVVM (Kendo UI)
 • Telerik
 • Knockout.js equivalent “open source” version
 • ObservableObject
      –   Bind for event handlers
      –   Get/Set for property updates with change notification
      –   toJSON for clean transport
      –   Exposes a change event
 • ObservableArray
      – Array with change tracking
      – Most basic array functions supported
 • Model – specialized ObservableObject with data definition for data
   sources
 • Validator – works with existing HTML5 tags and allows for custom
   rules


consulting    training    design     debugging                    wintellect.com
demo
   Kendo UI / MVVM




consulting   training   design   debugging   wintellect.com
Amplify.js (Postal.js)
 • JavaScript implementation of publish/subscribe pattern
 • Synchronous and asynchronous
 • No external dependencies
 • Channels for further scoping
 • Envelopes for correlation, tracking, etc.
 • Use events on objects and subscribe within modules
 • Use publisher/subscriber for decoupled communication
   between/across modules
 • Use the adapter pattern to adapt pub/sub to events
 • Wiretap to log all events




consulting   training   design   debugging                  wintellect.com
demo
   Amplify.js




consulting   training   design   debugging   wintellect.com
Recap
 •   JavaScript is good
 •   JavaScript has bad parts
 •   JavaScript can get ugly
 •   Known the language
 •   Program with JavaScript, not "C# using JavaScript"
 •   Learn how to make your code:
      –   Use the good parts (JSHint/JSLint)
      –   Cross-browser friendly (jQuery)
      –   Fluid and adaptable (Twitter Bootstrap)
      –   Data-friendly (JSON)
      –   Consistent (tools like underscore)
      –   Modular (Backbone, Requires)
      –   Testable and Extendable (MVVM)
      –   Decoupled (Postal)



consulting     training   design     debugging            wintellect.com
Links and Recommendations

 • Twitter me:
   @JeremyLikness
 • Blog me:
   http://csharperimage.jeremylikness.com/
 • JavaScript: The Good Parts
   ISBN: 0596517742




consulting   training   design   debugging   wintellect.com
Questions?




                            Jeremy Likness (@JeremyLikness)
                            Principal Consultant
                            jlikness@wintellect.com



consulting   training   design   debugging                    wintellect.com

Weitere ähnliche Inhalte

Was ist angesagt?

Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolboxSkysoul Pty.Ltd.
 
UI Standards Presentation 2
UI Standards Presentation 2UI Standards Presentation 2
UI Standards Presentation 2Joshua Jeffryes
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsPop Apps
 
Life ray training
Life ray training Life ray training
Life ray training Mayur Sand
 
concrete5 from developer perspective
concrete5 from developer perspectiveconcrete5 from developer perspective
concrete5 from developer perspectivemainio
 
IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)IWMW
 
Standardization in W3C
Standardization in W3CStandardization in W3C
Standardization in W3CJonathan Jeon
 
Building rich interface components with SharePoint
Building rich interface components with SharePointBuilding rich interface components with SharePoint
Building rich interface components with SharePointLouis-Philippe Lavoie
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?Chris Mills
 
SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSMitch Chen
 
Front end developer responsibilities what does a front-end developer do?
Front end developer responsibilities  what does a front-end developer do?Front end developer responsibilities  what does a front-end developer do?
Front end developer responsibilities what does a front-end developer do?Katy Slemon
 
Html5 with SharePoint 2010
Html5 with SharePoint 2010Html5 with SharePoint 2010
Html5 with SharePoint 2010Hemant Joshi
 
Do you need jQuery in 2019?
Do you need jQuery in 2019?Do you need jQuery in 2019?
Do you need jQuery in 2019?LindaHsu19
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationJonathan Abrams
 
JVx with VisionX and Oracle Forms integration
JVx with VisionX and Oracle Forms integrationJVx with VisionX and Oracle Forms integration
JVx with VisionX and Oracle Forms integrationSIB Visions GmbH
 

Was ist angesagt? (20)

Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolbox
 
UI Standards Presentation 2
UI Standards Presentation 2UI Standards Presentation 2
UI Standards Presentation 2
 
WebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page AppsWebNetConf 2012 - Single Page Apps
WebNetConf 2012 - Single Page Apps
 
Life ray training
Life ray training Life ray training
Life ray training
 
Concrete5 workshop
Concrete5 workshopConcrete5 workshop
Concrete5 workshop
 
concrete5 from developer perspective
concrete5 from developer perspectiveconcrete5 from developer perspective
concrete5 from developer perspective
 
IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)IWMW 2002: Web standards briefing (session C2)
IWMW 2002: Web standards briefing (session C2)
 
Standardization in W3C
Standardization in W3CStandardization in W3C
Standardization in W3C
 
Building rich interface components with SharePoint
Building rich interface components with SharePointBuilding rich interface components with SharePoint
Building rich interface components with SharePoint
 
HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?HTML5 and CSS3: does now really mean now?
HTML5 and CSS3: does now really mean now?
 
Practical html5
Practical html5Practical html5
Practical html5
 
SPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJSSPA, Scalable Application & AngularJS
SPA, Scalable Application & AngularJS
 
Web Development
Web DevelopmentWeb Development
Web Development
 
Wheel.js
Wheel.jsWheel.js
Wheel.js
 
Spa with angular
Spa with angularSpa with angular
Spa with angular
 
Front end developer responsibilities what does a front-end developer do?
Front end developer responsibilities  what does a front-end developer do?Front end developer responsibilities  what does a front-end developer do?
Front end developer responsibilities what does a front-end developer do?
 
Html5 with SharePoint 2010
Html5 with SharePoint 2010Html5 with SharePoint 2010
Html5 with SharePoint 2010
 
Do you need jQuery in 2019?
Do you need jQuery in 2019?Do you need jQuery in 2019?
Do you need jQuery in 2019?
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
JVx with VisionX and Oracle Forms integration
JVx with VisionX and Oracle Forms integrationJVx with VisionX and Oracle Forms integration
JVx with VisionX and Oracle Forms integration
 

Andere mochten auch

I server duress system design
 I server duress system design I server duress system design
I server duress system designQBsoft Solutions
 
Programação de Bezerros - palcos
Programação de Bezerros - palcosProgramação de Bezerros - palcos
Programação de Bezerros - palcosGiovanni Sandes
 
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15reportingonhealth
 
Surviving Financial Distress1
Surviving Financial Distress1Surviving Financial Distress1
Surviving Financial Distress1mwerling
 
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15reportingonhealth
 
Safe cities & gender issues 14 7-2015
Safe cities & gender issues  14 7-2015Safe cities & gender issues  14 7-2015
Safe cities & gender issues 14 7-2015VIBHUTI PATEL
 

Andere mochten auch (6)

I server duress system design
 I server duress system design I server duress system design
I server duress system design
 
Programação de Bezerros - palcos
Programação de Bezerros - palcosProgramação de Bezerros - palcos
Programação de Bezerros - palcos
 
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Jay Angoff: "King v. Burwell: Obamacare on the Brink?" 6.16.15
 
Surviving Financial Distress1
Surviving Financial Distress1Surviving Financial Distress1
Surviving Financial Distress1
 
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15
Linda Greenhouse: "King v. Burwell: Obamacare on the Brink?" 6.16.15
 
Safe cities & gender issues 14 7-2015
Safe cities & gender issues  14 7-2015Safe cities & gender issues  14 7-2015
Safe cities & gender issues 14 7-2015
 

Ähnlich wie Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2

AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptxNishchaiyaBayla1
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachPROIDEA
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technologyChris Love
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMChris Bannon
 
Wintellect - Windows 8 for the Silverlight and WPF Developer
Wintellect   - Windows 8 for the Silverlight and WPF DeveloperWintellect   - Windows 8 for the Silverlight and WPF Developer
Wintellect - Windows 8 for the Silverlight and WPF DeveloperJeremy Likness
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao Behara
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao Behara
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web ApplicationYakov Fain
 
Putting together a web app
Putting together a web appPutting together a web app
Putting together a web appRyan Lou
 
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
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)Oursky
 

Ähnlich wie Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2 (20)

Silverlight 5
Silverlight 5Silverlight 5
Silverlight 5
 
Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Training presentation.pptx
Training presentation.pptxTraining presentation.pptx
Training presentation.pptx
 
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav TulachJDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
JDD2015: Java Everywhere Again—with DukeScript - Jaroslav Tulach
 
Intro to modern web technology
Intro to modern web technologyIntro to modern web technology
Intro to modern web technology
 
Santosh_Resume_Java
Santosh_Resume_JavaSantosh_Resume_Java
Santosh_Resume_Java
 
A Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVMA Smooth Transition to HTML5 Using MVVM
A Smooth Transition to HTML5 Using MVVM
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
Wintellect - Windows 8 for the Silverlight and WPF Developer
Wintellect   - Windows 8 for the Silverlight and WPF DeveloperWintellect   - Windows 8 for the Silverlight and WPF Developer
Wintellect - Windows 8 for the Silverlight and WPF Developer
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Chalam_JAVA_Portal
Chalam_JAVA_PortalChalam_JAVA_Portal
Chalam_JAVA_Portal
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
 
Ramarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_WebserviceRamarao_US_NewNumber_Promatrix_Webservice
Ramarao_US_NewNumber_Promatrix_Webservice
 
Seven Versions of One Web Application
Seven Versions of One Web ApplicationSeven Versions of One Web Application
Seven Versions of One Web Application
 
Putting together a web app
Putting together a web appPutting together a web app
Putting together a web app
 
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
 
KhajavaliShaik
KhajavaliShaikKhajavaliShaik
KhajavaliShaik
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 

Kürzlich hochgeladen

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 

Kürzlich hochgeladen (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 

Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2

  • 1. Enterprise JavaScript Development: Oxymoron? Part 2 of 2 Jeremy Likness (@JeremyLikness) Principal Consultant jlikness@wintellect.com Copyright © 2012 consulting training design debugging wintellect.com
  • 2. Agenda • JSLint / JSHint – personal style is for fashion, not code • jQuery – one API to bind them all • JSON and Web API – flexible information on demand • Twitter Bootstrap – one layout to rule them all • Underscore.js – the Swiss army knife of JavaScript • Backbone.js – MVC on the client • RequireJS – dependency resolution • MVVM (for example, Kendo UI) – “Gotta keep „em separated” • Amplify.js – publisher/subscriber for the client • … and many more great projects we won‟t have time to discuss today consulting training design debugging wintellect.com
  • 3. JSLint / JSHint • JSLint – JavaScript code that checks for problems in JavaScript code • Authored by Douglas Crockford, who helped develop the JavaScript language, pioneered JSON and wrote The Good Parts • Very restrictive – many debates over whether it is the right tool or not • JSHint – code quality tool, open source project – Fork of JSLint – More flexible – Help avoid typos and language “gotchas” • Available as a Visual Studio extension – Install from Tools -> Extensions and Updates – Configure – you can even error builds based on the results – Start early because existing code can be a bear to fix consulting training design debugging wintellect.com
  • 4. demo JSLint and JSHint consulting training design debugging wintellect.com
  • 5. jQuery • Very “recent” API – released in 2006 • Most popular JavaScript library in use • Designed to make it easier to perform client-side scripting without worrying about browser-specific idioms • Bundled with the Visual Studio 2012 MVC templates • Support for current Firefox, Safari, Opera, and Chrome versions, and Internet Explorer 6 and above • Support for plug-ins – jQuery UI – jQuery grid – jQuery mobile consulting training design debugging wintellect.com
  • 6. demo jQuery consulting training design debugging wintellect.com
  • 7. JSON and Web API • JSON is client-side data “for free” • JSON is very human readable • JSON is more compact than XML • JSON is a popular format for REST • Web API makes it extremely easy to stand up REST end points • Web API provides true “negotiation” of content types • Web API gives control over response codes • Very easy syntax with jQuery consulting training design debugging wintellect.com
  • 8. demo JSON and Web API consulting training design debugging wintellect.com
  • 9. Twitter Bootstrap • Fixed and fluid layouts • Browser compatibility • Tablet and smartphone support (responsive CSS) • Provides tons of CSS for existing components: – Forms – Labels – Alert boxes – Typographical sections • Also includes JavaScript extensions for various features – Alert, Tooltip, Modal, etc. • Great way to baseline your application • Completely customizable CSS consulting training design debugging wintellect.com
  • 10. demo Twitter Bootstrap consulting training design debugging wintellect.com
  • 11. Underscore.js • Swiss Army Knife • Lots of great collection-based functions – Each – Find – Filter – Map – Reduce – Pluck • Testers – Is Empty? – Has? – Etc. • Templates • Helpers i.e. bind = no more self-invoking function consulting training design debugging wintellect.com
  • 12. demo Underscore.js consulting training design debugging wintellect.com
  • 13. Backbone.js • MVC on the client (C = Collection, not Controller!) • Models – Constructors – Defaults – Change notification – Initialization • Collections – Auto-binding to REST end points – Change notification • Views – Bind to tags – Support for templates • Events • Navigation / Browser journal • Great for “data over forms” style applications consulting training design debugging wintellect.com
  • 14. demo Backbone.js consulting training design debugging wintellect.com
  • 15. Require.js • Script file / module loader • In-browser dynamic assembly of components • Designed to improve speed and quality • Load modules only if/when/as needed • Optimizer tool can compress JavaScript into single file • In each file, you use this to load other scripts that are dependencies: require(["app/services"], function(services) { ... consulting training design debugging wintellect.com
  • 16. demo Require.js consulting training design debugging wintellect.com
  • 17. MVVM (Kendo UI) • Telerik • Knockout.js equivalent “open source” version • ObservableObject – Bind for event handlers – Get/Set for property updates with change notification – toJSON for clean transport – Exposes a change event • ObservableArray – Array with change tracking – Most basic array functions supported • Model – specialized ObservableObject with data definition for data sources • Validator – works with existing HTML5 tags and allows for custom rules consulting training design debugging wintellect.com
  • 18. demo Kendo UI / MVVM consulting training design debugging wintellect.com
  • 19. Amplify.js (Postal.js) • JavaScript implementation of publish/subscribe pattern • Synchronous and asynchronous • No external dependencies • Channels for further scoping • Envelopes for correlation, tracking, etc. • Use events on objects and subscribe within modules • Use publisher/subscriber for decoupled communication between/across modules • Use the adapter pattern to adapt pub/sub to events • Wiretap to log all events consulting training design debugging wintellect.com
  • 20. demo Amplify.js consulting training design debugging wintellect.com
  • 21. Recap • JavaScript is good • JavaScript has bad parts • JavaScript can get ugly • Known the language • Program with JavaScript, not "C# using JavaScript" • Learn how to make your code: – Use the good parts (JSHint/JSLint) – Cross-browser friendly (jQuery) – Fluid and adaptable (Twitter Bootstrap) – Data-friendly (JSON) – Consistent (tools like underscore) – Modular (Backbone, Requires) – Testable and Extendable (MVVM) – Decoupled (Postal) consulting training design debugging wintellect.com
  • 22. Links and Recommendations • Twitter me: @JeremyLikness • Blog me: http://csharperimage.jeremylikness.com/ • JavaScript: The Good Parts ISBN: 0596517742 consulting training design debugging wintellect.com
  • 23. Questions? Jeremy Likness (@JeremyLikness) Principal Consultant jlikness@wintellect.com consulting training design debugging wintellect.com

Hinweis der Redaktion

  1. Show the original first. Run in IE8 and IE9, then show crash in IE7 – find out if students can even see where the crash is coming from.Run JSLint, note it stops after a short time and you have to keep making fixes to keep it moving. Note complaints about spaces. Show that the defect was addressed.Now configure JSHint and show that experience.
  2. Run in browser, then show IETester and run in IE 6.0Show the form, then the logic, then the view – note how this helps structure the code and make it more readable
  3. Show fetch in ChromeShow fetch in IEShow fiddler testing
  4. Show fetch in ChromeShow fetch in IEShow fiddler testing
  5. Show fetch in ChromeShow fetch in IEShow fiddler testing
  6. Show fetch in ChromeShow fetch in IEShow fiddler testing
  7. Show fetch in ChromeShow fetch in IEShow fiddler testing
  8. Show fetch in ChromeShow fetch in IEShow fiddler testing
  9. Show fetch in ChromeShow fetch in IEShow fiddler testing