Showing posts with label ASP.NET Introduction. Show all posts
Showing posts with label ASP.NET Introduction. Show all posts

Friday, 10 August 2012

Beginners Introduction to ASP.NET

Introduction

I have seen many tutorials on ASP.NET but most of them starts with coding and writing your first ASP.NET Program. But here I has written this tutorial for explaining why there is a need for ASP.NET when classy ASP is working fine and what are the underlying technology behind ASP.NET, What programming model ASP.NET Provides to programmers. Now let us get started.ASP.NET is the new offering for Web developers from the Microsoft .It is not simply the next-generation of ASP; in fact, it is a completely re-engineered and enhanced technology that offers much, much more than traditional ASP and can increase productivity significantly. Because it has evolved from ASP, ASP.NET looks very similar to its predecessor—but only at first sight. Some items look very familiar, and they remind us of ASP. But concepts like Web Forms, Web Services, or Server Controls gives ASP.NET the power to build real Web applications.

Looking Back : Active Server Pages (ASP)

Microsoft Active Server Pages (ASP) is a server-side scripting technology. ASP is a technology that Microsoft created to ease the development of interactive Web applications. With ASP you can use client-side scripts as well as server-side scripts. Maybe you want to validate user input or access a database. ASP provides solutions for transaction processing and managing session state. Asp is one of the most successful language used in web development.

Problems with Traditional ASP

There are many problems with ASP if you think of needs for Today's powerful Web applications.
  1. Interpreted and Loosely-Typed Code
    ASP scripting code is usually written in languages such as JScript or VBScript. The script-execution engine that Active Server Pages relies on interprets code line by line, every time the page is called. In addition, although variables are supported, they are all loosely typed as variants and bound to particular types only when the code is run. Both these factors impede performance, and late binding of types makes it harder to catch errors when you are writing code.

  2. Mixes layout (HTML) and logic (scripting code)
    ASP files frequently combine script code with HTML. This results in ASP scripts that are lengthy, difficult to read, and switch frequently between code and HTML. The interspersion of HTML with ASP code is particularly problematic for larger web applications, where content must be kept separate from business logic.

  3. Limited Development and Debugging ToolsMicrosoft Visual InterDev, Macromedia Visual UltraDev, and other tools have attempted to increase the productivity of ASP programmers by providing graphical development environments. However, these tools never achieved the ease of use or the level of acceptance achieved by Microsoft Windows application development tools, such as Visual Basic or Microsoft Access. ASP developers still rely heavily or exclusively on Notepad.

    Debugging is an unavoidable part of any software development process, and the debugging tools for ASP have been minimal. Most ASP programmers
    resort to embedding temporary Response. Write statements in their code to trace the progress of its execution.

  4. No real state management
    Session state is only maintained if the client browser supports cookies. Session state information can only be held by using the ASP Session object. And you have to implement additional code if you, for example, want to identify a user.

  5. Update files only when server is down
    If your Web application makes use of components, copying new files to your application should only be done when the Web server is stopped. Otherwise it is like pulling the rug from under your application's feet, because the components may be in use (and locked) and must be registered.

  6. Obscure Configuration Settings
    The configuration information for an ASP web application (such as session state and server timeouts) is stored in the IIS metabase. Because the metabase is stored in a proprietary format, it can only be modified on the server machine with utilities such as the Internet Service Manager. With limited support for programmatically manipulating or extracting these settings, it is often an arduous task to port an ASP application from one server to another.

Introducing ASP.NET

ASP.NET was developed in direct response to the problems that developers had with classic ASP. Since ASP is in such wide use, however, Microsoft ensured that ASP scripts execute without modification on a machine with the .NET Framework (the ASP engine, ASP.DLL, is not modified when installing the .NET Framework). Thus, IIS can house both ASP and ASP.NET scripts on the same machine.

