Smart GWT
™
Quick Start Guide
Smart GWT v2.4
November 2010
Smart GWT
™
Quick Start Guide
Smart GWT v2.4
Copyright ©2010 and beyond Isomorphic Software, Inc. All rights reserved. The
information and technical data contained herein are licensed only pursuant to a license
agreement that contains use, duplication, disclosure and other restrictions; accordingly, it
is ―Unpublished-rights reserved under the copyright laws of the United States‖ for
purposes of the FARs.
Isomorphic Software, Inc.
101 California Street, Suite 2450
San Francisco, CA 94111
U.S.A.
Web: www.isomorphic.com
Notice of Proprietary Rights
The software and documentation are copyrighted by and proprietary to Isomorphic
Software, Inc. (―Isomorphic‖). Isomorphic retains title and ownership of all copies of the
software and documentation. Except as expressly licensed by Isomorphic in writing, you
may not use, copy, disseminate, distribute, modify, reverse engineer, unobfuscate, sell,
lease, sublicense, rent, give, lend, or in any way transfer, by any means or in any medium,
the software or this documentation.
1. These documents may be used for informational purposes only.
2. Any copy of this document or portion thereof must include the copyright
notice.
3. Commercial reproduction of any kind is prohibited without the express written
consent of Isomorphic.
4. No part of this publication may be stored in a database or retrieval system
without prior written consent of Isomorphic.
Trademarks and Service Marks
Isomorphic Software, Smart GWT, SmartClient and all Isomorphic-based trademarks and
logos that appear herein are trademarks or registered trademarks of Isomorphic Software,
Inc. All other product or company names that appear herein may be claimed as
trademarks or registered trademarks of their respective owners.
Disclaimer of Warranties
THE INFORMATION CONTAINED HEREIN IS PROVIDED ―AS IS‖ AND ALL EXPRESS
OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING
ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT AND ONLY TO
THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID.
Version 2.3 i
Contents
Contents ................................................................................... i
How to use this guide .............................................................. iii
Why Smart GWT? ..................................................................... v
More than Just Widgets – A Complete Architecture ......................v
Eliminates Cross-Browser Testing and Debugging .........................v
Complete Solution ......................................................................... vi
Open, Flexible Architecture .......................................................... vi
1. Overview .............................................................................. 1
Architecture ..................................................................................... 1
Capabilities and Editions of Smart GWT ....................................... 2
2. Installation ......................................................................... 3
Starting a New Project .................................................................... 3
Adding Smart GWT to an Existing Project..................................... 3
Server Configuration (optional) ..................................................... 4
3. Exploring ............................................................................. 5
Smart GWT Showcase .................................................................... 5
Smart GWT Java Doc ..................................................................... 6
Smart GWT Developer Console ...................................................... 6
4. Visual Components ............................................................ 11
Component Documentation & Examples ...................................... 11
Drawing, Hiding, and Showing Components ................................ 12
Size and Overflow .......................................................................... 12
Handling Events ............................................................................ 13
5. Data Binding ...................................................................... 15
Databound Components ............................................................... 15
Fields ............................................................................................. 16
DataSources .................................................................................. 20
Customized Data Binding ............................................................. 23
DataSource Operations ................................................................ 24
DataBound Component Operations ............................................. 26
Data Binding Summary ................................................................ 27
6. Layout .............................................................................. 28
Component Layout ....................................................................... 28
Container Components ................................................................ 30
Contents Smart GWT Quick Start
ii Version 2.3
Form Layout .................................................................................. 31
7. Data Integration ................................................................ 33
DataSource Requests .................................................................... 33
Smart GWT Server Framework .................................................... 34
DSRequests and DSResponses ..................................................... 35
Request and Response Transformation ....................................... 35
Criteria, Paging, Sorting and Caching .......................................... 37
Authentication and Authorization ............................................... 38
Relogin .......................................................................................... 39
8. Smart GWT Server Framework ........................................ 40
DataSource Generation ................................................................ 40
Server Request Flow ..................................................................... 43
Direct Method Invocation ............................................................ 45
DMI Parameters ........................................................................... 46
Adding DMI Business Logic ......................................................... 46
Returning Data ............................................................................. 49
Queuing & Transactions ............................................................... 50
Queuing, RESTHandler, and SOAs .............................................. 52
Operation Bindings ...................................................................... 52
Declarative Security...................................................................... 54
Dynamic Expressions (Velocity) .................................................. 56
SQL Templating............................................................................ 59
SQL Templating — Adding Fields ................................................ 62
Why focus on .ds.xml files? ...................................................... 64
Custom DataSources .................................................................... 65
9. Extending Smart GWT ....................................................... 67
New Components ......................................................................... 67
New Form Controls ...................................................................... 68
Switching Theme .......................................................................... 69
Customizing Themes .................................................................... 70
10. Tips .................................................................................... 72
Beginner Tips ............................................................................... 72
Architecture Tips .......................................................................... 72
HTML and CSS Tips ..................................................................... 73
11. Evaluating Smart GWT ...................................................... 75
Which Edition to Evaluate ............................................................ 75
Evaluating Performance ............................................................... 76
Evaluating Interactive Performance ............................................ 78
Evaluating Editions and Pricing ................................................... 79
A note on supporting Open Source .............................................. 80
Contacts .................................................................................. 81
Version 2.3 iii
How to use this guide
The Smart GWT Quick Start Guide is designed to introduce you to the
Smart GWT
™
web presentation layer. Our goals are:
To have you working with Smart GWT components and
services in a matter of minutes.
To provide a conceptual framework, with pointers to more
detail, so you can explore Smart GWT in your areas of
interest.
This guide is structured as a series of brief chapters, each presenting a set
of concepts and hands-on information that you will need to build Smart
GWT-enabled web applications. These chapters are intended to be read in
sequence—earlier chapters provide the foundation concepts and
configuration for later chapters.
This is an interactive manual. You will receive the most benefit from this
guide if you are working in parallel with the Smart GWT SDK—following
the documented steps, creating and modifying the code examples, and
finding your own paths to explore. You may want to print this manual for
easier reference, especially if you are working on a single-display system.
We assume that you are somewhat acquainted with basic concepts of web
applications (browsers, pages, tags), object-oriented programming
(classes, instances, inheritance), and user interface development
(components, layout, events). However, you do not need deep expertise in
any specific technology, language, or system. If you know how to navigate
a file system, create and edit text files, and open URLs in a web browser,
you can start building rich web applications with Smart GWT today.
If you can’t wait to get started, you can skip directly to
Installation (Chapter 2) to create a Smart GWT project and begin
Exploring (Chapter 3) and Visual Components (Chapter 4). But if
you can spare a few minutes, we recommend reading the
introductory chapters first, for the bigger picture of Smart GWT
goals and architecture.
Thank you for choosing Smart GWT, and welcome.