Programmatically opening the Domain Model Wizard

4 posts, 0 answers
  1. Max
    Max avatar
    5 posts
    Member since:
    Sep 2013

    Posted 31 Mar 2014 Link to this post

    Hi all,

    I'm trying to automate the creation of some of our commonly used project architectures and require the ability to programmatically open the "New Domain Model Wizard" (this thing). I've been able to work out that it appears the class Telerik.OpenAccess.Sdk.Addin.VSAddin.OpenAccessAddin80 is  involved in the creation of this dialog through the VS extensions system but I haven't been able to successfully create this wizard myself. 

    Any possibility anyone is willing to disclose how to accomplish this?


  2. Boyan
    Admin
    Boyan avatar
    100 posts

    Posted 03 Apr 2014 Link to this post

    Hi Max,

    The easiest way to create custom project structure that allows you configuration through the New Domain Model Wizard is to modify and extend the Telerik Data Access default templates adding any additional resources you need. If this is something that you are interested in, you could find the templates in {Telerik Data Access Installation Folder}\dsl{VSVersion}\ProjectTemplates\ folder. For more information please check the Manually Updating an Existing Template section of this documentation article.

    If this approach is not applicable for you could you please describe the scenario which requires the New Domain Model Wizard to be started programmatically? Please note that when this wizard was designed it was not intended to be used programmatically by our clients. Providing more information on you current implementation scenario would allow us to analyze it and advice you better.

    Should you have any further questions do not hesitate to contact us again.

    Regards,
    Boyan
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
  3. DevCraft banner
  4. Max
    Max avatar
    5 posts
    Member since:
    Sep 2013

    Posted 03 Apr 2014 in reply to Boyan Link to this post

    Hi Boyan,

    Thank you sincerely for your input. Basically the scenario that I have is that I've gotten sick of manually putting together application architectures as projects commence.

    As a result I am trying to build an open source automated tool that would automatically build a multi-tier, service orientated architecture with all the basics already implemented for you (but that is highly configurable). Fundamentally it is my next implementation of this visual studio template I previously released. 

    The idea is that at the end of my automation tool wizard I wanted to open your OpenAccess wizard (or the Microsoft Entity Framework Data Model Wizard) and once it was completed I would automatically generate the WCF services, Views and Mappers associated with the various data structures your (or Microsofts) toolsets created.

    It's a somewhat ambitious concept, so completely understand if it is beyond what is possible with your toolset in its current state. Any further input would be highly appreciated.


  5. Boyan
    Admin
    Boyan avatar
    100 posts

    Posted 08 Apr 2014 Link to this post

    Hi Max,

    If I understood you correctly you would like to modify the template from your previous post and make it more flexible allowing the users to configure the database connection and Telerik Data Access settings through New Domain Model Wizard. Additionally, the other projects in your Visual Studio template should have similar behavior allowing custom code to be executed when they are created.

    If this is indeed the case, the most straight-forward way to achieve such functionality is to create a multi-project template (similar to your implementation). Using the workflow described in this documentation article will allow you to integrate the Telerik Data Access project template into your own Visual Studio template taking advantage of the New Domain Model Wizard with minimal overhead.

    Each of the other project templates that need to run custom logic could take advantage of the IWizard interface that allows you to execute code at various points while the projects are being created. This is actually very similar to the way that the New Domain Model Wizard works - if you locate the Telerik Data Access Domain Model project template (see my previous post), unzip it and open the .vstemplate file you will notice the <WizardExtension> node. This node registers the New Domain Model Wizard.
    Please refer to this documentation article for more information on how to implement custom wizards.
    This approach enables you to benefit from all the points of extensibility that Visual Studio provides when implementing your tool and to use project templates and wizards that are already integrated with Visual Studio.

    Please note that running the New Domain Model Wizard outside of the Visual Studio environment could prove a hard task and it would not be very beneficial because it is designed as a Visual Studio extension and it depends on the IDE.

    I hope this is helpful. Please let us know if you have any more questions. 

    Regards,
    Boyan
    Telerik
     
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
     
Back to Top