SlideShare una empresa de Scribd logo
1 de 41
“Pulsar”
Ideas and plans




       1
Overview

• Next generation of JS library.
• Uses RequireJS as a loader.
• Implemented as a package.
• Targets different environments.



                    2
Why separate loader?

• Outsourcing all loading and
  dependency-tracking tasks.
 • Supports different platforms.
• Outsourcing “DOM ready”.
• Interoperability with other libraries.


                     3
Supported environments
 • Browser
  • Desktop
  • Mobile
  • Web workers
  • Strict mode
 • SSJS

                  4
Simple front


define([“pulsar”], function(dojo){
 // use here dojo.xxx as before
});




                   5
Layered structure
• JS-specific and platform-neutral
  modules
 • Idiomatic support: EDP, FP, AOP,
   OOP...
 • Helpers: strings, dates, json...
• Browser-specific modules
 • DOM, CSS, events, XHR...
                    6
Layered structure

• Platform-specific modules and scripts
 • Legacy browser augmentation
 • SSJS-specific extensions
 • Mobile-specific support



                   7
Package structure
• Pulsar package is implemented as a
  relevant CommonJS asynchronous
  package.
• “Main” module imports modules and
  mixes their APIs together presenting
  unified namespace.
• Different environments use different
  “main” modules and/or builds.
                   8
Supporting browser
• Browser
 • JS-specific and platform-neutral
   modules
 • DOM, CSS, events, XHR...
• Web workers
 • JS-specific and platform-neutral
 • XHR
                  9
Lessons of EmbedJS

• Building custom application- and
  platform-specific bases should be easy.
• Finer-grained modules.
• Simplified modules (example: query).
 • Trading features for size/speed.


                   10
Pulsar foundations
• Start with Dojo 1.x base.
 • Users are familiar with it.
 • Many parts are “good” and proven.
• Replace “bad” parts, add missing
  pieces.
 • Dojo Core, DojoX, plugd, EmbedJS,
   blade + custom code if needed.
                    11
DOM plan
• Replace attr() with prop().
  • Clear docs, less code.
• Split getters and setters (prop, style...).
  • Less code, faster functions.
• Unify NodeList methods with node
  functions.
  • Less code, less docs.
                      12
DOM events
• Remove connect().
 • Overloaded for AOP and DOM
   events.
 • Leads to inconsistent awkward code:
   dojo.connect(dojo.byId(“id”), ...);
• Add on(): dojo.on(“id”, “onclick”, ...);
• Split off AOP.
                     13
DOM events
• Support for event delegation.
• No IE6, IE7, IE8? in the base.
 • Legacy: should be handled separately.
• Variant: no disconnect.
 • on() returns an object with destroy()
   method, which handles disconnects.
 • The same style is used consistently.
                    14
DOM geometry
• The biggest mess we have in the base.
 • A lot of code.
 • Still buggy in some cases.
 • A lot of semi-public functions.
• We need to decide what to keep.
 • Feedback from Dijit team?

                    15
DOM geometry
• Possible plan of actions:
 • Keep position() in the base.
 • Move marginBox() and contentBox()
   to the core.
   • It means: they should be included
     explicitly by user.

                    16
XHR plan
• Keep objectToQuery() and
  queryToObject() separately.
 • They can be used by SSJS.
• Keep all form processing separately.
 • Cannot be used by web workers.
• Keep XHR (the I/O part) as a module.
 • For browsers and web workers.
                   17
Query plan

• What is the problem with query?
 • A lot of code.
 • Support issues.
 • Speed considerations.
 • Compatibility.


                     18
Query plan
• Alternatives:
 • Use Acme.
 • Use Sizzle.
   • Allow to use both?
 • Use cssQuery.
 • Use querySelectorAll.

                   19
Query plan
• Alternatives:
 • Use simplified query like EmbedJS
   and move the full-blown version to
   the core.
   • Cons: confusion? appearing less
     feature-rich?
• Allow all options for a custom base.

                   20
Query plan


• If we allow options there, we should
  stop using query in the base itself.




                   21
Query-related notes
• From my experience majority of code
  works with a single node:
 • DOM construction.
   • For several nodes templating is a
     better solution.
 • Node updates/manipulations.
• We have unnecessary overhead.
                   22
