If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

I’ve recently been reviewing the code for my Entity Framework (simple O/R Mapping, Entity validation, etc) to determine if I should consider swapping out the O/R Mapping for something else such as NHibernate, NPersist, Wilson OR Mapper, etc.  The reason I’ve been considering this is that swapping out the O/R Mapping functionality within my Entity Framework with one of the more widely used frameworks may make it easier for people to extend ActiveType (CMS) for their unique needs.

As part of my review I was investigating the differences in functionality between the other O/R Mappers out there and the lightweight O/R mapper I’ve developed in my base Entity Framework.  There are a lot of obvious differences, but, as you might be able to tell from the title of this post I’m going to focus on how the mapping is configured in the various O/R Mappers.  Most O/R Mapping products out there today have the mapping of objects to database tables defined in an external configuration file.  There are some (mine included) that define the mapping within the classes themselves via custom attributes. 

I’ve recently been reading up on Indigo and as I’ve worked through all the code samples I couldn’t help but notice their extensive use of attributes.  Although O/R Mapping and Indigo are clearly not one in the same I can’t help but notice the obvious similarities.  I can’t help but think there are others that agree:

One last point, [DataContract] is just not an "Indigo" feature -- it is a feature for the entire .Net Framework.

Thinking about it in only Web services terms doesn't do justice to the host of important scenarios that it addresses elsewhere (version-tolerate persistence for any CLR type in any store).

We are defining a common abstract data model for CLR types for N scenarios -- many of which are Web service related.

http://www.douglasp.com/PermaLink.aspx?guid=01095547-b7f1-4e1d-8c4e-31038296f164

If [DataContract] is not just an Indigo feature but a feature for the entire .NET Framework then why couldn’t it become the center point for an O/R Mapping engine?  And if attributes are good enough for defining [ServiceContract], [OperationContract], and [DataContract] why couldn't it also be good enough for defining details to be used by a persistence engine?

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Sunday, June 19, 2005 2:17 PM by Paul Wilson    
I prefer xml mappings because:

1) Persistence is external to my entity objects -- I can and do use my entities differently at times.
2) Makes it easier to change the O/R Mapper I use -- not totally seamless, but easier if pure POCO.
3) Table and field names can and do vary at times -- customers of my apps do have different schemas.
4) Makes it easier to reuse my entity objects -- the same business logic can be used in different ways.
5) Personal preference -- focus on business only -- I just don't see the point of attribute clutter.

How is Indigo different then?

1) The service class typically requires a service.
2) There are not usually multiple service brokers.
3) There is not often a need for multiple versions.
4) The service itself is the means of reuse here.
5) Personal preference -- focus is the service.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, June 20, 2005 5:29 AM by Alex James    
I have to say I kind of agree with Paul on this one. XML mappings make sense for O/R mappers. Since mappings can change independantly of the rest of the business object. Surely that is the whole point of an O/R mapper?

However in my 'Ideal' world there is something else that encapsulates the mapping for me. For example a Server? So that my client code can use those objects without needing to load a mapping file.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, June 20, 2005 12:57 PM by Steve    
Yeah, I agree with Paul as well, but I also wonder if there may be reasons that the Indigo team chose to go with an attribute based approach as opposed to a xml configuration approach. I suppose some of Paul's points regarding the differences explains some reasons. I'll need to dig into Indigo more before I can make my own conclusions. Thanks for the thoughts...

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, June 20, 2005 4:42 PM by Alex James    
Steve,

I may be missing something because I've only had a cursory look but I think [DataContract] and [DataMember] are 'what' not 'how'. I.e. It tells us what we need to do, i.e. we need to persist the object and the fields marked with [DataMember] too, it doesn't tell us How. That seems different from O/R Mapping files which are about How. What do you think?

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, June 20, 2005 11:40 PM by Steve    
Alex,
I'm still tring to figure out what exactly [DataContact] and [DataMember] are used for :) My impression from reading over some docs was that they're used to define the "schema" that is shared amount the services ([ServiceContract] & [OperationContract]). I was trying to create a Indigo project on my local machine to have a look at how one might use DataContract and DataMember but I wasn't having any luck. I'll look to try again and report back on what I think.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Wednesday, June 22, 2005 10:10 PM by Joe    
The OR Mapper I use supports both XML Mappings and Attributes...essentially abstracted which are used. Attributes are good for RAD ... BUT I have noticed that sometimes, particularly when re-use is desired, that you need 'contextual' attributes. By separating how I've implemented the attributes (ie via XML or directly), I can do this.

