tag:blogger.com,1999:blog-2629608947246129428.post8100152939682932857..comments2024-02-18T05:01:43.733-07:00Comments on Reference Bits: High Performance Data Access Layer Architecture Part 1Rudy Lacovarahttp://www.blogger.com/profile/15639782534216467791noreply@blogger.comBlogger43125tag:blogger.com,1999:blog-2629608947246129428.post-30878056972994395392015-10-20T20:05:19.689-06:002015-10-20T20:05:19.689-06:00This comment has been removed by the author.tranthuhahungyenhttps://www.blogger.com/profile/15220165204181653297noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-62491703501307504892014-06-30T04:27:37.914-06:002014-06-30T04:27:37.914-06:00This comment has been removed by the author.bir dosthttps://www.blogger.com/profile/13283817500381418103noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-23387587541578397112014-06-28T09:56:31.851-06:002014-06-28T09:56:31.851-06:00This comment has been removed by the author.bir dosthttps://www.blogger.com/profile/13283817500381418103noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-6840643285350016932014-06-24T07:21:32.285-06:002014-06-24T07:21:32.285-06:00This comment has been removed by the author.bir dosthttps://www.blogger.com/profile/13283817500381418103noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-45374808075283935122014-04-19T03:41:34.616-06:002014-04-19T03:41:34.616-06:00I agrees that Switching database vendor is usually...I agrees that Switching database vendor is usually unrealistic in production. But separation of concerne (data access, data transfer..), make code loosely coupled for testability is still a good idea. But we shouldn't abuse the idea with too much boilerplate copy/paste codes. I prefer module over layer. An app is combination of small module which do only 1 things. Maybe the module need to acces database to fullfill his jobs. But it should do what ever it want, in the way it should to passed his blackbox test.Anonymoushttps://www.blogger.com/profile/06818891108552693190noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-80245006373845050102013-04-13T01:13:56.907-06:002013-04-13T01:13:56.907-06:00Convert VB to C# with VBConversions,the most accur...Convert VB to C# with VBConversions,the most accurate code translation tool available. more information then visit: www.vbconversions.com <br />and Product Details : www.tangiblesoftwaresolutions.com/Product_Details/Instant_CSharp.html<br /> <br /><a href="http://www.vbconversions.com/" rel="nofollow">vb.net to c# converter</a><br /><a href="http://www.vbconversions.com/" rel="nofollow">convert vb c#</a><br /><a href="http://www.vbconversions.com/" rel="nofollow">vb to c# converter</a><br />Anonymoushttps://www.blogger.com/profile/12388613948363982900noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-45226960596728223632013-02-06T04:32:14.780-07:002013-02-06T04:32:14.780-07:00The 2nd Part is already Published and There are lo...The 2nd Part is already Published and There are lots of persons are used this for high performance data access.just i m using diagram of the DAL design that for understanding.JasperDffyhttp://jasperdffy.wix.com/dot-net-developernoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-66689990503282249552012-11-30T11:05:58.453-07:002012-11-30T11:05:58.453-07:00Mapping might eliminate that issue. In our distri...Mapping might eliminate that issue. In our distributed system, DTO's act as our communication between layers. Domain objects map to DTO's which transmit data to and from our various presentation layers. Data received from those layers are then mapped back to our DAL. Various frameworks exist to assist with mapping code, such as Automapper which can make this trivial and separate a number of concerns.Anonymoushttps://www.blogger.com/profile/10616718443953390010noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-59207269334361321562012-08-30T10:52:38.641-06:002012-08-30T10:52:38.641-06:00Hi,
Nice framework, but is there any link from wh...Hi,<br /><br />Nice framework, but is there any link from where I can download the complete working solution? <br /><br />Thanks! <br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-28269760207671814312012-01-17T21:45:21.022-07:002012-01-17T21:45:21.022-07:00This seems to be an anti pattern when looking from...This seems to be an anti pattern when looking from a domain driven perspective. You are stuck with a data access layer and no real domain model to house logic. I repository pattern that handles domain objects would be much more scaleableAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-51169226052125435912011-10-31T03:51:26.212-06:002011-10-31T03:51:26.212-06:00good jobgood jobAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-67240183244272637282011-07-27T14:10:25.878-06:002011-07-27T14:10:25.878-06:00Great article. I was wondering if you have you th...Great article. I was wondering if you have you thought about using extension methods to turn your DTOs into business objects? This would negate the need to have a "Data" property on your business objects and would be more intuative to the consuming code. I am considering this for a project I am working on, so would be interested in your $0.02!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-41110775440981370812011-04-25T07:02:13.628-06:002011-04-25T07:02:13.628-06:00@Rudy Lacovara - In the example above you have sug...@Rudy Lacovara - In the example above you have suggested to use DTOs that contain only the properties of our objects. And we'll fill our DTOs using ADO.Net. That sounds pretty cool.<br /><br />But, What if we have a complex object graph i.e; may be a PersonDTO object contains a list of OrderDTO etc. Is there any recommended approach or best practice to fill the (Dependent Objects) OrderDTO list as well when querying the (Parent Object)PersonDTO from Database.<br /><br />Similary, When saving a (Parent Object) PersonDTO object how can we detect changes in the (Dependent Objects) OrderDTO and save them. <br /><br />The ORM tools like EF, NHibernate etc. provide such functionalities. I was wondering if you could suggest how we'll accomplish this using your prescribed architecture?Arfan Baighttps://www.blogger.com/profile/11465766865415886988noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-68986600390487492752011-02-08T07:50:31.001-07:002011-02-08T07:50:31.001-07:00@Ontani, to see the code for GetSingleDTO() take a...@Ontani, to see the code for GetSingleDTO() take a look at http://rlacovara.blogspot.com/2010/04/aapl-part-5-how-to-write-data-access.html and the datamapper post that comes after it.Rudy Lacovarahttps://www.blogger.com/profile/15639782534216467791noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-25888560662508145792011-01-21T10:34:20.208-07:002011-01-21T10:34:20.208-07:00Is there code for your GetSingleDTO, GetListDTO an...Is there code for your GetSingleDTO, GetListDTO and your stored procedures? I'm really interested on how you would accomplish this. The overhead of the current ORM tools is way to great to even consider using them for business applications. Writing your own straightforward DAL, BL could really benefit performance.<br /><br />Thanks!PUREVision studioshttps://www.blogger.com/profile/17198026048540457167noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-38837639076576678022011-01-13T00:07:42.522-07:002011-01-13T00:07:42.522-07:00I prefer the special data object approach. I'...I prefer the special data object approach. I've gone pretty far in that direction with my newer architectures (check out AAPL). <br /><br />Regarding strongly typed datasets, I never say never, and even the craziest architecture has some situation that it's the right solution for. However, all that goes out the window when it comes to strongly typed datasets. They are evil. They are friction. They are a pox sent from hell to punish developers. They are never a good idea. I hate them. Keep in mind I'm not talking about datasets. Datasets and DataTables are handy data containers, and while I prefer not to use them I've worked on lots of good apps that did use them. Datasets and DatTables are fine. The code generated monstrosity that is a strongly typed dataset is not fine and should be avoided if you value your sanity.Rudy Lacovarahttps://www.blogger.com/profile/15639782534216467791noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-26538507575785903432011-01-12T14:33:54.374-07:002011-01-12T14:33:54.374-07:00I really like this approach, although I always run...I really like this approach, although I always run into fetching "composed" data. For example, I need data for a gridview containing data which is in fact a join of several tables. Now you either fetch the parent object and execute some more queries for all its children in order to fetch the entire dataset, or you create a "special" dataobject, containing all fields for the gridview data. Another option is to return datasets (either strongly or weakly typed) instead of creating those "special" objects or performing multiple queries. How do you think about this? What's the ultimate solution when you need consolidated data that does not map 1 to 1 with a dataobject?Jan Keizerhttp://www.jankeizer.benoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-52865169545635250032010-12-02T19:30:50.055-07:002010-12-02T19:30:50.055-07:00Totally agree with this post.
I've analyzed, ...Totally agree with this post.<br /><br />I've analyzed, examined, and worked with many of the most common ORM platforms including Entity Framework, EF CTP4 Code-First, OpenAccess, NHibernate, LightSpeed, DataObjects, etc, and to me at the end of the day, what's most important is speed, control, and predictability.<br /><br />Although many of these ORMs make development easier in the beginning, the reality is more times than not the focus turns from creating code rapidly to tuning the application for performance, migration, and maintainability - especially after launch.<br /><br />Sure, with an ORM you can flip a switch and work with another DB, but who cares - if that DB is running 3-10x slower than native DAL code like ADO.NET, you're eventually going to be faced with tweaking those poor performing areas, whether they be queries, indexes, batching, connection pooling, or the myriad of other factors impacting all the layers between your POCO and your queries to the database.<br /><br />Not to mention, most of these ORMs tightly bind you one way or another to your model and schema. Try performing a staged, rolling upgrade while relying entirely on ORM-based platforms, and you're in for a painful ride. You will spend all your time trying to get the ORM to allow itself to work with a schema change.<br /><br />For large scalable web projects, no doubt it's wonderful to have a rapid, iterative development process where you can change a property and get a new schema instantly, but not very practical when it comes to production releases and you're wasting valuable (and expensive) CPU resources relying on an ORM.<br /><br />I love EF Code-First conceptually and in practice (for prototyping), but it's never going to be able to compete with the sheer performance gained from leveraging native ADO.NET. It's impossible.<br /><br />I will say, BLToolkit is something to look at - it's about the closest I've found to providing an "ORM-like" wrapper around native ADO.NET functions without giving up a lot of performance in the process.<br /><br />Maybe it's a middle ground worth considering, or at least deploying in concert with an ORM. Use an ORM for your back-end internal applications, and native DAL on the front-end (web) for high performance?<br /><br />It's always a trade-off, and every project is different, but it seems we're too quick to sacrifice performance for a slightly better coding experience.<br /><br />Is it really worth it? Time will tell.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-16030210612629588512010-10-27T06:59:58.949-06:002010-10-27T06:59:58.949-06:00To be a truly high performance DAL, you need to im...To be a truly high performance DAL, you need to implement high performance updates as well, which means only updating fields in the database that have changed. Can you show us how your framework updates a Person if, say, only the email has changed?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-36649852921158777892010-07-03T13:40:37.295-06:002010-07-03T13:40:37.295-06:00You have conveniently ignored the UPDATE case.You have conveniently ignored the UPDATE case.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-30623857880568169702010-05-11T11:27:28.977-06:002010-05-11T11:27:28.977-06:00There is such a thing as Strongly Typed Datasets. ...There is such a thing as Strongly Typed Datasets. For Web Apps, you should never instantiate a Dataset, but the DataTables and TableAdapters provide a good means for binding data through ObjectDataSources. Your article is ver good. Thanks!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-56145233588929342692010-01-17T13:33:17.349-07:002010-01-17T13:33:17.349-07:00I'm thinking to write an application for Windo...I'm thinking to write an application for Windows Mobile and I was going to use Nhibernate, but I found that it is not supported by CF. But I still want to write my app in DDD manner. Your post showed that I could write effective DDD DAL even without ORM. Thanks.Andriy Budayhttps://www.blogger.com/profile/09181254564747384052noreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-21480459632395912142010-01-01T12:53:21.550-07:002010-01-01T12:53:21.550-07:00Rudy,
Certainly impressive article for those in pe...Rudy,<br />Certainly impressive article for those in persuit of a light weight DAl for their data access endeavour. I'm planning to use this approach in my recent project for Mobile Recovery system in for Windows Mobile 6 utilizing the ADO.NET CE and full scale versions for client and web service respectively. One thing I notitced here if I use same approach for my various modules of a full scale Banking System then the DTOs in the Common will create problems. As different programmers working on different modules and they should be able to edit their part of DTOs and DB/Persistence classes what will you suggest the workaround to this will be. Also suggest how could the Parser logic be merged with the DB classes or in DTO.<br /><br />Thanks,<br />KhalidAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-44487054459436969282009-12-05T01:54:48.227-07:002009-12-05T01:54:48.227-07:00Rudy,
Just wanted to stop by and say thanks. Thi...Rudy,<br /><br />Just wanted to stop by and say thanks. This is a very impressive article and helped me clarify a few things.<br />I've been tearing my hair out for the last couple of weeks but now I realise that I was on the right track all along!<br /><br />Thanks again,<br />JasonJason Summershttp://www.jasonsummers.co.uknoreply@blogger.comtag:blogger.com,1999:blog-2629608947246129428.post-43480863689514213422009-09-01T10:53:16.760-06:002009-09-01T10:53:16.760-06:00One more thing.. What service do you use to have t...One more thing.. What service do you use to have the C# code so nicely formatted and highlighted inside Blogger?SeeSharpWriterhttps://www.blogger.com/profile/02098977942838434483noreply@blogger.com