Anda di halaman 1dari 6

ASP.NET 2.0 FEATURES 1. Improve the reliability and usability of Web applications C ur re n t l y , ma n y A S P. N E T 1 . x a p p l i c a t io n s r u n o n M ic ro s o ft I I S 5 . 0 . AS P. N E T 2 . 0 leverages new IIS 6.

0 features for improved performance and scalability. Specifically, IIS6.0 provides a new process model which greatly enhances the ability of a server to hostmultiple applications in a truly independent fashion. Each ASP.NET application residesin its own isolated process and cannot accidentally interact with other applications. Quitesimply put, applications can no longer break each other. Each application runs completelyseparated from every other application. If one application crashes, it doesn't affect other applications.In terms of usability, new features such as master pages and themes allow you to developlarge Web applications using a consistent structure that is manageable and configurable. 2. Reduce the number of lines of code you have to write in common scenarios ASP.NET 2.0 includes wizards and controls that allow you to perform frequent tasks (e.g.data access) without having to write a single line of code. Visual Studio 2005 includesdesigners to layout and configure complex pages with data bound tables. As a developer,you can use the wizards to work faster and smarter.ASP.NET 2.0 also leverages changes in the .NET Framework. In particular, the partialclass concept is particularly useful for ASP.NET developers. A partial class lets you writepart of the code and lets the ASP.NET compiler write the rest when necessary. You nolonger have to see boilerplate code, nor do you have to write any of it. 3. Offer user features to personalize Web applications ASP.NET 2.0 includes built-in controls to help you manage user accounts andpersonalize the content and layout of pages in your application. First, the memberships e r v i c e le t s yo u t ra c k us e rs . T he n e w l o g i n c o nt ro l s i n t e g r a t e w i t h t h e me mb e rs h i p service to allow you to automate account creation and user login without writing anycode. The new Web Parts feature allows you to create Web applications that containcontrols that can be edited and personalized by users. Users can select and customize theparts that are displayed on a Web page as they see fit. Finally, the Profile service provideslong-term persistence of user preferences and data through declarative XMLconfiguration. 4. Provide enhanced design features to generate consistent layouts and design A S P. N E T 2 . 0 s u p p o r t s ma s t e r p a g e s , t he me s a n d s k i n s t o b u i l d a p p l i c a t io n s w i t h a consistent page layout and design. These new features are

easy to implement and modify,and greatly enhance the manageability and maintainability of large applications.Many of the new features in ASP.NET 2.0 are aimed specifically at addressing thesegoals. Throughout the rest of the paper, we will look at individual technologies and seeho w A S P. N E T 2 . 0 b u i l d s o n A SP. N E T 1 . x t o p r o v i d e a p o w e r fu l W e b a p p l i c a t io n development platform. What Does ASP.NET 2.0 Mean To ASP Developers? For ASP developers, the impact of the many new features in ASP.NET 2.0 is largely dependenton your development background. Classical ASP required considerable HTML knowledge andm a n ua l c o d i n g e ve n fo r re la t i v e l y s i mp l e t a s k s l i k e ge n e ra t i n g a t a b l e o r a fo r m. A S P. N E Tabstracts most of these idiosyncrasies and encapsulates them in auto-generated code or core classlibraries. You no longer have to worry about HTML tags, POST, GET, and query strings. Youcan focus on developing code that implements business logic.Classical ASP development intermixed HTML code with scripting code. This spaghetti codemade readability very difficult. Scripting code could be inserted anywhere, which also made ithard to build well-designed applications that shared code properly and in an extensible fashion.ASP.NET applications implement an object-oriented paradigm that allows for faster development and reduces the complexity of building upon existing code.ASP.NET 2.0 also takes care of many of the redundant details you had to implement manually inASP. For example, you can use object-oriented features to easily re-use code between pages.You can also leverage master pages to quickly create a coherent design for your application, or apply skins and themes to programmatically set the look and feel of your Web pages. Thanks tot h e i n t u i t i v e d e s i g n e n v i r o n me n t , r ic h s e t o f d e b u g g i n g t o o ls a n d s t ro n g l y t y p e d c o mp i l e d languages, ASP.NET 2.0 helps you develop better applications faster. ASP.NET 2.0 Providers The provider model defines a set of interfaces and hooks into the data persistence layer thatprovides storage and retrieval for specified requests. In this way the provider model acts as aprogramming specification that allows ASP.NET 2.0 to service unique client concerns.ASP.NET 2.0 uses a wide variety of providers, including: MembershipThe membership provider manages supports user authentication and user management. ProfileThe profile provider supports storage and retrieval of user specific data linked toa profile.