My current concern for Indigo is that my data contract may in fact be contextual and I'm loathe to implement more than one object.

Perhaps this is more a concern for libraries/re-usable data libraries.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Thursday, July 07, 2005 1:08 AM by Jeff Perrin    
I started to reply, but it got too big, so it's now a full-fledged post:

http://blog.jeffperrin.com/testosteles/posts/444.aspx

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Sunday, July 10, 2005 8:58 PM by hammett    
Definitely attributes.

ActiveRecord adds attributes sugar and performs the integration with NHibernate - for me its the best of both worlds.

http://www.castleproject.org/index.php/ActiveRecord


# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, April 07, 2008 7:16 PM by Tony    
Jeff Perrin's post is now at: http://www.jeffperrin.com/index.php/2005/07/

# ed hardy

Wednesday, October 28, 2009 11:19 PM by ed hardy    
one day i went shopping outside ,and in an ed hardy store,I found some kinds of ed hardy i love most?they are: ed hardy jeans on sale ed hardy jeans on sale ed hardy jeans sale ed hardy jeans sale cheap ed hardy jeans cheap ed hardy jeans cheap ed hardy jeans on sale cheap ed hardy jeans on sale cheap ed hardy jeans sale cheap ed hardy jeans sale ed hardy jeans for men on sale ed hardy jeans for men on sale discount ed hardy jeans discount ed hardy jeans disconnt ed hardy jeans for men on sale disconnt ed hardy jeans for men on sale good qulity ed hardy jeans for men on sale good qulity ed hardy jeans for men on sale

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Thursday, October 29, 2009 9:29 AM by tiffany jewelry    

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Thursday, October 29, 2009 9:45 AM by tiffany jewelry    

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Thursday, October 29, 2009 9:44 PM by links of london Necklace    

links london Pendants links london Pendants links london Pendants links london Pendants links london Pendants links london Pendants links london Pendants links london Pendants links london Pendants links of london links of london new arrival links of london new arrival links of london new arrival links london new arrival links london new arrival links london links london new arrival links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet links of london Friendship Bracelet

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Saturday, November 21, 2009 9:17 PM by qingpi    
XT Lowest Price replica watches supplier, BREITLING REPLICA offer high-class
replica watches
REPLICA more than 100 famous brands, luxucy replica Piaget watches and swiss watches


We supplies all kinds ofreplica watches
replica watches
and so on. Over 10000 Styles of High ...replica Rolex watches

# Still, A&F as in other whipsawed industr

Monday, November 23, 2009 12:49 AM by af    
Still, A&F as in other whipsawed industries, a few survivors stand to abercrombie benefit from the widespread pain. To figure out who they are abercrombie fitch since the recession began near the end of 2007. Then I researched earnings abercrombie & fitch reports and other sources to separate firms with strong inherent growth from those benefiting from mergers, abercrombie Jeans accounting anomalies, or one-time events. Of 41 firms on Capital IQ's initial list, abercrombie Pants only eight made the final cut. abercrombie Tees All emphasize value, whether it's huge portions or quality for less. abercrombie Shorts And all of these companies are financially healthy, abercrombie Sweaters with reasonable debt and the wherewithal to keep expanding despite a credit crunch. abercrombie Outerwears Here are the restaurants with the right recipe for lean times:It might not be good for America's waistline, abercrombie Hoodies but froufrou dining off petite plates is out. abercrombie Polos The recession has made us hungry for family-size piles of comfort food, abercrombie fitch Jeans skyscraping burgers, abercrombie fitch Pants and all-you-can-eat fries.Like other segments of the retail economy, abercrombie fitch Tees the restaurant industry has struggled over the past two years abercrombie fitch Sweaters as unemployment has soared and consumers have curtailed spending. abercrombie fitch Outerwears The National Restaurant Association's performance index shows that the industry has been shrinking for 23 months in a row. abercrombie fitch Hoodies High-end bistros have fared the worst, with sales at fancy restaurants like Ruth's Chris and Morton's Steakhouse off by 20 percent or more, abercrombie fitch Polos as corporate customers pare expenses and other diners trade down.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, November 23, 2009 3:20 AM by yoyo    

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Monday, November 23, 2009 3:27 AM by yoyo    