Advantages of ASP.NET

  1. Separation of Code from HTML
    To make a clean sweep, with ASP.NET you have the ability to completely separate layout and business logic. This makes it much easier for teams of programmers and designers to collaborate efficiently. This makes it much easier for teams of programmers and designers to collaborate efficiently.

  2. Support for compiled languages
    developer can use VB.NET and access features such as strong typing and object-oriented programming. Using compiled languages also means that ASP.NET pages do not suffer the performance penalties associated with interpreted code. ASP.NET pages are precompiled to byte-code and Just In Time (JIT) compiled when first requested. Subsequent requests are directed to the fully compiled code, which is cached until the source changes.

  3. Use services provided by the .NET Framework
    The .NET Framework provides class libraries that can be used by your application. Some of the key classes help you with input/output, access to operating system services, data access, or even debugging. We will go into more detail on some of them in this module.

  4. Graphical Development Environment
    Visual Studio .NET provides a very rich development environment for Web
    developers. You can drag and drop controls and set properties the way you do in Visual Basic 6. And you have full IntelliSense support, not only for your code, but also for HTML and XML.

  5. State management
    To refer to the problems mentioned before, ASP.NET provides solutions for session and application state management. State information can, for example, be kept in memory or stored in a database. It can be shared across Web farms, and state information can be recovered, even if the server fails or the connection breaks down.

  6. Update files while the server is running!
    Components of your application can be updated while the server is online and clients are connected. The Framework will use the new files as soon as they are copied to the application. Removed or old files that are still in use are kept in memory until the clients have finished.

  7. XML-Based Configuration FilesConfiguration settings in ASP.NET are stored in XML files that you can easily read and edit. You can also easily copy these to another server, along with the other files that comprise your application.

ASP.NET Overview

Here are some point that gives the quick overview of ASP.NET.
  • ASP.NET provides services to allow the creation, deployment, and execution of Web Applications and Web Services
  • Like ASP, ASP.NET is a server-side technology
  • Web Applications are built using Web Forms. ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface. They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.
  • Web Forms are designed to make building web-based applications as easy as building Visual Basic applications

ASP.NET Architecture

