SlideShare una empresa de Scribd logo
1 de 29
dojo.data, stores and
      widgets

Tobias von Klipstein - klipstein@uxebu.com

     uxebu Consulting Ltd. & Co. KG
dojo.data?
• uniform and consistent data access layer
• hides the underlying data structure
  (JSON, XML, CSV)
• a set of APIs/interfaces for writing data
  stores
• unique way to handle data with widgets
The big picture
                                Stores                      Widgets
        API
   dojo.data.Read       dojo.data.ItemFileReadStore     dijit.form.ComboBox


  dojo.data.Identity                                   dijit.form.FilteringSelect
                        dojox.data.QueryReadStore


                                                               dijit.Tree
                            dojox.data.CsvStore


                                                        dojox.grid.DataGrid


  dojo.data.Write       dojo.data.ItemFileWriteStore

                                                                 ...
                                    ...
dojo.data.Notification
Terminology
dojo.data             Database Term
datastore             cursor
data source           database
item                  row
attribute             column
value                 -
reference             (foreign key)
identity              primary key
query                 WHERE clause of SQL Select
dojo.data APIs        JDBC or ODBC
request               SQL Select
dojo.data APIs

• dojo.data.api.Read
• dojo.data.api.Write
• dojo.data.api.Identity
• dojo.data.api.Notification
dojo.data.api.Read
•                           •
    determine the APIs          testing any object, if it
    that a datastore            is an item of a store
    implements
                            •   lazy-loading of items
•   determine attributes
                            •   searching for items
    of each data item
                                that match a query
•   getting values of
                            •   sorting
    attributes
                            •   paging
•   testing, if a specific
                            •
    value is contained in       filtering (using query
    an attribute                and wildcards: *, _)
dojo.data.api.Write

• provides functions for:
 • creating new items
 • modifiying items
 • deleting items
dojo.data.api.Identity


• identify items by unique key
dojo.data.api.Notification

 •   implemented in conjunction with Write API

 •   provides notifications for:

     •   item creation (onNew)

     •   item modification (onSet)

     •   item deletion (onDelete)
Available stores
•   dojo.data

    •   ItemFileReadStore

    •   ItemFileWriteStore

•   dojox.data

    •   QueryReadStore

    •   CsvStore

    •   HtmlTableStore

    •   ServiceStore

    •   XmlStore
More stores
          (dojox.data)
• AndOrReadStore      • ItemExplorer
• AndOrWriteStore     • JsonQueryRestStore
• AppStore            • JsonRestStore
• AtomReadStore       • KeyValueStore
• CouchDBRestStore    • OpenSearchStore
• CssClassStore       • OpmlStore
• CssRuleStore        • PersevereStore
• FileStore           • PicasaStore
• FlickrRestStore     • RailsStore
• FlickrStore         • S3Store
• GoogleFeedStore     • SnapLogicStore
• GoogleSearchStore   • StoreExplorer
• HtmlStore           • WikipediaStore
ItemFileReadStore
• reading JSON
 • from an http endpoint (url attribute)
 • in-memory JavaScript-object (data attr.)
• deserialization of values (typeMap attr.)
• implements Read/Identity API (read-only!)
• using a predefined JSON structure
ItemFileReadStore
       compatible json data

