-
Reusing your ORM resources with Smooks Persistence (6 messages)
- Posted by: Maurice Zeijen
- Posted on: February 27 2009 08:24 EST
One of the major new features in Smooks v1.2 will be the new Persistence Cartridge. This cartridge enables the use of several entity persistence frameworks from within Smooks, currently targeting Hibernate, Ibatis and any JPA compatible framework. It also allows you use your own Data Access Objects (DAOs). This cartridge is great for those cases where you already have your data access layer and want to use its power from within Smooks. It also allows you to reuse these persistence resources on any format of data, not just XML e.g. EDI, CSV, JSON etc. Read the rest of the article at: http://blog.smooks.org/2009/02/26/smooks-persistence-part-1-the-introduction/Threaded Messages (6)
- Re: Reusing your ORM resources with Smooks Persistence by augustientje bloem on March 01 2009 12:47 EST
- Re: Reusing your ORM resources with Smooks Persistence by Mileta Cekovic on March 01 2009 15:07 EST
-
Re: Reusing your ORM resources with Smooks Persistence by Tom Fennelly on March 02 2009 05:34 EST
- Re: Reusing your ORM resources with Smooks Persistence by Maurice Zeijen on March 02 2009 06:08 EST
-
Re: Reusing your ORM resources with Smooks Persistence by Tom Fennelly on March 02 2009 05:34 EST
- Re: Reusing your ORM resources with Smooks Persistence by Mileta Cekovic on March 01 2009 15:07 EST
- Re: Java by Bernd Schuller on March 02 2009 03:02 EST
- Re: Java by Tom Fennelly on March 02 2009 05:26 EST
-
Re: Reusing your ORM resources with Smooks Persistence[ Go to top ]
- Posted by: augustientje bloem
- Posted on: March 01 2009 12:47 EST
- in response to Maurice Zeijen
This is really cool. I take it it's a bit like what has been done for logging where one logger framework wraps several other logging frameworks. The cool thing about that is that your code is not dependent on any of those wrapped frameworks. Of course, your code is now dependent on the wrapping framework, but we can always introduce yet another wrapper that wraps the various wrapping frameworks. If this kind of power is now also available for persistence, then this is certainly a great benefit to us all. I especially like this one:It enables the Persistence cartridge to use your DAOs without it actually needing to know the details of your DAOs.
This is absolutely a good feature. Finally we can implement the DAO pattern without the clients of our DAO classes being dependent on their implementation. This is really good stuff! Keep up the good work :) -
Re: Reusing your ORM resources with Smooks Persistence[ Go to top ]
- Posted by: Mileta Cekovic
- Posted on: March 01 2009 15:07 EST
- in response to augustientje bloem
Of course, your code is now dependent on the wrapping framework, but we can always introduce yet another wrapper that wraps the various wrapping frameworks.
If you do so your application will run in 'WRAP' speed instead of WARP speed :) -
Re: Reusing your ORM resources with Smooks Persistence[ Go to top ]
- Posted by: Tom Fennelly
- Posted on: March 02 2009 05:34 EST
- in response to Mileta Cekovic
Yeah... I don't really think that's the point (correct me if I'm wrong Maurice). It's not intended as a wrapper/anstraction for different persistence frameworks. I guess that's what JPA is all about. The main idea of this is that you can reuse existing persistence resources to persist data sources of many different formats e.g. EDI, CSV, JSON etc with reduced effort. IOf course, your code is now dependent on the wrapping framework, but we can always introduce yet another wrapper that wraps the various wrapping frameworks.
If you do so your application will run in 'WRAP' speed instead of WARP speed :) -
Re: Reusing your ORM resources with Smooks Persistence[ Go to top ]
- Posted by: Maurice Zeijen
- Posted on: March 02 2009 06:08 EST
- in response to Tom Fennelly
You are totally right Tom. The reason why we need the abstraction layer is because the Persistence Cartridge doesn't know anything about your DAO's or persistence framework. But somehow we need execute the methods of your DAO's. That is where Scribe comes in. The persistence framework understands the Scribe and via some Mapping, Scribe understands your DAO's. The conclusion is that the only reason to use Scribe is when the client (in Smooks case the Persistence Cartridge) of the DAO's can't know anything about the DAO's. Regarding performance: It is correct that the wrapper will cost performance, but probably not that much. Probably for a lot of cases the performance loss isn't that much of a problem.Of course, your code is now dependent on the wrapping framework, but we can always introduce yet another wrapper that wraps the various wrapping frameworks.
If you do so your application will run in 'WRAP' speed instead of WARP speed :)
Yeah... I don't really think that's the point (correct me if I'm wrong Maurice). It's not intended as a wrapper/anstraction for different persistence frameworks. I guess that's what JPA is all about. The main idea of this is that you can reuse existing persistence resources to persist data sources of many different formats e.g. EDI, CSV, JSON etc with reduced effort. I -
Re: Java[ Go to top ]
- Posted by: Bernd Schuller
- Posted on: March 02 2009 03:02 EST
- in response to Maurice Zeijen
overthink things and learn that nobody here is interested in your f*ing turkish chat site. -
Re: Java[ Go to top ]
- Posted by: Tom Fennelly
- Posted on: March 02 2009 05:26 EST
- in response to Maurice Zeijen
Don't overthink things and become obsessed with the keywords–remember that you are writing for a human audience, so the object is to write sohbet articles that would be useful to your target market, while keeping in mind the type of language that your target market uses (and that way your keywords and their variations will naturally pop up in your articles).
wtf?
2) Write educational articles on the topic of your blogwebsite.