ÔõôÅжÏÒ»¸öASP.NETµÄ³ÌÐòÊÇ·ñÈý²ã¼Ü¹¹
Èý²ã¼Ü¹¹(3-tier application) ͨ³£ÒâÒåÉϵÄÈý²ã¼Ü¹¹¾ÍÊǽ«Õû¸öÒµÎñÓ¦Óû®·ÖΪ£º±íÏֲ㣨UI£©¡¢ÒµÎñÂß¼²ã£¨BLL£©¡¢Êý¾Ý·ÃÎʲ㣨DAL£©¡£Çø·Ö²ã´ÎµÄÄ¿µÄ¼´ÎªÁË“¸ßÄÚ¾Û£¬µÍñîºÏ”µÄ˼Ïë¡£
1¡¢±íÏֲ㣨UI£©£ºÍ¨Ë×½²¾ÍÊÇÕ¹ÏÖ¸øÓû§µÄ½çÃ棬¼´Óû§ÔÚʹÓÃÒ»¸öϵͳµÄʱºòËûµÄËù¼ûËùµÃ¡£
2¡¢ÒµÎñÂß¼²ã£¨BLL£©£ºÕë¶Ô¾ßÌåÎÊÌâµÄ²Ù×÷£¬Ò²¿ÉÒÔ˵ÊǶÔÊý¾Ý²ãµÄ²Ù×÷£¬¶ÔÊý¾ÝÒµÎñÂß¼´¦Àí¡£
3¡¢Êý¾Ý·ÃÎʲ㣨DAL£©£º¸Ã²ãËù×öÊÂÎñÖ±½Ó²Ù×÷Êý¾Ý¿â£¬Õë¶ÔÊý¾ÝµÄÔöÌí¡¢É¾³ý¡¢Ð޸ġ¢¸üС¢²éÕҵȡ£
Èý²ã½á¹¹ÔÀí£º
3¸ö²ã´ÎÖУ¬ÏµÍ³Ö÷Òª¹¦ÄܺÍÒµÎñÂß¼¶¼ÔÚÒµÎñÂß¼²ã½øÐд¦Àí¡£
ËùνÈý²ãÌåϵ½á¹¹£¬ÊÇÔÚ¿Í»§¶ËÓëÊý¾Ý¿âÖ®¼ä¼ÓÈëÁËÒ»¸ö“Öмä²ã”£¬Ò²½Ð×é¼þ²ã¡£ÕâÀïËù˵µÄÈý²ãÌåϵ£¬²»ÊÇÖ¸ÎïÀíÉϵÄÈý²ã£¬²»ÊǼòµ¥µØ·ÅÖÃÈý̨»úÆ÷¾ÍÊÇÈý²ãÌåϵ½á¹¹£¬Ò²²»½ö½öÓÐB/SÓ¦ÓòÅÊÇÈý²ãÌåϵ½á¹¹£¬Èý²ãÊÇÖ¸Âß¼ÉϵÄÈý²ã£¬¼´Ê¹ÕâÈý¸ö²ã·ÅÖõ½Ò»Ì¨»úÆ÷ÉÏ¡£
Èý²ãÌåϵµÄÓ¦ÓóÌÐò½«ÒµÎñ¹æÔò¡¢Êý¾Ý·ÃÎÊ¡¢ºÏ·¨ÐÔУÑéµÈ¹¤×÷·Åµ½ÁËÖмä²ã½øÐд¦Àí¡£Í¨³£Çé¿öÏ£¬¿Í»§¶Ë²»Ö±½ÓÓëÊý¾Ý¿â½øÐн»»¥£¬¶øÊÇͨ¹ýCOM/DCOMͨѶÓëÖмä²ã½¨Á¢Á¬½Ó£¬ÔÙ¾ÓÉÖмä²ãÓëÊý¾Ý¿â½øÐн»»¥¡£
±íʾ²ã
λÓÚ×îÍâ²ã£¨×îÉϲ㣩£¬ÀëÓû§×î½ü¡£ÓÃÓÚÏÔʾÊý¾ÝºÍ½ÓÊÕÓû§ÊäÈëµÄÊý¾Ý£¬ÎªÓû§ÌṩһÖÖ½»»¥Ê½²Ù×÷µÄ½çÃæ¡£
ÒµÎñÂß¼²ã
ÒµÎñÂß¼²ã£¨Business Logic Layer£©ÎÞÒÉÊÇϵͳ¼Ü¹¹ÖÐÌåÏÖºËÐļÛÖµµÄ²¿·Ö¡£ËüµÄ¹Ø×¢µãÖ÷Òª¼¯ÖÐÔÚÒµÎñ¹æÔòµÄÖƶ¨¡¢ÒµÎñÁ÷³ÌµÄʵÏÖµÈÓëÒµÎñÐèÇóÓйصÄϵͳÉè¼Æ£¬Ò²¼´ÊÇ˵ËüÊÇÓëϵͳËùÓ¦¶ÔµÄÁìÓò£¨Domain£©Âß¼Óйأ¬ºÜ¶àʱºò£¬Ò²½«ÒµÎñÂß¼²ã³ÆΪÁìÓò²ã¡£ÀýÈçMartin FowlerÔÚ¡¶Patterns of Enterprise Application Architecture¡·Ò»ÊéÖУ¬½«Õû¸ö¼Ü¹¹·ÖΪÈý¸öÖ÷ÒªµÄ²ã£º±íʾ²ã¡¢ÁìÓò²ãºÍÊý¾ÝÔ´²ã¡£×÷ΪÁìÓòÇý¶¯Éè¼ÆµÄÏÈÇýEric Evans£¬¶ÔÒµÎñÂß¼²ã×÷Á˸üϸÖµػ®·Ö£¬Ï¸·ÖΪӦÓòãÓëÁìÓò²ã£¬Í¨¹ý·Ö²ã½øÒ»²½½«ÁìÓòÂß¼ÓëÁìÓòÂß¼µÄ½â¾ö·½°¸·ÖÀë¡£
ÒµÎñÂß¼²ãÔÚÌåϵ¼Ü¹¹ÖеÄλÖúܹؼü£¬Ëü´¦ÓÚÊý¾Ý·ÃÎʲãÓë±íʾ²ãÖм䣬Æðµ½ÁËÊý¾Ý½»»»ÖгÐÉÏÆôϵÄ×÷Óá£ÓÉÓÚ²ãÊÇÒ»ÖÖÈõñîºÏ½á¹¹£¬²ãÓë²ãÖ®¼äµÄÒÀÀµÊÇÏòϵģ¬µ×²ã¶ÔÓÚÉϲã¶øÑÔÊÇ“ÎÞÖª”µÄ£¬¸Ä±äÉϲãµÄÉè¼Æ¶ÔÓÚÆäµ÷Óõĵײã¶øÑÔûÓÐÈκÎÓ°Ïì¡£Èç¹ûÔÚ·Ö²ãÉè¼Æʱ£¬×ñÑÁËÃæÏò½Ó¿ÚÉè¼ÆµÄ˼Ï룬ÄÇôÕâÖÖÏòϵÄÒÀÀµ
Ïà¹ØÎĵµ£º
ASP.NET defines an application as the sum of all files, pages, handlers, modules, and executable code that can be invoked or run in the scope of a given virtual directory (and its subdirectories) on a Web application server. For example, an "order" application might be published in the "/order ......
ÿ´Î½«ÍøÒ³·¢Ë͵½·þÎñÆ÷ʱ£¬¶¼»á´´½¨ÍøÒ³ÀàµÄÒ»¸öÐÂʵÀý¡£ÔÚ´«Í³µÄ Web ±à³ÌÖУ¬Õâͨ³£Òâζ×ÅÔÚÿһ´ÎÍù·µÐгÌÖУ¬Óë¸ÃÒ³¼°¸ÃÒ³ÉϵĿؼþÏà¹ØÁªµÄËùÓÐÐÅÏ¢¶¼»á¶ªÊ§¡£ÀýÈ磬Èç¹ûÓû§½«ÐÅÏ¢ÊäÈëµ½Îı¾¿ò£¬¸ÃÐÅÏ¢½«ÔÚ´Óä¯ÀÀÆ÷»ò¿Í»§¶ËÉ豸µ½·þÎñÆ÷µÄÍù·µÐгÌÖжªÊ§¡£
ΪÁ˽â¾ö´«Í³µÄ Web ±à³Ìµ ......
ASP.NET ÅäÖÃÎļþ¹¦ÄÜÔÊÐíÄú´æ´¢¼òµ¥£¨±êÁ¿£©Öµ¡¢¼¯ºÏºÍÆäËû¸´ÔÓÀàÐÍ£¬ÒÔ¼°Óû§¶¨ÒåµÄÀàÐÍ¡£
1¡¢ÊôÐÔ¶¨ÒåÐÅÏ¢
ÔÚÅäÖÃÎļþÖж¨ÒåÊôÐÔʱ£¬Ó¦Ö¸¶¨½«ÓÃÓÚÒýÓøÃÊôÐÔµÄÃû³Æ¡£ÀýÈ磬Èç¹ûÒª´æ´¢ÓÊÕþ±àÂ룬Ôò¿ÉÒÔ½«ÊôÐÔÃüÃûΪ PostalCode£¬È»ºó¿ÉÒÔ»ñÈ¡ÊôÐÔÖµ²¢½«ÆäÉèÖÃΪ Profile.Pos ......
Ò»¡¢Î¯ÍÐ
£¨1£© ίÍÐʱһÖÖÒýÓ÷½·¨µÄÀàÐÍ£¬Ò»µ©ÎªÎ¯ÍзÖÅäÁË·½·¨£¬Î¯Íн«Óë¸Ã·½·¨¾ßÓÐÍêÈ«ÏàͬµÄÐÐΪ£¬Î¯Íз½·¨µÄ´øŶÓÿÉÒÔÏñ
ÆäËû·½·¨Ò»Ñù£¬¾ßÓвÎÊýºÍ·µ»ØÖµ£¬
È磺 public delegate int PerformCa ......