SlideShare a Scribd company logo
Dojo – from web page to web application Yoav Rubin, IBM Research – Haifa, yoav@il.ibm.com
What is a web application
What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application    has data, algorithms, APIs Accessed    the application itself can be accessed by anyone  Web browser    Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network    there is a need to minimize what’s being communicated
How does Dojo relates to it
What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application    has data, algorithms, APIs Accessed    the application itself can be accessed by anyone   Web browser    Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network    there is a need to minimize what’s being communicated
Dojo.data A data access layer Hides underlying data structures and formats  set of APIs/interfaces for writing data stores Unique way to handle data with widgets
The general architecture
Dojo.data translated to en-db SQL Select request JDBC or ODBC Dojo.data.api WHERE cause Query Primary key Identity Foreign key Reference -- Value Column Attribute Row Item Database Data source Cursor Datastore Database Term Dojo.data
Dojo.data – available stores  ItemFileReadStore and ItemFileWriteStore Would map to your DB on your server Several general purpose stores (found in dojox.data): CsvStore ServiceStore XmlStore OpmlStore JsonRestStore JsonQueryStore
But there are other kinds of possible data sources / applications
Getting the data from other web applications Found in dojox.data Wikipedia WikipediaStore Google search GoogleSearchStore Google feed GoogleFeedStore Picasa PicasaStore Flickr FlickrRestStore S3 S3Store
Getting data of your client side  HtmlTableStore Data found in a table in your application CssClassStore Data about the css classes used within your application (read only) CssRuleStore Data about the css rules (read only)
Presenting the data in a grid – dojox.grid.DataGrid Dynamic and editable data views Sortable and resizeable columns Data driven backing store Filtering Dynamic loading In-place editing Sub-grids Sub-views (Column locking) ‏ Fast virtual vertical scrolling Cell formatters to isolate content from layout
dojox.grid.DataGrid
Presenting the data in a tree – dijit.Tree DataStore driven, model backed Drag and Drop branches Forest support (hidden root) Custom icons for branches and leafs
What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application    has data, algorithms, APIs Accessed    the application itself can be accessed by anyone  Web browser    Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network    there is a need to minimize what’s being communicated
What do we know about our users – nothing What can we assume about our users – even less then that
Users diversity They use different browsers, with different versions They have different mother tongue language They may have disabilities How does a colorblind person sees my application Will my application cause a seizure to an epileptic person There are even user that prefer to use the keyboard over the mouse Remember all these vi / emacs users
What does dojo supports Browsers User’s locale can be determined by the application’s user, and defaults to the locale defined upon browser installation Localization Based on the user’s locale Parsing Presentation  Number, currency, date, time Internationalization Dojo fetches the right string and messages (a.k.a resource bundle) based on the user’s locale Accessibility Keyboard navigation High contrast mode WAI roles and states
What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application    has data, algorithms, APIs Accessed    the application itself can be accessed by anyone   Web browser    Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network    there is a need to minimize what’s being communicated
 
