Create a service / dao level for GWT / Spring / Hibernate / PostgreSQL

We are developing a webapp using GWT 2.0 (not for AppEngine), Spring, and Hibernate, and are trying to run as much code as possible by automatically generating it.

I looked at spring rou against appfuse to generate dao service / level . I tried appfuse, but this did NOT work for me; In addition, roo for GWT is not quite there yet, as it is a Milestone release.

If the tool can generate a service level and a DAO for me, I should be able to do the actual business logic and connect to the user interface - although it seems that if I am ready to wait another 6 months, Version 1.1M1 Roo can get me there, but I you need to do something right away.

Any suggestions?

Thank you so much

0
source share
5 answers

I have not used it myself, but Firestorm / DAO looks promising ...

+3
source

AppFuse and Spring roo in their current versions should provide sufficient capabilities to generate the desired code.

As you want to create Service and Dao levels, there is nothing related to GWT.

So give AppFuse another try, or ask a question about your specific problems with AppFuse.

+1
source

What about Grails and the GWT then plugin ?

+1
source

From my understanding of the level of service, I do not know how you generated it; if it is written correctly, it should be based on your business model and should not fully follow your database schema. Unlike a DAO (maybe I actually also don’t have a DAO from one to one object), you should not have a service for each object, instead, your services should either use the objects as part of their API to run units or deliver Business objects, which are the level of abstraction between control logic and data access. It can also be a hybrid of both. It depends on the complexity of the application and how closely your DAO / Entities are closely related to your database.

EDIT: based on your comment and a great hurry, I would use the tools mentioned in other posts to create your DAO layer, which will give you a very good start. Then I will create one service object that contains all your DAOs. From there, you will have access to all business logic in the test container (service object). This will not allow you to put it in controllers and will provide one place where people can see all the methods of business logic. As it grows, you will see layoffs and logical units, which you can subsequently divide into different service facilities.

I hope you have time to do this, but when I am in a huge hurry, I like that all my complexity in business is in one service object, unlike many controllers. Refactoring, which you will do later, will be much easier. And yet you can easily test the methods that I would recommend, regardless of rush, believe me, it’s faster to write tests on service methods than to test them, deploying and checking.

+1
source

Check out the fastcode . This is pretty wicekd. It takes your DAOs, which you can automatically generate using myEclipse and connects them to Fastcode, generating nice service level interfaces. He does all this with Spring as an option.
Cool, you can repeat the service level again and again as the database changes (in tandem with updated DAOs)

+1
source

All Articles