Sunteți pe pagina 1din 20

Chapter-1 INTRODUCTION 1.1 Introduction On .

NET
It is a new, easy, and extensive programming platform .net is not the operating system but it is a layer between the operating system and the programming language. It is not a programming language. it supports many programming languages, including vb.net, c# etc. .net provides a common set of class libraries, which can be accessed from any .net based programming language. There will not be separate set of classes and libraries for each language If you know anyone .net language, you can write code in any .net language.

Fig. 1.1.NET Framework

1.1.1 Difference b/w VB and VB.NET


1. Totally new programming language. 2. It just retains the syntax of the VB 3. VB.NET supports some old functionality of VB.

1.1.2 Visual studio


Vs. studio is an editor. It helps developer write the .net programs very easy. Vs.net editor automatically generates lot of code, allow developers to drag and drop controls to a form, provide short cuts to compile and build the application etc.

1.1.3 NET supported languages


Currently .net supports the following languages: 1 2 3 4 c# vb.net c++ j# the above languages are from Microsoft. Many third parties are writing Compilers for

other languages with .net support.

1.2 Introductions of ASP.Net


The introduction of ASP.NET 1.0/1.1 changed the Web programming model. But since I have worked on ASP.Net2.0 Framework, I will limit the discussion on ASP.Net2.0. The primary goal of ASP.NET 2.0 is to enable you to build powerful, secure, and dynamic applications using the least possible amount of Code. To participate in the Web application world, Microsoft developed Active Server Pages (ASP). ASP was a quick and easy way to develop Web pages. ASP pages consisted of a single page that contained a mix of markup and languages. ASP evolved and new versions were released. ASP 2.0 and 3.0 were popular because the technology made it relatively straightforward and easy to create Web pages. ASP.NET brought a Visual Basicstyle event based model to Web application development, providing much-needed state management techniques over stateless HTTP. Its model is much like the earlier Visual Basic model in that a

developer can drag and drop a control onto a surface or form, manipulate the controls properties, and even work with the code behind these controls to act on certain events that occur during their lifecycles. Much of the focus of ASP.NET 2.0 is on productivity. ASP.NET 2.0 eliminated much of the tedious coding.

1.2.1 Features of ASP.Net are enumerated below:


ASP.Net is integrated with the .Net framework ASP.Net is compiled not interpreted ASP.Net is Multilanguage ASP.Net is hosted by Common Language Runtime ASP.Net is Object Oriented ASP.Net is multiservice and multibrowser Easy to develop and configure Follows code behind model

1.2.2 Web Parts


ASP.NET 2.0 Web Parts can provide a consistent look for a site, while still allowing user customization of style and content. New controls:

Zone controls - areas on a page where the content is consistent Web part controls - content areas for each zone

Fig. 1.2 Web Application

1.2.3 Solution Explorer


Visual Studio includes a tool called Solution Explorer. By clicking the plus and minus sign we can expand or contract the folders. The icon in the toolbar starts from the left with a tool that switches from the solution explorer to a view of properties. The double horizontal arrows perform a refresh. The double file icon automatically hides or expands nested sub files. The next two icons open the selected files to display either their user interface design or their code. The double browser icon is used to copy the entire site to the deployment machine. The right most icons, with the hammer, open a Web Administrator tool to manage features of the site.

1.2.4 ASP.NET 2.0-A Powerful Tool to Build Dynamic Web Sites


ASP.NET 2.0 fundamentally reduces the barriers for development of complex web sites. Developers can very quickly put together (and easily maintain) a complex site by merely assembling the building blocks Microsoft has developed in ASP.NET 2.0 Instead of writing 50 or so lines of code (as in earlier versions of ASP), the designer can now simply drag and drop a control to the page and answer some questions in a wizard. This control generates a small amount of code for your page and the server uses that code to build pages in HTML that are then sent to the browser. Any browser that can display HTML can display ASP.NET 2.0 pages.

Fig 1.3 Dynamic Website

1.3 The .NET Framework


The .NET Framework is a managed type-safe environment for application development and execution. The .NET Framework manages all aspects of your programs execution. It allocates memory for the storage of data and instructions, grants or denies the appropriate permissions to your application, initiates and manages application execution, and manages the reallocation of memory from resources that are no longer needed. The .NET Framework consists of two main components: the common language runtime and the .NET Framework class library.

Fig. 1.4 .NET Framework

1.3.1 Common Language Runtime


