Is a DAL really that efficient?
My company is looking at using a DAL. This will consist of creating business objects, setting of data objects and converting all the data to xml and on the server side turn around and put it back to the type it was. It is using a CRUD approach.
These are my concerns
1) converting from text then back
2) heavy use of reflection in doing this
3) problems arising when I only need to modify one column in a table.
This doesn't seem more efficient than using webservices.
If this should be self evident that this is faster and more efficient can anyone recommend good books on this.
We are using MS sql 2005 utilizing c#.
is it just overlooking all the inefficiencies becauses computers are faster?
[761 byte] By [
terickso] at [2007-11-20 11:44:39]

# 1 Re: Is a DAL really that efficient?
I'll start by your last question:
is it just overlooking all the inefficiencies because computers are faster?
No, poor design and unnecessary processing still affects performance. I believe that optimization these days is about good design and architecture than small coding optimizations that optimizing compilers do better.
Your description of the DAL is covers much more than what DAL usually does. DAL is not about data transformation from client to server anyway.
An important question to ask is: What are the design goals of this design?
Can you consider using .net remoting (or better WCF that will work fine both as web services and as a replacement for remoting for better performance)
hspc at 2007-11-9 13:45:41 >

# 2 Re: Is a DAL really that efficient?
I apologize if the term dal is to vague.
I won't even pretend I know half of what the latest coding practices are lately, but what I describe is what someone whom are company hired is the latest and greatest and is pushing what I described to replace our webservices. The webservices are action orientated and do not use a crud interface. What I have been trying to read or ask people more knowledgable then me is, is the approach mentioned previously the latest and greatest. I would imagine it will depend on factors, the question I have been trying to find what factors.
Our current approach is to have an object has a method which performs an action. It can be one or many fields in a table which need to be modified. It is streamed to binary and sent to the server where the webservice uses a stored procedure to do a particular action.
The new approach is get the whole table have it mapped to text and convert it back to needed db types in a webservice and save the whole thing to a table. (crud interface).
Maybe even this approach is a new twist, like I said I am not the most up to date in my reading.
Thanks for any input.
# 3 Re: Is a DAL really that efficient?
Hi terickso
I cannot judge the design without the details, but in general, CRUDy interfaces of web services is an considered an anti-pattern (bad practice). sure, there can be other opinions.
The new approach is get the whole table have it mapped to text and convert it back to needed db types in a webservice and save the whole thing to a table. (crud interface).
What about network transfers performance? How locks will be handled?
Also using this approach, seems that business logic will not be centralized in the middle tier. It will be on the client actually, can this be a maintenability issue in your case?
Also why make when you can reuse?
What about future needs of application? designing this way can cause an interoperability issue when you want to integrate other application with this one.
I hope I could give some light.:)
hspc at 2007-11-9 13:47:40 >