PersonalizationThe personalization provider supports persistence of Web Partconfigurations and layouts for each user. Site NavigationThe site navigation provider maps the physical storage locations of ASP.NET pages with a logical model that can be used for in-site navigation and linked tothe various new navigation controls Data providersADO.NET has always used a provider model to facilitate the connectionbetween a database and the ADO.NET API. ASP.NET 2.0 builds upon the data provider by encapsulating many of the ADO.NET data calls in a new object called a data source.Each type of provider acts independently of the other providers. You can therefore replace theprofile provider without causing problems with the membership provider. Compilation Options ASP.NET 2.0 offers four different compilation models for a Web application:1. Normal (ASP.NET 1.x)In a normal ASP.NET Web application, the code behind fileswere compiled into an assembly and stored in the /bin directory. The Web pages (ASPX)were compiled on demand. This model worked well for most Websites. However, thecompilation process made the first request of any ASP.NET page slower than subsequentrequests. ASP.NET 2.0 continues to support this model of compilation.2 . Ba t c h c o mp i l a t i o n I n A S P. N E T 2 . 0 , y o u c a n b a t c h c o mp i l e a n y a p p l i c a t i o n w i t h a single URL request. As with ASP.NET 1.x, batch compiling removes the delay on thef i r s t p a g e r e q u e s t , b u t c r e a t e s a l o n g e r c y c l e t i m e o n s t a r t u p . I n a d d i t i o n , b a t c h compilation still requires that the code behind files are compiled pre-deployment.3. Deployment pre-compilationA new feature of ASP.NET 2.0 allows for fullcompilation of your project prior to deployment. In the full compilation, all of the codeb e h i n d fi l e s , A S PX p a ge s , H TM L, g ra p h i c s re s o u rc e s , a n d o t h e r b a c k e nd c o d e a re c o m p i l e d i n t o o n e o r m o r e e x e c u t a b l e a s s e m b l i e s , d e p e n d i n g o n t h e s i z e o f t h e application and the compilation settings. The assemblies contain all of the compiled codef o r t h e W e b s i t e a n d t h e resource files and configuration files are copied w i t h o u t mo d i f i c a t io n . T h i s c o mp i l a t i o n me t h o d p r o v i d e s fo r t h e g re a t e s t p e r fo r ma nc e a nd enhanced security. If you are working with highly visible or highly secure Websites, thisoption is the best choice for final deployment. However, if you are building a small siterunning on your local intranet, and the site changes frequently, full pre-compilation maybe over kill.4.

Full runtime compilationAt the other extreme of deployment precompilation,ASP.NET 2.0 provides a new mechanism to compile the entire application at runtime.That is, you can put your un-compiled code behind files and any other associated code int he n e w \ c o d e d i re c t o r y a n d le t A S P. N E T 2 . 0 c re a t e a nd ma i n t a i n re fe re n c e s t o t h e assembly that will be generated from these files at runtime. This option provides theg re a t e s t fl e x i b i l i t y i n t e r ms o f c ha n g i n g W e b s i te c o n t e n t a t t h e c o s t o f s t o r i n g u n - compiled code on the server.

Changes in Development A S P. N E T 2 . 0 a n d V i s ua l S t ud i o 2 0 0 5 a l s o c h a n ge ma n y o f t h e d a y t o d a y a s p e c t s o f W e b application development. In this section, we will look at several of the areas where featuresavailable in ASP.NET 1.x have been heavily modified. Development Tools The latest release of Visual Studio (Visual Studio 2005) includes several new development toolsto help you build Web applications. IntelliSense Now everywhere! IntelliSense helps you develop code faster by issuing "popup" programming hints. Everyt i me y o u r e fe re n c e a n o b j e c t i n y o u r c o d e , I n t e l l i S e ns e o ffe rs yo u a l is t o f a va i l a b le methods, properties and events. You no longer have to type out complete methods, or search documentation for parameter specifications. Previous releases of VisualStudio.NET had excellent IntelliSense support, but the Visual Studio 2005 allows you totake advantage of IntelliSense in script blocks, inline CSS style attributes, configurationfiles and any XML file that contains a DTD or a XML schema references. Wizards to auto-generate code for many tasks One of the major goals of ASP.NET 2.0 is to reduce development time and the number of l i n e s o f c o d e y o u h a ve t o w r i t e . V i s ua l St u d i o 2 0 0 5 i n c l u d e s w iz a rd s y o u c a n us e t o create data source connections, and many other common tasks. Designer support for master pages, themes and skins Classic ASP pages required you to start each page from scratch. Replicating page layouti n a n a p p l i c a t i o n w a s a t i me - c o ns u mi n g p r o c e s s . V is u a l

