NET Centric Computing · Unit 2 · 3 hrs
Introduction to ASP.NET
Exam-focused notes for Introduction to ASP.NET (NET Centric Computing, CSC378): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.
Introduction to ASP.NET in short
This unit places C# inside the wider .NET ecosystem: the difference between .NET, .NET Core, ASP.NET and its variants, the architecture and design principles behind the platform, how compilation and execution actually work, and the command line tooling used to build and run .NET Core applications day to day.
What this unit covers
- .NET and ASP.NET frameworks: .NET, .NET Core, Mono, ASP.NET Web Forms, ASP.NET MVC, ASP.NET Web API, ASP.NET Core
- .NET Architecture and Design Principles
- Compilation and Execution of .NET applications: CLI, MSIL and CLR
- .NET Core in detail
- .NET CLI: build, run, test and deploy .NET Core Applications
.NET and ASP.NET frameworks
2079 · 5 marks
Differentiate between .NET and ASP.NET frameworks. How do you test the .NET core applications? [5]
2076 · 5 marks
What do you mean by Microsoft Net framework? Explain with example.[5]
Show solved answerHide answer
Microsoft .NET Framework
Definition
The .NET Framework is a software development platform developed by Microsoft that provides a controlled programming environment where software can be developed, installed, and executed on Windows-based operating systems. It provides tools and libraries for building and running applications using multiple programming languages such as C#, F#, and Visual Basic.
The .NET ecosystem includes several implementations:
- .NET Framework (original Windows-based platform)
- .NET Core (modern, cross-platform version)
- Mono (open-source, cross-platform implementation)
Key Components of .NET Framework
1. Common Language Runtime (CLR)
The CLR is the execution engine of .NET. It manages code execution, memory management, and security. Code written in .NET languages is compiled into Intermediate Language (IL), which the CLR then executes.
2. Class Libraries / Base Class Library (BCL)
A large collection of reusable classes, interfaces, and value types that provide common functionality to all .NET applications.
3. Application Models / Technologies
| Technology | Purpose | Example |
|---|---|---|
| Win Forms | Form-based desktop applications | Notepad-like client apps |
| ASP.NET | Web-based applications | Runs on Chrome, Firefox, etc. |
| ADO.NET | Database interaction | Oracle, Microsoft SQL Server |
.NET Core (Modern Version)
.NET Core is the newer, improved version of the .NET Framework. It is:
- Open-source -- maintained by Microsoft on GitHub under MIT and Apache 2 licenses
- Cross-platform -- runs on Windows, macOS, and Linux
- Modular and lightweight -- written from scratch for performance
- Supports multiple languages -- C#, F#, Visual Basic
- Wide range of applications -- mobile, desktop, web, cloud, IoT, games, machine learning
- Consistent across architectures -- x64, x86, and ARM
Mono
Mono is another example of a cross-platform .NET implementation available on Windows, macOS, Linux, and more. It was originally designed as an open-source implementation of .NET Framework on Linux.
Example: The Unity game engine uses C# through Mono as a cross-platform way of creating video games. Mono provides the means to compile and run C# programs, similar to the .NET Framework.
Simple Example (C# Console Application on .NET Core)
using System;
namespace HelloDotNet
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello from .NET Framework!");
Console.WriteLine("Platform: Cross-platform with .NET Core");
}
}
}
Output:
Hello from .NET Framework!
Platform: Cross-platform with .NET Core
This simple program can be compiled and run on Windows, macOS, or Linux using .NET Core, demonstrating the cross-platform nature of the framework.
Summary
| Feature | Description |
|---|---|
| Developer | Microsoft |
| Languages Supported | C#, F#, Visual Basic |
| Platform (.NET Core) | Windows, macOS, Linux |
| Application Types | Web, Desktop, Mobile, Cloud, IoT, Games |
| Open Source | Yes (.NET Core on GitHub) |
The .NET Framework (and its modern evolution .NET Core) provides a unified, powerful, and flexible environment for building a wide variety of applications across multiple platforms.
.NET CLI
2078 · 10 marks
Explain the procedure for building, running, and deploying .NET core applications. Write a program to show the possibility of SQL injection attack.[10]
Make Unit 2 stick
Practice CSC378 with flashcards & quizzes