Query-related notes
• It would be nice to return the first
  matched element and stop searching.
 • In this case a single node should be
   returned rather than a NodeList.
• In any case single node functions are
  important.
 • Less overhead (proven practically).

                    23
Language helpers
• OOP
 • Should we move declare() out of the
   base?
  • It is lighter in Pulsar because the
    legacy support was removed.
 • If yes, do we need any light version?
  • Variant: delegate() + C3MRO
                   24
Globals

• Theoretically CommonJS modules can
  be evaluated in the sandbox.
 • No globals. All references are explicit.
 • What to do about dojo.config?



                    25
Legacy support
• Dojo 1.x is still the main focus of efforts.
  • We cannot afford another 0.4/0.9
    split.
• Dojo 2.0 will use the “soft start”:
  • The base first.
  • Some other modules are migrated or
    developed.
                     26
Legacy support
• All SSJS platforms are assumed to be
  legacy-free (double-check!).
• Only browsers need to be augmented.
 • We can handle browsers in two ways:
   • Conditional loading of modules (?).
   • User should include additional
     script(s), if needed.
                   27
Legacy support
• Possible solution:
 • Use Dean Edwards libraries: Base2,
   IE7, cssQuery.
 • Base2 can update prototypes for
   Array, Date, String to make them
   more conformant.
 • Base2 can augment browser objects,
   but it requires some code from us.
                       28
Legacy support
• Why augment prototypes instead of
  wrapper functions?
 • By using wrappers we penalize all
   browsers. Augmentation is free.
 • No need to augment every object:
   faster, and automatic.
• We do not augment Object.

                  29
Legacy support
• We cannot augment DOM objects.
 • Updating all objects on the fly can be
   taxing and impractical.
 • Back to wrapper functions?
• IE7 library “updates” IE6-8 to match
  IE9 HTML-wise and CSS-wise.
 • No direct effect on DOM.
                   30
Legacy support
• We may need to subset Base2 or
  provide our own solutions.
 • Base2 and IE7 are MIT licensed,
   cssQuery is LGPL.
• Augmenting DOM is not enough.
• We need to migrate from browser
  sniffing to feature detection.

                  31
Legacy support
• Feature detection:
 • I waited for dojo-fd to be finished, yet
   it is dormant for several months.
   • Ultimately I used the trunk.
 • has.js is done by Dojo contributors.
   • Should we integrate it somehow?
   • Pulsar’s browser.js is a sniffer.
                    32
Legacy support

• Possible solution:
 • Reserve a global namespace, which
   can be populated by a legacy shim.
 • Normal base modules check that
   namespace to route their functions
   properly.


                       33
Dojo Base 1.x/2.0 plan
 • Produce 1.6 as usual (end of 2010).
 • 1.7 base should coordinate with 2.0
   base.
  • Backports, deprecating old stuff.
 • 2.0 produces a compatibility module for
   1.7 base to ease the migration.
 • 1.8 finalizes base changes.
                     34
Marketing 2.0
• Guides how to migrate from 1.x and
  other major libraries to 2.0.
 • Possible compatibility layers for other
   major libraries to ease the transition.
• Common market of JS modules.
• Porting important modules from 1.x to
  2.0 including charting and grid.

                   35
Technical plan
• Everything in the base should be:
 • Documented.
 • Unit tested.
 • Benchmarked.
 • Size tested.
• Users should know benefits and
  tradeoffs exactly.
                   36
Technical plan
• All tests/demos should be hosted with
  optimized builds so we are not
  embarrassed by unrelated deficiencies.
• We have to select tools:
 • Builder/optimizer - RequireJS?
 • Inline docs - JSDoc? Dojo doc format?
 • Test harness - DOH?
                    37
General considerations
• JS is at the strange place now.
 • SSJS is red hot, yet driven by refugees
   from other languages.
 • I don’t know a single SSJS project that
   can partition a load between server
   and client.
 • James Burke and Kris Zyp are
   working on it with CommonJS.
                    38
General considerations
• JS the language is not used at 100%.
 • E.g., JS is capable of Code Generation
   (CG), yet almost nobody uses it.
   • CG is a norm for LISP languages.
   • Crockford: JS is “Lisp in C's
     Clothing”. Yet... nothing...
 • Yes, it works in strict mode too.
                    39