St u d i o 2 0 0 5 p r o v i d e s fu l l WYSIWYG support for ASP.NET master pages. Master pages are page templates thatcan be used to apply a consistent style and layout to each page in your application. After you create a master page, you can easily create new pages that leverage your master page,and let ASP.NET automatically apply the style and layout of the master page.V is u a l St u d i o 2 0 0 5 le t s yo u s e e ho w a n y c o n t e n t y o u a d d t o a p a ge w i l l l o o k w he ncombined with the master page (even though the code from the master page is hiddenfrom your development page). Improved code editing features Ed i t i n g c o d e i s no t a n e a s y t a s k i n t ra d it i o n a l A S P a p p l i c a t i o ns . V is ua l S t u d io 2 0 0 5 makes code editing much easier by preserving all HTML code (including white space,casing, indention, carriage returns, and word wrapping). Visual Studio 2005 allows yout o s e t s t y l e fo r ma t s fo r t h e H TM L c o d e fo r yo u r a p p l i c a t i o n t h a t c a n b e i mp o r t e d o r exported to standardize development for your whole team. Style sheets allow you toformat the way your content is displayed to a user. Visual Studio.NET 2005 allows yout o c us t o m i z e t he fo r ma t fo r ho w yo u r H TM L c o d e is w r i t t e n. Fo r e xa mp l e , y o u c a nenforce style guidelines to ensure all HTML tags are capitalized, or that all nested HTMLelements are indented two spaces. These guidelines allow your entire development teamto develop pages with the same formatting rules.Visual Studio 2005 also supports tag-outline and tag-navigation modes to help you editlarge documents. These modes allow you to move through, expand, and collapse HTMLand ASP.NET tags, and to see open and closed tag relationships clearly.You can easily add and edit tables into HTML pages using the "Insert Table" dialog box.T h e w iz a rd l e t s y o u s p e c i fy t h e s t y l e , s i z e ( t a b l e w i d t h a nd t he n u mb e r o f ro w s a n d columns), and format of a table without writing any code.V is ua l St u d i o 2 0 0 5 a ls o a l l o w s y o u t o d e v e lo p y o u r H TM L c o d e fo r a s p e c i f i c W e b browser or HTML standard. For example, it you want all your HTML code to adhere toNetscape's standard, you can select Netscape HTML as your target, and any code thatdoesn't meet Netscape's standards will be flagged in real-time. Visual Studio 2005 includes a light weight Web server V is ua l S t u d io 2 0 0 5 i n c l u d e s a l i g h t -w e i g h t W e b s e r ve r fo r d e ve l o p i n g A S P. N E Tapplications. The Web server services local requests only and is perfect for development.By adding this Web server, you no longer

need to use IIS on a development machine.Y o u c a n u s e t he b u i l t - i n s e r ve r, a n d ge t fu l l d e b u g g i n g s u p p o r t . A n o t h e r i mp o rt a n t a d va n t a g e is a n y us e r c a n b u i l d a n d t e s t a n a p p l i c a t i o n. Y o u n o l o n ge r n e e d t o b e a n administrator on the computer. It should be noted that you must still deploy your finalapplications on IIS. Improved debugging environment Debugging applications in ASP is an arduous process, as code is interpreted on the fly.S y n t a x e r ro rs a re n 't e xp o s e d u n t i l y o u r u n a p p l i c a t io n s . T h e d e b u g g i n g s u p p o rt is improved in Visual Studio 2005. Visual Studio .NET 2003 provided limited support for edit-andcontinue debugging. Visual Studio 2005 improves edit-and-continue debuggingand provides more information during the debugging process. For example, an improvedimplementation of DataTips provides information about variables and expressions asmouse popup windows during the debugging process. Visual Studio 2005 also providesadditional features, like advanced debugging with breakpoints on disassembly, registers,addresses (when applicable), and "Just My Code Stepping".

Anda mungkin juga menyukai