Problem
The documentation provides detailed guides for Neo.collection.Base and Neo.data.Model (Records), which are the building blocks of the data layer. However, there is no dedicated guide for Neo.data.Store, which is the class that developers will most commonly use to bring these concepts together and connect them to data-aware UI components like Grids and ComboBoxes. This leaves a gap in the learning path from understanding the core data classes to using them in practice.
Solution
Create a new guide in the learn/guides/datahandling section that focuses specifically on Neo.data.Store. This guide will act as a bridge, showing how to use Collections and Records together via the Store to manage and display data.
Content Outline
The guide should cover the following topics:
Introduction to data.Store:
- Explain that
data.Store extends collection.Base and is specialized for managing Record instances.
- Briefly recap its role as the central piece of the data layer for UI components.
Creating a Store:
- Show how to define a class that extends
Neo.data.Store.
- Explain the key
static config properties:
model: How to associate a Neo.data.Model.
keyProperty: Its importance for record lookups.
data: Providing inline, local data.
Loading Remote Data:
- Explain how to use the
url_ config to fetch data from a remote server.
- Show an example of the expected JSON response format.
- Explain the
autoLoad_ config.
Connecting Stores to Components:
- Provide a practical example of creating a
Neo.grid.Container and assigning a Store instance to its store config.
- Show how the grid automatically displays the data.
The sourceId Pattern for Shared Data:
- Explain the problem: filtering a shared store for one component (like a ComboBox) affects another (like a Grid).
- Demonstrate the solution:
- Create a main, unfiltered "master" store.
- Create a second store for a
ComboBox, configured with sourceId pointing to the master store.
- Show how filtering the ComboBox's store does not affect the master store or the Grid.
Interacting with a Store:
- Briefly cover common methods like
add(), remove(), get(), and how they work with Record instances.
- Mention the
recordChange event and its importance for granular UI updates.
Acceptance Criteria
- A new markdown file is created at
learn/guides/datahandling/UsingStores.md.
- The guide follows the proposed content outline.
- The guide includes clear, practical code examples.
- The new guide is added to the
learn/tree.json file.
Problem
The documentation provides detailed guides for
Neo.collection.BaseandNeo.data.Model(Records), which are the building blocks of the data layer. However, there is no dedicated guide forNeo.data.Store, which is the class that developers will most commonly use to bring these concepts together and connect them to data-aware UI components like Grids and ComboBoxes. This leaves a gap in the learning path from understanding the core data classes to using them in practice.Solution
Create a new guide in the
learn/guides/datahandlingsection that focuses specifically onNeo.data.Store. This guide will act as a bridge, showing how to use Collections and Records together via the Store to manage and display data.Content Outline
The guide should cover the following topics:
Introduction to
data.Store:data.Storeextendscollection.Baseand is specialized for managingRecordinstances.Creating a Store:
Neo.data.Store.static configproperties:model: How to associate aNeo.data.Model.keyProperty: Its importance for record lookups.data: Providing inline, local data.Loading Remote Data:
url_config to fetch data from a remote server.autoLoad_config.Connecting Stores to Components:
Neo.grid.Containerand assigning aStoreinstance to itsstoreconfig.The
sourceIdPattern for Shared Data:ComboBox, configured withsourceIdpointing to the master store.Interacting with a Store:
add(),remove(),get(), and how they work withRecordinstances.recordChangeevent and its importance for granular UI updates.Acceptance Criteria
learn/guides/datahandling/UsingStores.md.learn/tree.jsonfile.