The common language runtime can be thought of as the environment that manages code execution. It provides core services, such as code compilation, memory allocation, thread management, and garbage collection. Through the common type system (CTS), it enforces strict type-safety and ensures that code is executed in a safe environment by also enforcing code access security.

1.3.2 .Net Framework Class Library


The .NET Framework class library provides a collection of useful and reusable types that are designed to integrate with the common language runtime. The types provided by the .NET Framework are object-oriented and fully extensible, and they allow us to seamlessly integrate our applications with the .NET Framework.

1.3.3 Languages and the .NET Framework


The .NET Framework is designed for cross-language compatibility, which means, simply, that .NET components can interact with each other no matter what supported language they were written in originally. So, an application written in Microsoft Visual Basic .NET might reference a dynamic-link library (DLL) file written in Microsoft Visual C#, which in turn might access a resource written in managed Microsoft Visual C++ or any other .NET language. This language interoperability extends to full object-oriented inheritance. A Visual Basic .NET class might be derived from a C# class, for example, or vice versa.

1.3.4 The Structure of a .NET Application


To understand how the common language runtime manages code execution, you must examine the structure of a .NET application. The primary unit of a .NET application is the assembly. An assembly is a self-describing collection of code, resources, and metadata. The assembly manifest contains information about what is contained within the assembly. The assembly manifest provides:

Identity information, such as the assemblys name and version number A list of all types exposed by the assembly A list of other assemblies required by the assembly A list of code access security instructions, including permissions required by the assembly and permissions to be denied the assembly

1.3.5 Compilation and Execution of a .NET Application


When you compile a .NET application, it is not compiled to binary machine code; rather, it is converted to IL. This is the form that your deployed application takesone or more assemblies consisting of executable files and DLL files in IL form. At least one of these assemblies will contain an executable file that has been designated as the entry point for the application.

1.4 Principal design features 1.4.1 Interoperability: - Because interaction between new and older applications is
commonly required, the .NET Framework provides means to access functionality that is implemented in programs that execute outside the .NET environment. Access to COM components is provided in the System. Runtime. Interpol Services and System. Enterprise Services namespaces of the framework; access to other functionality is provided using the P/Invoke feature.

1.4.2 Common Runtime Engine: - All .NET programs execute under the supervision of
the Common Language Runtime (CLR) which is the virtual machine component of the .NET framework, guaranteeing certain properties and behaviors in the areas of memory management, security, and exception handling.

1.4.3 Language Independence: - The .NET Framework introduces a Common Type


System, or CTS. The CTS specification defines all possible data types and programming constructs supported by the CLR and how they may or may not interact with each other.

1.4.4 Simplified Deployment: - Installation of computer software must be carefully


managed to ensure that it does not interfere with previously installed software, and that it conforms to increasingly stringent security requirements. The .NET framework includes design features and tools that help address these requirements.

1.4.5 Security: - The design is meant to address some of the vulnerabilities, such as buffer
overflows. Additionally, .NET provides a common security model for all applications.

1.4.6 Portability: - The design of the .NET Framework allows it to theoretically be platform
agnostic, and thus cross-platform compatible. That is, a program written to use the framework should run without change on any type of system for which the framework is implemented. Microsoft's commercial implementations of the framework cover Windows, Windows CE.

Chapter-2

LITERATURE REVIEW 2.1 ASP.NET 2.0


Its a testament to the good design of ASP.NET 1.0 and 1.1 that few of the changes introduced in ASP.NET 2.0 were fixes for existing features. Instead, ASP.NET 2.0 kept the same underlying plumbing and concentrated on adding new, higher-level features. Some of the highlights include the following:

2.1.1 More rich controls


ASP.NET 2.0 introduced more than 40 new controls, from long-awaited Basics like a collapsible Tree View to a JavaScript-powered Menu

2.1.2 Master pages


Master pages are reusable page templates. For example, you can use a master page to ensure that every web page in your application has the same header, footer, and Navigation controls.

2.1.3 Themes
Themes allow you to define a standardized set of appearance characteristics for Web controls. Once defined, you can apply these formatting presets across your website for a consistent look.

2.1.4 Security and membership


ASP.NET 2.0 added a slew of security-related features, including Automatic support for storing user credentials, a role-based authorization feature, and pre-Built security controls for common tasks like logging in, registering, and retrieving a forgotten password.

10

2.1.5 Data source controls


The data source control model allows you to define how your page Interacts with a data source declaratively in your markup, rather than having to write the Equivalent data access code by hand. Best of all, this feature doesnt force you to abandon Good component-based designyou can bind to a custom data component just as easily as You bind directly to the database.

2.1.6 Web parts


