SlideShare ist ein Scribd-Unternehmen logo
1 von 70
Downloaden Sie, um offline zu lesen
Thursday, November 3, 2011
2.0 to 3.0 MIGRATION GUIDE
                              Darrell Meyer
                              Ext GWT Lead
                               Sencha Inc.

                             darrell@sencha.com
                                #darrellmeyer




Thursday, November 3, 2011
Overview
                             General Changes
                               Components
                                 Layouts
                                  Models
                               Data Widgets
                             Stores & Loaders
                                 Theming




Thursday, November 3, 2011
General Changes




Thursday, November 3, 2011
General Changes
      Package namespace change com.extjs to com.sencha
      Module breakup
      com.sencha.gxt.core.Core
      com.sencha.gxt.cell.Core
      com.sencha.gxt.data.Data
      com.sencha.gxt.dnd.DND
      com.sencha.gxt.fx.Fx
      com.sencha.gxt.messages.Messages
      com.sencha.gxt.state.State
      com.sencha.gxt.theme.Base
      com.sencha.gxt.theme.Blue
      com.sencha.gxt.widget.Core
      com.sencha.gxt.ui.GXT - works like 2.0 GXT module


Thursday, November 3, 2011
Legacy Module
       Bindings
       ModelData
       MVC
       Old XTemplate




Thursday, November 3, 2011
Deprecated Code

       All GXT 2.0 deprecated code removed from 3.0
       com.extjs.gxt.ui.client.binder - move to legacy
       com.extjs.gxt.ui.client.tree
       com.extjs.gxt.ui.client.treetable




Thursday, November 3, 2011
Components




Thursday, November 3, 2011
El vs. XElement
      XElement replaces El class
      XElement extends JavaScriptObject is not wrapper
      component.el() now component.getElement()
      Any GWT Element can be cast to XElement

     // 2.0
     ContentPanel panel = new ContentPanel();
     panel.el().getFrameWidth("lr");

     // 3.0
     ContentPanel panel = new ContentPanel();
     panel.getElement().getFrameWidth(Side.LEFT, Side.RIGHT);

     // casting Element to XElement
     HTML html = new HTML("I am a GWT Widget");
     html.getElement().<XElement>cast().getFrameWidth(Side.LEFT, Side.RIGHT);


Thursday, November 3, 2011
XTemplate
       Replaced runtime JavaScript XTemplate
       Compile time using Deferred Binding
       Can retrieve data from any Java Bean
       Works with SafeHtml




Thursday, November 3, 2011
2.0 XTemplate

                       XTemplate.create(getDetailTemplate());

                       public native String getDetailTemplate() /*-{
                         return ['<div class="details">',
                         '<tpl for=".">',
                         '<img src="{modPath}"><div class="details-info">',
                         '<b>Image Name:</b>',
                         '<span>{name}</span>',
                         '<b>Size:</b>',
                         '<span>{sizeString}</span>',
                         '<b>Last Modified:</b>',
                         '<span>{dateString}</span></div></tpl></div>'].join("");
                       }-*/;




Thursday, November 3, 2011
3.0 XTemplate
        interface DetailRenderer extends XTemplates {
          @XTemplate(source = "AdvancedListViewDetail.html")
          public SafeHtml render(Photo photo);
        }

        DetailRenderer renderer = GWT.create(DetailRenderer.class);

        <div class="details">
          <img src="{path}"><div class="details-info">
          <b>Image Name:</b><span>{name}</span>
          <b>Size:</b><span>{size:number("#0")}k</span>
          <b>Last Modified:</b><span>{date:date("M/d/yyyy")}</span>
        </div>




Thursday, November 3, 2011
Lazy Rendering




Thursday, November 3, 2011
Lazy Rendering
      2.0
      Components create their DOM lazily
      Can’t work on DOM before Component rendered




Thursday, November 3, 2011
Lazy Rendering
      2.0
      Components create their DOM lazily
      Can’t work on DOM before Component rendered


      3.0
      Component create their DOM at construction
      DOM available immediately




Thursday, November 3, 2011
Lazy Rendering
      2.0
      Components create their DOM lazily
      Can’t work on DOM before Component rendered


      3.0
      Component create their DOM at construction
      DOM available immediately
              // 2.0
              ContentPanel panel = new ContentPanel();
              panel.el().setLeft(10); // fails, DOM does not exist

              // 3.0
              ContentPanel panel = new ContentPanel();
              panel.getElement().setLeft(10); // works


Thursday, November 3, 2011
Events & Handlers




Thursday, November 3, 2011
Events & Handlers

      2.0
      Custom GXT events & handlers
      Events have getters not applicable to all events
      Must read docs




Thursday, November 3, 2011
Events & Handlers

      2.0
      Custom GXT events & handlers
      Events have getters not applicable to all events
      Must read docs


      3.0
      GWT Handlers
      Strongly Typed
      Typed events vs. generic events




Thursday, November 3, 2011
Events & Handlers




Thursday, November 3, 2011
Events & Handlers
          // 2.0 generic listeners, must match event with correct event type
          ContentPanel panel = new ContentPanel();
          panel.addListener(Events.Expand, new Listener<ComponentEvent>() {
            public void handleEvent(ComponentEvent be) {
              // generic event
            }
          });




