ASP.NET Overview
The .Net Framework
ASP stands for Active Server Pages, Microsoft's implementation of server technology to What are the advantages of .Net?
- RAD (Rapid Application Development)
- Platform Independence (ie, not O/S dependent)
- Network Transparent (ie, it is not necessary to know that a computer is in a different physical space)
The framework has two major components: CLR (Common Language Runtime) and FCL (Framework Class Library). The FCL is resident on a .Net enabled server and holds all the bundled classes. The CLR is the compiled code produced by the various language compilers. It complies to CLI (Common Language Infrastructure) and can generate code which runs in the .Net Framework. Microsoft supplies C#, VB, Managed C++ JScript and J# as languages. There are many others (around 40) provided by 3rd party vendors. CLI compliant compilers compile source code to the intermediate format - CIL (Common Intermediate Format). At runtime, the CLR comples the CIL into machine specific native code using a JIT (Just In Time) compiler. Microsofts' implementation of the CIL is their MSIL. These are the stages for code:
- human-readable, eg VB
- gets compiled to CLR
- CLR processes code using a CLI compliant JIT, producing machine specific code
Different human-readable languages compile back to the same CLR.
FCL organises classes into Namespaces. This is to avoid duplication of names, and the logical organisation of classes used for specific purposes. The Page (and related web classes) are in System.UI.Web, for example.
We applications tend to have three parts:
- content
- business logic
- configuration
Execution
Execution of .Net code is done via dlls. Code wriiten is made up as an assembly - a dll. This holds MSIL, Microsoft System Intermediate Language. The CLR manages the code, therefore it is called 'managed' code. This includes saftely checks and memory management.
ISAPI stands for Internet Server Application Programming Interface. For .aspx files, it runs aspnet_isapi.dll. An html file can run as an aspx file by changing the file name. This may be desirable in order for certain security features to be brought into play.
Classes, Objects and Inheritance
Classes are like blueprints or plans. They are instantiated into an object which can then hold data. In Java there are static methods that do not require instantiation. Anything similar in VB.Net?
A Property is a like a physical 'fact' about the object. A Method is something it can do.
Inheritance describes the way a class can derive from a prototype. It inherits all methods and properties of the parent class, and can have others added.
Polymorphism describes the nature of classes having methods and properties associated with it. It also describes the way the same method can produce different results from a series of similar objects.
Methods can given the following access permissions:
Public - universal access
Private - limits access to its containing type
Protected - limits access to the containing type and all derived classes
Friend - limits acces to classes within the current project
Resources
Useful Book: ASP Kickstart book is very good.
www.asp.net - details of the web matrix project here.
www.msdn.com - the developer network.