Best Practices in web development with OpenAccess

Thread is closed for posting
6 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1508 posts
    Member since:
    Oct 2004

    Posted 16 Feb 2009 Link to this post

    Requirements

    RadControls for ASP .NET AJAX version

     

    2008.3.1314.35
    OpenAccess ORM version 2010.2.714.1
    .NET version

     

    3.5
    Visual Studio version

     

    2008
    programming language

     

    C#
    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION
    The project demonstrates the mostly recommended approaches for handling the object scope in a web development environment. It relates to the Knowledge-Base article discussing this topic.

    UPDATE:The most recent version of this project can be found in the Software Development Kit, which you can download here. In case you have questions related to this project, please use the support ticketing system.

  2. CodeMonkey
    CodeMonkey avatar
    10 posts
    Member since:
    Oct 2009

    Posted 01 Nov 2009 Link to this post

    I don't follow ths sample.

    I see the IObjectScope being created in the ScopeModule (BestPracticesHttpModule) but I see no access to that session held object from the pages in BestPracticesMasterPage. The master page appears to be getting a new scope from the local project implmentation of IObjectScopeProvider rather than the one loaded into the session. 

    What is it I am missing?

  3. Zoran
    Admin
    Zoran avatar
    534 posts
    Member since:
    Sep 2012

    Posted 02 Nov 2009 Link to this post

    Hello CodeMonkey,

    The HttpModule and the Master Page are two different approaches of handling the object scope that do not have too much in common. In the Master Page an object scope is always obtained from the ObjectScopeProvider and it is accessed in the child pages via the Scope property of the Master Page.

    In the HttpModule approach the scope is created and stored in the Session using the module and it is hence accessed in the pages of the project that contains the HttpModule on their Page_Init event handler.

    Sincerely yours,
    Zoran
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  4. CodeMonkey
    CodeMonkey avatar
    10 posts
    Member since:
    Oct 2009

    Posted 02 Nov 2009 Link to this post

    Oops my bad.

    I didn't see the Default.aspx in the BestPracticesHttpModule, I assumed it was just a project holding the ScopeModule and not web project in itself.

    I am using the ASP.NET MVC projects with a Model layer (OA classes) and a Repository/Service layers being called from the controllers - is there a preferred technique in this scenario?

  5. Zoran
    Admin
    Zoran avatar
    534 posts
    Member since:
    Sep 2012

    Posted 03 Nov 2009 Link to this post

    Hi CodeMonkey,

    Well you can use either of the approaches as well as the one described in the second part of the KB-article series. There is no specific recommendation for the approach you are about to take, it is all left for the user to decide.

    Regards,
    Zoran
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  6. Damyan Bogoev
    Admin
    Damyan Bogoev avatar
    581 posts
    Member since:
    Sep 2012

    Posted 13 Jun 2011 Link to this post


    The most recent version of this project can be found in the Software Development Kit, which you can download here. In case you have questions related to this project, please use the support ticketing system.

    All the best,
    Damyan Bogoev
    the Telerik team

    Q1’11 SP1 of Telerik OpenAccess is available for download; also available is the Q2'11 Roadmap for Telerik OpenAccess ORM.

Back to Top