to
ASP.NET
Yingcai Xiao
Approach
Get the BIG picture before programming
Why? then How?
Principles and practices: know the concepts
and know how to design and implement an
application.
In the industry: design then coding
What is a Computer?
Programming
= Data Structures + Algorithms
Professor Donald E. Knuth
What Types of Programs?
(1) Stand Alone:
MS PowerPoint
(2) Web/Internet-based:
(a) Client-side: client-side JavaScript
(b) Server Side:
ASP.NET, JSP, Web Services
3-Tir Enterprise Applications
(c) Both-sides: Apps
(3) Cloud: Applications on the Cloud. Everything is
on the Internet and the Internet is a huge computer.
Why? Code Reuse!
Traditional Compilation/Linking (C/C++)
OS1 OS2
Common Binary Code?
Java Intermediate Language: Java Bytecode
OS1 OS2
Program statements are interpreted one at a time during the run-time.
JIT Compiler
OS1 OS2
All programming statements are compiled at compile time.
OS-Independent Code:
Intermediate Languages
OS1 OS2
MSIL: Microsoft Intermediate Language
MSIL Code
OS1 OS2
.NET OS-Platform-Independence
The Programming Language for .NET: C#
C#:
(0) C^+^2n; n = 0, 1, 2, => C, C++, C#
(1) The most advanced programming language to date
(3) OOP (Object-oriented Programming)
(4) EDP (Event Driven Programming)
(5) Dynamic type generation
(6) Platform-independent?: Code runs on any platform
with .NET runtime
(7) Visual Studio
A Common Language?
.NET Common Language Runtime
To make .NET language independent, CLR (Common Language
Runtime) is defined as the runtime environment.
CLR defines CTS (Common Type System) which should be
followed by all languages to be used in the .NET framework.
Syntax: int, for, ..
Semantics: multiple inheritance is not allowed in CTS
The code that follows CTS standard is called managed code.
regular C++ supports multiple inheritance
managed C++ does not support multiple inheritance
CLR: Common Language Runtime
OS1 OS2
.NET Language-Independence
.NET Architecture for Language and Platform Independence
(fan-in and fan-out on MSIL)
OS1 OS2
CLI (Common Language Infrastructure)
CLR/CTS for Everyone?
CLI : Common Language Infrastructure
OS1 OS2
Even though, CLI/CTS/CLR can make a program
written in any language to run on any platform, the
entire program (including all libraries used) has to be
on the platform before running.
SOAP
Web Service 1 WSDL Interface 1
http://en.wikipedia.org/wiki/.NET_Framework
.NET Framework Compositions
For Beginners:
C# Concisely, Bishop & Horspool, Pearson / Addison Wesley
Beginning C# Objects from Concepts to Code, Barker and Palmer, Apress
Microsoft Visual C#.NET Step by Step, John Sharp, Microsoft Press
Visual C#2010, Deitel & Deitel
Understanding .NET, David Chappell, Pearson / Addison Wesley