Saturday, August 21, 2010

Web Services with Apache CXF and Cayenne

This new module shall show the integration with a standard web service framework. Apache Cayenne provides a web services framework with Hessian, but with this example it shows how you could use Cayenne with CXF.

As parts of the application will be running in different JVM, we need data transfer objects. Apache Cayenne is used on the server side, while the client uses only distributed DTO's and handlers.

First of all the choice of Apache CXF instead of Axis2 was mainly because of the tighter integration of Java web service standards and the opportunity of OSGi usage in the future. The documentation on some parts of Java web services is not the best today (in 2010) but many googled resources indicate that the web service arena is still in heavy development to enable enterprise like programming requests and interopability between Java and other platforms such as .NET.

The example shall show a hello world like example but based on yafra using a database backend through Cayenne as ORM and some basic session functionalities. As the web service server is started as standalone server the usage of a singleton is needed to set the Cayenne context at startup. Basic session handling is possible and will store session id and some stuff like username or others.

Requests to handlers/functions/processes can be simple web services, even accessible outside of a full application client but as well fully integrated with session access to verify that a session was allowed before you get other data.

As many of the standards within web services are not yet mature enough like servlets or EJB's, many things are still proprietary to an implementation like Apache CXF or subject of changes in the future. Therefore the example is only a basic one.

The key idea was to have an adapter within the Eclipse RCP fat client to exchange the server handling between EJB's and Web Services. This needs still to be worked out and of course is only useful for this framework in sense as an example of Java technology usage.

Sunday, July 25, 2010

Milestone 2 development hosting platforms

To support the development of Milestone 2 (M2) I have chosen 2 development systems.

Ubuntu Linux
The current platform is 10.04 LTS with the desktop edition as 64 bit build. As I will not use Adobe Flash (which is still an issue with linux 64bit) or any other special software I can use full advantege of 64 bit. In addition to the standard setup I have chosen Java-Sun JRE and JDK, Mysql Server and Client, Gimp, Chromium, Putty, Filezilla, Adobe Acrobat, Mysql Browser and Admin. I have enable Medibuntu and installed VLC and I have setup the standard Yafra development environment for M2 directly from external resources (I did not install the Eclipse that comes with Ubuntu). In addition I installed Mysql Workbench from mysql.com.

Windows
I have chosen Windows 7 64 bit build. I have made a setup as on Ubuntu. Beside Eclipse I use Textpad as a notepad replacement.

For more information on the standard M2 development tools used please see the Wiki.

Tuesday, July 20, 2010

Welcome

Hi and welcome to yafra.org !

yafra means yet another (different) framework and provides an application framework mainly based around java enterprise technologies but provides as well access to other technologies like microsoft .net.

The system is built around a central database (which can be mysql, derby, oracle, microsoft sql server or others) and the core relies on the ORM solution apache cayenne.

It provides examples for web based solutions as well as fat client solutions.

The main target is to provide technologies applied already with some basic use cases so that some one can jump start to learn those technologies or to simply copy and paste and build his/her own solution. Reuse is not a target as the framework relies on very good frameworks itself however it shall show the use of them playing together making up a business application.

The main source is on sourceforge.net (yafra.sourceforget.net), the homepage is on www.yafra.org and social stuff is within the google world here.

Contributors are welcomed ! Please contact the yafraorg@gmail.com administrator.

Cheers