ASP.NET is based on the fundamental architecture of .NET Framework. Visual studio provide a uniform way to combine the various features of this Architecture.
Architechture of Asp.Net
Architecture is explained form bottom to top in the following discussion.
  1. At the bottom of the Architecture is Common Language Runtime. NET Framework common language runtime resides on top of the operating system services. The common language runtime loads and executes code that targets the runtime. This code is therefore called managed code. The runtime gives you, for example, the ability for cross-language integration.
  2. .NET Framework provides a rich set of class libraries. These include base classes, like networking and input/output classes, a data class library for data access, and classes for use by programming tools, such as debugging services. All of them are brought together by the Services Framework, which sits on top of the common language runtime.
  3. ADO.NET is Microsoft’s ActiveX Data Object (ADO) model for the .NET Framework. ADO.NET is not simply the migration of the popular ADO model to the managed environment but a completely new paradigm for data access and manipulation.

    ADO.NET is intended specifically for developing web applications. This is evident from its two major design principles:
    1. Disconnected Datasets—In ADO.NET, almost all data manipulation is done outside the context of an open database connection.
    2. Effortless Data Exchange with XML—Datasets can converse in the universal data format of the Web, namely XML.
  • The 4th layer of the framework consists of the Windows application model and, in parallel, the Web application model.
    The Web application model-in the slide presented as ASP.NET-includes Web Forms and Web Services.
    ASP.NET comes with built-in Web Forms controls, which are responsible for generating the user interface. They mirror typical HTML widgets like text boxes or buttons. If these controls do not fit your needs, you are free to create your own user controls.

    Web Services brings you a model to bind different applications over the Internet. This model is based on existing infrastructure and applications and is therefore standard-based, simple, and adaptable.

    Web Services are software solutions delivered via Internet to any device. Today, that means Web browsers on computers, for the most part, but the device-agnostic design of .NET will eliminate this limitation.
  • One of the obvious themes of .NET is unification and interoperability between various programming languages. In order to achieve this; certain rules must be laid and all the languages must follow these rules. In other words we can not have languages running around creating their own extensions and their own fancy new data types. CLS is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow.
  • The CLR and the .NET Frameworks in general, however, are designed in such a way that code written in one language can not only seamlessly be used by another language. Hence ASP.NET can be programmed in any of the .NET compatible language whether it is VB.NET, C#, Managed C++ or JScript.NET.
  • Quick Start :To ASP.NET

    After this short excursion with some background information on the .NET Framework, we will now focus on ASP.NET.

    File name extensions

    Web applications written with ASP.NET will consist of many files with different file name extensions. The most common are listed here. Native ASP.NET files by default have the extension .aspx (which is, of course, an extension to .asp) or .ascx. Web Services normally have the extension .asmx.
    Your file names containing the business logic will depend on the language you use. So, for example, a C# file would have the extension .aspx.cs. You already learned about the configuration file Web.Config.
    Another one worth mentioning is the ASP.NET application file Global.asax - in the ASP world formerly known as Global.asa. But now there is also a code behind file Global.asax.vb, for example, if the file contains Visual Basic.NET code. Global.asax is an optional file that resides in the root directory of your application, and it contains global logic for your application.

    All of these are text files

    All of these files are text files, and therefore human readable and writeable.

    The easiest way to start

    The easiest way to start with ASP.NET is to take a simple ASP page and change the file name extension to .aspx.

    Page Syntax

    Here is quick introduction of syntax used in ASP.NET

    Directives

    You can use directives to specify optional settings used by the page compiler when processing ASP.NET files. For each directive you can set different attributes. One example is the language directive at the beginning of a page defining the default programming language.

    Monday, 28 March 2011

    +Feature :CBT Nuggets Microsoft 70-515: .NET 4 MCTS only 50 USD

    Trainer: Don Jones

    Videos: 20
    Time: 6 hrs

    This series shows you how to build Web applications for Windows, using version 4 of the .NET Framework and Visual Studio 2010. You will use ASP.NET, along with related .NET Framework technologies.
    You’ll learn to develop Web Forms pages, develop and use Web Forms controls, implement client-side scripting and AJAX, configure and extend a Web application, display and manipulate data and use ASP.NET Model-View-Controller (MVC) 2.
    You'll also be ready for Microsoft's 70-515 exam -- in either C# or Visual Basic
    What You'll Learn

    Tuesday, 14 December 2010

    Free ebook - Introducing .NET 4.0 With Visual Studio 2010

    Microsoft is introducing the vast series of changes to the approach which the .NET Framework operates.



    Introducing .NET 4.0: with Visual Studio 2010 is written to yield we with only which roadmap. It serves as the no-nonsense authority which will assistance gifted .NET developers assimilate the stroke of the brand brand brand brand brand brand new horizon as well as the compared technologies.
    This book will keep we updated upon the changes as well as assistance we to seize brand brand brand brand brand brand new opportunities quietly as well as quickly.

    What you’ll learn

    Get an general outlook as well as short story of any brand brand brand brand brand brand new or becoming different record which puts it in to context

    Familiarize yourself with pass concepts as well as opportunities by rarely permitted tutorials

    Understand how to perform usual tasks in brand brand brand brand brand brand new record areas such as pLINQ
    Gain consultant opening tips
    See examples of real-world applications of any record to assistance we sense how the record can be put to work
    To download click here

    Free ebook - Testing ASP.NET Web Applications

    As Microsoft's key Web technology for creating dynamic, data-driven Web sites and Web applications, ASP.NET is incredibly popular. This is the first book to combine several testing topics and make them specific to ASP.NET. The author duo of Microsoft MVPs covers both the test-driven development approach and the specifics of automated user interface testing; performance, load, and stress testing; accessibility testing; and security testing.




    This definitive guide walks you through the many testing pitfalls you might experience when developing ASP.NET applications. The authors explain the fundamental concepts of testing and demystify all the correct actions you need to consider and the tools that are available so that you may successfully text your application.



    Author duo of Microsoft MVPs offer a unique resource: a combination of several testing topics and making them specific to ASP.NET, Microsoft's key Web technology for creating dynamic, data-driven Web sites and applications Guides you through the many testing pitfalls you may experience when developing ASP.NET applications



    Reviews the fundamental concepts of testing and walks you through the various tools and techniques available and for successfully testing an application


    to download click here

    Monday, 29 November 2010

    ASP.NET Introduction

    What Is ASP?

    Intro to Visual Web Developer http://megateach.blogspot.com/ from ashraf on Vimeo.


    (Active Server Page) A Web server technology that allows for the creation of dynamic, interactive sessions with the user. An ASP is a Web page that contains HTML code and embedded programming code written in VBScript or Jscript. It was introduced with Version 3.0 of Microsoft's Internet Information Server . When Internet Information Server encounters an ASP page requested by the browser, it executes the embedded program. ASPs are Microsoft's alternative to CGI scripts and JavaServer Pages (JSPs), which allow Web pages to interact with databases and other programs. Third- party products add ASP capability to non-Microsoft Web servers. The Active Server Page technology is an ISAPI program and ASP documents use an .ASP extension.

    Popular Posts