Scala + GWT
Just mark it here for further references.
http://java.dzone.com/articles/creating-application-using
Spring Roo is an Rapid Application Development tool which helps you in rapidly building spring based enterprise applications in the Java programming language. Google App Engine is a Cloud Computing Technology which lets you run your application on Google's infrastructure. Using Spring Roo, you can develop applications which can be deployed on Google App Engine. In this tutorial, we will develop a simple application which can run on Google App Engine.
Roo configures and manages your application using the Roo Shell. Roo Shell can be launched as a stand-alone, command-line tool, or as a view pane in the SpringSource Tool Suite IDE.
Prerequisite
Before we can start using Roo shell, we need to download and install all pre-requites.
After installing all the above we can start building application.
ConferenceRegistration.Roo Application
Conference Registration is a simple application where speaker can register themselves and create a session they want to talk about. So, we will be having two entities Speaker and Presentation. Follow the instructions to create the application:
ConferenceRegistration.Roo Application
Conference Registration is a simple application where speaker can register themselves and create a session they want to talk about. So, we will be having two entities Speaker and Presentation. Follow the instructions to create the application:
1.project --topLevelPackage com.shekhar.conference.registration --java 6
This command created a new maven project with top-level package name as com.shekhar.conference.registration and created directories for storing source code and other resource files. In this command, we also specified that we are using Java version 6.
1.persistence setup --provider DATANUCLEUS --database GOOGLE_APP_ENGINE --applicationId roo-gae
This command set up all the things required for the persistence. It creates persistence.xml, adds all the dependencies required for persistence in pom.xml. We have chosen provider as DATANUCLEUS and database as GOOGLE_APP_ENGINE because we are developing our application for Google App Engine and it uses its own datastore. applicationId is also required when we deploy our application to Google App Engine. Now our persistence set up is completed.
1.entity --class ~.domain.Speaker --testAutomatically
2.field string --fieldName fullName --notNull
3.field string --fieldName email --notNull --regexp ^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$
4.field string --fieldName city
5.field date --fieldName birthDate --type java.util.Date --notNull
6.field string --fieldName bio
The above six lines created an entity named Session with different fields. In this we have used notNull constraint, email regex validation, date field. Spring Roo on app engine does not support enum and references yet which means that you can't define one-one or one-to-many relationships between entities yet. These capabilities are supported on Spring MVC applications but Spring MVC applications can't be deployed on app engine as if now. Spring Roo jira has these issues. They will be fixed in future releases(Hope So :) ).
1.entity --class ~.domain.Presentation --testAutomatically
2.field string --fieldName title --notNull
3.field string --fieldName description --notNull
4.field string --fieldName speaker --notNull
The above four lines created a JPA entity called Presentation, located in the domain sub-package, and added three fields -- title,description and speaker. As you can see, speaker is added as a String (just enter the full name). Spring Roo on Google App Engine still does not support references.
1.gwt setup
This command will add the GWT controller as well as all the UI required stuff. This command may take couple of minutes if you don't if you don't have those dependencies in your maven repository.
1.logging setup --level DEBUG
1.mvn gwt:compile gae:deploy
It will ask you app engine credentials(emailid and password).