Domain Model vs Traditional 'ORM-Enable'

10 posts, 0 answers
  1. James
    James avatar
    22 posts
    Member since:
    Sep 2010

    Posted 12 Oct 2010 Link to this post

    Hello,

    I started a new project recently. OpenAccess Q2 2010 build 714 is used.

    The database schema is empty. The tables will be 100+. The initial application version will use SQL Server Express (e.g. 2008R2). Later versions may support Oracle XE.

    Do you suggest the new Domain Model or the traditional 'ORM-Enable' way?
    • if Domain Model: I hope to create tables visually in the domain model (entity diagram), and then forward mapping to the database schema.
    • if ORM-Enble: I may create tables using SQL Server Management Studio, and then reverse mapping to OpenAccess.

    The DTO template seems to work with Domain Model only. Can I gain DTO-similar capabilities from the traditional 'ORM-Enable' way?

    Any suggestions will be very useful . Thanks!

    Regards,
    James
  2. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 15 Oct 2010 Link to this post

    Hello James,

    I would recommend you to go for the DSL approach. This way you will avoid both writing the classes and the database schema. You can create the classes in the designer, set all relationships and let the Update Database From Model wizard do the table definition job. You can execute the wizard several times against different databases and work with the same model against them. This is possible because the wizard generates backend-specific SQL, based on the currently used connection string.

    I am afraid that the DTO templates are not available for the classic "Enable project" approach. The old code generation mechanism does not provide so rich extensibility capabilities as the new one, which uses standard T4 templates. Hope that helps.

    All the best,
    Alexander
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. James
    James avatar
    22 posts
    Member since:
    Sep 2010

    Posted 16 Oct 2010 Link to this post

    Thanks Alexander!

    What does OpenAccess DSL mean, could you pls give me a link or example?

    It's easy for me to create a database schema using database tools. Manually writing classes with [Telerik.OpenAccess.Persistance] and similar attributes will take much more time, if no tools can help achieve this effectively.

    Regards,
    James
  5. TSE
    TSE avatar
    381 posts
    Member since:
    Sep 2008

    Posted 17 Oct 2010 Link to this post

    Hi James,

    The "DSL" refers to the visual designer shipped with OpenAccess, where you can visually design your classes and then forward map them to tables.
    However, you must use the Visual Designer (OpenAccessContext) approach instead of the Classic approach for the designer to show up.
    See this link in the docs

    Regards

    Henrik
  6. James
    James avatar
    22 posts
    Member since:
    Sep 2010

    Posted 18 Oct 2010 Link to this post

    Hello Henrik,

    Thanks for your suggestions.

    I've decided to use the new Domain Model way after discussing with Telerik support team.

    From the article (http://www.telerik.com/support/kb/orm/general/dto-templates-for-domain-models.aspx), DTO templates is an initial version. So, any features (not VB support) will be added to DTO templates in Q3 2010?

    Regards,
    James
  7. TSE
    TSE avatar
    381 posts
    Member since:
    Sep 2008

    Posted 18 Oct 2010 Link to this post

    Hi James,

    I will let the Telerik support team answer the question regarding availability of features in the Q3 regarding the DTO templates. Please note however, that the templates are based on T4 and can be modified for custom needs.

    Regards

    Henrik
  8. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 19 Oct 2010 Link to this post

    Hello,

    Surely, there will be a VB version of the templates for Q3. The new templates will also support one-way navigation properties and will contain several important fixes.

    Kind regards,
    Alexander
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. TSE
    TSE avatar
    381 posts
    Member since:
    Sep 2008

    Posted 19 Oct 2010 Link to this post

    Yes, Alexander...That navigation stuff is really appreciated and a wanted (at least by me) feature..

    Keep up the good work..

    /Henrik
  10. James
    James avatar
    22 posts
    Member since:
    Sep 2010

    Posted 20 Oct 2010 Link to this post

    Hello Henrik,

    Thanks for your suggestion! I have not used T4 from Microsoft, but now I know the extension possibility of DTO Templates.

    Regards,
    James
  11. James
    James avatar
    22 posts
    Member since:
    Sep 2010

    Posted 20 Oct 2010 Link to this post

    Hello Alexander,

    Thank you for your updates! I think the one-way navigation feature will be useful if it's added to DTO Templates in Q3 2010.

    Regards,
    James
Back to Top
DevCraft banner