SlideShare une entreprise Scribd logo
1  sur  48
Télécharger pour lire hors ligne
Enyo + Onyx
                              for JS Nerds
                              Ben Combee (@unwiredben)
                            Austin JavaScript Meetup, April 2012




Wednesday, April 18, 2012
Wednesday, April 18, 2012
We need 500 apps for
                      the TouchPad, stat!
                            (that was Enyo 1.0)




Wednesday, April 18, 2012
We want apps from
                              devs that aren’t
                            HTML+CSS experts.
                             They need to run
                               everywhere.

Wednesday, April 18, 2012
How?



Wednesday, April 18, 2012
Components.
                    As seen in Visual Basic.
                      They’re not sexy.
                         They work.

Wednesday, April 18, 2012
iOS & Android
                            Chrome & Safari
                             Firefox & IE8+
                              Open webOS
                               Windows 8

Wednesday, April 18, 2012
Open Source.
                             Apache 2.0.


Wednesday, April 18, 2012
All source is on
                            github.com/enyojs


Wednesday, April 18, 2012
Enyo 2.0: The Parts



Wednesday, April 18, 2012
boot - load all the
                                 source


Wednesday, April 18, 2012
package.js:

                enyo.depends(
                
 “app.js”,
                
 “../css/app.css”,
                
 “$lib/onyx”);




Wednesday, April 18, 2012
kernel - OOP, there it is



Wednesday, April 18, 2012
enyo.kind() is a
                            constructor factory


Wednesday, April 18, 2012
enyo.kind({
                
 name: “tv.NewGirl”,
                
 kind: “TelevisionShow”,
                	 show: function() {
                	 	 this.inherited(arguments);
                
 
 system.play(“ng001.mp4”);
                	 }
                });
                var ng = new NewGirl();




Wednesday, April 18, 2012
enyo.Object provides
                         property publishing


Wednesday, April 18, 2012
enyo.kind({
                
 name: “UPC”,
                	 kind: enyo.Object,
                
 published: { productID: “0000000000” },
                	 create: function() {
                	 	 this. productIDChanged();
                	 },
                	 productIDChanged: function(oldValue) {
                	 	 this.barcode = generate(this.productID);
                	 }
                });



Wednesday, April 18, 2012
var x = new UPC({
                
 productID: “123456789X”
                });

                x.setProductID(“5678900002”);
                pID = x.getProductID();




Wednesday, April 18, 2012
enyo.Component
                       enables encapsulation
                            and events


Wednesday, April 18, 2012
enyo.kind({
                
 name: “SithLord”,
                
 kind: “Jedi”,
                
 events: { onSpeak: “” },
                	 scream: function(message) {
                	 	 doSpeak({
                	 	 	 message: message,
                
 
 
 tone: “whiney” });
                	 })
                });



Wednesday, April 18, 2012
enyo.kind({
                
 name: “SithLords”,
                	 components: [
                
 
 { kind: SithLord, name: “DarthVader”,
                
 
 
 onSpeak: “listenToToys” },
                
 
 { kind: SithLord, name: “Palpatine” },
                
 
 { kind: SithLord, name: “DarthSidious” }
                	 ],
                	 listenToToys: function(inSender, inEvent) {
                	 	 alert(inEvent.mesage);
                	 }
                });



Wednesday, April 18, 2012
var toys = new SithLords;

                toys.$.DarthVader.setWeapon(lightsaber);
                toys.$.DarthVader.throw(toys.$.Palpatine);
                toys.$.DarthVader.scream(“NOOOOOOO!”);




Wednesday, April 18, 2012
enyo.UIComponent
                            provides hooks for
                              layout control


Wednesday, April 18, 2012
enyo.Signals is routing
                       for app-level events


Wednesday, April 18, 2012
lang.js - utilities
                                log.js - logging
                       job.js - setTimeout wrapper
                     animation.js - math + reqFrame
                         macroize.js - templates


Wednesday, April 18, 2012
dom - dealing with
                                 HTML


Wednesday, April 18, 2012
enyo.Control:
                      a rendering engine for
                             HTML


Wednesday, April 18, 2012
enyo.kind({
                  name: “BumperSticker”,
                  kind: enyo.Control,
                  tag: “div”,
                  content: “Keep Austin Weird!”,
                  style: “color: blue; font-size: 96pt”
                });

                var bs = new BumperSticker();
                bs.renderInto(document.body);




Wednesday, April 18, 2012
dispatcher.js:
                     hooks all the standard
                     DOM events into the
                        Enyo scheme

Wednesday, April 18, 2012
enyo.kind({
                
 name: “BumperSticker”,
                
 content: “Keep Austin Weird!”,
                
 style: “color: blue; font-size: 96pt”,
                	 tap: function() {
                
 
 alert(“someone bumped me!”); }
                });

                var bs = new BumperSticker();
                bs.renderInto(document.body);




Wednesday, April 18, 2012
ajax - data-access
                  through XHR & JSONP


Wednesday, April 18, 2012
function apiOK(inAsync, inValue) {
                
 alert( “success: “ + inValue ); }
                function apiFAIL(inAsync, inError) {
                
 alert( “FAIL: “ + inError ); }

                var a = new enyo.Ajax({
                
 url: “http://example.org/api”
                }).response(apiOK).error(apiFAIL).go();




Wednesday, April 18, 2012
ui - building blocks for
                 making themed widgets


Wednesday, April 18, 2012
Button.js      BaseLayout.js
                            Checkbox.js    DragAvatar.js
                             Image.js         Group.js
                              Input.js      GroupItem.js
                            Repeater.js      Selection.js
                            RichText.js   ToolDecorator.js
                             Select.js



Wednesday, April 18, 2012
touch - enyo.Scroller &
                    touchscreen support


Wednesday, April 18, 2012
enyo.Scroller handles
                     how to show 10 lbs of
                      content in a 2lb box


Wednesday, April 18, 2012
...and now, let’s
                                introduce
                                  ONYX


Wednesday, April 18, 2012
enyo is the core
                             (think jQuery)


Wednesday, April 18, 2012
Onyx is our jQuery UI



Wednesday, April 18, 2012
CSS themes +
                              JS behavior +
                            composite controls


Wednesday, April 18, 2012
Onyx Sampler - live
                    views of all Onyx
                 controls & sample code


Wednesday, April 18, 2012
Support and Samples



Wednesday, April 18, 2012
API Viewer - pulls inline
                  documentation from
                     live source tree
                      enyojs.com/api

Wednesday, April 18, 2012
CryptoTweets -
                             game using enyo &
                            onyx & web services
                     combee.net/cryptotweets


Wednesday, April 18, 2012
Community Gallery -
                          enyo.js/gallery


Wednesday, April 18, 2012
Community Forums -
                        forums.enyojs.com


Wednesday, April 18, 2012
Blog - blog.enyojs.com



Wednesday, April 18, 2012
Twitter: @enyojs



Wednesday, April 18, 2012

Contenu connexe

Similaire à Enyo for JS Nerds - Austin JS Meetup, April 2012

Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j query
thewarlog
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Cheng Ta Yeh
 

Similaire à Enyo for JS Nerds - Austin JS Meetup, April 2012 (8)

PHP Loves MongoDB - Dublin MUG (by Hannes)
PHP Loves MongoDB - Dublin MUG (by Hannes)PHP Loves MongoDB - Dublin MUG (by Hannes)
PHP Loves MongoDB - Dublin MUG (by Hannes)
 
Introduction to j query
Introduction to j queryIntroduction to j query
Introduction to j query
 
Drupal Security Dive Into the Code
Drupal Security Dive Into the CodeDrupal Security Dive Into the Code
Drupal Security Dive Into the Code
 
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
Fluentd loves MongoDB, at MongoDB SV User Group, July 17, 2012
 
Oops lecture 1,2
Oops lecture 1,2Oops lecture 1,2
Oops lecture 1,2
 
The Heron Mapping Client
The Heron Mapping ClientThe Heron Mapping Client
The Heron Mapping Client
 
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPAIntegrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
Integrate Spring MVC with RequireJS & Backbone.js & Spring Data JPA
 