General considerations
• We need to explore hidden corners of JS
  and HTML5 to see if we can use them
  for the betterment of software
  development.
• We need to explore synergy between
  client and server on all levels.
 • Intelligent serving?
 • Smart pre-processing?
                   40
That’s all, folks!



        41

Más contenido relacionado

La actualidad más candente

Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)Martijn Verburg
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Martijn Verburg
 
Introduction to Hadoop - ACCU2010
Introduction to Hadoop - ACCU2010Introduction to Hadoop - ACCU2010
Introduction to Hadoop - ACCU2010Gavin Heavyside
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cacheSebastian Andrasoni
 
MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012Sean Laurent
 
Modern Java Concurrency (Devoxx Nov/2011)
Modern Java Concurrency (Devoxx Nov/2011)Modern Java Concurrency (Devoxx Nov/2011)
Modern Java Concurrency (Devoxx Nov/2011)Martijn Verburg
 
Your backend architecture is what matters slideshare
Your backend architecture is what matters slideshareYour backend architecture is what matters slideshare
Your backend architecture is what matters slideshareColin Charles
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011njbartlett
 
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptEnhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptJeremy Grelle
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLAlexei Krasner
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)jeresig
 
ceph openstack dream team
ceph openstack dream teamceph openstack dream team
ceph openstack dream teamUdo Seidel
 
Databases which, why and usage tips
Databases which, why and usage tipsDatabases which, why and usage tips
Databases which, why and usage tipsavnerner
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing InfinispanPT.JUG
 
Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Eugene Lazutkin
 
Orchestrating MySQL
Orchestrating MySQLOrchestrating MySQL
Orchestrating MySQLIvan Zoratti
 
Running Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureRunning Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureSimon Evans
 

La actualidad más candente (20)

Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)Polyglot and functional (Devoxx Nov/2011)
Polyglot and functional (Devoxx Nov/2011)
 
Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)Polyglot and Functional Programming (OSCON 2012)
Polyglot and Functional Programming (OSCON 2012)
 
Introduction to Hadoop - ACCU2010
Introduction to Hadoop - ACCU2010Introduction to Hadoop - ACCU2010
Introduction to Hadoop - ACCU2010
 
Infinispan, a distributed in-memory key/value data grid and cache
 Infinispan, a distributed in-memory key/value data grid and cache Infinispan, a distributed in-memory key/value data grid and cache
Infinispan, a distributed in-memory key/value data grid and cache
 
MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012MongoDB Case Study at NoSQL Now 2012
MongoDB Case Study at NoSQL Now 2012
 
Modern Java Concurrency (Devoxx Nov/2011)
Modern Java Concurrency (Devoxx Nov/2011)Modern Java Concurrency (Devoxx Nov/2011)
Modern Java Concurrency (Devoxx Nov/2011)
 
mtl_rubykaigi
mtl_rubykaigimtl_rubykaigi
mtl_rubykaigi
 
Your backend architecture is what matters slideshare
Your backend architecture is what matters slideshareYour backend architecture is what matters slideshare
Your backend architecture is what matters slideshare
 
Jax london 2011
Jax london 2011Jax london 2011
Jax london 2011
 
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScriptEnhancing Spring MVC Web Applications Progressively with Spring JavaScript
Enhancing Spring MVC Web Applications Progressively with Spring JavaScript
 
PostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQLPostgreSQL as an Alternative to MSSQL
PostgreSQL as an Alternative to MSSQL
 
mogpres
mogpresmogpres
mogpres
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
 
ceph openstack dream team
ceph openstack dream teamceph openstack dream team
ceph openstack dream team
 
Databases which, why and usage tips
Databases which, why and usage tipsDatabases which, why and usage tips
Databases which, why and usage tips
 
Introducing Infinispan
Introducing InfinispanIntroducing Infinispan
Introducing Infinispan
 
Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)Dojo for programmers (TXJS 2010)
Dojo for programmers (TXJS 2010)
 
Orchestrating MySQL
Orchestrating MySQLOrchestrating MySQL
Orchestrating MySQL
 
Running Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows AzureRunning Open Source Solutions on Windows Azure
Running Open Source Solutions on Windows Azure
 
End-to-end W3C APIs
End-to-end W3C APIsEnd-to-end W3C APIs
End-to-end W3C APIs
 

