You are previewing Ext GWT 2.0 Beginner's Guide.
O'Reilly logo
Ext GWT 2.0 Beginner's Guide

Book Description

Take the user experience of your website to a new level with Ext GWT

  • Explore the full range of features of the Ext GWT library through practical, step-by-step examples

  • Discover how to combine simple building blocks into powerful components

  • Create powerful Rich Internet Applications with features normally only found in desktop applications

  • Learn how to structure applications using MVC for maximum reliability and maintainability

  • In Detail

    Ext GWT, also known as GXT, takes Google Web Toolkit one step further by providing a wide range of powerful user interface components. It allows a developer to create powerful web applications that are almost like desktop applications. However to leverage all the features of this powerful Java library for creating desktop-style web applications, you need to learn how and when to use the right user interface component.

    Ext GWT 2.0: Beginner's Guide is a practical book that teaches you how to use the EXT GWT library to its full potential. It provides a thorough and no-nonsense explanation of the Ext GWT library, what it offers and how to use it through practical examples. This book provides clear, step-by-step instructions for getting the most out of Ext GWT and offers practical examples and techniques that can be used for building your own applications in EXT GWT

    This book gets you up and running instantly to build powerful Rich Internet Applications (RIA) with Ext GWT. It then takes you through all the interface-building widgets and components of Ext GWT using practical examples to demonstrate when, where, and how to use each of them. Layouts, forms, panels, grids, trees, toolbars, menus, and many other components are covered in the many examples packed in this book. You will also learn to present your data in a better way with templates and use some of the most sought-after features of Ext GWT in your web applications such as drag-and-drop and charts. Throughout the book a real application is built step by step using Ext GWT and deployed to Google App Engine.

    Imagine how great you'll feel when you're able to create great-looking desktop-style user interfaces for your web applications with Ext GWT!

    A comprehensive beginner's guide to building powerful rich internet applications using the Ext GWT library

    Table of Contents

    1. Ext GWT 2.0
      1. Ext GWT 2.0 Beginner's Guide
      2. Credits
      3. About the Author
      4. About the Reviewers
      5. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Time for action - heading
          1. What just happened?
          2. Pop quiz - heading
          3. Have a go hero - heading
        6. Reader feedback
        7. Customer support
          1. Errata
          2. Piracy
          3. Questions
      6. 1. Getting Started with Ext GWT
        1. What is GWT missing?
        2. What does Ext GWT offer?
        3. How is Ext GWT licensed?
        4. Alternatives to Ext GWT
          1. GWT-Ext
          2. Smart GWT
          3. Vaadin
        5. Ext GWT or GXT?
        6. Working with GXT: A different type of web development
        7. How GXT fits into GWT
        8. Downloading what you need
        9. Eclipse setup
        10. GWT setup
        11. Time for action - setting up GWT
          1. What just happened?
        12. GXT setup
        13. Time for action - setting up GXT
          1. What just happened?
        14. GWT project creation
        15. Time for action - creating a GWT project
          1. What just happened?
        16. GXT project configuration
        17. Time for action - preparing the project to use GXT
          1. What just happened?
        18. Differences of GXT controls
        19. Time for action - adapting the GWT app to use GXT controls
          1. What just happened?
          2. Pop quiz - introducing GXT
        20. Summary
      7. 2. The Building Blocks
        1. The Ext GWT Explorer Demo
        2. Essential knowledge
        3. GXT building block 1: Component
          1. BoxComponent
          2. Lazy Rendering
        4. GXT building block 2: Container
          1. LayoutContainer
          2. FlowLayout
          3. ContentPanel
        5. GXT building block 3: Events
          1. Sinking and swallowing events
        6. Introducing the example application
          1. The requirement
          2. The solution
        7. Blank project
        8. Time for action - creating a blank project
          1. What just happened?
        9. Viewport
        10. Time for action - adding a Viewport
          1. What just happened?
        11. Layout
          1. BorderLayout
        12. BorderLayoutData
        13. Time for action - using BorderLayout
          1. What just happened?
        14. Loading message
        15. Time for action - adding a loading message
          1. What just happened?
        16. Custom components
          1. The onRender method
        17. Time for action - creating custom components
          1. What just happened?
        18. First field components
        19. Button
          1. Size
          2. Icons
          3. Icon position
          4. Adding a menu
          5. ToggleButton
          6. SplitButton
        20. Creating a Link feed button
        21. Time for action - adding a button
          1. What just happened?
        22. Tooltip
        23. Time for action - adding a tooltip
          1. What just happened?
        24. Popup
        25. Time for action - creating a popup
          1. What just happened?
        26. SelectionListener
        27. Time for action - adding a SelectionListener
          1. What just happened?
        28. Field
        29. TextField
        30. Time for action - adding components to the Link feed popup
          1. What just happened?
          2. Pop quiz - matching the component with the description
        31. Popup positioning and alignment
        32. Time for action - positioning the popup
          1. What just happened?
          2. Have a go hero - adding a KeyListener
        33. Summary
      8. 3. Forms and Windows
        1. Change of requirements
          1. The RSS 2.0 specification
        2. FormPanel
        3. Fields
          1. TextFields
          2. TriggerField components
          3. ComboBox component
          4. ListField component
          5. CheckBox components
          6. HtmlEditor component
          7. Other field components
          8. Pop quiz - match the form components with their definitions
        4. Expanding the example application
        5. Creating a Create feed button
        6. Time for action - adding a Create feed button
          1. What just happened?
        7. Creating a Feed class
        8. Time for action - creating a feed data object
          1. What just happened?
        9. Window
        10. FitLayout
        11. Creating the FeedWindow component
        12. Time for action - creating a Window
          1. What just happened?
        13. Creating FeedForm
        14. Time for action - creating a feed form
          1. What just happened?
        15. Validating fields
          1. Text validation
          2. Numerical validation
          3. Custom validator
        16. Time for action - adding field validation
          1. What just happened?
        17. Using FieldMessages
        18. Time for action - adding FieldMessages to the fields
          1. What just happened?
        19. Submitting a form using HTTP
        20. Alternative to submitting a form using HTTP
        21. Creating a Feed service
        22. Time for action - creating service for feed objects
          1. What just happened?
        23. The Registry
        24. Storing the service in the Registry
        25. Time for action - using the Feed object
          1. What just happened?
        26. Saving a Feed
        27. Time for action - saving an object to the registry
          1. What just happened?
        28. Creating RSS XML
        29. Time for action - saving a Feed
          1. What just happened?
        30. Time for action - adding to the LinkFeedPopup
          1. What just happened?
          2. Have a go hero - create a new item form
        31. Summary
      9. 4. Data-backed Components
        1. Working with data
        2. ModelData interface
          1. Method 1: Extending BaseModel
        3. BeanModel class
          1. BeanModelFactory class
          2. Method 2: Implementing BeanModelTag
          3. Method 3: Creating a BeanModelMarker
        4. Time for action - creating a BeanModelMarker for Feed objects
          1. What just happened?
        5. Stores
        6. Time for action - creating and populating a ListStore
          1. What just happened?
        7. Data-backed ComboBox
        8. Data-backed ListField
        9. Time for action - creating a ListField for feeds
          1. What just happened?
        10. Server-side persistence
          1. Persisting an Existing Feed
        11. Time for action - persisting a link to an existing feed
          1. What just happened?
        12. Time for action - persisting a feed as an XML document
          1. What just happened?
        13. Server-side retrieval
        14. Time for action - loading feeds
          1. What just happened?
        15. Using remote data
          1. DataProxy interface
          2. DataReader interface
          3. ModelType class
          4. Loader interface
        16. LoadConfig
        17. How they fit together
        18. Time for action - using remote data with a ListField
          1. What just happened?
          2. Pop quiz - right tool for the job
          3. Have a go hero - loading items
        19. Grid
        20. ColumnConfig
        21. Grid Example
        22. Time for action - creating the ItemGrid
          1. What just happened?
        23. GridCellRenderer
        24. Time for action - using a GridCellRenderer
          1. What just happened?
        25. Summary
      10. 5. More Components
        1. Trees
          1. BaseTreeModel class
        2. Time for action - creating a BaseTreeModel
          1. What just happened?
        3. Time for action - providing categorized items
          1. What just happened?
          2. TreeStore class
          3. TreePanel class
          4. ImageBundle class
        4. Time for action - using an ImageBundle
          1. What just happened?
          2. TreeGrid class
          3. TreeGridCellRenderer class
        5. Time for action - replacing the Feed List with a Feed Tree
          1. What just happened?
        6. Advanced grid features
          1. HeaderGroupConfig class
          2. AggregationRowConfig class
          3. Paging
          4. PagingLoadResult interface
          5. PagingLoadConfig class
        7. Time for action - providing paged data
          1. What just happened?
          2. PagingModelMemoryProxy class
          3. PagingLoader class
          4. PagingToolBar class
        8. Time for action - creating a paging grid
          1. What just happened?
        9. Menus and toolbars
          1. Menu component
          2. MenuBar component
          3. MenuItem component
          4. CheckMenuItem component
          5. MenuEvent class
          6. Have a go hero - add a menu
          7. ToolBar component
        10. Time for action - adding a toolbar
          1. What just happened?
        11. TabPanel class TabItem class
          1. Status component
        12. Time for action - adding a Status component
          1. What just happened?
          2. Pop quiz - matching the component with the definition
        13. Summary
      11. 6. Templates
        1. Time for action - adding to the Feed and Item
          1. What just happened?
        2. Template class
        3. Time for action - creating the ItemPanel
          1. What just happened?
          2. Using a Template with other components
        4. Time for action - using a Template with a ListField
          1. What just happened?
        5. XTemplate class
          1. The for function
          2. The if function
          3. Special built-in template variables
          4. Basic math function support
          5. Inline code execution
          6. Using an XTemplate
        6. The RowExpander class
        7. Time for action - using a RowExpander
          1. What just happened?
        8. The ListView class
        9. Time for action - creating a Feed overview ListView
          1. What just happened?
        10. The ModelProcessor class
        11. Time for action - pre-processing model data
          1. What just happened?
        12. Item selectors
        13. Time for action - making ListView items selectable
          1. What just happened?
          2. Have a go hero - showing item titles in the feed overview
        14. CheckBoxListView
          1. Pop quiz - what does what?
        15. Summary
      12. 7. Model View Controller
        1. The need for good application structure
        2. The classic Model View Controller pattern
        3. The GXT Model View Controller
        4. The AppEvent class
        5. The EventType class
        6. Time for action - defining application events
          1. What just happened?
        7. Controller class
        8. Time for action - creating a controller
          1. What just happened?
        9. Time for action - handling events
          1. What just happened?
        10. The View class
        11. Time for action - creating a View
          1. What just happened?
        12. Dispatcher
          1. Pop quiz - : MVC fundamentals
        13. Incorporating MVC
        14. Time for action - registering a Controller with the Dispatcher
          1. What just happened?
        15. Time for action - refactoring UI setup
          1. What just happened?
        16. Time for action - creating the navigation Controller and View
          1. What just happened?
        17. Time for action - creating the FeedPanel Controller and View
          1. What just happened?
          2. Have a go hero - creating the item Controller and View
        18. Allowing viewing of multiple feeds
        19. Time for action - adding tabs
          1. What just happened?
        20. Wiring it together
        21. Time for action - responding to selections
          1. What just happened?
        22. Keeping things in sync
        23. Time for action - responding to a Feed being added
          1. What just happened
        24. Time for action - creating a status toolbar Controller and View
          1. What just happened?
        25. Summary
      13. 8. Portal and Drag-and-Drop
        1. Portlet class
        2. The Portal class
        3. ToolButton
        4. Time for action - creating a Portal Controller and a Portlet View
          1. What just happened?
        5. Time for action - creating the Navigation Portlet
          1. What just happened?
        6. Time for action - creating more portlets
          1. What just happened?
        7. Drag-and-drop
          1. The Draggable class
          2. The DragSource class
          3. DragSource implementations
          4. The DropTarget class
          5. DropTarget implementations
          6. Grouping sources and targets
          7. Pop quiz - Quick Q&A
        8. Using drag-and-drop
        9. Time for action - dragging and dropping of feeds
          1. What just happened?
        10. Time for action - dragging and dropping items
          1. What just happened?
          2. Have a go hero - creating an overview portlet
        11. Summary
      14. 9. Charts
        1. Time for action - including the chart module
          1. What just happened?
        2. Time for action - including the chart resources
          1. What just happened?
        3. Time for action - loading the chart JavaScript library
          1. What just happened?
        4. Chart class
        5. Time for action - creating a chart Portlet
          1. What just happened?
        6. ChartModel class
        7. ChartConfig class
        8. BarChart class
          1. CylinderBarChart class
          2. FilledBarChart class
          3. SketchBarChart class
          4. BarChart.Bar class
          5. HorizontalBarChart class
        9. PieChart class
        10. PieChart.Slice class
        11. LineChart class
        12. AreaChart class
        13. ScatterChart class
        14. StackedBarChart class
          1. Pop quiz - match the chart feature to the chart
        15. Using a PieChart
        16. Time for action - creating PieChart data
          1. What just happened?
          2. Have a go hero - creating an item count bar chart
        17. Summary
      15. 10. Putting It All Together
        1. Using Google App Engine
        2. Time for action - registering a Google App Engine application
          1. What just happened?
        3. Time for action - getting the application ready for GAE
          1. What just happened?
        4. Time for action - using the Google App Engine data store
          1. What just happened?
        5. Time for action - publishing the example application
          1. What just happened?
        6. Google Chrome
        7. Time for action - creating a Google Chrome application shortcut
          1. What just happened?
          2. Have a go hero - : ideas for doing even more
        8. Gears
        9. Mobile applications
          1. PhoneGap
          2. Widgets
        10. The future for GXT
        11. Getting more information
          1. GXT Explorer website
          2. GXT sample code
          3. GXT Java doc
          4. GXT Help Eclipse plugin
          5. GXT source code
          6. GXT forums
          7. Other programmer forums
          8. PopQuiz: Finding additional information
        12. Summary
      16. A. Pop quiz - Answers
        1. Chapter 1
        2. Chapter 2
        3. Chapter 3
        4. Chapter 4
        5. Chapter 5
        6. Chapter 6
        7. Chapter 7
        8. Chapter 8
        9. Chapter 9
        10. Chapter 10