# links of london

Tuesday, November 24, 2009 1:35 AM by links of london    
Chipotle Mexican Grill links of london jewellery . The fast food at these casual links of london eateries feels slow, links london jewelry thanks to organic ingredients cheap links of london , custom combos, link of london and an emphasis on freshness. links of london sale Traffic is down at many locations, links of london jewelry but the company has been able to compensate by raising prices, links london Olive Garden. links of london Charms More food for less money hits the sweet spot these days, links of london Charm which makes the family-style portions at this casual Italian chain a hit with diners. links of london Necklaces Olive Garden is a division of Darden Restaurants, links london Necklace which also operates Red Lobster, links of london Bracelets Longhorn Steakhouse, links london Bracelet and a few smaller chains. links of london Sweetie Bracelets Olive Garden has been the best performer of the bunch, links london Sweetie Bracelet with same-store sales down slightly but overall sales up, links of london Friendship Bracelets thanks to about 35 new outlets links of london Sweetie Watches that have opened over the past year links london Friendship Bracelet

# timberland boots,timberland shoes,timberland mens boots ,cheap timberland boots, timberland womens b

Tuesday, November 24, 2009 8:39 AM by timberland womens shoes    

Power invariably means both timberland on sale responsibility and cheap timberland boots danger . If your Riches are yours classic timberland boots , why don't you take timberland womens shoes them with mens timberland boots you to the other world ? Money is a good discount timberland boots servant and a bad timberland winter boots master . Money is like muck , not good except it be spread . No country , however rich , can afford the waste of its human resources . Sometimes one timberland store pays most for the things one gets for nothing .


# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Thursday, November 26, 2009 10:29 PM by abercrombie Jeans    
"Climate change links of london Necklaces needs to be addressed now. The poor will bear the brunt of the impacts. The frontline experience of many of us ed hardy bags working in international development indicates that communities are having to combat more extreme links london Necklace weather conditions." Climate ed hardy sunglasses change will play havoc with agriculture and water supplies and will increase diseases. "By 2025 the ed hardy purses proportion of the world's population living in countries of significant water stress will almost links of london friendship bracelets double, to 6 billion people. Tropical and ed hardy t shirts sub-tropical areas will be hardest abercrombie Polos hit - those countries already suffering from food insecurity".

# re: The next great O/R Mapper...ADO.NET?

Friday, November 27, 2009 4:21 AM by Aion Kina    
20947183369175745 In other words, Last Chaos Gold in addition Replica Cartier Watches to the original Replica Rolex Watches game, Final Replica Watch Fantasy XI Ultimate Replica Chanel Watches Collection will Replica Swiss Watches include the expansion Rise of Replica Breitling Watches the Zilar, Chains of Promathia, Treasures of Replica Watches Aht Urhgan and Wings of Replica IWC Watch the Goddess. In Dvd Box Sets addition, scenarios A Crystalline Replica Montblanc Watches Prophecy – Bestowing Ode of Life, A Moogle Kupo State – Evil in Swiss Replica Watches Small Doses and A Replica Breguet Watches Shantotto Ascension Tag Heuer Replica Watch – The Legend Torn, Her empire Born Replica BRM Watches will be present.

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Friday, November 27, 2009 6:32 AM by Ed Hardy    
Find a great range of Ed Hardy products. Ed Hardy Women's Ellerise Lowrise Sneaker · Ed Hardy Women's
thanks for your post.perhaps you will like
Ed Hardy
Ed Hardy handbags
cheap Ed Hardy
Ed Hardy clothes
Ed Hardy
Ed Hardy Clothing Shoes and Accessories On Sale,Official Ed Hardy Store for all Clothing and Gear,ed hardy swimwear,ed hardy Shoes.Ed Hardy shoes
Ed Hardy clothes
The Best Ed Hardy Online Store, supplying Cheap Ed Hardy shirts, Swimwears, Tanks, Bags and so on for women and men. Enjoy your ed hardy shopping experience here