{'identifier': 'abbr',
  'label': 'name',
  'items': [
   { 'abbr':'ec', 'name':'Ecuador', 'capital':'Quito' },
   { 'abbr':'eg', 'name':'Egypt', 'capital':'Cairo' },
   { 'abbr':'sv', 'name':'El Salvador', 'capital':'San Salv.' },
   { 'abbr':'gq', 'name':'Equatorial Guinea','capital':'Malabo'},
   ...
}
dojo.data fetch (1)
var store = new SomeStoreName({ /* store config data */);
store.fetch({
  start: 0,     // from where?
  count: 1000, // how many, tops?
  query: {
  // store specific!
  },
  sort: [
     { attribute: “attrName”, descending: true },
     // ...
  ],
  onBegin: function(numberFetched, request){ /* ... */ },
  onComplete: function(itemsArr, request){ /* ... */ },
  onError: function(errObj, request){ /* ... */ },
});
dojo.data fetch (2)

var onCompleteHandler = function(itemsArr, request){
  dojo.forEach(itemsArr, function(item){
  console.debug(
     store.getValue(item, “someAttributeName”);
     store.getIdentity(item); // returns the identity attr
     store.getLabel(item);
  };
}
Widgets using stores
•                                 •
    dijit.form.ComboBox               dojox.form.FilePickerTextBox,
                                      dojox.widget.FilePicker
•                                     (dojox.data.FileStore)
    dijit.form.FilteringSelect

                                  •
•                                     dojox.widget.Pager
    dijit.Tree

                                  •
•                                     dojox.widget.Roller
    dojox.grid.DataGrid

                                  •
•                                     dojox.widget.RollingList
    dojox.charting

                                  •
•                                     dojox.widget.SortList
    dojox.image.SlideShow

•   dojox.image.ThumbnailPicker
ComboBox / FilteringSelect
Tree
Grid
Charting
Slideshow
ThumbnailPicker
FilePicker
Pager
Roller
RollingList
SortList
DataGrid

•   Supports incremental data fetch/render and sort

•   Provides highly flexible layouts...

    •   Locked columns

    •   Cell formatters

    •   Complex row definitions

•   Paging via scrolling
Thank you!
Tobias von Klipstein, klipstein@uxebu.com

Más contenido relacionado

La actualidad más candente

Storage dei dati con MongoDB
Storage dei dati con MongoDBStorage dei dati con MongoDB
Storage dei dati con MongoDBAndrea Balducci
 
MongoD Essentials
MongoD EssentialsMongoD Essentials
MongoD Essentialszahid-mian
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDBAlex Zyl
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBJonathan Weiss
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingMyles Braithwaite
 
Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling rogerbodamer
 
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...Marco Gralike
 
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)Cubes - Lightweight Python OLAP (EuroPython 2012 talk)
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)Stefan Urbanek
 
The InfoGrid Graph DataBase
The InfoGrid Graph DataBaseThe InfoGrid Graph DataBase
The InfoGrid Graph DataBaseInfoGrid.org
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2MongoDB
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDBrogerbodamer
 

La actualidad más candente (17)

An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
Storage dei dati con MongoDB
Storage dei dati con MongoDBStorage dei dati con MongoDB
Storage dei dati con MongoDB
 
Mongo db queries
Mongo db queriesMongo db queries
Mongo db queries
 
Mongo db
Mongo dbMongo db
Mongo db
 
MongoD Essentials
MongoD EssentialsMongoD Essentials
MongoD Essentials
 
Introduction to Azure DocumentDB
Introduction to Azure DocumentDBIntroduction to Azure DocumentDB
Introduction to Azure DocumentDB
 
NoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDBNoSQL - An introduction to CouchDB
NoSQL - An introduction to CouchDB
 
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG MeetingApache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
Apache CouchDB Presentation @ Sept. 2104 GTALUG Meeting
 
Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling Intro to MongoDB and datamodeling
Intro to MongoDB and datamodeling
 
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...
Oracle Developer Day, 20 October 2009, Oracle De Meern, Holland: Oracle Datab...
 
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)Cubes - Lightweight Python OLAP (EuroPython 2012 talk)
Cubes - Lightweight Python OLAP (EuroPython 2012 talk)
 
MongoDB Meetup
MongoDB MeetupMongoDB Meetup
MongoDB Meetup
 
Full metal mongo
Full metal mongoFull metal mongo
Full metal mongo
 
The InfoGrid Graph DataBase
The InfoGrid Graph DataBaseThe InfoGrid Graph DataBase
The InfoGrid Graph DataBase
 
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
Joins and Other Aggregation Enhancements Coming in MongoDB 3.2
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Schema Design with MongoDB
Schema Design with MongoDBSchema Design with MongoDB
Schema Design with MongoDB
 

Similar a dojo.data, stores and widgets

In browser data stores
In browser data storesIn browser data stores
In browser data storesJames Thomas
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastGabriel Hamilton
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started TodayGabriel Hamilton
 
How dojo works
How dojo worksHow dojo works
How dojo worksAmit Tyagi
 
mongodb-introduction
mongodb-introductionmongodb-introduction
mongodb-introductionTse-Ching Ho
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...BradNeuberg
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responsesdarrelmiller71
 
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisJason Terpko
 
Working with the Web: 
Decoding JSON
Working with the Web: 
Decoding JSONWorking with the Web: 
Decoding JSON
Working with the Web: 
Decoding JSONSV.CO
 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesICF CIRCUIT
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBTobias Trelle
 
Introducing DataWave
Introducing DataWaveIntroducing DataWave
Introducing DataWaveData Works MD
 
Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDBMongoDB
 
Cross platform Mobile development on Titanium
Cross platform Mobile development on TitaniumCross platform Mobile development on Titanium
Cross platform Mobile development on TitaniumYiguang Hu
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSimonPilkington8
 
Apache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei BatisApache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei Batisday
 
Avro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAvro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAlexandre Victoor
 
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.GeeksLab Odessa
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 

Similar a dojo.data, stores and widgets (20)

In browser data stores
In browser data storesIn browser data stores
In browser data stores
 
Dojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, FastDojo: Beautiful Web Apps, Fast
Dojo: Beautiful Web Apps, Fast
 
Dojo: Getting Started Today
Dojo: Getting Started TodayDojo: Getting Started Today
Dojo: Getting Started Today
 
How dojo works
How dojo worksHow dojo works
How dojo works
 
Gaej For Beginners
Gaej For BeginnersGaej For Beginners
Gaej For Beginners
 
mongodb-introduction
mongodb-introductionmongodb-introduction
mongodb-introduction
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to RedisMongoDB: Comparing WiredTiger In-Memory Engine to Redis
MongoDB: Comparing WiredTiger In-Memory Engine to Redis
 
Working with the Web: 
Decoding JSON
Working with the Web: 
Decoding JSONWorking with the Web: 
Decoding JSON
Working with the Web: 
Decoding JSON
 
CIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM SitesCIRCUIT 2015 - Content API's For AEM Sites
CIRCUIT 2015 - Content API's For AEM Sites
 
Java Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDBJava Persistence Frameworks for MongoDB
Java Persistence Frameworks for MongoDB
 
Introducing DataWave
Introducing DataWaveIntroducing DataWave
Introducing DataWave
 
Managing Social Content with MongoDB
Managing Social Content with MongoDBManaging Social Content with MongoDB
Managing Social Content with MongoDB
 
Cross platform Mobile development on Titanium
Cross platform Mobile development on TitaniumCross platform Mobile development on Titanium
Cross platform Mobile development on Titanium
 
Swift Micro-services and AWS Technologies
Swift Micro-services and AWS TechnologiesSwift Micro-services and AWS Technologies
Swift Micro-services and AWS Technologies
 
Apache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei BatisApache Con Us2007 Apachei Batis
Apache Con Us2007 Apachei Batis
 
Avro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSONAvro, la puissance du binaire, la souplesse du JSON
Avro, la puissance du binaire, la souplesse du JSON
 
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
Java/Scala Lab: Борис Трофимов - Обжигающая Big Data.
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 

Último

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
[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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 

dojo.data, stores and widgets

  • 1. dojo.data, stores and widgets Tobias von Klipstein - klipstein@uxebu.com uxebu Consulting Ltd. & Co. KG
  • 2. dojo.data? • uniform and consistent data access layer • hides the underlying data structure (JSON, XML, CSV) • a set of APIs/interfaces for writing data stores • unique way to handle data with widgets
  • 3. The big picture Stores Widgets API dojo.data.Read dojo.data.ItemFileReadStore dijit.form.ComboBox dojo.data.Identity dijit.form.FilteringSelect dojox.data.QueryReadStore dijit.Tree dojox.data.CsvStore dojox.grid.DataGrid dojo.data.Write dojo.data.ItemFileWriteStore ... ... dojo.data.Notification
  • 4. Terminology dojo.data Database Term datastore cursor data source database item row attribute column value - reference (foreign key) identity primary key query WHERE clause of SQL Select dojo.data APIs JDBC or ODBC request SQL Select
  • 5. dojo.data APIs • dojo.data.api.Read • dojo.data.api.Write • dojo.data.api.Identity • dojo.data.api.Notification
  • 6. dojo.data.api.Read • • determine the APIs testing any object, if it that a datastore is an item of a store implements • lazy-loading of items • determine attributes • searching for items of each data item that match a query • getting values of • sorting attributes • paging • testing, if a specific • value is contained in filtering (using query an attribute and wildcards: *, _)
  • 7. dojo.data.api.Write • provides functions for: • creating new items • modifiying items • deleting items
  • 9. dojo.data.api.Notification • implemented in conjunction with Write API • provides notifications for: • item creation (onNew) • item modification (onSet) • item deletion (onDelete)
  • 10. Available stores • dojo.data • ItemFileReadStore • ItemFileWriteStore • dojox.data • QueryReadStore • CsvStore • HtmlTableStore • ServiceStore • XmlStore
  • 11. More stores (dojox.data) • AndOrReadStore • ItemExplorer • AndOrWriteStore • JsonQueryRestStore • AppStore • JsonRestStore • AtomReadStore • KeyValueStore • CouchDBRestStore • OpenSearchStore • CssClassStore • OpmlStore • CssRuleStore • PersevereStore • FileStore • PicasaStore • FlickrRestStore • RailsStore • FlickrStore • S3Store • GoogleFeedStore • SnapLogicStore • GoogleSearchStore • StoreExplorer • HtmlStore • WikipediaStore
  • 12. ItemFileReadStore • reading JSON • from an http endpoint (url attribute) • in-memory JavaScript-object (data attr.) • deserialization of values (typeMap attr.) • implements Read/Identity API (read-only!) • using a predefined JSON structure
  • 13. ItemFileReadStore compatible json data {'identifier': 'abbr', 'label': 'name', 'items': [ { 'abbr':'ec', 'name':'Ecuador', 'capital':'Quito' }, { 'abbr':'eg', 'name':'Egypt', 'capital':'Cairo' }, { 'abbr':'sv', 'name':'El Salvador', 'capital':'San Salv.' }, { 'abbr':'gq', 'name':'Equatorial Guinea','capital':'Malabo'}, ... }
  • 14. dojo.data fetch (1) var store = new SomeStoreName({ /* store config data */); store.fetch({ start: 0, // from where? count: 1000, // how many, tops? query: { // store specific! }, sort: [ { attribute: “attrName”, descending: true }, // ... ], onBegin: function(numberFetched, request){ /* ... */ }, onComplete: function(itemsArr, request){ /* ... */ }, onError: function(errObj, request){ /* ... */ }, });
  • 15. dojo.data fetch (2) var onCompleteHandler = function(itemsArr, request){ dojo.forEach(itemsArr, function(item){ console.debug( store.getValue(item, “someAttributeName”); store.getIdentity(item); // returns the identity attr store.getLabel(item); }; }
  • 16. Widgets using stores • • dijit.form.ComboBox dojox.form.FilePickerTextBox, dojox.widget.FilePicker • (dojox.data.FileStore) dijit.form.FilteringSelect • • dojox.widget.Pager dijit.Tree • • dojox.widget.Roller dojox.grid.DataGrid • • dojox.widget.RollingList dojox.charting • • dojox.widget.SortList dojox.image.SlideShow • dojox.image.ThumbnailPicker
  • 18. Tree
  • 19. Grid
  • 24. Pager
  • 28. DataGrid • Supports incremental data fetch/render and sort • Provides highly flexible layouts... • Locked columns • Cell formatters • Complex row definitions • Paging via scrolling
  • 29. Thank you! Tobias von Klipstein, klipstein@uxebu.com

Notas del editor