Destacado

Dojo GFX: SVG in the real world
Dojo GFX: SVG in the real worldDojo GFX: SVG in the real world
Dojo GFX: SVG in the real worldEugene Lazutkin
 
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007Eugene Lazutkin
 
SlideShare And SlideCasting
SlideShare And SlideCastingSlideShare And SlideCasting
SlideShare And SlideCastingMary Kajewski
 
Cook Shire Libraries October 2008
Cook Shire Libraries October 2008Cook Shire Libraries October 2008
Cook Shire Libraries October 2008Mary Kajewski
 
秋学期 第1回
秋学期 第1回秋学期 第1回
秋学期 第1回Koji Yamada
 
Functional practices in JavaScript
Functional practices in JavaScriptFunctional practices in JavaScript
Functional practices in JavaScriptEugene Lazutkin
 
Opal Training Project Presentation
Opal Training Project PresentationOpal Training Project Presentation
Opal Training Project PresentationMary Kajewski
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fuclimatewarrior
 
Apresentação herói maior man
Apresentação herói maior manApresentação herói maior man
Apresentação herói maior manzarronne
 
Comienza El Pgx 4
Comienza El Pgx 4Comienza El Pgx 4
Comienza El Pgx 4UNA
 
Como subir una imagen a tu blogger
Como subir una imagen a tu bloggerComo subir una imagen a tu blogger
Como subir una imagen a tu bloggerMCmaykolyx
 
Do it in remembrance of me at ssmc on 12 aug 2012
Do it in remembrance of me at ssmc on 12 aug 2012Do it in remembrance of me at ssmc on 12 aug 2012
Do it in remembrance of me at ssmc on 12 aug 2012SSMC
 
FERTILIZANTES ORANICO MINERAL
FERTILIZANTES ORANICO MINERALFERTILIZANTES ORANICO MINERAL
FERTILIZANTES ORANICO MINERALLeo BM
 

Destacado (20)

Dojo (QCon 2007 Slides)
Dojo (QCon 2007 Slides)Dojo (QCon 2007 Slides)
Dojo (QCon 2007 Slides)
 
Dojo GFX: SVG in the real world
Dojo GFX: SVG in the real worldDojo GFX: SVG in the real world
Dojo GFX: SVG in the real world
 
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
DojoX GFX Keynote Eugene Lazutkin SVG Open 2007
 
CRUD with Dojo
CRUD with DojoCRUD with Dojo
CRUD with Dojo
 
Fh Draft Nov 04
Fh   Draft Nov 04Fh   Draft Nov 04
Fh Draft Nov 04
 
SlideShare And SlideCasting
SlideShare And SlideCastingSlideShare And SlideCasting
SlideShare And SlideCasting
 
Cook Shire Libraries October 2008
Cook Shire Libraries October 2008Cook Shire Libraries October 2008
Cook Shire Libraries October 2008
 
秋学期 第1回
秋学期 第1回秋学期 第1回
秋学期 第1回
 
Functional practices in JavaScript
Functional practices in JavaScriptFunctional practices in JavaScript
Functional practices in JavaScript
 
Opal Training Project Presentation
Opal Training Project PresentationOpal Training Project Presentation
Opal Training Project Presentation
 
Python quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fu
 
Facts of the fake Indian independence
Facts of the fake Indian independenceFacts of the fake Indian independence
Facts of the fake Indian independence
 
Matriz Criativa
Matriz CriativaMatriz Criativa
Matriz Criativa
 
Apresentação herói maior man
Apresentação herói maior manApresentação herói maior man
Apresentação herói maior man
 
Censos 2011 aveiro
Censos 2011 aveiroCensos 2011 aveiro
Censos 2011 aveiro
 
Grupo Scout
Grupo ScoutGrupo Scout
Grupo Scout
 
Comienza El Pgx 4
Comienza El Pgx 4Comienza El Pgx 4
Comienza El Pgx 4
 
Como subir una imagen a tu blogger
Como subir una imagen a tu bloggerComo subir una imagen a tu blogger
Como subir una imagen a tu blogger
 
Do it in remembrance of me at ssmc on 12 aug 2012
Do it in remembrance of me at ssmc on 12 aug 2012Do it in remembrance of me at ssmc on 12 aug 2012
Do it in remembrance of me at ssmc on 12 aug 2012
 