# re: Parallels destroys my BootCamp setup

Saturday, November 28, 2009 10:04 PM by ugg boots ultra    
S11129I2 It is a ugg boots ultra strange thing, to note the excess of this passion, and how it braves the ugg bailey button sale nature, and value of things, by this; that the speaking in a perpetual hyperbole, is comely in nothing but in love. Neither is it merely in the uggs bailey button phrase; for whereas it hath been well said, that the arch-flatterer, with whom all the petty flatterers have intelligence, is a man`s self; certainly the classic tall uggs lover is more. For there was never proud man thought so absurdly well of him self, as the lover doth of the person loved; and therefore it was well said, That it is impossible to love, and to be wise. http://www.bayuggs.com/specials.html

# ed hardy

Tuesday, December 01, 2009 4:20 AM by ed hardy    

The street wear for the street smart speaks a lot about the fashion Christian Louboutin Shoes concepts of ed hardy clothing Line. The suave cuts and colors in the ed hardy t shirts Hoodies has become a popular flair among those who choose to mellow on their daily garb. The sneakers and ed hardy clothes are complemented by the ed hardy sale with its intricate vintage prints. The young professionals who choose not be held captives of ed hardy
and casual look of collars and slacks opt for ed hardy t shirt , shirts and hoodies for that relaxed and casual feel. ed hardy t-shirt is the normal look preferred by the hippies, artists and yuppies alike.



# Ugg Boots, Ugg Australia,Ugg Classic Cardy, Ugg Bailey Button, Ugg Cardy, Uggs Boots

Wednesday, December 02, 2009 9:52 AM by ugg ultra boots    
S11202C2

The important thing in bailey button boots life is to have a great ugg knightsbridge sale aim , and the ugg classic cardy determination to attain it.The man with a new ugg classic mini idea is a crank until the ugg classic tall sale idea succeeds . The only uggs classic crochet limit to our ugg lo pro button boots realization of tomorrow will be our nightfall ugg boots doubts of ugg rainier boots today . When an ugg sundance boots end is lawful and obligatory, the indispensable ugg ultra boots means to is are also lawful and obligatory .Genius only means hard-working all one's argyle knit boots life .

http://www.officialugg.co.uk/

# http://www.usuksale.com/

Friday, December 04, 2009 6:03 AM by ugg wholesale    

# ugg on sale, ugg boot, cheap ugg boots, ugg bailey button,uggs boot

Friday, December 04, 2009 10:51 AM by ugg classic tall sal    
S11204C2 To the ugg uk world you may be one person, but to ugg sale one person you may be the discount ugg boots world. Don't waste your bailey button boots time on a woman, who isn't willing to waste their ugg cardy sale time on you.Just because someone ugg classic tall doesn't love you the ugg classic tall sale way you want ugg nightfall sale them to, doesn't mean ugg rainier they don't love you with all ugg sundance sale they have.Don't try ugg ultra sale so hard, the bestugg lo pro button things come when you least expect them to.Maybe God wants us to meet a few ugg knightsbridge sale wrong people before meeting the right one, so that when we finally meet the person, we will know ugg classic short how to be grateful.

# UGG Bailey Button<

Friday, December 04, 2009 11:58 PM by UGG Bailey Button<    

# ugg boots

Monday, December 07, 2009 3:24 AM by miyo    
Discount UGG Boots newspapers dubbed Charles. And with UGG Classic Tall Boots. The quality of diamonds was UGG Bailey Button Boots, and remains, exemplary. In the spring of UGG Mini Boots,shocked the world by purchasing the French Crown Jewels.

# re: Parsing WordML using XLinq

Monday, December 07, 2009 10:25 AM by ugg boots sale    

# bule sky

Monday, December 07, 2009 7:51 PM by ugg boots sale    
This Ugg classic moccasin-inspired addition tougg ultra tall collection combines style and comfort in discount ugg boots yet signature craftsmanship perfect for ugg sundance boots fashionista. Quality sheepskin materials and the UGG signature stamp make the Retreat true to its roots. Work all day and play all night in the same pair of ugg classic tall boots.

# uggs on sale

Monday, December 07, 2009 11:44 PM by wisky    

# ugg boots

Monday, December 07, 2009 11:53 PM by sandy    
Sports shoes play an important Chris Paul Shoes in our life. Adidas shoes brand is a professional Gilbert Shoes. There are lots of Kevin Shoes on the Adidas world. Many world famous sports players choose Adidas shoes as their special footwear. In addition to football players, NBA players also trust Kobe Bryant Shoes

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Tuesday, December 08, 2009 8:49 AM by uggs boots on sale    

# Ugg,uggs,uggs sale,ugg sale,ugg for sale,ugg on sale,uggs on sale

Tuesday, December 08, 2009 11:26 AM by ugg bailey button sale    
S11208A2 The ugg bailey button sale world is a comedy to those who thinks, a tragedy to those ugg classic cardy boots who feels.Look not mournfully into the uggs classic mini past, it comes not back again. Wisely improve the present, it is ugg classic short thine. Go forth to meet the shadowy future, without fear, and with a manly lo pro button ugg heart.

# rhttp://www.bayuggs.com/specials.html

Tuesday, December 08, 2009 12:39 PM by ugg bailey button sale    
Waj8
It is a ugg boots ultra strange thing, to note the excess of this passion, and how it braves the ugg bailey button sale nature, and value of things, by this; that the speaking in a perpetual hyperbole, is comely in nothing but in love. Neither is it merely in the uggs bailey button phrase; for whereas it hath been well said, that the arch-flatterer, with whom all the petty flatterers have intelligence, is a man`s self; certainly the classic tall uggs lover is more. For there was never proud man thought so absurdly well of him self, as the lover doth of the person loved; and therefore it was well said, That it is impossible to love, and to be wise. http://www.bayuggs.com/specials.html

