Play@Work

Friday, February 25, 2005

Adding a Domain Model to Avyukta

Avyukta is a small application that Sagar and myself are building to get familiar with some of the Java open source tools that are lying around.

Havent had too much time to fool around with this though. Yesterday nite I added a basic domain model for the application and added Hibernate support to save the domain objects.

Learnt some nice stuff from the book " Java Open Source Programming".
                        title or description

Basically the book speaks about adding a layer between the Domain objects and the hibernate persistence. Makes a lot of sense as this makes the domain objects very testable without hitting the database. And this is important as lotsa business logic generally sits in the domain object layer.

We have a Persistence Manager in our Library ( which as of now handles saving books in the DB), and all the saving is routed thru the Persistence Manager. So when we want to test stuff we plug-in a Mock Persistence Manager and .. voila .. we have fast runnin tests.

0 Comments:

Post a Comment

<< Home