The Heron Mapping Client
The Heron Mapping ClientThe Heron Mapping Client
The Heron Mapping Client
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Enyo for JS Nerds - Austin JS Meetup, April 2012

  • 1. Enyo + Onyx for JS Nerds Ben Combee (@unwiredben) Austin JavaScript Meetup, April 2012 Wednesday, April 18, 2012
  • 3. We need 500 apps for the TouchPad, stat! (that was Enyo 1.0) Wednesday, April 18, 2012
  • 4. We want apps from devs that aren’t HTML+CSS experts. They need to run everywhere. Wednesday, April 18, 2012
  • 6. Components. As seen in Visual Basic. They’re not sexy. They work. Wednesday, April 18, 2012
  • 7. iOS & Android Chrome & Safari Firefox & IE8+ Open webOS Windows 8 Wednesday, April 18, 2012
  • 8. Open Source. Apache 2.0. Wednesday, April 18, 2012
  • 9. All source is on github.com/enyojs Wednesday, April 18, 2012
  • 10. Enyo 2.0: The Parts Wednesday, April 18, 2012
  • 11. boot - load all the source Wednesday, April 18, 2012
  • 12. package.js: enyo.depends( “app.js”, “../css/app.css”, “$lib/onyx”); Wednesday, April 18, 2012
  • 13. kernel - OOP, there it is Wednesday, April 18, 2012
  • 14. enyo.kind() is a constructor factory Wednesday, April 18, 2012
  • 15. enyo.kind({ name: “tv.NewGirl”, kind: “TelevisionShow”, show: function() { this.inherited(arguments); system.play(“ng001.mp4”); } }); var ng = new NewGirl(); Wednesday, April 18, 2012
  • 16. enyo.Object provides property publishing Wednesday, April 18, 2012
  • 17. enyo.kind({ name: “UPC”, kind: enyo.Object, published: { productID: “0000000000” }, create: function() { this. productIDChanged(); }, productIDChanged: function(oldValue) { this.barcode = generate(this.productID); } }); Wednesday, April 18, 2012
  • 18. var x = new UPC({ productID: “123456789X” }); x.setProductID(“5678900002”); pID = x.getProductID(); Wednesday, April 18, 2012
  • 19. enyo.Component enables encapsulation and events Wednesday, April 18, 2012
  • 20. enyo.kind({ name: “SithLord”, kind: “Jedi”, events: { onSpeak: “” }, scream: function(message) { doSpeak({ message: message, tone: “whiney” }); }) }); Wednesday, April 18, 2012
  • 21. enyo.kind({ name: “SithLords”, components: [ { kind: SithLord, name: “DarthVader”, onSpeak: “listenToToys” }, { kind: SithLord, name: “Palpatine” }, { kind: SithLord, name: “DarthSidious” } ], listenToToys: function(inSender, inEvent) { alert(inEvent.mesage); } }); Wednesday, April 18, 2012
  • 22. var toys = new SithLords; toys.$.DarthVader.setWeapon(lightsaber); toys.$.DarthVader.throw(toys.$.Palpatine); toys.$.DarthVader.scream(“NOOOOOOO!”); Wednesday, April 18, 2012
  • 23. enyo.UIComponent provides hooks for layout control Wednesday, April 18, 2012
  • 24. enyo.Signals is routing for app-level events Wednesday, April 18, 2012
  • 25. lang.js - utilities log.js - logging job.js - setTimeout wrapper animation.js - math + reqFrame macroize.js - templates Wednesday, April 18, 2012
  • 26. dom - dealing with HTML Wednesday, April 18, 2012
  • 27. enyo.Control: a rendering engine for HTML Wednesday, April 18, 2012
  • 28. enyo.kind({ name: “BumperSticker”, kind: enyo.Control, tag: “div”, content: “Keep Austin Weird!”, style: “color: blue; font-size: 96pt” }); var bs = new BumperSticker(); bs.renderInto(document.body); Wednesday, April 18, 2012
  • 29. dispatcher.js: hooks all the standard DOM events into the Enyo scheme Wednesday, April 18, 2012
  • 30. enyo.kind({ name: “BumperSticker”, content: “Keep Austin Weird!”, style: “color: blue; font-size: 96pt”, tap: function() { alert(“someone bumped me!”); } }); var bs = new BumperSticker(); bs.renderInto(document.body); Wednesday, April 18, 2012
  • 31. ajax - data-access through XHR & JSONP Wednesday, April 18, 2012
  • 32. function apiOK(inAsync, inValue) { alert( “success: “ + inValue ); } function apiFAIL(inAsync, inError) { alert( “FAIL: “ + inError ); } var a = new enyo.Ajax({ url: “http://example.org/api” }).response(apiOK).error(apiFAIL).go(); Wednesday, April 18, 2012
  • 33. ui - building blocks for making themed widgets Wednesday, April 18, 2012
  • 34. Button.js BaseLayout.js Checkbox.js DragAvatar.js Image.js Group.js Input.js GroupItem.js Repeater.js Selection.js RichText.js ToolDecorator.js Select.js Wednesday, April 18, 2012
  • 35. touch - enyo.Scroller & touchscreen support Wednesday, April 18, 2012
  • 36. enyo.Scroller handles how to show 10 lbs of content in a 2lb box Wednesday, April 18, 2012
  • 37. ...and now, let’s introduce ONYX Wednesday, April 18, 2012
  • 38. enyo is the core (think jQuery) Wednesday, April 18, 2012
  • 39. Onyx is our jQuery UI Wednesday, April 18, 2012
  • 40. CSS themes + JS behavior + composite controls Wednesday, April 18, 2012
  • 41. Onyx Sampler - live views of all Onyx controls & sample code Wednesday, April 18, 2012
  • 43. API Viewer - pulls inline documentation from live source tree enyojs.com/api Wednesday, April 18, 2012
  • 44. CryptoTweets - game using enyo & onyx & web services combee.net/cryptotweets Wednesday, April 18, 2012
  • 45. Community Gallery - enyo.js/gallery Wednesday, April 18, 2012
  • 46. Community Forums - forums.enyojs.com Wednesday, April 18, 2012