The skill set of client side development is very different from the skill set of server side development  Technologies Html, css, JavaScript, dom, flash/flex Platforms Browsers, devices Soft skills Usability, visual design Performance Network, runtime Other considerations Internationalization, accessibility  Technologies Java/ C# , PHP Platforms Servers, OS Soft skills Multi threading, deployment configuration Performance Connections, compilation optimizations Other considerations Security,  portability Each of these skills carries a baggage: tools, methodologies, protocols, testing etc.
Templating Templating is automatic generation of code The generator accepts Data  Generation template – a description how to transform data to code Need to have a good understanding of the generated code in order to create a good template Client  side code generation is usually done on the  server  side, mixed with server side code Think of servlets / JSP / ASP / PHP
Dojox.dtl – client side template engine A client side template engine Client side code generation as part of client side code What do we get by moving the engine to the client side Server side developer develop server side code Client side developer develop client side code Only the data is sent over the network Based on the Django Templating Language
Dojox.dtl – client side template engine The generation engine uses:  The input data is the widget’s object  Generation template is the widget’s template The generation engine creates an html code Transformed to DOM object DOM optimizations handled by the engine creators  Results eventually in the way that the widget is presented by the browser
Dojox.dtl – What can you write there Loops Conditional execution (if-else) Variables Predefined (e.g., a loop’s counter) User defined Knows how to work with dojo’s constructs AttachPoints, AttachEvents, Nested widgets
<ul> {%   for  item  in  itemsData  %} <li class=&quot;collection-row- {{ forloop.counter|divisibleby:&quot;2&quot;   }} &quot; dojoAttachEvent=&quot;onmouseover:onMouseOver,onmouseout:onMouseOut&quot; itemIndex=&quot; {{  forloop.counter  }} &quot;> <span> <a href=&quot;javascript:void(0)&quot;> {{  item.name  }} </a> </span> <span><img src=&quot;/images/ {{  item.state  }} -icon.gif&quot;></span> </li> {% endfor %} </ul>
Dojox.dtl – when to use A widget that suppose to present model backed information that is determined on runtime Especially when the data is structured and repeating Combine with data stores to get great result with very little code
What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application    has data, algorithms, APIs Accessed    the application itself can be accessed by anyone   Web browser    Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network    there is a need to minimize what’s being communicated
Web application communication scheme (for Ajax application) Client (Browser) Server Cacheable, heavy weighted, Once Non-cacheable, light weighted, Many times Bring me the application Application (.html, .js, .css, icons) Bring me some data Data (xml / json) Take some data Ack
How to handle the heavy weight stuff Make it less heavy (shrink it) Thus have a faster loading time Decrease the number of resources that travel over the network Each request comes along with a performance hit payload Less required resources    less requests    less time Cache as much as possible    only the first access to the application is slow
Dojo build system Minification of files using Shirnksafe Reduces whitespaces Removes comments Shortens variable names Merging of files to make a layer, which is a merge of several files needed to provide a closed functionality Based on the dojo.require call, build a dependency list and merge all of the files in that list Inline template of widgets into the .js file
How to handle the light weighted stuff Make it even lighter Reduce the processing done in the browser for each such interaction Use Json Pros: very efficient and smaller in size (when compared to XML) Cons: Can’t be protocolized (as oppose to XML schema) Agreed upon structure Verifiable contents
Dojo to the rescue – dojox.json.schema A schema based on a definition found in json-schema.org Which was already implemented in JavaScript, Java, PHP, Python, Prel, Ruby, .Net etc.  Defines a way to protocolize Json objects Dojox.json.schema.Validate Accepts a schema as an argument Accepts a Json object as an argument Performs validation
References http://www.dojotoolkit.org http://dojocampus.org http://www.slideshare.net/klipstein/dojodata-stores-and-widgets http://groups.google.com/group/json-schema/web/json-schema-implementations?pli =1

More Related Content

What's hot (20)

dmBridge & dmMonocle
dmBridge & dmMonocledmBridge & dmMonocle
dmBridge & dmMonocle
University of Nevada, Las Vegas
 
Rendering engine
Rendering engineRendering engine
Rendering engine
Dharita Chokshi
 
Html5
Html5Html5
Html5
mikusuraj
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
thebeebs
 
Nuxeo WebEngine: a practical introduction
Nuxeo WebEngine: a practical introductionNuxeo WebEngine: a practical introduction
Nuxeo WebEngine: a practical introduction
Nuxeo
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
Ariya Hidayat
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
Lorna Mitchell
 
Wt unit 1 ppts web development process
Wt unit 1 ppts web development processWt unit 1 ppts web development process
Wt unit 1 ppts web development process
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
Ivano Malavolta
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JS
Mats Bryntse
 
Wt unit 3 server side technology
Wt unit 3 server side technologyWt unit 3 server side technology
Wt unit 3 server side technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Apache Cordova 4.x
Apache Cordova 4.xApache Cordova 4.x
Apache Cordova 4.x
Ivano Malavolta
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming Language
TsungWei Hu
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and Composition
Dzmitry Varabei
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
Teamstudio
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Asp.net
Asp.netAsp.net
Asp.net
Naveen Sihag
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browser
Sabin Buraga
 
HTML5: the new frontier of the web
HTML5: the new frontier of the webHTML5: the new frontier of the web
HTML5: the new frontier of the web
Ivano Malavolta
 
The web as it should be
The web as it should beThe web as it should be
The web as it should be
thebeebs
 
Nuxeo WebEngine: a practical introduction
Nuxeo WebEngine: a practical introductionNuxeo WebEngine: a practical introduction
Nuxeo WebEngine: a practical introduction
Nuxeo
 
Understanding Webkit Rendering
Understanding Webkit RenderingUnderstanding Webkit Rendering
Understanding Webkit Rendering
Ariya Hidayat
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
Lorna Mitchell
 
Modern development paradigms
Modern development paradigmsModern development paradigms
Modern development paradigms
Ivano Malavolta
 
