|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
只要你想学,就没什么优缺点,上面那位大哥已经把网上的评论说了,但我认为想学哪个都一样,不然它就不可能在当今时代数字艺术方面存活到今天asp.net|程序|计划|数据DesigningandimplementingaversatiledataaccesstierforanASP.NETapplication
ByPaulAbarham
Inthisarticle,wewilldrilldowndeeperintothedesignofan-tierarchitectureandourfocuswillbeonthedataaccesstier(DAT)
Abstract
计划并完成用于ASP.NET一个通用的数据存取层使用程序
作者PaulAbarham翻译cwxiao888@163.com
在此文中,我们将深切研讨n-tier架构的计划,并且我们将聚焦于DAT(DAT,dataaccesstier)。
择要
Inthisarticle,wewilldrilldowndeeperintothedesignofan-tierarchitectureandourfocuswillbeonthedataaccesstier(DAT)(Figure0).Ourgoalistodesignandimplementanappropriatedataaccesstier(DAT)forscalable,reliableandinteroperablewebapplication.Ihavedividedthisarticleintotwomajorparts.Inthefirstpart,wewilldiscussaboutarchitecturalgoals,typedDataSet,EventLogsandHttpModules,whicharehelpfultounderstandthesecondpartofthisarticle.Wewillbuildinthesecondpartasmall(butfine)n-tierapplicationandourfocuswillbeondesignandimplementationofdataaccesstier.YouneedaSqlServer(database:Northwind)andVS.nettofollowthisarticle.
在此文中,我们将深切研讨n-tier架构的计划,并且我们将聚焦于DAT(DAT,dataaccesstier)(Figure0)。我们的方针是计划并完成一个可晋级的牢靠而且互相协同DAT收集使用程序。我已将本文分红两个次要的部分。在第一部分中,我们将会商有关于架构的目标,typedDataSet,EventLogs和HttpModules,这无益于了解本文的第二部分。在第二个部分中我们将创立一个小的(可是很好)n-tier应程序,并且我们的核心会合在在计划和完成DAT。你必要一个SqlServer(数据库:Northwind)和VS.net来跟从本文举行操纵。
Contents:内容
1.DesigningGoalsofadataaccesstier(DAT)DAT的计划方针
1.1ArchitecturalGoals架构方针
1.2Installationoftheprototypeprototype的安装
1.3TypedDataSets
1.4EventLogs
1.5HttpModules
2.0Implementingversatiledataaccesstier(DAT)完成通用的DAT
2.1Implemetingasuperclassfordataaccesstier.完成一个用于DAT的超类(superclass)
2.2AperformancetesttoevaluateSqlDataReaderandDataSetobjectsinthebusinesstier.
评价贸易层(businesstier)中SqlDataReader和DataSet工具的功能测试
2.3HowcanIextendthisdataaccesstier(DAT)toaccessmulti-databases.
我怎样才干扩大此DAT至存取多层数据库(accessmulti-databases)
2.4HowcanIapplydatabasetransactionswithdifferentisolationlevel?
我怎样使用分歧断绝品级(differentisolationlevel)的数据库处置(databasetransactions)?
2.5HowcanIinsertandretrieveimages?
我如何拔出和检索图像?
Figure0showsusatypical3TierApplicationthatisdissectedintothreemajordisjunctivelayers,whicharedatatier(DA),middletierandpresentationtier(PT).
Figure0给我们展现了一个典范的3Tier使用,它被分红三个次要的分别层,datatier(DA),middletier和presentationtier(PT)。
Ifyouarenotfamiliarwithn-tierarchitecture,Iliketorecommendfollowingarticles.
http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp
http://www.c-sharpcorner.com/Code/2002/June/AdoNetWinDNAPerspective.asp
假如你对n-tier架构不太熟习,我给你保举以下文章。
http://www.c-sharpcorner.com/Tutorials/Building3TierAppPA.asp
http://www.c-sharpcorner.com/Code/2002/June/AdoNetWinDNAPerspective.asp
1.Designinganappropriatedataaccesstier(DAT)
1.0ArchitecturalGoals
Themustrequirementsofanenterpriseapplicationcanbeexpressedthroughthefollowingbuzzwords
InteroperabilityandExtendibility
ScalabilityandPerformance
ReliabilityandManageability
Security
Letuslooksomeofthebuzzwordscloser,whatdotheyreallymean?
Interoperabilitydealswiththeabilityofasystemtocommunicatewithotherinternalorexternalsystemsinaheterogeneousenvironment.Thisisaveryimportantissue,becauseweneedinformationtoactjustintimetomeetneedsofourcustomersandbusinesspartners.Toachievethisimportantgoal,oursystemmustabletoofferandconsumewebservices.
Tobeagileinyourbusiness,sometimesyouneedtoextendyourapplication.Ifwecoupleasystemsotightlytoothersystems,thenitmaytriggera“modifyavalanche”(e.g.youpassdatatoapeerapplicationviaemail,whichrepresentsdatatablesthroughcommaseparatedcolumns.Therecipientwillopentheemailandparseittogaininformation.Say,ifwewantaddorchangeacolumn,thenwehavetomodifyotherdependingsystemstoobecausetheorderofcolumnshavechanged).Inordertoavoid“modifyavalanches”,wemustcouplesystemslooselyusingtechnologiessuchlikeWebservices(preciously:XMLsupportedtechnologies).
Scalabilityisameas</p>asp对于服务器的要求较高,一般的服务器如果访问量一大就垮了,不得不重启。 |
|