One common type of web application is the portal, which centralizes different Information using separate panes on a single web page. Web parts provide a prebuilt portal Framework complete with a flow-based layout, configurable views, and even drag-and-drop Support.

Fig 2.1 Web Parts

11

2.1.7 Profiles
This feature allows you to store user-specific information in a database without Writing any database code Instead, ASP.NET takes care of the tedious work of retrieving the Profile data when its needed and saving the profile data when it changes.

2.2 ASP.NET 3.5


Developers who are facing ASP.NET 3.5 for the first time are likely to wonder what happened to ASP.NET 3.0 Oddly enough, it doesnt exist. Microsoft used the name .NET Framework 3.0 to release new technologiesmost notably, WPF (Windows Presentation Foundation), a slick new user interface technology for building rich clients, WCF (Windows Communication Foundation), a technology for building message-oriented services, and WF (Windows Workflow Foundation), a technology that allows you to model a complex business process as a series of actions (optionally using a visual flow chart like designer).

2.2.1 LINQ
LINQ (Language Integrated Query) is a set of extensions for the C# and Visual Basic languages. It allows us to write C# or Visual Basic code that manipulates in-memory data in much the same way we query a database. Technically LINQ defines about 40 query operators, such as select, from, in, where, and order by (in C#). These operators allow us to code our query. However, there are various types of data on which this query can be performed, and each type of data requires a separate flavor of LINQ. The most fundamental LINQ flavor is LINQ to Objects, which allows us to take a collection of objects and perform a query that extracts some of the details from some of the objects. LINQ to Objects isnt ASP.NET-specific. However, the .NET Framework 3.0 doesnt include a new version of the CLR or ASP.NET. Instead, the next release of ASP.NET was rolled into the .NET Framework Compared to ASP.NET 2.0 ASP.NET 3.5 is a more gradual evolution. Its new features are concentrated in two areas: LINQ and Ajax.

12

2.2.2 AJAX
AJAX (Asynchronous JavaScript and XML) is not a new programming language, but a new technique for creating better, faster, and more interactive web applications With AJAX, a JavaScript can communicate directly with the server, with the XML Http Request object. With this object, a JavaScript can trade data with a web server, without reloading the page.AJAX uses asynchronous data transfer (HTTP requests) between the browser and the web server, allowing web pages to request small bits of information from the server instead of whole pages.The AJAX technique makes Internet applications smaller, faster and more user-friendly. AJAX is based on the following web standards: JavaScript XML HTML CSS

Fig 2.2 Ajax Extension

13

Chapter-3

THE .NET BASE CLASS LIBRARY & EXECUTION PROCESS


The namespace names are self-descriptive by design. Straightforward names make the .NET Framework easy to use and allow you to rapidly familiarize yourself with its contents.

3.1 Execution Process


A code written on a .NET platform has to go through 2 stages:

Stage 1
Compilation, when page is requested the first time.The first time a page is requested, the code is compiled. Compiling code in .NET means that a compiler in a first step emits Microsoft intermediate language (MSIL) and produces metadataif you compile your source code to managed code. In a following step MSIL has to be converted to native code.

3.1.1 Microsoft intermediate language (MSIL)


Microsoft intermediate language is code in an assembly languagelike style. It is CPU independent and therefore can be efficiently converted to native code. The conversion in turn can be CPU-specific and optimized. The intermediate language provides a hardware abstraction layer.

Stage 2
MSIL is executed by the common language runtime.

3.1.2 Common language runtime (CLR)


The common language runtime contains just-in-time (JIT) compilers to convert the MSIL into native code. This is done on the same computer architecture that the code should run on.The runtime manages the code when it is compiled into MSILthe code is therefore called managed code.

14

Fig 3.1 Common Language Runtime (CLR) The Common Language Runtime (CLR) is the virtual machine component of Microsoft's .NET initiative. It is Microsoft's implementation of the Common Language Infrastructure (CLI) standard, which defines an execution environment for program code. The CLR runs a form of byte code called the Microsoft Intermediate Language (MSIL), Microsoft's implementation of the Common Intermediate Language.

3.2 C# Classes & ITS STRUCTURE


C# is cross-language interoperability; also called mixed-language programming Cross-language interoperability is crucial for the creation of large, distributed software systems. It is also desirable for programming software components, because the most valuable component is one that can be used by the widest variety of computer languages in the greatest number of operating environments. C# was created at Microsoft late in the 1990s and was part of Microsofts overall .NET strategy. By building C# upon a solid, well-understood foundation, C# offers an easy migration path from these languages.

