As far as I can remember, deployment of Java webapps on the internet has always been painful. Since the early days of the servlet spec, it's been almost impossible to find cheap and reliable hosting for Servlet/JSP applications.
Good news : those days might be over soon !
With the rise of the Cloud Computing movement, several platforms now exist where you can deploy Java webapps, with various backend services, and pricing models. One of them caught my eye a few months ago, the one from Google, called App Engine.
It's basically a JEE web container (to run your servlets) plus some back-end services for various stuff, from persistence to user management etc.
Rings a bell ?
Looking at the spec, and taking it out for a quick spin, it became immediately apparent that we could actually deploy Woko-based webapps there.
As GAE supports JPA, all we needed was to implement a dedicated ObjectStore backed by Google's JPA provider. And a Stripes interceptor that manages the lifecycle of the EntityManager, a replacement for the OSIV mechanism we already have for Hibernate.
Those were implemented in an hour or so : JPA is very similar to Hibernate for the client API, so writing the base components was really easy.
Then, a bit of fight with the maven pom and maven-gae-plugin. I had to configure a few things as usual, and eventually I had my Woko/GAE project ready. I could run it on my dev server :
> mvn gae:run
And even deploy in GAE :
> mvn gae:deploy
Nothing more to do : the webapp is pushed to Google's infrastructure, and ready to serve requests :
http://test.wokotestbabz.appspot.com/home
I could use the developer role (wdevel/wdevel) in order to create instances of a test POJO and browse them. Stripes, JPA persistence, everything seems to work just fine... Yikes !
Of course, there is room for improvement (full text search, Google user accounts, etc.) but overall it's very encouraging. Deploying Woko apps to GAE is definitly easy, and provides a really cool solution for hosting your apps on the internet at a very low cost (free for small apps), without sysadmin hassles, in an infrastructre that is supposed to scale.
Our next slogan will probably look like "Woko : POJOs in the Kloud !"
Everything is detailed here:
https://github.com/vankeisb/woko2/wiki/GoogleAppEngine
Enjoy,
Remi
PS : for those who have not followed recent developments, we have moved to GitHub for the next release (Woko 2).
Saturday, October 08, 2011
Sunday, April 12, 2009
JFacets 3.0 is out
JFacets 3.0 has just been released. Changes include :
Enjoy !
Rémi
- Complete rework of the project's structure and dependencies : No third party dependencies are required for Java/XML and Annotated facets. This is great as it allows using JFacets easily without Spring...
- Removal of IExecutable interface and executable facets : the use case was too detailed, and can be implemented very easily if you need it, so this feature has been removed from the framework.
- Removal of JFacets.get(...) factory methods. They were tightly coupled with Spring, and as we don't depend on Spring any more, the factory methods are not necessary, and the lifecycle of the JFacets instances is now to be handled by the user.
- New JFacetsBuilder class for creating instances of JFacets easily, useful e.g. when you don't use Spring or any other D.I. framework.
Enjoy !
Rémi
Sunday, October 28, 2007
Rich Internet Applications, Woko Style !
For a while, the idea of exporting Woko managed POJOs into processable formats has been floating around. This way, the data could be accessed not only by human beings, but also by "third party" code easily...
With the growing integration of AJAX and RIA technologies into web applications, the idea has transformed into a requirement. Dynamicity inside the browser has a price : in addition to HTML, you need your webapp to serve some processable infos for your AJAX or RIA client-side technology. Also, beyond export of objects, client applications might need to access more advanced features, like CRUD, search, or custom biz logic.
But wait...
Woko already serves your POJOs as HTML... why wouldn't it serve them as XML, or JSON ?
Woko already allows a human being to access the application's business logic... why wouldn't it allow another program to do it as well ?
XML/JSON POJO Exports
This is now an out-of-the-box feature ! You can now easily export your POJOs to XML or JSON, via the (xml, profileId, targetType) facet.
It's a command facet, so it can be invoked remotely just be sending an HTTP request to the appropriate URL, like :
http://.../myapp/command/Book/123/xml
Default export is available for all Objects and ROLE_WOKO_DEVELOPER, but of course, you can reuse and tweak the output for your own profiles/objects... via facet override, as usual !
Fat Client API
In addition to XML/JSON export, Woko also allows remote applications to access "functionalities" in the application. It proposes a RPC-style API for invocation of all the features in Woko : CRUD, search, and triggering of Command Facets.
In short, a remote client can virtually do everything a human being can do with the application (depending of course of the facet assignation) !
The Killer AJAX/RIA Backend
This is pretty fat news, as you can guess. The "Fat Client API" enables fast and easy implementation of hybrid webapps, where regular HTML is mixed with AJAX widgets, Flash components, Applets etc.
Last but not least, security isn't a problem either. As all the Fat Client API uses facets that you define, the whole system is consistent. Data and services are tailored to the caller's profile, so you hardly publish a service to the wrong clients without noticing it ! Moreover, the "user profiling" principle applies here too : you probably don't wanna provide the same level of features to everybody...
This feature embraces Woko's Web 2.0 and simplicity principles, and makes it a first class choice for people building AJAX/RIA webapps. Forget about writing all those handlers for your XmlHttpRequest objects, they're already there ! You already have all the plumbing for exporting your data, and deploy new RPC services.
Put your POJOs on the Web !
With the growing integration of AJAX and RIA technologies into web applications, the idea has transformed into a requirement. Dynamicity inside the browser has a price : in addition to HTML, you need your webapp to serve some processable infos for your AJAX or RIA client-side technology. Also, beyond export of objects, client applications might need to access more advanced features, like CRUD, search, or custom biz logic.
But wait...
Woko already serves your POJOs as HTML... why wouldn't it serve them as XML, or JSON ?
Woko already allows a human being to access the application's business logic... why wouldn't it allow another program to do it as well ?
XML/JSON POJO Exports
This is now an out-of-the-box feature ! You can now easily export your POJOs to XML or JSON, via the (xml, profileId, targetType) facet.
It's a command facet, so it can be invoked remotely just be sending an HTTP request to the appropriate URL, like :
http://.../myapp/command/Book/123/xml
Default export is available for all Objects and ROLE_WOKO_DEVELOPER, but of course, you can reuse and tweak the output for your own profiles/objects... via facet override, as usual !
Fat Client API
In addition to XML/JSON export, Woko also allows remote applications to access "functionalities" in the application. It proposes a RPC-style API for invocation of all the features in Woko : CRUD, search, and triggering of Command Facets.
In short, a remote client can virtually do everything a human being can do with the application (depending of course of the facet assignation) !
The Killer AJAX/RIA Backend
This is pretty fat news, as you can guess. The "Fat Client API" enables fast and easy implementation of hybrid webapps, where regular HTML is mixed with AJAX widgets, Flash components, Applets etc.
Last but not least, security isn't a problem either. As all the Fat Client API uses facets that you define, the whole system is consistent. Data and services are tailored to the caller's profile, so you hardly publish a service to the wrong clients without noticing it ! Moreover, the "user profiling" principle applies here too : you probably don't wanna provide the same level of features to everybody...
This feature embraces Woko's Web 2.0 and simplicity principles, and makes it a first class choice for people building AJAX/RIA webapps. Forget about writing all those handlers for your XmlHttpRequest objects, they're already there ! You already have all the plumbing for exporting your data, and deploy new RPC services.
Put your POJOs on the Web !
Monday, May 21, 2007
JFacets 2.1 with Instance Facets !
JFacets 2.1 has just been released, with support for Instance Facets !
Until now, facets were bound to types (Class or Interface), but you could not easily attach a facet to an instance of a given type... Well, now you can, using InstanceFacets !
A new interface has been introduced (IInstanceFacet - javadocs here), that defines a callback method that you have to implement in order to decide if the facet matches the target object or not.
This new release is available for download on sf.net. It doesn't break compatibility, so you can upgrade your jfacets jar without breaking anything to your app.
Enjoy !
Until now, facets were bound to types (Class or Interface), but you could not easily attach a facet to an instance of a given type... Well, now you can, using InstanceFacets !
A new interface has been introduced (IInstanceFacet - javadocs here), that defines a callback method that you have to implement in order to decide if the facet matches the target object or not.
This new release is available for download on sf.net. It doesn't break compatibility, so you can upgrade your jfacets jar without breaking anything to your app.
Enjoy !
Sunday, May 20, 2007
WokoTracker demo available
WokoTracker, a full blown Woko demo, has just been released on sf.net.
It's a simple but functional issue tracker with 3 different roles, that demonstrates some advanced features of Woko, such as :
Read more...
It's a simple but functional issue tracker with 3 different roles, that demonstrates some advanced features of Woko, such as :
- Custom users (part of the Domain Model)
- CRUD features customization (instance-based permissions and the like)
- Page Templates and Object Renderer extension
- Filtered search, extended results page
- Commands on objects
- ...and more !
Read more...
Saturday, April 14, 2007
JFacets 2.0 released
JFacets 2.0 has just been released.
Here's the change list :
Those changes should not break backward compatibility (unless you have developed custom facet context factories etc.), so don't hesitate to upgrade to this new release !
Full sources + maven2 build is available (in a zip) as well as a compiled jar on sf.net downloads (plus demos of WebFacets and Acegi integration).
Also, the core JFacets project is now managed with SVN on sf.net (moved from the CVS).
Enjoy !
Here's the change list :
- enabled use of plain POJOs : facets don't even need to implement the IFacet interface any more !
- Added a getFacet(facetName, profileId) method to JFacets : allows easier use when you don't need any target object
- Added access to the FacetDescriptor used for retrieving the facets from the facet context (deprecated one method in IFacetContextFactory and added a new one)
- Added INavigableProfileRepository (and upgraded Acegi integration layer) : enables full nav on the Profiles Graph from IDEs, tools etc.
- Refactored WebFacets for greater flexibility (now you can obtain request-scoped JFacets beans from the Spring context, in your Spring apps)
- Upgraded Spring version, now uses 2.0.2, but still compatible with earlier versions
Those changes should not break backward compatibility (unless you have developed custom facet context factories etc.), so don't hesitate to upgrade to this new release !
Full sources + maven2 build is available (in a zip) as well as a compiled jar on sf.net downloads (plus demos of WebFacets and Acegi integration).
Also, the core JFacets project is now managed with SVN on sf.net (moved from the CVS).
Enjoy !
Thursday, March 08, 2007
Woko 0.5 released
I've just released a 0.5 of the Woko project template. It includes several enhancements :
The docs in the wiki will be updated soon to reflect the current status of development.
Grab the project template from sourceforge, and enjoy the ride !
Cheers
Remi
- Merged ROLE_READ and ROLE_WRITE into a single ROLE_USER as this makes the overall stuff simpler. ROLE_USER is appropriate for demos, or really simple apps only. For more advanced stuff, it's better to extend the profiles graph as you want !
- Improved association editing : now you can create new objects and associate them directly to other objects. This is much more user friendly than the previous version where you had to create objects separatly and then associate them.
- Localized all messages and texts, and provided a French translation. More languages could be supported easily just by creating new resource files.
- Improved search page : now search results are grouped by class, and the score is shown.
- Fixed property specific overriding : now it's really easy, and reliable :-)
- Included a calendar widget for date properties by default (uses jscalendar)
- Fixed some bugs and made small improvements here and there...
The docs in the wiki will be updated soon to reflect the current status of development.
Grab the project template from sourceforge, and enjoy the ride !
Cheers
Remi
Subscribe to:
Posts (Atom)