1. {{
Slim3 for GAESlim3 for GAE
Java framework for Google application engine.Java framework for Google application engine.
Author by caoguangyaoAuthor by caoguangyao
2. Optimized for Google App engine/JavaOptimized for Google App engine/Java
Can use as just a datastore frameworkCan use as just a datastore framework
Main concept :Simple,Less Is MoreMain concept :Simple,Less Is More
Open sourceOpen source
Main feature:fast spin-up,hot reloading,typeMain feature:fast spin-up,hot reloading,type
safe querysafe query
Slim3=> MVC framework.Slim3=> MVC framework.
3. Install javaInstall java
Install eclipseInstall eclipse
Plugins for Eclipse:Plugins for Eclipse:
http://dl.google.com/eclipse/plugin/3.7http://dl.google.com/eclipse/plugin/3.7
http://slim3.googlecode.com/svn/updates/http://slim3.googlecode.com/svn/updates/
EnvirementsEnvirements
8. Uncomment out GWTServiceServlet and theUncomment out GWTServiceServlet and the
servlet-mapping in war/WEB-INF/web.xmlservlet-mapping in war/WEB-INF/web.xml
<servlet><servlet>
<servlet-name>GWTServiceServlet</servlet-name><servlet-name>GWTServiceServlet</servlet-name>
<servlet-class>org.slim3.gwt.server.rpc.GWTServiceServlet</servlet-class><servlet-class>org.slim3.gwt.server.rpc.GWTServiceServlet</servlet-class>
<load-on-startup>1</load-on-startup><load-on-startup>1</load-on-startup>
</servlet></servlet>
<servlet-mapping><servlet-mapping>
<servlet-name>GWTServiceServlet</servlet-name><servlet-name>GWTServiceServlet</servlet-name>
<url-pattern>*.s3gwt</url-pattern><url-pattern>*.s3gwt</url-pattern>
</servlet-mapping></servlet-mapping>
Edit project configureEdit project configure
9. File-New-ModuleFile-New-Module
Input “tutorial” in the “Package” text fieldInput “tutorial” in the “Package” text field
Input “Main” in the “Module name” text fieldInput “Main” in the “Module name” text field
Click “finish”Click “finish”
““src/tutorial/Main.gwt.xml” will be createdsrc/tutorial/Main.gwt.xml” will be created
Change it toChange it to
<?xml version="1.0" encoding="UTF-8"?><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN"
"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-"http://google-web-toolkit.googlecode.com/svn/tags/2.5.1/distro-source/core/src/gwt-
module.dtd">module.dtd">
<module<module rename-to='main'rename-to='main'>>
<inherits name="com.google.gwt.user.User" /><inherits name="com.google.gwt.user.User" />
<inherits name='org.slim3.gwt.emul.S3Emulation' /><inherits name='org.slim3.gwt.emul.S3Emulation' />
<source path="client"/><source path="client"/>
<source path="shared" /><source path="shared" />
</module></module>
Create moduleCreate module
10. File-New-Entry Point ClassFile-New-Entry Point Class
Input “tutorial.client” in the “Package” textInput “tutorial.client” in the “Package” text
fieldfield
Input “MainEntryPoint” in the “Name” textInput “MainEntryPoint” in the “Name” text
fieldfield
““src/tutorial.client/MainentryPoint.java” willsrc/tutorial.client/MainentryPoint.java” will
be createbe create
File – New – Html PageFile – New – Html Page
Input “index.html” in the “file name” text fieldInput “index.html” in the “file name” text field
Create Entry Point ClassCreate Entry Point Class
11. Run as > Web Application.Run as > Web Application.
Running the ProjectRunning the Project