15

3.2.1 How C# Relates to the .NET Framework


Although C# is a computer language that can be studied on its own, it has a special relationship to its runtime environment, the .NET Framework. The reason for this is twofold. First, C# was initially designed by Microsoft to create code for the .NET Framework. Second, the libraries used by C# are the ones defined by the .NET Framework. Thus, even though it is possible to separate the C# language from the .NET environment, the two are closely linked.

3.2.2 C# Features
Directly derived from C, C++ and Java. Provides Multilanguage Interoperability Full Integration with Windows platform. Related to .Net Runtime Environment.

Object Oriented
No pointers required! C# programs typically have no need for direct pointer manipulation Automatic memory management through garbage collection. Formal syntactic constructs for classes, interfaces, structures, enumerations, and delegates.

3.2.3 Forms, Controls & Menus


Forms generally contain a set of related information or options that provide users with information they need to proceed. Every form is also a class, and you can create multiple instances of a form or inherit from a form. Controls make information and options accessible to users. Controls such as labels and picture boxes can display information. Controls such as text boxes, list boxes, or combo boxes can both display information and accept user input. Controls such as buttons can allow the user to select a course of action.

16

Menus and toolbars provide a structured way to expose available commands to the users of your application. Menus are often incorporated to provide access to higher-level commands that might be common to all the forms of an application, such as commands to save data or exit the application. Menus can present options in a logical, consistent manner that enhances the user experience and enables rapid mastery of the application. Menu elements can be enabled or disabled to customize options available to the user at different points in the application. 3.2.3.1 Primary Composition Considerations Include Simplicity Position of controls Consistency Aesthetics

3.2.3.1.1 Simplicity Simplicity is an important aspect of a user interface. A visually busy or overly complex user interface makes it harder and more time-consuming to learn the application. A user interface should allow a user to quickly complete all interactions required by the program, but it should expose only the functionality needed at each stage of the application. 3.2.3.1.2 Position of Controls The location of controls on your user interface should reflect their relative importance and frequency of use. For example, if we have a form that is used to input both required information and optional information, the controls for the required information are more important and should receive greater prominence. In Western cultures, user interfaces are typically designed to be read left-to-right and top-to-bottom. The most important or frequently used controls are most easily accessed at the top of the form Controls that will be used after a user completes an action on a form, such as a Submit button, should follow the logical flow of information and be placed at the bottom of the form.

17

3.2.3.1.3 Consistency Our user interface should exhibit a consistent design across each form in your application. An inconsistent design can make our application seem disorganized or chaotic, hindering adoption by our target audience. Dont ask users to adapt to new visual elements as they navigate from form to form. 3.2.3.1.3 Aesthetics Whenever possible, a user interface should be inviting and pleasant. Although clarity and simplicity should not be sacrificed for the sake of attractiveness, we should endeavor to create an application that will not dissuade users.

18

Chapter-4

CONCLUSION
The technologies discussed and the functionality they provide are taken for granted by the user: users expect a toolbar, they expect copy and paste support, and they expect to be able to open a file theyve dragged from Windows Explorer to our application. Fortunately, adding the necessary implementation is easy with Visual C#, especially compared to drag and drop implementation in the days before the .NET Framework. The .NET Framework includes the Dataset object to work directly with the data. The object gives you the flexibility and control to represent the data in any way needed. The object can easily be bound to controls in either Windows Forms or Web Forms to tie the controls and datasets together. This allows you to build data entry screens quickly. The .NET Framework also includes two data providers that are used to access data sources: the OLE DB .NET Data Provider and the SQL Server .NET Data Provider. Using the Connection, Command, Data Reader, and Data Adapter objects included in each data provider, you can get complete access to your data. The integration of .NET with XML means that the data in ADO.NET can easily be portable and persisted locally. We can retrieve information not just about the data contents, but about the data schema as well. In addition, we can easily read and write XML data documents.

19

BIBLIOGRAPHY Websites
1. msdn.microsoft.com/en-us/library/ms123401.aspx 2. en.wikipedia.org/wiki/.NET_Framework 3. www.microsoft.com/download/en/details.aspx?id=19

Books for References


1. Pro ASP.NET 3.5 in C# 2008, Second Edition by Imaar Spaanjaars referred page no. 45-60. 2. ASP.Net Complete Reference by Matthew MacDonald referred page no. 210-240. 3. Microsoft Visual Studio C# 2008 by Rod Stephens and John Sharp referred page no. 119-139.

20

S-ar putea să vă placă și