aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Design Patterns & Mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Design Patterns & Mapping" Watch "Design Patterns & Mapping" New topic
Author

Design Patterns & Mapping

Steve Mitchell
Greenhorn

Joined: Jun 03, 2001
Posts: 12
I'm transferring to a new group that does not have an established code library for the data mapping/persistence layers. I'll have to look at third party persistence products like TopLink or, preferably, design a reusable mapping component.
What are some good patterns for to look at for mapping? The system I use today uses a broker to match broker classes to domain classes. All SQL is contained in the broker classes in the mapping layer. GOF does not cover the broker pattern. Any suggestions on a good source on the broker pattern?
What other patterns or design books might be good to look at for designing a mapping component?
http://www.byteworksinc.com

[This message has been edited by Steve Mitchell (edited October 02, 2001).]


Steve Mitchell<br /><a href="http://www.byteworksinc.com" target="_blank" rel="nofollow">http://www.byteworksinc.com</a>
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Steve I cant help you but I love your site
Santanu Barua
Greenhorn

Joined: Jul 10, 2001
Posts: 2
I have found Information Systems Architecture patterns in martin fowler's website at www.matinfowler.com to be very useful also an article titled "Connecting Business Objects to Relational Databases" by Joseph W. Yoder et al is very good...
Steve Mitchell
Greenhorn

Joined: Jun 03, 2001
Posts: 12
That is just what I was looking for! Thanks.
Originally posted by Santanu Barua:
I have found Information Systems Architecture patterns in martin fowler's website at www.martinfowler.com to be very useful also an article titled "Connecting Business Objects to Relational Databases" by Joseph W. Yoder et al is very good...

Pho Tek
Ranch Hand

Joined: Nov 05, 2000
Posts: 761

You might also want to check out JDO (Java Data Objects),
a transparent persistence framework between Java objects and relational data.
See http://jcp.org/jsr/detail/12.jsp


Regards,

Pho
Iain Lowe
Greenhorn

Joined: Sep 07, 2001
Posts: 12
Kyle Brown has written a paper on the subject of mapping Objects to RDBMS's. He has expressed his views in a pattern language he calls Crossing Chasms. Check it out at http://members.aol.com/kgb1001001/Chasms.htm
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Originally posted by Iain Lowe:
Kyle Brown has written a paper on the subject of mapping Objects to RDBMS's. He has expressed his views in a pattern language he calls Crossing Chasms. Check it out at http://members.aol.com/kgb1001001/Chasms.htm

Thanks for the reference. My pattern language can also be reached through Martin Fowler's ISA patterns, also referenced above. I've been working closely with Martin on his ISA patterns, and I'm not ashamed to say that they're better written than my own. Mine are a bit more complete at the moment, but Martin is quickly moving to change that!

------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Alan Shalloway
Ranch Hand

Joined: Sep 26, 2001
Posts: 60
A high level approach I take when doing data mapping is to have a set of objects that acts as an intermediary between my in memory objects and my non-OO data. THis way, the rest of my system thinks it is dealing with an OO database, even though it is not. These layering objects are factories on one hand, creating objects from the database and updaters (for want of a better word) that move objects I need persisted into the rdbms. These layers aren't all that hard and are easy to maintain. It also allows me to write query objects that can work directly on the RDBMS. Relational databases have some really strong advantages if you don't need to worry about differences of the objects. For example, some applications I've worked on have had to worry about different nationalities. In my code, I'd use polymorphism to hide differences in tax rules, ... However, my databases typically could be easily split up so only data from one country was in any one data base. This allows for quick queries and extractions to be done in the RDBMS itself.
------------------
Alan Shalloway,
Look for Jim Trott and my book: Design Patterns Explained
Visit our site Net Objectives.
Visit our on-line companion to the book


Alan Shalloway.<BR>Look for Jim Trott and my book: <A HREF="http://www.amazon.com/exec/obidos/ASIN/0201715945/ref=ase_electricporkchop/103-0514572-3811868" TARGET=_blank rel="nofollow">Design Patterns Explained</A><BR>Visit our site <A HREF="http://www.netobjectives.com" TARGET=_blank rel="nofollow">Net Objectives</A>.<BR>Visit our <A HREF="http://www.netobjectives.com/dpexplained/index.html" TARGET=_blank rel="nofollow">Design Patterns Explained Community of Practice</A><BR>Check out our <A HREF="http://www.netobjectives.com/xml/xml_cdrom_info.htm" TARGET=_blank rel="nofollow">CDROM based audio training in XML</A>
 
 
subject: Design Patterns & Mapping