Saturday, October 24, 2009

Google App Engine for Java Case Study

In my company I was involved in Cloud Computing Competition. The challenge was to understand the oportunity of cloud computing and what company can delivere to our customers. For the company we decide use Amazon EC2.
But this story not about Amazon. I decide to create my simple project on Google App Engine. The first and major plus it's free. Actually when I see what the service is free I fill disappointed. But not in case of Google.
I decide to write project witch is log restaurant, coffee bars and entertainment places. It's quite easy task from first look. Also I would like fill my application with lot of Google services maps, youtoube, picasa ... My thinking was what Google App Engine can help me. Also it's support Java.
From technical point of view I as Java Enterprise developer select Spring DI/MVC and GWT. It's quite easy and in this technologies I am expert.
Lets begin. In google groups you can find information witch framework works on Google App. My application is has few of Ajax. That is why I decide didn't remove GWT. Basically the application has add place screen and find place screen.
I start with add new place functionality. The information what I wont get from application should not have only text information, also images. What was first trouble. I spend one week to develop add image to place functionality. Google app doesn't support file access. Files could not be uploaded to service. You can store them to DB. But it has limitations. Here can help you picasa service. But stop Google App has also request timeout limitation. And it failed each request with exceptions. But fails are uploaded. Most of enterprise developers don't like exceptions I also. So I should wait when google create filesystem or create some hacks. At this time I remove add image functionality.
When I start developing find functionality I found that queries not support "not equals" operation. Also have limitations for >, >=, <, <= if you use it in one query.
Technically all environment configuration is easy. I add tiles support and configure it with Spring MVC. Add dependency injection and controllers scan. For service injection in RCP service you should use hacks.
Also you should know what Google App Engine for Java have only on thread. If you than create multi threading application you can use queues and for them tasks.
It's the troubles of cheap scalable hosting. If you select Google App engine for you application you should be ready for a problems. But it's still quite good for start ups.

Thursday, October 22, 2009

Scrum Mater Certification

Take a part in Scrum Master Certification class. The facilitator was Jens Ostergaard. I have experience working in Scrum teams. In class was many questions about process. Some of them was really interesting.

Sunday, October 11, 2009

PicasaWeb API

Trying Google Picasa API. The API is not working correctly. The official example of getting all albums doesn't work. URL feedUrl = new URL("http://picasaweb.google.com/data/feed/api/user/username?kind=album"); UserFeed myUserFeed = myService.getFeed(feedUrl, UserFeed.class); for (AlbumEntry myAlbum : myUserFeed.getAlbumEntries()) { System.out.println(myAlbum.getTitle().getPlainText()); } Looking at source code you can look what getAlbumEntries is implemented by super.getEntries(AlbumEntry.class). But all entries is in another type GphotoEntry. So you can get them. You can use myUserFeed.getEntries(). But in future can be some issues. Also for one album getting I try to use: "http://picasaweb.google.com/data/feed/api/user/" + USER_NAME + "/albumid/" + albumId; but it's return few information. I can't get album name. I think the better decision is create own service.

Monday, June 22, 2009

Enterprise Java productivity is still not ideal?

Spring community say that enterprise Java productivity is still not ideal. Why not? To start up the project you use code from previous projects or some assets. They are not ideal for new project. But why new Spring framework Roo provide ideal assets? There are exist many applications with designers just click and you have final applications. Such as WebSphere and AquaLogic. But still many developers and companies prefer use spring, ejb. This tools are more flexible. And actually I like idea of Spring Community. But Roo is still a toy. And I am afraid of automatically generated aspects. Last year innovations in enterprise application developing to create productive application with best practices is agile and cloud computing. I think it's quit interesting to have tool for manual coding and customization. We are going to the past no UI designers only command line. It's still flexible and fast solution.

Thursday, June 18, 2009

Java future

Java future is abstract. But I think with time Java world would be stronger. I like the idea of Spring community. Java has more 3rd party libraries, but there are no one platform. The Spring present new framework ROO. At the first look it's pretty nice. Interesting how it's work for complex projects. Because for simple CRUD application it's wonderful. I think Java community need new technology for fast application creation. The maven help us to add dependency. But yet not exist flexible solution for assets.

Thursday, May 28, 2009

Cloud computing

Working on cloud computing application and still doesn't understand why is popular. Actually it has only business value. For big projects, which has some computation loading. But for small it has no value. Platform clouds such as Google Apps its still simple hosting. You have platform but no multi threads. But simple DB access. The Amazon is infrastructure cloud and have more features. They have many success stories. But still it's big projects. 72$ for month +traffic +storage it's quite expensive for small startups. But for enterprise solutions its cheap.

Tuesday, May 27, 2008

Wicket vs GWT

Wicket and GWT both use component approach. But it's too different. The Wicket uses a special HTML attribute to denote components, enabling easy editing with ordinary HTML editors. With Wicket you get the benefits of a first-class component model and a non-intrusive approach to HTML. In Wicket, all server side state is automatically managed. For many applications, it will be worth trading off the increased server load of extra server-side state for decreased development costs, lower maintenance costs, quicker time-to-market and generally higher quality software. But the GWT has a different approach to AJAX. The GWT use pour HTML and Java DOM model, to translates your Java application to browser-compliant JavaScript and HTML. Making a heavy use of client browser and minimizing number and size of HTTP requests. With Java to JavaScript translation you should always control your code. In client code you can use only base types. To call service you should create special classes. With service implementation you get 3 files. Two interface where first is for synchrony use, second is for asynchrony use and one implementation. So you have messy code. One of disadvantages is complex structure of modules. Personally I chose Wicket. It impresses me with its simplicity and ability to create reusable panels without any XMLs.