GWT app in 30 minutes

just recently released a new (yet unstable) version Spring-Roo one of the main features of which is to support the generation of user interface based on GWT.

I was wondering today poeksperimentirovat, under the cut transfer my blog (for those too lazy to read in English) describing how to make a GWT app in less than 30 minutes. I hope habarovchanin'll find it interesting and useful.
image

what is it


Spring Framework is one of the most popular framework available for Java. I think almost everyone who wrote web applications in Java faced him;
Spring-Roo — utility to generate project: entity-classes for working with the database, model CRUD, a number of other common tasks. I understand the idea of growing from Ruby-On-Rail — but I could be wrong
GWT — library for building modern web applications with active use of ajax. Developed by Google and is increasingly gaining popularity.

First we will need JDK 1.6 (what a surprise!) and Apache Maven. I hope people who are interested in GWT and Spring these products are put immediately after installing the operating system.

Download the latest version of Spring Roo 1.1M1 site Spring Source

Download script for roo: clinic.roo is almost the same clinic.the roo that comes in the examples, but only adapted for use with GWT:
* Zakomentiroval enum-s — they apparently are not supported yet.
* Boolean field is changed from a primitive in java.lang.Boolean (also led to a compilation error — apparently is-that is not supported)
* Link one-to-many (collection Set) — salmeterola — not supported while generating GWT
* Replaced by Calendar Date;
* Salmeterolo code generating the user interface for Spring-MVC
* And enabled generation of an interface based on GWT (gwt setup command)

Run this script:
# roo
roo > script --file clinic.roo
roo> exit

Waiting for nekota while roo will generate for us the source codes of the project. In the end we have almost a standard project uses maven to build.

Run it:

# mvn gwt:run


There will have some time to wait, because during the build will be uploaded all the required libraries (and a lot of them). Re-Assembly will go much faster.
image

Suggestion to copy the URL and open it in your browser
image

Your GWT application is ready!

Conclusions


Spring-Roo — the idea is good, but its integration with GWT is not stable yet — many things don't work out.
But to use it for (for example) examining and quick start — quite possibly — what's it to you, I hope, will help
Article based on information from habrahabr.ru

Комментарии

Популярные сообщения из этого блога

Fresh hay from the cow, or 3000 icons submitted!

Knowledge base. Part 2. Freebase: make requests to the Google Knowledge Graph

Group edit the resources (documents) using MIGXDB