Understanding the Existing Development Scenario

2. Introduction to the .NET Initiative and the .NET Platform

Section Owner: Saurabh Nandu MVP Content Contributors: Balachandran , Pradeep The Microsoft .NET initiative is a very wide initiative and it spans multiple Microsoft Products ranging from the Windows OS to the Developer Tools to the Enterprise Servers. The definition of .NET differs from context to context, and it becomes very difficult for you to interpret the .NET strategy. This section aims at demystifying the various terminologies behind .NET from a developer’s perspective. It will also highlight the need for using this new .NET Platform in your applications and how .NET improves over its previous technologies.

2.1 Understanding the Existing Development Scenario

Windows DNA is a concept for building distributed applications using the Microsoft Windows operating system and related software products. First we will understand about the 2- tier, 3- tier and then move on to N- tier Windows DNA. Why to divide an application into logical layers? Factoring an application into logical parts is useful. Breaking a large piece of software into smaller pieces can make it easier to build, easier to reuse and easier to modify. It can also be helpful in accommodating different technologies or different business organizations. 2-Tier: Client Server Presentation Layer Data Source Layer Win 32 Clients VB Forms Mail Server Sql Server File System Fig Showing 2 – Tier Client Server Model Through the appearance of Local-Area-Networks, PCs came out of their isolation, and were soon not only being connected mutually but also to servers. ClientServer- computing was born. A two-tiered application is an application whose functionality can only be segmented into two logical tiers, presentation services and data services. The presentation services of a two-tiered application are responsible for gathering information from the user, interacting with the data services to perform the applications business operations, and presenting the results of those operations to the user. The Presentation services are also called the presentation layer because it presents information to the user. Things you might find in a presentation layer include a Web browser, a terminal, a custom-designed GUI, or even a character-based user interface . Client-Server architecture was a major buzzword in the early 90s, taking initially dumb terminal applications and giving them a fancy windows-like front end, using PCs with terminal emulators which presented pretty GUIs Graphical user interface or later Visual Basic etc front-ends. A web browser talking to a web server is an example of a client talking to a server. Here there is presentation logic presentation tier happening at the client, and datafile access data access tier and logic happening at the server. One reason why the 2-tier model is so widespread is because of the quality of the tools and middleware that have been most commonly used since the 90’s: Remote-SQL, ODBC, relatively inexpensive and well-integrated PC-tools like Visual Basic, Power-Builder, MS Access, 4-GL-Tools by the DBMS manufactures. In comparison the server side uses relatively expensive tools. In addition the PC-based tools show good Rapid-Application- Development RAD qualities i.e. simpler applications can be produced in a comparatively short time. The 2-tier model is the logical consequence of the RAD-tools’ popularity. 3 – Tier: Client Server Browser based Interface html xml J l Win32 Client Applications Vi l B i f Sql Server Oracle RDBMS Mail Server File System Business Layer Data Service Layer Presentation Layer COM COM + COM ASP IIS Apache Business Rules and Process HTTP Fig Showing 3 – Tier or N- Tier Client Server Model In a three-tiered application, the presentation services are responsible for gathering information from the user, sending the user information to the business services for processing, receiving the results of the business services processing, and presenting those results to the user. The most popular architecture on the web currently, mostly taking the form of web browser processing client side presentation in the form of HTMLDHTML, etc, the web server using some scripting language ASP and the database server SQL Server for example serving up the data. The basic functionalities of 3 – Tier or N-Tier follows are The presentation services tier is responsible for: • Gathering information from the user • Sending the user information to the business services for processing • Receiving the results of the business services processing • Presenting those results to the user The business services tier is responsible for: • Receiving input from the presentation tier. • Interacting with the data services to perform the business operations. • Sending the processed results to the presentation tier. The data services tier is responsible for the: • Storage of data. • Retrieval of data. • Maintenance of data. • Integrity of data. In Windows DNA applications commonly implement their business logic using one or more of three implementation options. • Asp Pages • COM components • Stored procedures running in the DBMS Writing much business logic in ASP pages is a bad idea. Since simple languages are used, such as Microsoft Visual Basic Script, and the code is interpreted each time it is executed, which hurts the performance. Code in ASP pages is also hard to maintain, largely because business logic is commonly intermixed with presentation code that creates the user interface. One recommended approach for writing middle-tier business logic is to implement that logic as COM objects. This approach is a bit more complex than writing a pure ASP application. Wrapping business logic in COM objects also cleanly separates this code from the presentation code contained in ASP pages, making the application easier to maintain. The Third option for writing business logic is to create some of that code as stored procedures running in the database management system DBMS. Although a primary reason for using stored procedures is to isolate the details of database schema from business logic to simplify code management and security, having code in such a close proximity to data can also help optimize performance.

2.2 Challenges faced by developers