Building Rich Internet Applications with Ext JS
Building Rich Internet Applications  with Ext JSBuilding Rich Internet Applications  with Ext JS
Building Rich Internet Applications with Ext JS
Mats Bryntse
 
JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)JavaScript Libraries (Ajax Exp 2006)
JavaScript Libraries (Ajax Exp 2006)
jeresig
 
Python - A Comprehensive Programming Language
Python - A Comprehensive Programming LanguagePython - A Comprehensive Programming Language
Python - A Comprehensive Programming Language
TsungWei Hu
 
Chrome Internals: Paint and Composition
Chrome Internals: Paint and CompositionChrome Internals: Paint and Composition
Chrome Internals: Paint and Composition
Dzmitry Varabei
 
jQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPagesjQuery: The World's Most Popular JavaScript Library Comes to XPages
jQuery: The World's Most Popular JavaScript Library Comes to XPages
Teamstudio
 
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...IJCER (www.ijceronline.com) International Journal of computational Engineerin...
IJCER (www.ijceronline.com) International Journal of computational Engineerin...
ijceronline
 
Architecture of the Web browser
Architecture of the Web browserArchitecture of the Web browser
Architecture of the Web browser
Sabin Buraga
 

Similar to Dojo - from web page to web apps (20)

Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
Robert J. Stein
 
PowerPoint
PowerPointPowerPoint
PowerPoint
Videoguy
 
HTML5
HTML5HTML5
HTML5
Maurice De Beijer [MVP]
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
yoavrubin
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
Microsoft ArcReady
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
Lucas Jellema
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
dominion
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
koolkampus
 
java web services - soap and rest services
java web services - soap and rest  servicesjava web services - soap and rest  services
java web services - soap and rest services
VasantPrasad
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
Paul Klipp
 
Switch to Backend 2023
Switch to Backend 2023Switch to Backend 2023
Switch to Backend 2023
Google Developer Students Club NIT Silchar
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbone
zonathen
 
08 ajax
08 ajax08 ajax
08 ajax
Ynon Perek
 
L19 Application Architecture
L19 Application ArchitectureL19 Application Architecture
L19 Application Architecture
Ólafur Andri Ragnarsson
 
Html5
Html5Html5
Html5
Zahin Omar Alwa
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
Geoffrey Fox
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
Mahmoud Tolba
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
Sunil Kumar
 
Advanced Web Development
Advanced Web DevelopmentAdvanced Web Development
Advanced Web Development
Robert J. Stein
 
PowerPoint
PowerPointPowerPoint
PowerPoint
Videoguy
 
Intro to mobile web application development
Intro to mobile web application developmentIntro to mobile web application development
Intro to mobile web application development
zonathen
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
yoavrubin
 
