19

Click here to load reader

Data Loading for Ext GWT

  • Upload
    sencha

  • View
    2.882

  • Download
    1

Embed Size (px)

DESCRIPTION

The Ext GWT Data Loading API provides a powerful and flexible mechanism for retrieving remote or local data and binding the data to user interface components. During this session, you will learn will learn the difference between Data Loaders, Proxies and Readers and how they work together.

Citation preview

Page 1: Data Loading for Ext GWT

Ext GWTData Loading

DARRELL MEYER, SENCHASVEN BRUNKEN, SENCHA

Monday, November 29, 2010

Page 2: Data Loading for Ext GWT

OverviewConference App

ModelsLoaders

Loading ExamplesQuestions

Monday, November 29, 2010

Page 3: Data Loading for Ext GWT

Conference App

Monday, November 29, 2010

Page 4: Data Loading for Ext GWT

Ext GWT 2.2.1GWT 2.1

Java Persistence API (JPA)Google App Engine (GAE)

RequestFactoryGWT MVPDependency Injection with Gin

Download at http://dev.sencha.com/playpen/gxt/conference-app.zip

Technology Stack

Monday, November 29, 2010

Page 5: Data Loading for Ext GWT

Eclipse IDE for Java EE Developers (Helios 3.6.1)http://www.eclipse.org/downloads/

PluginsMaven Integration for Eclipsehttp://m2eclipse.sonatype.org/sites/m2e

Maven Integration for Eclipse WTP Integrationhttp://m2eclipse.sonatype.org/sites/m2e-extras

Google Eclipsehttp://code.google.com/eclipse/

IDE & Plugins

Monday, November 29, 2010

Page 6: Data Loading for Ext GWT

Models

Monday, November 29, 2010

Page 7: Data Loading for Ext GWT

Generic data type used throughout Ext GWTAllows form of introspectionInterface based with default implementation

Models & ModelData

Monday, November 29, 2010

Page 8: Data Loading for Ext GWT

Implement ChangeEventSourceModel implements ChangeEventSourceChangeListeners added to ModelsModels EventsUpdateAdd, Remove, Update TreeModel

Change Events & Listeners

Monday, November 29, 2010

Page 9: Data Loading for Ext GWT

Create Model instances from POJOsUse GWT RPC with non-modelsPOJOs need to be markedBeanModelMarker (indirect)BeanModelTag (direct)BeanModelLookup & BeanModelFactoryBeanModelReader

BeanModel

Monday, November 29, 2010

Page 10: Data Loading for Ext GWT

Loaders

Monday, November 29, 2010

Page 11: Data Loading for Ext GWT

Responsible for loading remote dataDelegates work to DataProxy & DataReaderInterface based with default implsSupports 3 eventsBeforeLoadLoadLoadException

Loader

Loader

DataProxy DataReader

Loader

ListLoader TreeLoader

PagingLoaderRemoteSortTreeLoader

Monday, November 29, 2010

Page 12: Data Loading for Ext GWT

Retrieve remote contentAny data type supported

DataProxy

DataProxy

HttpProxy MemoryProxy

PagingModelMemoryProxy

ScriptTagProxyRpcProxy

Monday, November 29, 2010

Page 13: Data Loading for Ext GWT

Coverts raw data to ModelData instances

DataReader

DataReader

BeanModelReader JsonReader

JsonLoadResultReader

TreeBeanModelReaderModelReader

TreeModelReader XmlReader

XmlLoadResultReader

Monday, November 29, 2010

Page 14: Data Loading for Ext GWT

Loading Examples

Monday, November 29, 2010

Page 15: Data Loading for Ext GWT

Example uses ScriptTagProxy, HttpProxy, & RpcProxy

DataProxy Example

Monday, November 29, 2010

Page 16: Data Loading for Ext GWT

Define the data with ModelTypeCreate DataProxyCreate DataReaderCreate Loader

DataProxy Example

Monday, November 29, 2010

Page 17: Data Loading for Ext GWT

Server implementation usingFilterPagingLoadConfigPagingLoadResult

Paging Loader Example

Monday, November 29, 2010

Page 18: Data Loading for Ext GWT

Questions?

Monday, November 29, 2010

Page 19: Data Loading for Ext GWT

Thanks!Twitter @darrellmeyer

Portions of this presentation from the GWT documentation licensed under the Creative Commons Attribution 3.0 License

Monday, November 29, 2010