Interface SgwtEESetup


public interface SgwtEESetup

Smart GWT Pro/EE Project Setup

The Smart GWT framework is distributed with both client and server components. GWT components run on the client, in the browser, and integrate with optional server components that run in a standards-compliant web container, like Tomcat. Client components don't necessarily require the server, but server components are designed to make many complicated tasks trivial. See the SmartGWT feature matrix for details.

In all cases, Isomorphic strongly recommends using some form of dependency management in your project, as it dramatically simplifies framework installation and upgrades. Most teams with Java experience are at least familiar with Maven so Smart GWT also includes support for publishing both client and server components to a Maven repository. Note that your project doesn't necessarily need to be built with Maven, it just needs to be able to retrieve its dependencies from that repository. Gradle and Ivy are two popular alternatives, for example.

Those who still wish to manage the installation manually should refer to the separate documentation topic covering the manual installation. The rest of this overview touches briefly on context, tips, and tricks for those who want to follow best practices but may not necessarily have experience with Maven.

"Maven is a software project management and comprehension tool", whose key features include a mechanism for dependency resolution as recommended above. In short, Maven attempts to retrieve these resources first from a local repository. If the resource isn't found, it attempts to retrieve it from one or more remote repositories, and caches it for subsequent attempts.

Most open source Java libraries can be found on the (remote) Maven Central repository, which requires no configuration to use. Occasionally, however, the library you need isn't published to any public repository, and you'll need to install it locally or deploy it to a remote repository. Most environments should be using a remote repository provided by a repository manager set up and maintained by your organization.

Smart GWT is not published to any public repository, and so will need to be installed or deployed before you're able to use it in any project. This can be quite tedious when it has to be done for as many artifacts as are provided in current distributions, so an open source Maven "Plugin" is made available with install and deploy goals that each are capable of downloading, unpacking, and installing or deploying Patch & Development Builds in a single step. After Maven has been downloaded, installed, and configured (some configuration required for other than LGPL or EVAL Smart GWT builds), this whole process takes no more than a few minutes on a reasonably fast network. Refer to MavenSupport documentation for a command that you can copy and paste to install the most recent evaluation version of Smart GWT, and another to get you started by generating a skeleton project from a Maven archetype, or template.

Having run both of those commands, your newly created project will contain a pom.xml file, which details among other things the libraries, or dependencies, needed to compile, package, and run the app. In this case, you'll find a reference to the version of Smart GWT you used to create the project. To upgrade, you'll just change the value of the ${smartgwt.version} property to reflect another build number that you've installed or deployed using the process outlined above and rebuild. To add another JAR to your project, you just add the dependency to your POM. To add one of the Smart GWT optional modules, for example, you'd first use the plugin to install / deploy it to your own repository and then add the appropriate block to your POM's dependencies section.

Your project will also contain a README file containing a copy/paste command line for installing, deploying to and starting a local 'embedded' Jetty server, as well as detailed instructions for Eclipse integration, and even automated conversion to an Ant based build (complete with Ivy configuration). Isomorphic generally recommends starting with the Jetty command to see things working quickly before experimentation with other approaches. The plugin provides an FAQ for reference, and posting questions / issues to the public forum for help is always appropriate.