Thursday, November 3, 2011
Events & Handlers
          // 2.0 generic listeners, must match event with correct event type
          ContentPanel panel = new ContentPanel();
          panel.addListener(Events.Expand, new Listener<ComponentEvent>() {
            public void handleEvent(ComponentEvent be) {
              // generic event
            }
          });



           // 3.0 strongly typed, can’t misuse API
           ContentPanel panel = new ContentPanel();
           panel.addExpandHandler(new ExpandHandler() {
             @Override
             public void onExpand(ExpandEvent event) {
               // typed event
             }
           });


Thursday, November 3, 2011
ContentPanel Changes




Thursday, November 3, 2011
ContentPanel Changes

      2.0
      ContentPanel supports “framed / unframed”
      Support top component and bottom component




Thursday, November 3, 2011
ContentPanel Changes

      2.0
      ContentPanel supports “framed / unframed”
      Support top component and bottom component



      3.0
      ContentPanel & FramedPanel
      Removed support of top and bottom component




Thursday, November 3, 2011
2.0 ContentPanel

                             ContentPanel panel = new ContentPanel();
                             panel.setFrame(true);
                             panel.setLayout(new FitLayout());

                             ToolBar toolBar = new ToolBar();
                             toolBar.add(new LabelToolItem("ToolBar"));

                             panel.setTopComponent(toolBar);

                             panel.add(new Html("Fill panel"));




Thursday, November 3, 2011
3.0 ContentPanel
                FramedPanel panel = new FramedPanel(); // panel extends SimpleContainer

                VerticalLayoutContainer con = new VerticalLayoutContainer();
                panel.setWidget(con);

                ToolBar toolBar = new ToolBar();
                toolBar.add(new LabelToolItem("ToolBar"));

                con.add(toolBar, new VerticalLayoutData(1, -1));
                con.add(new HTML("Fill panel"), new VerticalLayoutData(1, 1));




Thursday, November 3, 2011
Fields & FormLayout




Thursday, November 3, 2011
Fields & FormLayout

      2.0
      Label set of ïŹelds directly
      Field labels can only be rendered into FormLayout




Thursday, November 3, 2011
Fields & FormLayout

      2.0
      Label set of ïŹelds directly
      Field labels can only be rendered into FormLayout


      3.0
      Labels provided via FieldLabel
      Fields and FieldLabel can render any any layout
      FormLayout no longer needed and removed




Thursday, November 3, 2011
Field Validation




Thursday, November 3, 2011
Field Validation
       2.0
       Validation built into ïŹelds themselves
       Validator interface only supported with TextField
       Hard to add custom validation




Thursday, November 3, 2011
Field Validation
       2.0
       Validation built into ïŹelds themselves
       Validator interface only supported with TextField
       Hard to add custom validation



        3.0
        Validation removed from Fields
        All ïŹelds support adding zero to many Validators




Thursday, November 3, 2011
Field Validators

            field = new TextField();
            field.addValidator(new MinLengthValidator(4));
            field.addValidator(new EmptyValidator<String>());

            number = new NumberField<Integer>(new IntegerPropertyEditor());
            number.addValidator(new MinNumberValidator<Integer>(3));




Thursday, November 3, 2011
Layouts




Thursday, November 3, 2011
Layouts




Thursday, November 3, 2011
Layouts
       2.0
       Generic container supports all layouts
       Possible to use wrong layout data with layout




Thursday, November 3, 2011
Layouts
       2.0
       Generic container supports all layouts
       Possible to use wrong layout data with layout


       3.0
       Layout collapsed into container
       Strongly typed layout containers




Thursday, November 3, 2011
Layouts
                                 2.0                3.0
                             BorderLayout   BorderLayoutContainer

           Container         CenterLayout   CenterLayoutContainer

                             FlowLayout     FlowLayoutContainer




Thursday, November 3, 2011
Layout Example




Thursday, November 3, 2011
Layout Example
                      // 2.0
                      LayoutContainer con = new LayoutContainer();
                      con.setLayout(new FlowLayout());
                      con.add(new HTML("child 1"));
                      // 2nd param takes any layout data instance
                      con.add(new HTML("child 2"), new MarginData(5));




Thursday, November 3, 2011
Layout Example
                      // 2.0
                      LayoutContainer con = new LayoutContainer();
                      con.setLayout(new FlowLayout());
                      con.add(new HTML("child 1"));
                      // 2nd param takes any layout data instance
                      con.add(new HTML("child 2"), new MarginData(5));


                      // 3.0
                      FlowLayoutContainer con   = new FlowLayoutContainer();
                      con.add(new HTML("child   1"));
                      // 2nd param only takes   margin data
                      con.add(new HTML("child   2"), new MarginData(5));



Thursday, November 3, 2011
Models




Thursday, November 3, 2011
2.0 ModelData
      GWT does not provide introspection
      ModelData provides access to property and values
      Stores data in map



                 public interface ModelData {
                   public <X> X get(String property);
                   public Map<String, Object> getProperties();
                   public Collection<String> getPropertyNames();
                   public <X> X remove(String property);
                   public <X> X set(String property, X value);
                 }




