Localized Domain Model - Input Needed RRS feed

  • Question

  • I am working on a localized domain model and am playing around with two approaches. If anyone has experience with either, any feedback would be appreciated.


    Let me use simple objects to try and explain...


    I have products and categories that are localized. My localized data is more than just product names or static strings. They localized data is both country-specific and language specific. The products are tech-spec heavy and have many global fields that are country/locale independent.


    Country-specific data includes items such as product availability dates, publish times for each country, etc.

    Locale-specific data includes, product names, description, product support links, etc.


    My two approaches are as follows:


    1. Create the Product class with two coleections of CountryProperties and LocaleProperties. We then set the context of the current locale (en-us) and then provide a property such as .AvailableDate wich scans the collection for the en-us object and returns the availableDate property.


    2. Flatten out each class to just have a .AvailableDate and hydrate the objects using a specific query that includes locale as a parameter. This basically ties each object to it's locale.


    #1 allows us to work with a single object an we can ensure that the global props are represented in the same place. It would equality a little easier to manage as well as caching.


    #2 would make us work with 4 objects if we are trying to update the locale name for each language or globally set a product availability date in all countries. All of the global props are the same in all 4 objects, the local data is would be different.


    We've got the proof of concepts working for both on the subset of our domain model, both ways work fine and each has its own drawbacks. Before making a firm decision, I wanted to get some input from anyone else who may see any other pain points we aren't seeing right now before implementing our full model.


    Any input is appreciated. Thank you,





    Thursday, June 12, 2008 6:02 PM