ArcReady - Architecting For The Cloud
ArcReady - Architecting For The CloudArcReady - Architecting For The Cloud
ArcReady - Architecting For The Cloud
Microsoft ArcReady
 
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
The Story of How an Oracle Classic Stronghold successfully embraced SOA (ODTU...
Lucas Jellema
 
Using Ajax In Domino Web Applications
Using Ajax In Domino Web ApplicationsUsing Ajax In Domino Web Applications
Using Ajax In Domino Web Applications
dominion
 
21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS21. Application Development and Administration in DBMS
21. Application Development and Administration in DBMS
koolkampus
 
java web services - soap and rest services
java web services - soap and rest  servicesjava web services - soap and rest  services
java web services - soap and rest services
VasantPrasad
 
Krug Fat Client
Krug Fat ClientKrug Fat Client
Krug Fat Client
Paul Klipp
 
Intro to-html-backbone
Intro to-html-backboneIntro to-html-backbone
Intro to-html-backbone
zonathen
 
CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2CTS Conference Web 2.0 Tutorial Part 2
CTS Conference Web 2.0 Tutorial Part 2
Geoffrey Fox
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
Ajax toolkit framework
Ajax toolkit frameworkAjax toolkit framework
Ajax toolkit framework
Sunil Kumar
 

More from yoavrubin (6)

CR17 - Designing a database like an archaeologist
CR17 - Designing a database like an archaeologistCR17 - Designing a database like an archaeologist
CR17 - Designing a database like an archaeologist
yoavrubin
 
Designing a database like an archaeologist
Designing a database like an archaeologistDesigning a database like an archaeologist
Designing a database like an archaeologist
yoavrubin
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks week
yoavrubin
 
Clojure's take on concurrency
Clojure's take on concurrencyClojure's take on concurrency
Clojure's take on concurrency
yoavrubin
 
Functional OOP, Clojure style
Functional OOP, Clojure styleFunctional OOP, Clojure style
Functional OOP, Clojure style
yoavrubin
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
yoavrubin
 
CR17 - Designing a database like an archaeologist
CR17 - Designing a database like an archaeologistCR17 - Designing a database like an archaeologist
CR17 - Designing a database like an archaeologist
yoavrubin
 
Designing a database like an archaeologist
Designing a database like an archaeologistDesigning a database like an archaeologist
Designing a database like an archaeologist
yoavrubin
 
Functional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks weekFunctional Programming in Javascript - IL Tech Talks week
Functional Programming in Javascript - IL Tech Talks week
yoavrubin
 
Clojure's take on concurrency
Clojure's take on concurrencyClojure's take on concurrency
Clojure's take on concurrency
yoavrubin
 
Functional OOP, Clojure style
Functional OOP, Clojure styleFunctional OOP, Clojure style
Functional OOP, Clojure style
yoavrubin
 
JavaScript - Programming Languages course
JavaScript - Programming Languages course JavaScript - Programming Languages course
JavaScript - Programming Languages course
yoavrubin
 

Recently uploaded (20)

AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your UsersAutomation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
Automation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From AnywhereAutomation Dreamin': Capture User Feedback From Anywhere
Automation Dreamin': Capture User Feedback From Anywhere
Lynda Kane
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
"PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System""PHP and MySQL CRUD Operations for Student Management System"
"PHP and MySQL CRUD Operations for Student Management System"
Jainul Musani
 
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your UsersAutomation Dreamin' 2022: Sharing Some Gratitude with Your Users
Automation Dreamin' 2022: Sharing Some Gratitude with Your Users
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 

Dojo - from web page to web apps

  • 1. Dojo – from web page to web application Yoav Rubin, IBM Research – Haifa, [email protected]
  • 2. What is a web application
  • 3. What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application  has data, algorithms, APIs Accessed  the application itself can be accessed by anyone Web browser  Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network  there is a need to minimize what’s being communicated
  • 4. How does Dojo relates to it
  • 5. What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application  has data, algorithms, APIs Accessed  the application itself can be accessed by anyone Web browser  Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network  there is a need to minimize what’s being communicated
  • 6. Dojo.data A data access layer Hides underlying data structures and formats  set of APIs/interfaces for writing data stores Unique way to handle data with widgets
  • 8. Dojo.data translated to en-db SQL Select request JDBC or ODBC Dojo.data.api WHERE cause Query Primary key Identity Foreign key Reference -- Value Column Attribute Row Item Database Data source Cursor Datastore Database Term Dojo.data
  • 9. Dojo.data – available stores ItemFileReadStore and ItemFileWriteStore Would map to your DB on your server Several general purpose stores (found in dojox.data): CsvStore ServiceStore XmlStore OpmlStore JsonRestStore JsonQueryStore
  • 10. But there are other kinds of possible data sources / applications
  • 11. Getting the data from other web applications Found in dojox.data Wikipedia WikipediaStore Google search GoogleSearchStore Google feed GoogleFeedStore Picasa PicasaStore Flickr FlickrRestStore S3 S3Store
  • 12. Getting data of your client side HtmlTableStore Data found in a table in your application CssClassStore Data about the css classes used within your application (read only) CssRuleStore Data about the css rules (read only)
  • 13. Presenting the data in a grid – dojox.grid.DataGrid Dynamic and editable data views Sortable and resizeable columns Data driven backing store Filtering Dynamic loading In-place editing Sub-grids Sub-views (Column locking) ‏ Fast virtual vertical scrolling Cell formatters to isolate content from layout
  • 15. Presenting the data in a tree – dijit.Tree DataStore driven, model backed Drag and Drop branches Forest support (hidden root) Custom icons for branches and leafs
  • 16. What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application  has data, algorithms, APIs Accessed  the application itself can be accessed by anyone Web browser  Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network  there is a need to minimize what’s being communicated
  • 17. What do we know about our users – nothing What can we assume about our users – even less then that
  • 18. Users diversity They use different browsers, with different versions They have different mother tongue language They may have disabilities How does a colorblind person sees my application Will my application cause a seizure to an epileptic person There are even user that prefer to use the keyboard over the mouse Remember all these vi / emacs users
  • 19. What does dojo supports Browsers User’s locale can be determined by the application’s user, and defaults to the locale defined upon browser installation Localization Based on the user’s locale Parsing Presentation Number, currency, date, time Internationalization Dojo fetches the right string and messages (a.k.a resource bundle) based on the user’s locale Accessibility Keyboard navigation High contrast mode WAI roles and states
  • 20. What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application  has data, algorithms, APIs Accessed  the application itself can be accessed by anyone Web browser  Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network  there is a need to minimize what’s being communicated
  • 21.  
  • 22. The skill set of client side development is very different from the skill set of server side development Technologies Html, css, JavaScript, dom, flash/flex Platforms Browsers, devices Soft skills Usability, visual design Performance Network, runtime Other considerations Internationalization, accessibility Technologies Java/ C# , PHP Platforms Servers, OS Soft skills Multi threading, deployment configuration Performance Connections, compilation optimizations Other considerations Security, portability Each of these skills carries a baggage: tools, methodologies, protocols, testing etc.
  • 23. Templating Templating is automatic generation of code The generator accepts Data Generation template – a description how to transform data to code Need to have a good understanding of the generated code in order to create a good template Client side code generation is usually done on the server side, mixed with server side code Think of servlets / JSP / ASP / PHP
  • 24. Dojox.dtl – client side template engine A client side template engine Client side code generation as part of client side code What do we get by moving the engine to the client side Server side developer develop server side code Client side developer develop client side code Only the data is sent over the network Based on the Django Templating Language
  • 25. Dojox.dtl – client side template engine The generation engine uses: The input data is the widget’s object Generation template is the widget’s template The generation engine creates an html code Transformed to DOM object DOM optimizations handled by the engine creators Results eventually in the way that the widget is presented by the browser
  • 26. Dojox.dtl – What can you write there Loops Conditional execution (if-else) Variables Predefined (e.g., a loop’s counter) User defined Knows how to work with dojo’s constructs AttachPoints, AttachEvents, Nested widgets
  • 27. <ul> {% for item in itemsData %} <li class=&quot;collection-row- {{ forloop.counter|divisibleby:&quot;2&quot; }} &quot; dojoAttachEvent=&quot;onmouseover:onMouseOver,onmouseout:onMouseOut&quot; itemIndex=&quot; {{ forloop.counter }} &quot;> <span> <a href=&quot;javascript:void(0)&quot;> {{ item.name }} </a> </span> <span><img src=&quot;/images/ {{ item.state }} -icon.gif&quot;></span> </li> {% endfor %} </ul>
  • 28. Dojox.dtl – when to use A widget that suppose to present model backed information that is determined on runtime Especially when the data is structured and repeating Combine with data stores to get great result with very little code
  • 29. What is a web application From wikipedia: “ An application that is accessed via a web browser over a network” Application  has data, algorithms, APIs Accessed  the application itself can be accessed by anyone Web browser  Ajax technologies in the client side (HTML, DOM, JavaScript, CSS) Over a network  there is a need to minimize what’s being communicated
  • 30. Web application communication scheme (for Ajax application) Client (Browser) Server Cacheable, heavy weighted, Once Non-cacheable, light weighted, Many times Bring me the application Application (.html, .js, .css, icons) Bring me some data Data (xml / json) Take some data Ack
  • 31. How to handle the heavy weight stuff Make it less heavy (shrink it) Thus have a faster loading time Decrease the number of resources that travel over the network Each request comes along with a performance hit payload Less required resources  less requests  less time Cache as much as possible  only the first access to the application is slow
  • 32. Dojo build system Minification of files using Shirnksafe Reduces whitespaces Removes comments Shortens variable names Merging of files to make a layer, which is a merge of several files needed to provide a closed functionality Based on the dojo.require call, build a dependency list and merge all of the files in that list Inline template of widgets into the .js file
  • 33. How to handle the light weighted stuff Make it even lighter Reduce the processing done in the browser for each such interaction Use Json Pros: very efficient and smaller in size (when compared to XML) Cons: Can’t be protocolized (as oppose to XML schema) Agreed upon structure Verifiable contents
  • 34. Dojo to the rescue – dojox.json.schema A schema based on a definition found in json-schema.org Which was already implemented in JavaScript, Java, PHP, Python, Prel, Ruby, .Net etc. Defines a way to protocolize Json objects Dojox.json.schema.Validate Accepts a schema as an argument Accepts a Json object as an argument Performs validation
  • 35. References http://www.dojotoolkit.org http://dojocampus.org http://www.slideshare.net/klipstein/dojodata-stores-and-widgets http://groups.google.com/group/json-schema/web/json-schema-implementations?pli =1