Thursday, November 3, 2011
3.0 Models
       Support any bean-like object
       Not forced to implement GXT interfaces
       Not forced to use GXT model classes
       Interoperability with RPC, RequestFactor, AutoBean




Thursday, November 3, 2011
ValueProvider
                    interface PostProperties extends PropertyAccess<Post> {
                      ModelKeyProvider<Post> id();

                        ValueProvider<Post, String> username();

                        ValueProvider<Post, String> forum();

                        ValueProvider<Post, String> subject();

                        ValueProvider<Post, Date> date();
                    }

                    // create properties instance via deferred binding
                    PostProperties props = GWT.create(PostProperties.class);

                    // use model key provider and value providers
                    ListStore<Post> store = new ListStore<Post>(props.id());
                    new ColumnConfig<Post, String>(props.forum(), 150, "Forum");


Thursday, November 3, 2011
Xml AutoBeans
     interface XmlAutoBeanFactory extends AutoBeanFactory {
       static XmlAutoBeanFactory instance = GWT.create(XmlAutoBeanFactory.class);

         AutoBean<EmailCollection> items();
     }

   interface ContactCollection {
      @PropertyName("records/record")
      List<Email> getValues();
    }

     interface Contact {
       @PropertyName("Name")
       String getName();

         @PropertyName("Email")
         String getEmail();

         @PropertyName("Phone")
         String getPhone();
     }


Thursday, November 3, 2011
Data Widgets




Thursday, November 3, 2011
Renderers Vs Cells




Thursday, November 3, 2011
Renderers Vs Cells

      2.0
      Customize data via renderers which return HTML or Widgets
      Renderers do not support events




Thursday, November 3, 2011
Renderers Vs Cells

      2.0
      Customize data via renderers which return HTML or Widgets
      Renderers do not support events

      3.0
      All data widgets support cells
      Cells support events and can ïŹre events
      High performance via ïŹ‚yweight pattern




Thursday, November 3, 2011
Event Cell Example

 cell = new SimpleSafeHtmlCell<String>(SimpleSafeHtmlRenderer.getInstance(),
 "click") {

              @Override
              public void onBrowserEvent(Context context, Element parent, String value,
                           NativeEvent event, ValueUpdater<String> valueUpdater) {
                super.onBrowserEvent(context, parent, value, event, valueUpdater);
                if ("click".equals(event.getType())) {
                  Info.display("Click", "You clicked "" + value + ""!");
                }
              }
         };

 tree.setCell(cell);




Thursday, November 3, 2011
2.0 Renderer
    renderer = new GridCellRenderer<ModelData>() {

          public Object render(ModelData model, String property, ColumnData config,
    int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) {

                     Button button = new Button("Click Me");
                     button.addSelectionListener(new SelectionListener<ButtonEvent>() {

                       @Override
                       public void componentSelected(ButtonEvent ce) {
                         Info.display("Event", "Button Clicked");
                       }
                     });
                     return button;
                 }
            };



Thursday, November 3, 2011
3.0 Cells
           ColumnConfig column = new ColumnConfig();
           column.setRenderer(renderer);

           cc1 = new ColumnConfig<Plant, String>(properties.name(), 100, "Name");

           TextButtonCell button = new TextButtonCell();
           button.addSelectHandler(new SelectHandler() {
             @Override
             public void onSelect(SelectEvent event) {
               Context c = event.getContext();
               int row = c.getIndex();
               Plant p = store.get(row);
               Info.display("Event", "The " + p.getName() + " was clicked.");
             }
           });
           cc1.setCell(button);



Thursday, November 3, 2011
Stores & Loaders




Thursday, November 3, 2011
Stores




Thursday, November 3, 2011
Stores
       2.0
       Only works with ModelData instances
       Can have reference to Loaders




Thursday, November 3, 2011
Stores
       2.0
       Only works with ModelData instances
       Can have reference to Loaders


      3.0
      Work with any object type
      Requires ModelKeyProvider
      Stores are not aware of Loaders
      Loaders bound to Stores via LoadListeners




Thursday, November 3, 2011
Loaders
       Refactored generic usage
       Better static code checking from IDE
       Stores no longer use loaders directly




Thursday, November 3, 2011
Loader Example

   final ExampleServiceAsync service = GWT.create(ExampleService.class);

   proxy = new RpcProxy<PagingLoadConfig, PagingLoadResult<Post>>() {
     @Override
        public void load(PagingLoadConfig loadConfig, AsyncCallback<PagingLoadResult<Post>>
             callback) {
          service.getPosts(loadConfig, callback);
        }
     };

   ListStore<Post> store = new ListStore<Post>(props.id());

   loader = new PagingLoader<PagingLoadConfig, PagingLoadResult<Post>>(proxy);
   loader.setRemoteSort(true);
   loader.addLoadHandler(new LoadResultListStoreBinding<PagingLoadConfig, Post,
   PagingLoadResult<Post>>(store));




Thursday, November 3, 2011
DataProxies
       HttpProxy & SciptTagProxy can generate Json & Xml
       Both proxies use writers to serialize data or else toString




