u Using ready-made framework
Ø The preferred Of course .NET Framework is about to officially launch ObjectSpaces!
Ø If you want Total Solution, Borland Eco is the best choice!
Ø Others
n Open source project recommended to use OPF (abroad)
N commercial products recommended to use Grove (domestic)
u Design your own persistence layer
Ø If you want yourself to design the wheel, then the best reference material is too this article: http://www.ambysoft.com/persistencelayer.pdf
Ø It is the stone of it, you can attack jade
It's a mountain, non-J2EE, a classic case hibernate, has already been a household, do you still need to wait?
Although the platform is different, excellent design is a common wealth, .Net Guys act now!
Ø Code is a teacher forever, please pay more attention to these two .NET Open Source projects:
N opf
N ojb.net
l
u Data Access Layer location in the entire system architecture
This is the last diagram of this article, I hope to bring you some help:
u Daf Solution of choice
Ø Determine the interface is the key: no. 1!
No matter what technology, this is always the most important step: at least, the author thinks so.
After using Daf Solution, there is no need for the specific use of the Data Access Logic technology. As long as the interface is determined, even many historical legacy issues can be easily solved!
Ø Access technology wants to: Just do it!
Generally, when we design Data Access Logic, most need to decide what technology architecture in advance, such as: Stored Procedure DataSet / DataTable / DataView (Simple Structure, easy to operate), or SQL Provider Factory DataReader Entity (PETSHOP mode, good performance, strong portable ability), after Daf Solution, it is no longer an obstacle to obstructing system architects for Data Access logic design!
You can do this, you can use duwamish mode when designing, and when implementing (possibly based on performance), part of the Data Access Logic is adjusted to PETSHOP mode. Even if other Layer caller is not particularly familiar with ado.net, you can also decide to use O / R mapping inside some Data Access Logic, easy to easily use OO. Subsequent processing!
However, despite this, some ISSUES requires specific conditions for specific analysis:
(1) Stored procedure also has a convenient and high performance, and there is also a graft problem to consider;
(2) O / R mapping has a certain price for performance and complexity; (3) When using DataReader, how to access DataSet faster, it is always an uncomfortable problem (although author I have made an assertion for this), love hate is difficult!
(4) Do you use Distributed Process? How can security issues solve? .NET Remoting has not given a good solution. WEBSERVICES can be compatible with other systems?
For only 4 cases, it can be seen.
Although these realities have to solve one by one, under the big tree of Daf, you still have a large freedom, don't have to add a lot of troubles to the unified architecture!
Ø Storage is not here: Data Entity Facade!
Here, the author believes that it may be more appropriate to call "Persistence not".
It can be said that DAL's cornerstone is from DAF, while the DAF and the outside Bridge are Data Entity Façade. It is the unified appearance to let us freely pay a variety of changes that may happen at any time!
Return to XML? no problem!
Don't you modify the call code after returning XML? Very simple, be an EntityConvert!
O / R mapping is cool, let me return to the object? Change the configuration file and write
O / R Mapping Data Access Logic! Is it very cool?
DataSet makes our system overwhelmed, the customer has frequent complaints: you call
The web page has no response, please brush it later, what?
It's not difficult: withdrawing Dataset, replace DataReader, Data Entity
Façade has built different data access base stations to your Server, it
Will make sure your system is located in the service area (0.01% may be you)
Forget the latest PATCH of .NET Framework, the rest of 0.01% is also very good
Do it, go to buy a new memory or add a CPU)!
... (if you need to return other systems that cannot be identified, please call the following call: 800820xxxx, the Daf Solution team will help you ...)
U n-tier architecture N true meaning
Very simple, 2 sentences end:
n ==? Not important, the key is: Data Access Layer!
If you want to make a texture, the interface is a life pulse!
l
u msdn
Ø .NET FRAMEWORK 1.2 Documentation
Ø Longhorn SDK
Ø Data Access and Storage
Ø C # 2.0 Specification
u design patterns
Ø GOF 23
Ø Microsoft Patterns & Practices
u community
Ø The Microsoft .NET Framework Community
Ø THSERVERSIDE.NET
Ø ASP.NET Starter Kitsø The Code Project
Ø DOT NET PERSISTENCE
U other
Ø Developing The Microsoft Business Framework
Ø Borland Eco
Ø Constructor
Ø DotNetnuke
Ø Rational XDE
About the Author:
This article author Zhang Xuefeng is a consultant for Microsoft (China) Co., Ltd. He is currently working in China's Microsoft Advisor Consulting Department, engaged in .NET technology research and development of related projects. You can contact him through xfzhang@microsoft.com.
Return to the first paragraph: http://www.9cbs.net/develop/read_article.asp? Id = 27542