FERTILIZANTES ORANICO MINERAL
FERTILIZANTES ORANICO MINERALFERTILIZANTES ORANICO MINERAL
FERTILIZANTES ORANICO MINERAL
 

Similar a Pulsar

SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSEugene Lazutkin
 
Dojo GFX workshop slides
Dojo GFX workshop slidesDojo GFX workshop slides
Dojo GFX workshop slidesEugene Lazutkin
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQLDon Demcsak
 
GR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume LaforgeGR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume LaforgeGR8Conf
 
Dojo Grids in XPages
Dojo Grids in XPagesDojo Grids in XPages
Dojo Grids in XPagesTeamstudio
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)Chris Simmonds
 
Go: What's Different ?
Go: What's Different ?Go: What's Different ?
Go: What's Different ?Tarun Vashisth
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challengesbcantrill
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)emiltamas
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overviewJesse Warden
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Cacereshernanibf
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_SummaryHiram Fleitas León
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPrashant Rane
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications OpenEBS
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsFabian Jakobs
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community EngineCommunity Engine
 
MongoDB at community engine
MongoDB at community engineMongoDB at community engine
MongoDB at community enginemathraq
 

Similar a Pulsar (20)

SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
 
Dojo GFX workshop slides
Dojo GFX workshop slidesDojo GFX workshop slides
Dojo GFX workshop slides
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Intro to Big Data and NoSQL
Intro to Big Data and NoSQLIntro to Big Data and NoSQL
Intro to Big Data and NoSQL
 
GR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume LaforgeGR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
GR8Conf 2009: Practical Groovy DSL by Guillaume Laforge
 
Dojo Grids in XPages
Dojo Grids in XPagesDojo Grids in XPages
Dojo Grids in XPages
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Go: What's Different ?
Go: What's Different ?Go: What's Different ?
Go: What's Different ?
 
Dynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open ChallengesDynamic Languages in Production: Progress and Open Challenges
Dynamic Languages in Production: Progress and Open Challenges
 
Scaling with mongo db (with notes)
Scaling with mongo db (with notes)Scaling with mongo db (with notes)
Scaling with mongo db (with notes)
 
Angular 2 overview
Angular 2 overviewAngular 2 overview
Angular 2 overview
 
One drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp CaceresOne drupal to rule them all - Drupalcamp Caceres
One drupal to rule them all - Drupalcamp Caceres
 
JavaFX 101
JavaFX 101JavaFX 101
JavaFX 101
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
 
Pune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCDPune-Cocoa: Blocks and GCD
Pune-Cocoa: Blocks and GCD
 
Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications Latest (storage IO) patterns for cloud-native applications
Latest (storage IO) patterns for cloud-native applications
 
Masterin Large Scale Java Script Applications
Masterin Large Scale Java Script ApplicationsMasterin Large Scale Java Script Applications
Masterin Large Scale Java Script Applications
 
Surge2012
Surge2012Surge2012
Surge2012
 
Mongo DB at Community Engine
Mongo DB at Community EngineMongo DB at Community Engine
Mongo DB at Community Engine
 
MongoDB at community engine
MongoDB at community engineMongoDB at community engine
MongoDB at community engine
 

Más de Eugene Lazutkin

Express: the web server for node.js
Express: the web server for node.jsExpress: the web server for node.js
Express: the web server for node.jsEugene Lazutkin
 
Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.Eugene Lazutkin
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applicationsEugene Lazutkin
 
Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part IIEugene Lazutkin
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part IEugene Lazutkin
 
DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007Eugene Lazutkin
 

Más de Eugene Lazutkin (12)

Service workers
Service workersService workers
Service workers
 
Advanced I/O in browser
Advanced I/O in browserAdvanced I/O in browser
Advanced I/O in browser
 
Streams
StreamsStreams
Streams
 
Express: the web server for node.js
Express: the web server for node.jsExpress: the web server for node.js
Express: the web server for node.js
 
TXJS 2013 in 10 minutes
TXJS 2013 in 10 minutesTXJS 2013 in 10 minutes
TXJS 2013 in 10 minutes
 
Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.Practical pairing of generative programming with functional programming.
Practical pairing of generative programming with functional programming.
 