Thursday, November 3, 2011
Readers

      Easily map Json to properties
      Easily map Xml xpaths to bean properties
      ModelType replaced with annotations


                             // 2.0 defines the JSON structure
                             ModelType type = new ModelType();
                             type.setRoot("records");
                             type.addField("Sender", "name");
                             type.addField("Email", "email");
                             type.addField("Phone", "phone");
                             type.addField("State", "state");
                             type.addField("Zip", "zip");


Thursday, November 3, 2011
3.0 Readers Pt. 1
      public interface EmailAutoBeanFactory extends AutoBeanFactory {
        AutoBean<RecordResult> items();
        AutoBean<ListLoadConfig> loadConfig();
      }

      public interface Email {
        String getName();
        String getEmail();
        String getPhone();
        String getState();
        String getZip();
      }

      public interface RecordResult {
        List<Email> getRecords();
      }



Thursday, November 3, 2011
3.0 Readers Pt. 2
   class DataRecordJsonReader extends JsonReader<ListLoadResult<Email>,
 RecordResult> {

     public DataRecordJsonReader(AutoBeanFactory factory, Class<RecordResult>
 rootBeanType) {
       super(factory, rootBeanType);
     }

     protected ListLoadResult<Email> createReturnData(Object loadConfig,
 RecordResult incomingData) {
       return new BaseListLoadResult<Email>(incomingData.getRecords());
     }
   }

     EmailAutoBeanFactory factory = GWT.create(EmailAutoBeanFactory.class);
     DataRecordJsonReader reader = new DataRecordJsonReader(factory,
 RecordResult.class);


Thursday, November 3, 2011
Theming




Thursday, November 3, 2011
Resource Changes




Thursday, November 3, 2011
Resource Changes
       2.0
       Must include gxt-all.css and all images




Thursday, November 3, 2011
Resource Changes
       2.0
       Must include gxt-all.css and all images


       3.0
       Removed gxt-all.css and image resources
       Only required to add link to reset.css
       Implemented Appearance pattern
       CSS & images now ClientBundle based




Thursday, November 3, 2011
Appearance Example


       // non framed
       ContentPanel panel = new ContentPanel();

       // framed using appearance
       FramedPanelAppearance appearance = GWT.create(FramedPanelAppearance.class);
       ContentPanel framed = new ContentPanel(appearance);

       // convenience subclass
       FramedPanel framed2 = new FramedPanel();




Thursday, November 3, 2011
Questions?




Thursday, November 3, 2011

Weitere Àhnliche Inhalte

Ähnlich wie Migrating from Ext GWT 2.x to 3.0

Introducing Ext GWT 3.0
Introducing Ext GWT 3.0Introducing Ext GWT 3.0
Introducing Ext GWT 3.0Sencha
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesSencha
 
Ext GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and AppearancesExt GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and AppearancesSencha
 
Ext GWT 3.0 Layouts
Ext GWT 3.0 LayoutsExt GWT 3.0 Layouts
Ext GWT 3.0 LayoutsSencha
 
Building Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScriptBuilding Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScriptdanwrong
 
Ext GWT 3.0 Data Binding and Editors
Ext GWT 3.0 Data Binding and EditorsExt GWT 3.0 Data Binding and Editors
Ext GWT 3.0 Data Binding and EditorsSencha
 
Roger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner
 
This is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdfThis is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdffeetshoemart
 
Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWTSencha
 
OSGi Puzzlers
OSGi PuzzlersOSGi Puzzlers
OSGi Puzzlersbjhargrave
 
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)jbellis
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panelArun Prasad
 
Ext js user login panel
Ext js user login panelExt js user login panel
Ext js user login panelArun Prasad
 
BioJS specification document
BioJS specification documentBioJS specification document
BioJS specification documentRafael C. Jimenez
 
Ext JS 4.1: Layouts, Performance, and API updates
Ext JS 4.1: Layouts, Performance, and API updatesExt JS 4.1: Layouts, Performance, and API updates
Ext JS 4.1: Layouts, Performance, and API updatesSencha
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupalmcantelon
 
What's New in GWT 2.2
What's New in GWT 2.2What's New in GWT 2.2
What's New in GWT 2.2David Chandler
 
Tushar Mahapatra - Portfolio for recent Projects
Tushar Mahapatra - Portfolio for recent ProjectsTushar Mahapatra - Portfolio for recent Projects
Tushar Mahapatra - Portfolio for recent ProjectsTushar Mahapatra
 

Ähnlich wie Migrating from Ext GWT 2.x to 3.0 (20)

Introducing Ext GWT 3.0
Introducing Ext GWT 3.0Introducing Ext GWT 3.0
Introducing Ext GWT 3.0
 
TMF meets GMF
TMF meets GMFTMF meets GMF
TMF meets GMF
 
Ext GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced TemplatesExt GWT 3.0 Advanced Templates
Ext GWT 3.0 Advanced Templates
 
Ext GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and AppearancesExt GWT 3.0 Theming and Appearances
Ext GWT 3.0 Theming and Appearances
 
Ext GWT 3.0 Layouts
Ext GWT 3.0 LayoutsExt GWT 3.0 Layouts
Ext GWT 3.0 Layouts
 
Building Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScriptBuilding Non-shit APIs with JavaScript
Building Non-shit APIs with JavaScript
 
