Understanding Code Behind in .Net FrameworkWritten by Balaji
Understanding Code Behind in .Net FrameworkThe ASP.NET Code Behind feature in .Net Framework allows developers to separate server-side code from presentation layer. This concept makes server-side code to store in one file and presentation code, that is, HTML code in another file. When you compile ASP.NET page both these files get compiled as a single entity. In traditional ASP model, this could not be achieved which often leads to intermingling of code and design. The biggest advantage, in ASP.NET, is that presentation code will be in .aspx file and server-side code will be in any .Net compatible language such as Visual Basic.Net, C#, or J#. You can also do away with presentation layer because you can give this role to web designers. This saves time and you can concentrate only on coding part of application. In addition, you can create a class for your code and inherit this class from ASP.NET Page object. By this way class can access page intrinsics and also interact with postback architecture. After this you can create ASP.NET page and apply a page directive to inherit from this new class.
| | Understanding Common Type System in .Net FrameworkWritten by Balaji
Understanding Common Type System in .Net FrameworkAs .Net Framework is language independent and support over 20 different programming languages, many programmers will write data types in their own programming language. For example, an integer variable in C# is written as int, whereas in Visual Basic it is written as integer. Therefore in .Net Framework you have single class called System.Int32 to interpret these variables. Similarly, for ArrayList data type .Net Framework has a common type called System.Collections.ArrayList. In .Net Framework, System.Object is common base type from where all other types are derived. This system is called Common Type System. The types in .NET Framework are base on which .NET applications, components, and controls are built. Common Type System in .Net Framework defines how data types are going to be declared and managed in runtime. The Common Type System performs following functions: • Automatically adapts itself in a framework that enables integration of multiple languages, type safety, and high performance code execution. • Provides an object-oriented model. • Standardizes conventions that all languages must follow. • Invokes security checks. • Encapsulates data structures.
|