Optimization of modern web applications
Optimization of modern web applicationsOptimization of modern web applications
Optimization of modern web applications
 
OOP in JS
OOP in JSOOP in JS
OOP in JS
 
Exciting JavaScript - Part II
Exciting JavaScript - Part IIExciting JavaScript - Part II
Exciting JavaScript - Part II
 
RAD CRUD
RAD CRUDRAD CRUD
RAD CRUD
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part I
 
DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007DojoX GFX Session Eugene Lazutkin SVG Open 2007
DojoX GFX Session Eugene Lazutkin SVG Open 2007
 

Último

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 educationjfdjdjcjdnsjd
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
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
 

Último (20)

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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Pulsar

  • 2. Overview • Next generation of JS library. • Uses RequireJS as a loader. • Implemented as a package. • Targets different environments. 2
  • 3. Why separate loader? • Outsourcing all loading and dependency-tracking tasks. • Supports different platforms. • Outsourcing “DOM ready”. • Interoperability with other libraries. 3
  • 4. Supported environments • Browser • Desktop • Mobile • Web workers • Strict mode • SSJS 4
  • 5. Simple front define([“pulsar”], function(dojo){ // use here dojo.xxx as before }); 5
  • 6. Layered structure • JS-specific and platform-neutral modules • Idiomatic support: EDP, FP, AOP, OOP... • Helpers: strings, dates, json... • Browser-specific modules • DOM, CSS, events, XHR... 6
  • 7. Layered structure • Platform-specific modules and scripts • Legacy browser augmentation • SSJS-specific extensions • Mobile-specific support 7
  • 8. Package structure • Pulsar package is implemented as a relevant CommonJS asynchronous package. • “Main” module imports modules and mixes their APIs together presenting unified namespace. • Different environments use different “main” modules and/or builds. 8
  • 9. Supporting browser • Browser • JS-specific and platform-neutral modules • DOM, CSS, events, XHR... • Web workers • JS-specific and platform-neutral • XHR 9
  • 10. Lessons of EmbedJS • Building custom application- and platform-specific bases should be easy. • Finer-grained modules. • Simplified modules (example: query). • Trading features for size/speed. 10
  • 11. Pulsar foundations • Start with Dojo 1.x base. • Users are familiar with it. • Many parts are “good” and proven. • Replace “bad” parts, add missing pieces. • Dojo Core, DojoX, plugd, EmbedJS, blade + custom code if needed. 11
  • 12. DOM plan • Replace attr() with prop(). • Clear docs, less code. • Split getters and setters (prop, style...). • Less code, faster functions. • Unify NodeList methods with node functions. • Less code, less docs. 12
  • 13. DOM events • Remove connect(). • Overloaded for AOP and DOM events. • Leads to inconsistent awkward code: dojo.connect(dojo.byId(“id”), ...); • Add on(): dojo.on(“id”, “onclick”, ...); • Split off AOP. 13
  • 14. DOM events • Support for event delegation. • No IE6, IE7, IE8? in the base. • Legacy: should be handled separately. • Variant: no disconnect. • on() returns an object with destroy() method, which handles disconnects. • The same style is used consistently. 14
  • 15. DOM geometry • The biggest mess we have in the base. • A lot of code. • Still buggy in some cases. • A lot of semi-public functions. • We need to decide what to keep. • Feedback from Dijit team? 15
  • 16. DOM geometry • Possible plan of actions: • Keep position() in the base. • Move marginBox() and contentBox() to the core. • It means: they should be included explicitly by user. 16
  • 17. XHR plan • Keep objectToQuery() and queryToObject() separately. • They can be used by SSJS. • Keep all form processing separately. • Cannot be used by web workers. • Keep XHR (the I/O part) as a module. • For browsers and web workers. 17
  • 18. Query plan • What is the problem with query? • A lot of code. • Support issues. • Speed considerations. • Compatibility. 18
  • 19. Query plan • Alternatives: • Use Acme. • Use Sizzle. • Allow to use both? • Use cssQuery. • Use querySelectorAll. 19
  • 20. Query plan • Alternatives: • Use simplified query like EmbedJS and move the full-blown version to the core. • Cons: confusion? appearing less feature-rich? • Allow all options for a custom base. 20
  • 21. Query plan • If we allow options there, we should stop using query in the base itself. 21
  • 22. Query-related notes • From my experience majority of code works with a single node: • DOM construction. • For several nodes templating is a better solution. • Node updates/manipulations. • We have unnecessary overhead. 22
  • 23. Query-related notes • It would be nice to return the first matched element and stop searching. • In this case a single node should be returned rather than a NodeList. • In any case single node functions are important. • Less overhead (proven practically). 23
  • 24. Language helpers • OOP • Should we move declare() out of the base? • It is lighter in Pulsar because the legacy support was removed. • If yes, do we need any light version? • Variant: delegate() + C3MRO 24
  • 25. Globals • Theoretically CommonJS modules can be evaluated in the sandbox. • No globals. All references are explicit. • What to do about dojo.config? 25
  • 26. Legacy support • Dojo 1.x is still the main focus of efforts. • We cannot afford another 0.4/0.9 split. • Dojo 2.0 will use the “soft start”: • The base first. • Some other modules are migrated or developed. 26
  • 27. Legacy support • All SSJS platforms are assumed to be legacy-free (double-check!). • Only browsers need to be augmented. • We can handle browsers in two ways: • Conditional loading of modules (?). • User should include additional script(s), if needed. 27
  • 28. Legacy support • Possible solution: • Use Dean Edwards libraries: Base2, IE7, cssQuery. • Base2 can update prototypes for Array, Date, String to make them more conformant. • Base2 can augment browser objects, but it requires some code from us. 28
  • 29. Legacy support • Why augment prototypes instead of wrapper functions? • By using wrappers we penalize all browsers. Augmentation is free. • No need to augment every object: faster, and automatic. • We do not augment Object. 29
  • 30. Legacy support • We cannot augment DOM objects. • Updating all objects on the fly can be taxing and impractical. • Back to wrapper functions? • IE7 library “updates” IE6-8 to match IE9 HTML-wise and CSS-wise. • No direct effect on DOM. 30
  • 31. Legacy support • We may need to subset Base2 or provide our own solutions. • Base2 and IE7 are MIT licensed, cssQuery is LGPL. • Augmenting DOM is not enough. • We need to migrate from browser sniffing to feature detection. 31
  • 32. Legacy support • Feature detection: • I waited for dojo-fd to be finished, yet it is dormant for several months. • Ultimately I used the trunk. • has.js is done by Dojo contributors. • Should we integrate it somehow? • Pulsar’s browser.js is a sniffer. 32
  • 33. Legacy support • Possible solution: • Reserve a global namespace, which can be populated by a legacy shim. • Normal base modules check that namespace to route their functions properly. 33
  • 34. Dojo Base 1.x/2.0 plan • Produce 1.6 as usual (end of 2010). • 1.7 base should coordinate with 2.0 base. • Backports, deprecating old stuff. • 2.0 produces a compatibility module for 1.7 base to ease the migration. • 1.8 finalizes base changes. 34
  • 35. Marketing 2.0 • Guides how to migrate from 1.x and other major libraries to 2.0. • Possible compatibility layers for other major libraries to ease the transition. • Common market of JS modules. • Porting important modules from 1.x to 2.0 including charting and grid. 35
  • 36. Technical plan • Everything in the base should be: • Documented. • Unit tested. • Benchmarked. • Size tested. • Users should know benefits and tradeoffs exactly. 36
  • 37. Technical plan • All tests/demos should be hosted with optimized builds so we are not embarrassed by unrelated deficiencies. • We have to select tools: • Builder/optimizer - RequireJS? • Inline docs - JSDoc? Dojo doc format? • Test harness - DOH? 37
  • 38. General considerations • JS is at the strange place now. • SSJS is red hot, yet driven by refugees from other languages. • I don’t know a single SSJS project that can partition a load between server and client. • James Burke and Kris Zyp are working on it with CommonJS. 38
  • 39. General considerations • JS the language is not used at 100%. • E.g., JS is capable of Code Generation (CG), yet almost nobody uses it. • CG is a norm for LISP languages. • Crockford: JS is “Lisp in C's Clothing”. Yet... nothing... • Yes, it works in strict mode too. 39
  • 40. General considerations • We need to explore hidden corners of JS and HTML5 to see if we can use them for the betterment of software development. • We need to explore synergy between client and server on all levels. • Intelligent serving? • Smart pre-processing? 40

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n