Ext GWT 3.0 Data Binding and Editors
Ext GWT 3.0 Data Binding and EditorsExt GWT 3.0 Data Binding and Editors
Ext GWT 3.0 Data Binding and Editors
 
Roger Kenner Automating Posting
Roger Kenner Automating PostingRoger Kenner Automating Posting
Roger Kenner Automating Posting
 
This is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdfThis is a java lab assignment. I have added the first part java re.pdf
This is a java lab assignment. I have added the first part java re.pdf
 
Best Practices in Ext GWT
Best Practices in Ext GWTBest Practices in Ext GWT
Best Practices in Ext GWT
 
OSGi Puzzlers
OSGi PuzzlersOSGi Puzzlers
OSGi Puzzlers
 
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
Cassandra 1.0 and the future of big data (Cassandra Tokyo 2011)
 
Designing an ExtJS user login panel
Designing an ExtJS user login panelDesigning an ExtJS user login panel
Designing an ExtJS user login panel
 
Ext js user login panel
Ext js user login panelExt js user login panel
Ext js user login panel
 
BioJS specification document
BioJS specification documentBioJS specification document
BioJS specification document
 
Ext JS 4.1: Layouts, Performance, and API updates
Ext JS 4.1: Layouts, Performance, and API updatesExt JS 4.1: Layouts, Performance, and API updates
Ext JS 4.1: Layouts, Performance, and API updates
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupal
 
What's New in GWT 2.2
What's New in GWT 2.2What's New in GWT 2.2
What's New in GWT 2.2
 
XML.ppt
XML.pptXML.ppt
XML.ppt
 
Tushar Mahapatra - Portfolio for recent Projects
Tushar Mahapatra - Portfolio for recent ProjectsTushar Mahapatra - Portfolio for recent Projects
Tushar Mahapatra - Portfolio for recent Projects
 

Mehr von Sencha

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsSencha
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 HighlightsSencha
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridSencha
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportSencha
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsSencha
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSencha
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...Sencha
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...Sencha
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSencha
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsSencha
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...Sencha
 

Mehr von Sencha (20)

Breathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web ComponentsBreathe New Life into Your Existing JavaScript Applications with Web Components
Breathe New Life into Your Existing JavaScript Applications with Web Components
 
Ext JS 6.6 Highlights
Ext JS 6.6 HighlightsExt JS 6.6 Highlights
Ext JS 6.6 Highlights
 
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
Sencha Roadshow 2017: BufferedStore Internals featuring eyeworkers interactiv...
 
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
Sencha Roadshow 2017: Build Progressive Web Apps with Ext JS and Cmd
 
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App TestingSencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
 
Sencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha TestSencha Roadshow 2017: What's New in Sencha Test
Sencha Roadshow 2017: What's New in Sencha Test
 
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
Sencha Roadshow 2017: Sencha Upgrades - The Good. The Bad. The Ugly - Eva Luc...
 
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and ToolingSencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
Sencha Roadshow 2017: Modernizing the Ext JS Class System and Tooling
 
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
Sencha Roadshow 2017: Sencha Best Practices: Coworkee App
 
Sencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop FirstSencha Roadshow 2017: Mobile First or Desktop First
Sencha Roadshow 2017: Mobile First or Desktop First
 
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and BeyondSencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
Sencha Roadshow 2017: Innovations in Ext JS 6.5 and Beyond
 
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data GridLeveraging React and GraphQL to Create a Performant, Scalable Data Grid
Leveraging React and GraphQL to Create a Performant, Scalable Data Grid
 
Learn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research ReportLearn Key Insights from The State of Web Application Testing Research Report
Learn Key Insights from The State of Web Application Testing Research Report
 
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React AppsIntroducing ExtReact: Adding Powerful Sencha Components to React Apps
Introducing ExtReact: Adding Powerful Sencha Components to React Apps
 
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark BrocatoSenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
SenchaCon 2016: Keynote Presentation - Art Landro, Gautam Agrawal, Mark Brocato
 
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
SenchaCon 2016: Add Magic to Your Ext JS Apps with D3 Visualizations - Vitaly...
 
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
SenchaCon 2016: LinkRest - Modern RESTful API Framework for Ext JS Apps - Rou...
 
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web AppsSenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
SenchaCon 2016: Expect the Unexpected - Dealing with Errors in Web Apps
 
Ext JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell SimeonsExt JS Architecture Best Practices - Mitchell Simeons
Ext JS Architecture Best Practices - Mitchell Simeons
 
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
SenchaCon 2016: Mobile First? Desktop First? Or Should you Think Universal Ap...
 

KĂŒrzlich hochgeladen

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vĂĄzquez
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 

