SlideShare uma empresa 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante 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
 

Semelhante 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

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
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
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
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
 
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
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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...
 
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
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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?
 
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
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

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 do Editor