Solved

Limitations / Problems with ObjectDataSource

Posted on 2009-07-06
7
278 Views
Last Modified: 2013-12-17
Guys,
Can anyone help me in understanding the Limitations / Problems with ObjectDataSource in .NET 2.0 and 3.5 framework? I have heard that this is not a best practice to use ObjectDataSource. We are going to create a new application with SOA and SaaS model. We want the application be very much flexible and easily adoptable.
Please suggest me.
0
Comment
Question by:saj_37uk
  • 3
  • 2
7 Comments
 
LVL 18

Accepted Solution

by:
Richard Lee earned 250 total points
Comment Utility
ObjectDataSource Limitations:

1. Tightly coupled to databound control.
2. Tightly coupled to select/update/delete methods
3. Event lifecyle difficult to follow especially when interacting with other complex controls.
4. Event firing out of your control.
5. Hard to extend application.

A better loosely coupled and more flexible data access layer is appropriate for your SOA and SaaS model. To increase reliability and decrease development time an ORM such as LINQ or Entity Framework can be used.

I would strongly advised against using ObjectDataSource a model such as the following could be used.

             <-- Lightweight DTOs                <-- ORM DTOs
Presentation    <--    Business     <--    LINQ/Entity Framework/etc    <--    Data Source
-------------------------------------------------------------------------------------------------------
 Presentation           Business                                    Data Layer
     Layer                     Layer
-------------------------------------------------------------------------------------------------------
0
 

Author Comment

by:saj_37uk
Comment Utility
Thank you very much!
Do you have any other suggestion for using with SOA & SaaS model? We are planning to include CSLA framework.
0
 
LVL 18

Assisted Solution

by:Richard Lee
Richard Lee earned 250 total points
Comment Utility
I am not a fan of the CSLA framework however it works and caters for concurrency.

To support loose coupling & separation of concerns (SoC) you may want to look into a UI design pattern/framework. Since you are using ASP.NET the ASP.NET MVC Framework springs to mind. http://www.asp.net/mvc.

This ensures that all logic that handles functionality can be seperate and therefore can be handled by a service outside of the UI. You can also look into the Model View Presenter (MVP) pattern. Almost the same but you can choose your preference.
0
 

Author Comment

by:saj_37uk
Comment Utility
Thank you very much for your open suggestions. I'm accepting this as a solution of my query.
0
 
LVL 18

Expert Comment

by:Richard Lee
Comment Utility
Thanks but I don't think you prompted to close the solution rather than accept.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now