A small tip to generate more meaningful Id. Instead of 32 for OrderID use O000000032. [caption id="attachment_356" align="alignright" width="173" caption="Use smart and meaningful ids "][/caption] Simple implementations: SmartIdTableGenerator SmartIdSequenceGenerator
Image via Wikipedia It has been more than a week since I downloaded Grails, Although my first Grails impressions are not so well, I am playing with Grails with lots of curiosity and joy,
Image via Wikipedia Since SpringSource acquires the Grails I was willing to test this framework and make a dummy project but first I should read some books:)
Image via Wikipedia More java framework and APIs that I have been using. you can find the first part this article here: java runtime stack
Image by Neil T via Flickr I have been developing java application for more then 6 years. Most of these years I have used and evaluated open source projects. Here I'll try to explain my open source java stack.
Hi again, a few hours ago I have read a question about ORM mapping for java . He wonders why and when this technology is chosen. Disclaimer: I am omitting the case, when your database is just a storage for a CRUD apps. I am talking about complex applications, when stored procedures are used very extensively, like Oracle's PL/SQL.
if you are working with more than one db vendor (mysql/postgresql/oracle ,vs...) both at the same project. you may like this a lot :) the configuration sample below allow to run your hibernate application at two or more database vendors without changing any code
At least for some common patterns like DAOs. As a popular manner, most of the java applications have at least three layers like UI, Service and DAO. For each layer you probably have interface and a single or more implementation classes. And while UI layer has some really complex businesses for effective UI experience, DAO layer is only related with CRUD operations for a single or a group of beans. Here is the routine that you can get rid of
Annotations came to JDK with JDK5 (2004) since then they evaluated and are accepted so widely and even became more powerful and useful than XML in just 4 years. While you are developing a project with java at any scale you'll need a very large number of XML files defined in very different API's and DTD/XSDs. Which makes configuration very complex. eg:struts.xml,tiles.xml,validation.xml,hibernate.cfg.xml,spring-context.xml,web.xml,and so on Although it is easy to read and modify there are lots files :( Now with annotations: