Solved

Limitations / Problems with ObjectDataSource

Posted on 2009-07-06
7
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 18

Accepted Solution

by:
Richard Lee earned 250 total points
ID: 24787571
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
ID: 24787729
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
ID: 24787877
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
ID: 24788205
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
ID: 24788441
Thanks but I don't think you prompted to close the solution rather than accept.
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

738 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