A brief overview of the Dojo Framework Enhanced Grid or how to quickly and easily organize the output of data in the form of tables
Often, many novice Web developers suffer from having to reinvent the wheel again and again.Outputting and formatting data becomes more complicated and confusing.But!Dojo can easily handle this task!
Foreword
About a year ago I started developing web applications in one company. Historically, the application used a large number of tables for data output. Each table is a kind of agent that retrieves data from the database and generates HTML. Over time, the number of tables continued to multiply, as did the number of agents, which began to create some problems with high server loads.
To solve this problem, it was decided to use Dojo. Now all that is required is data in JSON format, and the Enhanced Grid component will do all the routine work for us!
To better understand what is going on, watch this video from 3 minutes 35 seconds:
')
Minimum theory
Any grid in Dojo is a widget that generates an HTML table based on a sample of data. This data is stored in a specialized storage - Store.
dojo.require("dojo.data.ItemFileWriteStore"); // var data = { identifier: 'id', // items: [] // JSON }; // var store = new dojo.data.ItemFileWriteStore({data: data});