This document discusses loading data in Ext GWT applications. It provides an overview of models, loaders, data proxies, and data readers used to load data from remote sources. Examples are given of using different data proxies like ScriptTagProxy, HttpProxy and RpcProxy. It also shows a paging loader example to load data from the server using paging. The presentation aims to explain the key components and patterns involved in loading and managing remote data in Ext GWT applications.
4. Technology Stack
Ext GWT 2.2.1
GWT 2.1
Java Persistence API (JPA)
Google App Engine (GAE)
RequestFactory
GWT MVP
Dependency Injection with Gin
Download at http://dev.sencha.com/playpen/gxt/conference-app.zip
Monday, November 29, 2010
5. IDE & Plugins
Eclipse IDE for Java EE Developers (Helios 3.6.1)
http://www.eclipse.org/downloads/
Plugins
Maven Integration for Eclipse
http://m2eclipse.sonatype.org/sites/m2e
Maven Integration for Eclipse WTP Integration
http://m2eclipse.sonatype.org/sites/m2e-extras
Google Eclipse
http://code.google.com/eclipse/
Monday, November 29, 2010
7. Models & ModelData
Generic data type used throughout Ext GWT
Allows form of introspection
Interface based with default implementation
Monday, November 29, 2010
8. Change Events & Listeners
Implement ChangeEventSource
Model implements ChangeEventSource
ChangeListeners added to Models
Models Events
Update
Add, Remove, Update TreeModel
Monday, November 29, 2010
9. BeanModel
Create Model instances from POJOs
Use GWT RPC with non-models
POJOs need to be marked
BeanModelMarker (indirect)
BeanModelTag (direct)
BeanModelLookup & BeanModelFactory
BeanModelReader
Monday, November 29, 2010
11. Loader DataProxy DataReader
Responsible for loading remote data
Delegates work to DataProxy & DataReader
Interface based with default impls Loader
Supports 3 events
BeforeLoad
Load
LoadException Loader
ListLoader TreeLoader
RemoteSort
PagingLoader
TreeLoader
Monday, November 29, 2010
12. DataProxy
Retrieve remote content
Any data type supported
DataProxy
HttpProxy MemoryProxy RpcProxy ScriptTagProxy
PagingModel
MemoryProxy
Monday, November 29, 2010
13. DataReader
Coverts raw data to ModelData instances
DataReader
BeanModel TreeBean TreeModel
JsonReader ModelReader XmlReader
Reader ModelReader Reader
JsonLoad XmlLoad
ResultReader ResultReader
Monday, November 29, 2010
19. Thanks!
Twitter @darrellmeyer
Portions of this presentation from the GWT documentation licensed under the Creative Commons Attribution 3.0 License
Monday, November 29, 2010