# ugg boots sale

Wednesday, December 09, 2009 6:38 AM by sky    
This Ugg classic moccasin-inspired addition tougg ultra tall collection combines style and comfort in discount ugg boots yet signature craftsmanship perfect for ugg sundance boots fashionista. Quality sheepskin materials and the UGG signature stamp make the Retreat true to its roots. Work all day and play all night in the same pair of ugg classic tall boots.

# ugg classic tall boots

Wednesday, December 09, 2009 9:11 AM by ugg classic tall boots    

# re: If Attributes are good enough for Indigo why aren't they good enough for O/R Mappers?

Wednesday, December 09, 2009 11:23 AM by aaaaaaaaa    

#

Ugg to show your beauty in everyday

Friday, December 11, 2009 7:38 AM by wow_boots    

Ugg to show your beauty in everyday


What is beatiful ? It is equip yourself beautiful.

Pamela Anderson who has been using the sexy image of the well-known for everyone, in private occasion she also like casual dress very much and a simple casual style is her style. Therefore, a simple white long-barreled ugg boot is her favorite. The light brown or white ugg, eversion the inner hair make it more casual playful, suitable for a very casual life of makeup, what’s more this is suitable for all year round. The classic simplicity of low-key models is as the same as the feeling given to everyone by Pamela Anderson. The little sweetheart Hilary Duff who is always has a low-key style also a loyal lover for ugg. The simple low-key classic model is just like she’s style in life which is comfortable and refreshing.

So Ugg Knit boots for women features lavish twin-faced sheepskin for the utmost comfort. Precision craftsmanship is evident in the UGG Knit Classic Argyle Boots reinforced heel and raw seams.


# discount ugg boots

Friday, December 11, 2009 8:44 AM by discount ugg boots    

Do you like Ugg boots? Do you wanna purchase Cheap Ugg boots?Now, this year, we have some new comings. The Ugg Bailey Button is still the best seller this month. And we also add some colors in Classic Ugg Tall. The Classic Ugg Cardy is still the pop one. And we also have Ugg Sundance and Ugg Nightfall boots in stock. Welcome to shop with us for discount ugg boots. Hurry up to win the gifts!

# http://www.atasale.com

Friday, December 11, 2009 7:57 PM by shoes