王軍 查宇
摘要:文章介紹了在.NET Framework下開發(fā)WEB應(yīng)用系統(tǒng)中常用的框架,以及這些開發(fā)框架的結(jié)構(gòu)、技術(shù)特點和主要應(yīng)用的領(lǐng)域。通過合理的選擇開發(fā)框架可以有效了提高開發(fā)效率、降低代碼的耦合度和系統(tǒng)結(jié)構(gòu)更加清晰。
關(guān)鍵詞:WEB開發(fā)框架;三層框架;2N層框架;MVC框架;Web服務(wù);LINQ和LINQ Entity Framework;WCF+SILVERLIGHT
中圖分類號:TP311文獻(xiàn)標(biāo)識碼:A文章編號:1009-3044(2012)15-3594-04
The Analysis and Research on WEB Development Frame Hierarchy in the DotNet Platform
WANG Jun, ZHA Yu
(Anhui Technical College of Mechanical and Electrica Engineering, Information Engineering Department, Wuhu 241000, China)
Abstract: The paper describes a WEB application system framework DotNET Framework development, and the structure of the develop? ment framework, technical characteristics and application areas. Reasonable choice for development framework can improve development efficiency, and reduce the degree of coupling and system architecture of the code more clear.
Key words: Web development framework; three layer frame; 2N layer frame; MVCframe; Web Serverce; LINQ and LINQ Entity Frame? Work; WCF+SILVERLIGHT
圖1三層框架結(jié)構(gòu)
表示層是用戶與系統(tǒng)進(jìn)行交互的接口,用于顯示數(shù)據(jù)和接收用戶輸入的數(shù)據(jù),一般使用ASP.NET Web Form、報表等技術(shù);業(yè)務(wù)邏輯層是系統(tǒng)的核心,系統(tǒng)的主要功能、業(yè)務(wù)規(guī)則、業(yè)務(wù)流程等在此層實現(xiàn)。業(yè)務(wù)邏輯層處于數(shù)據(jù)訪問層與表示層中間,起到了數(shù)據(jù)交換中承上啟下的作用,一般業(yè)務(wù)使用C#、VB.Net等語言實現(xiàn)。數(shù)據(jù)訪問層是系統(tǒng)和數(shù)據(jù)庫之間架起一座橋梁,它主要是負(fù)責(zé)向業(yè)務(wù)邏輯層提供數(shù)據(jù)和修改數(shù)據(jù)的操作,是業(yè)務(wù)邏輯層訪問數(shù)據(jù)庫的接口,使用數(shù)據(jù)訪問層可以減少系統(tǒng)對某一特定數(shù)據(jù)庫的依賴,提高系統(tǒng)數(shù)據(jù)訪問的安全性,在.net框架中一般使用ADO.NET技術(shù)訪問數(shù)據(jù)庫。
使用三層框架可以使用開發(fā)人員可以只關(guān)注整個結(jié)構(gòu)中的其中某一層,方便開發(fā)任務(wù)的分解和并行開發(fā);降低層與層之間的耦合性,可以很容易的用新的實現(xiàn)來替換原有層次的實現(xiàn);有利于標(biāo)準(zhǔn)化和各層邏輯的復(fù)用。