Multi tierd ASP.NET Ajax and OpenAccess

11 posts, 0 answers
  1. Sean
    Sean avatar
    18 posts
    Member since:
    Oct 2008

    Posted 09 Apr 2009 Link to this post

    I've read through serveal threads and looked at many examples and I've yet to get a clear understanding of how to best use OpenAccess with ASP.NET and Rad Controls. In particular I'm struggling with the ObjectScope and where it should live and be managed. You have a "Best Practices" project that has both a masterpage implementation and http handler implementation. I then read a thread that the http handler will not work with ajax controls because of javascript errors and the thread response from Telerik was well just use regular asp.net controls. That is not a reasonable answer. None of your examples (CRUD, Best Practices, OpenAccessSimpleExample) demonstrate how to:

    1. Retrieve an object
    2. Bind it to a control
    3. Update values from webform controls (not on load of a page)
    4. Persist the chages back.

    In some threads you suggest the disconneced API while in others the normal object scope. All your examples show doing this all in page load (Retrieve, edit, persist back). This is not a real world example of an application. Applications require users to interact with the data and persist changes back to the database.

    I would love to see a true n-tiered appliation webform, bll, and dal with your own ajax controls demonstrating the scenario above with a definitive methodology on how to manage object container while maintaining separation of concerns in my tiers.

    I have concerns that I am unable to cache objects in memory and allow users to work with them and persist them back because the original object scope is now disposed of. That means I have to also cache all object scopes. A normal application could be working with several objects at the same time. This could get very difficult to manage if I can't have one overal provider to retrieve, cache, update and submit objects back to for persistence. I may have completely misunderstood the framework so clarification on all this would be great.

    Thanks,
    Sean
  2. Sean
    Sean avatar
    18 posts
    Member since:
    Oct 2008

    Posted 13 Apr 2009 Link to this post

    4 days no response? What has happened to the Telerik customer support I used to get?
  3. DevCraft banner
  4. Dimitar Kapitanov
    Admin
    Dimitar Kapitanov avatar
    632 posts

    Posted 14 Apr 2009 Link to this post

    Hello Sean,
    We are in the process of preparing an N-Tier Web/WCF application example that can be used as a reference example of using OpenAccess in the web. Usually the scopes should be disposed with the page, but if you want to have a long-running object scope you should provide the means of storing the object scope. A useful pattern is to bind controls to our data source and have a single scope shared among different data source instances. Having said that, I admit that we have to demonstrate more clearly the scenarios when using OpenAccess in the web. He have it in our plans.

    Regards,
    Dimitar Kapitanov
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  5. Daniel Plomp
    Daniel Plomp avatar
    130 posts
    Member since:
    Feb 2004

    Posted 17 Apr 2009 Link to this post

    Do you know when this 'sample app' would be ready? I'm also desperate waiting for some samples and clarification on this! Thanks! -Daniel-
  6. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 21 Apr 2009 Link to this post

    Hello Daniel,

    Our plans are to have the N-Tier Web/WCF application and its related documentation uploaded in two weeks. We will notify you once it is published.

    Greetings,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 29 Apr 2009 Link to this post

    Hi Guys,

    I'd like to add my vote to this request. I'm in seriouis need of some clarity on these topics! 

    Can you confirm a point, will this sample application have no reference to OpenAccess directly in the web application? In other words will there be true seperation of concerns?

    Also, are you still on target for releasing this? On what date can we expect it?

    Regards,

    Richard.
  8. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 30 Apr 2009 Link to this post

    Hi Web Belief Ltd,

    Yes I confirm, OpenAccess is used only in the low level tiers - the Data layer and the BLL. Additional middle-tier objects are used for transportation over the service.

    Our target is to publish the demo until the end of the next week.

    Sincerely yours,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. richardFlow
    richardFlow avatar
    62 posts
    Member since:
    Jun 2012

    Posted 01 May 2009 Link to this post

    Hi Alexander,

    My interpretation of proper separation of concerns would have the openAccess code restricted to just the DAL.  Surely the BLL will just process the Business Objects and calls the DAL to be returned Objects or ObjectCollections.  Therefore there is no need to refer to OpenAccess or scopes etc within the BLL or the higher levels.

    Regards,

    Richard.
  10. SuperXRAY
    SuperXRAY avatar
    82 posts
    Member since:
    Feb 2007

    Posted 04 May 2009 Link to this post

    I'm offering my help with this, but I cannot post a sample project due to NDA restrictions. I don't have the time to make a new app, but I will most definitely modify someone's app to do this as an example.

    If I am correct here, the real point is to have the BLL do it's job, perform business logic on objects retrieved via the ORM. This is actually quite easy to do. The main complication with this type of setup is staying consistent with how your Presentation Layer accesses the objects it needs. Whether you use an ObjectDataSource or something else.

    Please let me know what you are using to access the objects, or if you need help with that to. If you are developing WebApps specifically, then it is VERY debatable as to whether a separate BLL will increase or decreases performance.

    If you can post a sample project that you 'almost have working', I'll happily take a look at it.
  11. SuperXRAY
    SuperXRAY avatar
    82 posts
    Member since:
    Feb 2007

    Posted 04 May 2009 Link to this post

    BTW, all of our projects use Telerik RadControls for ASP.NET AJAX and the Telerik ORM. Stuff works great.
  12. Alexander
    Admin
    Alexander avatar
    727 posts

    Posted 13 May 2009 Link to this post

    Hello Guys,

    The demo application is available for download. Please read the related Knowledge base article first. It describes how to run the project and contains a link to the source code.

    Regards,
    Alexander
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top
DevCraft banner