KĂŒrzlich hochgeladen (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 

Migrating from Ext GWT 2.x to 3.0

  • 2. 2.0 to 3.0 MIGRATION GUIDE Darrell Meyer Ext GWT Lead Sencha Inc. darrell@sencha.com #darrellmeyer Thursday, November 3, 2011
  • 3. Overview General Changes Components Layouts Models Data Widgets Stores & Loaders Theming Thursday, November 3, 2011
  • 5. General Changes Package namespace change com.extjs to com.sencha Module breakup com.sencha.gxt.core.Core com.sencha.gxt.cell.Core com.sencha.gxt.data.Data com.sencha.gxt.dnd.DND com.sencha.gxt.fx.Fx com.sencha.gxt.messages.Messages com.sencha.gxt.state.State com.sencha.gxt.theme.Base com.sencha.gxt.theme.Blue com.sencha.gxt.widget.Core com.sencha.gxt.ui.GXT - works like 2.0 GXT module Thursday, November 3, 2011
  • 6. Legacy Module Bindings ModelData MVC Old XTemplate Thursday, November 3, 2011
  • 7. Deprecated Code All GXT 2.0 deprecated code removed from 3.0 com.extjs.gxt.ui.client.binder - move to legacy com.extjs.gxt.ui.client.tree com.extjs.gxt.ui.client.treetable Thursday, November 3, 2011
  • 9. El vs. XElement XElement replaces El class XElement extends JavaScriptObject is not wrapper component.el() now component.getElement() Any GWT Element can be cast to XElement // 2.0 ContentPanel panel = new ContentPanel(); panel.el().getFrameWidth("lr"); // 3.0 ContentPanel panel = new ContentPanel(); panel.getElement().getFrameWidth(Side.LEFT, Side.RIGHT); // casting Element to XElement HTML html = new HTML("I am a GWT Widget"); html.getElement().<XElement>cast().getFrameWidth(Side.LEFT, Side.RIGHT); Thursday, November 3, 2011
  • 10. XTemplate Replaced runtime JavaScript XTemplate Compile time using Deferred Binding Can retrieve data from any Java Bean Works with SafeHtml Thursday, November 3, 2011
  • 11. 2.0 XTemplate XTemplate.create(getDetailTemplate()); public native String getDetailTemplate() /*-{ return ['<div class="details">', '<tpl for=".">', '<img src="{modPath}"><div class="details-info">', '<b>Image Name:</b>', '<span>{name}</span>', '<b>Size:</b>', '<span>{sizeString}</span>', '<b>Last Modified:</b>', '<span>{dateString}</span></div></tpl></div>'].join(""); }-*/; Thursday, November 3, 2011
  • 12. 3.0 XTemplate interface DetailRenderer extends XTemplates { @XTemplate(source = "AdvancedListViewDetail.html") public SafeHtml render(Photo photo); } DetailRenderer renderer = GWT.create(DetailRenderer.class); <div class="details"> <img src="{path}"><div class="details-info"> <b>Image Name:</b><span>{name}</span> <b>Size:</b><span>{size:number("#0")}k</span> <b>Last Modified:</b><span>{date:date("M/d/yyyy")}</span> </div> Thursday, November 3, 2011
  • 14. Lazy Rendering 2.0 Components create their DOM lazily Can’t work on DOM before Component rendered Thursday, November 3, 2011
  • 15. Lazy Rendering 2.0 Components create their DOM lazily Can’t work on DOM before Component rendered 3.0 Component create their DOM at construction DOM available immediately Thursday, November 3, 2011
  • 16. Lazy Rendering 2.0 Components create their DOM lazily Can’t work on DOM before Component rendered 3.0 Component create their DOM at construction DOM available immediately // 2.0 ContentPanel panel = new ContentPanel(); panel.el().setLeft(10); // fails, DOM does not exist // 3.0 ContentPanel panel = new ContentPanel(); panel.getElement().setLeft(10); // works Thursday, November 3, 2011
  • 17. Events & Handlers Thursday, November 3, 2011
  • 18. Events & Handlers 2.0 Custom GXT events & handlers Events have getters not applicable to all events Must read docs Thursday, November 3, 2011
  • 19. Events & Handlers 2.0 Custom GXT events & handlers Events have getters not applicable to all events Must read docs 3.0 GWT Handlers Strongly Typed Typed events vs. generic events Thursday, November 3, 2011
  • 20. Events & Handlers Thursday, November 3, 2011
  • 21. Events & Handlers // 2.0 generic listeners, must match event with correct event type ContentPanel panel = new ContentPanel(); panel.addListener(Events.Expand, new Listener<ComponentEvent>() { public void handleEvent(ComponentEvent be) { // generic event } }); Thursday, November 3, 2011
  • 22. Events & Handlers // 2.0 generic listeners, must match event with correct event type ContentPanel panel = new ContentPanel(); panel.addListener(Events.Expand, new Listener<ComponentEvent>() { public void handleEvent(ComponentEvent be) { // generic event } }); // 3.0 strongly typed, can’t misuse API ContentPanel panel = new ContentPanel(); panel.addExpandHandler(new ExpandHandler() { @Override public void onExpand(ExpandEvent event) { // typed event } }); Thursday, November 3, 2011
  • 24. ContentPanel Changes 2.0 ContentPanel supports “framed / unframed” Support top component and bottom component Thursday, November 3, 2011
  • 25. ContentPanel Changes 2.0 ContentPanel supports “framed / unframed” Support top component and bottom component 3.0 ContentPanel & FramedPanel Removed support of top and bottom component Thursday, November 3, 2011
  • 26. 2.0 ContentPanel ContentPanel panel = new ContentPanel(); panel.setFrame(true); panel.setLayout(new FitLayout()); ToolBar toolBar = new ToolBar(); toolBar.add(new LabelToolItem("ToolBar")); panel.setTopComponent(toolBar); panel.add(new Html("Fill panel")); Thursday, November 3, 2011
  • 27. 3.0 ContentPanel FramedPanel panel = new FramedPanel(); // panel extends SimpleContainer VerticalLayoutContainer con = new VerticalLayoutContainer(); panel.setWidget(con); ToolBar toolBar = new ToolBar(); toolBar.add(new LabelToolItem("ToolBar")); con.add(toolBar, new VerticalLayoutData(1, -1)); con.add(new HTML("Fill panel"), new VerticalLayoutData(1, 1)); Thursday, November 3, 2011
  • 28. Fields & FormLayout Thursday, November 3, 2011
  • 29. Fields & FormLayout 2.0 Label set of ïŹelds directly Field labels can only be rendered into FormLayout Thursday, November 3, 2011
  • 30. Fields & FormLayout 2.0 Label set of ïŹelds directly Field labels can only be rendered into FormLayout 3.0 Labels provided via FieldLabel Fields and FieldLabel can render any any layout FormLayout no longer needed and removed Thursday, November 3, 2011
  • 32. Field Validation 2.0 Validation built into ïŹelds themselves Validator interface only supported with TextField Hard to add custom validation Thursday, November 3, 2011
  • 33. Field Validation 2.0 Validation built into ïŹelds themselves Validator interface only supported with TextField Hard to add custom validation 3.0 Validation removed from Fields All ïŹelds support adding zero to many Validators Thursday, November 3, 2011
  • 34. Field Validators field = new TextField(); field.addValidator(new MinLengthValidator(4)); field.addValidator(new EmptyValidator<String>()); number = new NumberField<Integer>(new IntegerPropertyEditor()); number.addValidator(new MinNumberValidator<Integer>(3)); Thursday, November 3, 2011
  • 37. Layouts 2.0 Generic container supports all layouts Possible to use wrong layout data with layout Thursday, November 3, 2011
  • 38. Layouts 2.0 Generic container supports all layouts Possible to use wrong layout data with layout 3.0 Layout collapsed into container Strongly typed layout containers Thursday, November 3, 2011
  • 39. Layouts 2.0 3.0 BorderLayout BorderLayoutContainer Container CenterLayout CenterLayoutContainer FlowLayout FlowLayoutContainer Thursday, November 3, 2011
  • 41. Layout Example // 2.0 LayoutContainer con = new LayoutContainer(); con.setLayout(new FlowLayout()); con.add(new HTML("child 1")); // 2nd param takes any layout data instance con.add(new HTML("child 2"), new MarginData(5)); Thursday, November 3, 2011
  • 42. Layout Example // 2.0 LayoutContainer con = new LayoutContainer(); con.setLayout(new FlowLayout()); con.add(new HTML("child 1")); // 2nd param takes any layout data instance con.add(new HTML("child 2"), new MarginData(5)); // 3.0 FlowLayoutContainer con = new FlowLayoutContainer(); con.add(new HTML("child 1")); // 2nd param only takes margin data con.add(new HTML("child 2"), new MarginData(5)); Thursday, November 3, 2011
  • 44. 2.0 ModelData GWT does not provide introspection ModelData provides access to property and values Stores data in map public interface ModelData { public <X> X get(String property); public Map<String, Object> getProperties(); public Collection<String> getPropertyNames(); public <X> X remove(String property); public <X> X set(String property, X value); } Thursday, November 3, 2011
  • 45. 3.0 Models Support any bean-like object Not forced to implement GXT interfaces Not forced to use GXT model classes Interoperability with RPC, RequestFactor, AutoBean Thursday, November 3, 2011
  • 46. ValueProvider interface PostProperties extends PropertyAccess<Post> { ModelKeyProvider<Post> id(); ValueProvider<Post, String> username(); ValueProvider<Post, String> forum(); ValueProvider<Post, String> subject(); ValueProvider<Post, Date> date(); } // create properties instance via deferred binding PostProperties props = GWT.create(PostProperties.class); // use model key provider and value providers ListStore<Post> store = new ListStore<Post>(props.id()); new ColumnConfig<Post, String>(props.forum(), 150, "Forum"); Thursday, November 3, 2011
  • 47. Xml AutoBeans interface XmlAutoBeanFactory extends AutoBeanFactory { static XmlAutoBeanFactory instance = GWT.create(XmlAutoBeanFactory.class); AutoBean<EmailCollection> items(); } interface ContactCollection { @PropertyName("records/record") List<Email> getValues(); } interface Contact { @PropertyName("Name") String getName(); @PropertyName("Email") String getEmail(); @PropertyName("Phone") String getPhone(); } Thursday, November 3, 2011
  • 49. Renderers Vs Cells Thursday, November 3, 2011
  • 50. Renderers Vs Cells 2.0 Customize data via renderers which return HTML or Widgets Renderers do not support events Thursday, November 3, 2011
  • 51. Renderers Vs Cells 2.0 Customize data via renderers which return HTML or Widgets Renderers do not support events 3.0 All data widgets support cells Cells support events and can ïŹre events High performance via ïŹ‚yweight pattern Thursday, November 3, 2011
  • 52. Event Cell Example cell = new SimpleSafeHtmlCell<String>(SimpleSafeHtmlRenderer.getInstance(), "click") { @Override public void onBrowserEvent(Context context, Element parent, String value, NativeEvent event, ValueUpdater<String> valueUpdater) { super.onBrowserEvent(context, parent, value, event, valueUpdater); if ("click".equals(event.getType())) { Info.display("Click", "You clicked "" + value + ""!"); } } }; tree.setCell(cell); Thursday, November 3, 2011
  • 53. 2.0 Renderer renderer = new GridCellRenderer<ModelData>() { public Object render(ModelData model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<ModelData> store, Grid<ModelData> grid) { Button button = new Button("Click Me"); button.addSelectionListener(new SelectionListener<ButtonEvent>() { @Override public void componentSelected(ButtonEvent ce) { Info.display("Event", "Button Clicked"); } }); return button; } }; Thursday, November 3, 2011
  • 54. 3.0 Cells ColumnConfig column = new ColumnConfig(); column.setRenderer(renderer); cc1 = new ColumnConfig<Plant, String>(properties.name(), 100, "Name"); TextButtonCell button = new TextButtonCell(); button.addSelectHandler(new SelectHandler() { @Override public void onSelect(SelectEvent event) { Context c = event.getContext(); int row = c.getIndex(); Plant p = store.get(row); Info.display("Event", "The " + p.getName() + " was clicked."); } }); cc1.setCell(button); Thursday, November 3, 2011
  • 55. Stores & Loaders Thursday, November 3, 2011
  • 57. Stores 2.0 Only works with ModelData instances Can have reference to Loaders Thursday, November 3, 2011
  • 58. Stores 2.0 Only works with ModelData instances Can have reference to Loaders 3.0 Work with any object type Requires ModelKeyProvider Stores are not aware of Loaders Loaders bound to Stores via LoadListeners Thursday, November 3, 2011
  • 59. Loaders Refactored generic usage Better static code checking from IDE Stores no longer use loaders directly Thursday, November 3, 2011
  • 60. Loader Example final ExampleServiceAsync service = GWT.create(ExampleService.class); proxy = new RpcProxy<PagingLoadConfig, PagingLoadResult<Post>>() { @Override public void load(PagingLoadConfig loadConfig, AsyncCallback<PagingLoadResult<Post>> callback) { service.getPosts(loadConfig, callback); } }; ListStore<Post> store = new ListStore<Post>(props.id()); loader = new PagingLoader<PagingLoadConfig, PagingLoadResult<Post>>(proxy); loader.setRemoteSort(true); loader.addLoadHandler(new LoadResultListStoreBinding<PagingLoadConfig, Post, PagingLoadResult<Post>>(store)); Thursday, November 3, 2011
  • 61. DataProxies HttpProxy & SciptTagProxy can generate Json & Xml Both proxies use writers to serialize data or else toString Thursday, November 3, 2011
  • 62. Readers Easily map Json to properties Easily map Xml xpaths to bean properties ModelType replaced with annotations // 2.0 defines the JSON structure ModelType type = new ModelType(); type.setRoot("records"); type.addField("Sender", "name"); type.addField("Email", "email"); type.addField("Phone", "phone"); type.addField("State", "state"); type.addField("Zip", "zip"); Thursday, November 3, 2011
  • 63. 3.0 Readers Pt. 1 public interface EmailAutoBeanFactory extends AutoBeanFactory { AutoBean<RecordResult> items(); AutoBean<ListLoadConfig> loadConfig(); } public interface Email { String getName(); String getEmail(); String getPhone(); String getState(); String getZip(); } public interface RecordResult { List<Email> getRecords(); } Thursday, November 3, 2011
  • 64. 3.0 Readers Pt. 2 class DataRecordJsonReader extends JsonReader<ListLoadResult<Email>, RecordResult> { public DataRecordJsonReader(AutoBeanFactory factory, Class<RecordResult> rootBeanType) { super(factory, rootBeanType); } protected ListLoadResult<Email> createReturnData(Object loadConfig, RecordResult incomingData) { return new BaseListLoadResult<Email>(incomingData.getRecords()); } } EmailAutoBeanFactory factory = GWT.create(EmailAutoBeanFactory.class); DataRecordJsonReader reader = new DataRecordJsonReader(factory, RecordResult.class); Thursday, November 3, 2011
  • 67. Resource Changes 2.0 Must include gxt-all.css and all images Thursday, November 3, 2011
  • 68. Resource Changes 2.0 Must include gxt-all.css and all images 3.0 Removed gxt-all.css and image resources Only required to add link to reset.css Implemented Appearance pattern CSS & images now ClientBundle based Thursday, November 3, 2011
  • 69. Appearance Example // non framed ContentPanel panel = new ContentPanel(); // framed using appearance FramedPanelAppearance appearance = GWT.create(FramedPanelAppearance.class); ContentPanel framed = new ContentPanel(appearance); // convenience subclass FramedPanel framed2 = new FramedPanel(); Thursday, November 3, 2011