http://smapshow.appspot.com
That is to prove that GWT app can just look like a normal commercial web site. And it also contains my SMap showcase.
Been quite busy recently, I have stopped developing SMap for a while, but evey time I look at her I still feel so proud. I think I can make it better than Openlayers in the future, consider I am the only developer I would say I have made a very good progress!
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris."- Larry Wall
Thursday, 29 March 2012
Tuesday, 27 March 2012
GWT Spring Hibernate/JPA (part 2)
Now we will add spring framework to this project. Normally I use maven to manage j2ee projects,but with GWT, I've spent a lot of time(with the GWT maven plugin) and still can't make the IDE and maven work together very well. So I decided only use maven to manage the dependencies and leave the rest to eclipse.
Attached file is my demo project(windows, eclipse3.7 with google plugin) , I think a experienced programmer would prefer trying that first. The demo also includes some design/widgets I created based on my experience and needs.
It should work straight away. (rightclick->run as->web application) .
in /libs there is the pom.xml with all dependency. Inside this file you can see
<outputDirectory>../war/WEB-INF/lib</outputDirectory>
which pointing to the output directory.
you can run mvn process-resources, that will fetch all dependency jars to war/WEB-INF/lib.
In WEB-INF, I put 3 xml files in the spring folder as usual. and web.xml needs to modify. (see my demo)
you may need to change <context:component-scan> to specify the package to scan.
In datasource.xml , this line tells spring to look for "config.properties" in classpath
<context:property-placeholder location="classpath:config.properties" />
I feel there is no need to explain normal spring stuffs, let me know if you have questions about my demo.
Attached file is my demo project(windows, eclipse3.7 with google plugin) , I think a experienced programmer would prefer trying that first. The demo also includes some design/widgets I created based on my experience and needs.
It should work straight away. (rightclick->run as->web application) .
in /libs there is the pom.xml with all dependency. Inside this file you can see
<outputDirectory>../war/WEB-INF/lib</outputDirectory>
which pointing to the output directory.
you can run mvn process-resources, that will fetch all dependency jars to war/WEB-INF/lib.
In WEB-INF, I put 3 xml files in the spring folder as usual. and web.xml needs to modify. (see my demo)
you may need to change <context:component-scan> to specify the package to scan.
In datasource.xml , this line tells spring to look for "config.properties" in classpath
<context:property-placeholder location="classpath:config.properties" />
I feel there is no need to explain normal spring stuffs, let me know if you have questions about my demo.
GWT Spring Hibernate/JPA (part 1)
In eclipse, using Dynamic Web Project is the most easy way to develop/debug a spring powered j2ee project. However when developing GWT apps, it's a shame not to use google's eclipse plugin, which will set the project as a "Web Application Project".
The first part will tell you how to create a eclipse project has both facets.
First you need to have the Eclipse IDE for Java EE Developers (http://www.eclipse.org/downloads/)
1 create a google GWT project with Google eclipse plug-in. (install it if you haven't https://developers.google.com/eclipse/ )
2 right click project, properties-> project facet-> convert to facet form -> check dynamic web module facet in the list.
3 using Windows Explorer, navigate to the project folder -> ./settings -> org.eclipse.wst.common.component, open this file with any text editor,
modify this line:
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
to
<wb-resource deploy-path="/" source-path="/war" tag="defaultRootSource"/>
then refresh the project in eclipse.
After these simple steps the project is configured as google gwt project and also a WTP project.
That allows this project to be run/debugged as a GWT app or a normal web app. (right click->run as)
The first part will tell you how to create a eclipse project has both facets.
First you need to have the Eclipse IDE for Java EE Developers (http://www.eclipse.org/downloads/)
1 create a google GWT project with Google eclipse plug-in. (install it if you haven't https://developers.google.com/eclipse/ )
2 right click project, properties-> project facet-> convert to facet form -> check dynamic web module facet in the list.
3 using Windows Explorer, navigate to the project folder -> ./settings -> org.eclipse.wst.common.component, open this file with any text editor,
modify this line:
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
to
<wb-resource deploy-path="/" source-path="/war" tag="defaultRootSource"/>
then refresh the project in eclipse.
After these simple steps the project is configured as google gwt project and also a WTP project.
That allows this project to be run/debugged as a GWT app or a normal web app. (right click->run as)
Saturday, 18 February 2012
what will the feature hold
I'v given up fedora, looks like lubuntu is so fat the best for me.
And my map widget is in Beta . http://smapshow.appspot.com , I will start building some showcase when I get time.
Now it supports WMS and part of WFS. In terms of WFS. The short term goal is the function to edit layers from geo server. Feel a little bit sad though, since no one or company supports me to do the thing I am good at and interested in, and I will never have chance to lead a team to achieve something really remarkable. People just want to do the easy things and get paid, and who can we blame.
I will invest some time on GWT styling(theme). The GWT should have been more popular, if it had some nice themes. I really admire the flexibility of GWT, it's quite extraordinary comparing other RIA framework. People may miss the point that in fact With GWT, we can create any types of web page, not necessarily to be desktop-like.
And my map widget is in Beta . http://smapshow.appspot.com , I will start building some showcase when I get time.
Now it supports WMS and part of WFS. In terms of WFS. The short term goal is the function to edit layers from geo server. Feel a little bit sad though, since no one or company supports me to do the thing I am good at and interested in, and I will never have chance to lead a team to achieve something really remarkable. People just want to do the easy things and get paid, and who can we blame.
I will invest some time on GWT styling(theme). The GWT should have been more popular, if it had some nice themes. I really admire the flexibility of GWT, it's quite extraordinary comparing other RIA framework. People may miss the point that in fact With GWT, we can create any types of web page, not necessarily to be desktop-like.
Subscribe to:
Posts (Atom)