.Net Framework Web Application and Development Digital Media Department Unit Credit Value : 4...

34
.Net Framework Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours [email protected] Digital Media Department Politeknik Brunei

Transcript of .Net Framework Web Application and Development Digital Media Department Unit Credit Value : 4...

.Net FrameworkWeb Application and Development

Digital Media Department

Unit Credit Value : 4EssentialLearning time : 120 hours

[email protected] Media DepartmentPoliteknik Brunei

Contents

• Framework

• About .NET

• What is .NET?

• .NET Platform

• Web Services

• .NET Design Features

• Common Language Runtime (CLR)

Contents Cont.

• CLR Compilation• CLR Execution Model• MISL – Microsoft Intermediate Language• J2EE vs .NET Execution• Run-time Hosts• .NET Framework• .NET Framework Classes

Contents Cont.

•Microsoft Developer Network• .NET’s Solution• .NET vs J2EE (Java)• .NET Framework Release History• .NET Framework for Users• .NET Framework for Developers• .NET Framework System Requirement• Supported Client Operating Systems

Framework

In brief:

A framework is just a collection of predefined code that the programmer can use without having to write it explicitly.

It allows developers to create applications more easily.

Programmer may write their own program without using a framework but it will end up writing their own framework and result in more errors.

Framework Cont.

A software framework is a universal, reusable software platform to develop applications, products and solution.

Software frameworks include support programs, compilers, code libraries, tools sets, and application programming interfaces (APIs) that bring together all the different components to enable development of a project or solution.

Framework Cont.

• A compiler is a computer program that will translate high-level/source code (the code you understand and write in) into another computer language.

• Tools set are set of function use to help programmer to develop applications such as code editor, debugger, etc.

Framework Cont.

• Code libraries contain predefined code/classes.

• API is a specification that documents the rules to use the predefined code/classes in code libraries. This is like a dictionary that we use which tells us how we should use the words to build our sentences.

About .NET

• .NET is a Microsoft’s strategy for developing large distributed software systems, since year 2000.

• It’s motivation:• “An open language platform for Web development”• “A component model for the Internet”

About .NET Cont.

• Comparing to• COM (Component Object Model)

• A component model for the desktop.

• CORBA (Common Object Request Broker Architecture) • An Object Oriented model for the Internet.

• Java • An Object Oriented model for the Internet but for a single programming

language.

What is .NET?

• A platform that supports the vision of how information technology will evolve.

• Fundamentals:

• Common Language Runtime (CLR)

• .NET Framework

.NET Platform

z

Web Form

.NET Framework

Windows

Web Service

Protocols: HTTP,HTML, XML, SOAP, UDDI

Tools:Visual Studio.NET,

Notepad

Applications Clients

.NET FoundationWeb Services

Your InternalWeb Service

Third-PartyWeb Services

.NET EnterpriseServers

Web Services

• The center of the .NET architecture

• A programmable application component accessible via standard Web protocols.

• Expose functionality over the Web

• Built on existing and emerging standards• HTTP, XML, SOAP, UDDI, WSDL, etc.

.NET Design Features

There are 7 design features:

• Interoperability•Common Language Runtime engine (CLR)• Language Independence•Base Class Library• Simplified Deployment• Security• Portability

.NET Design Features Cont.

• Interoperability• It provide means to access functionality implemented in newer and older programs

that execute outside the .NET environment.

• Common Language Runtime (CLR) Engine• All .NET programs execute under the supervision of the CLR, guaranteeing certain

properties and behaviors in the areas of memory management, security, and exception handling.

.NET Design Features Cont.

• Language Independence• Common Type System (CTS) supports the exchange of types and object instance

between any conforming .NET language

• Base Class Library (BCL)• A library of common functionality available to all languages using the .NET

Framework

.NET Design Features Cont.

• Simplified Deployment• Includes design features and tools to provide smooth installation

of computer software without compromising the security requirements.

• Security• Provide a common security model for all applications.

• Portability• provide cross-platform implementation for other operating

systems.

Common Language Runtime (CLR)

• The foundation of .NET Framework, providing core services for preparing and managing code execution.• Verification, compilation, memory & thread management, code safety.

• Support cross-language interoperability in tightly-integrated fashion• C#, Visual Basics (VB), C++, and Others (COBOL, Perl, Eiffel, Python)• Define a class in one language, then use another language, and call a

method of it.

CLR Compilation

Source Code

C++, C#, VB or any .NET language

csc.exe or vbc.exeCompiler

Assembly

DLL or EXE

CLR

VBSource code

Compiler

C++C#

Assembly AssemblyAssembly MSIL

Common Language Runtime Compiler

Compiler Compiler

CommonLanguageInfrastructure(CLI)

ManagedCode

ManagedCode

ManagedCode

UnmanagedCode

CLR Services

Operating System Services

Native Code

CLR Execution Model

MSIL

•MSIL – Microsoft Intermediate Language

• Code execution under CLR

•Write programs in languages supported by CLR

• Translate source code into MSIL code

• Convert MSIL code into native code

• Execute code, with supporting infrastructures• Automatic memory management, security, Interoperability,

versioning support, cross-language debug.

J2EE vs .NET Execution

Hello.java Hello.class JVMcompile execute

Hello.vb Hello.exe CLRcompile execute

Source code Byte code

MSILSource code

Run-time Hosts

• CLR supports both Web server applications and traditional Windows applications.

• Each application requires a run-time host.

• The run-time host loads CLR into a process creates the application domains within the process, and loads user code into the application domains.

• Three run-time hosts• ASP.NET – can be an integrated development environment• Microsoft IE – basically a browser• Shell executable – command-line interface

.NET Framework

The .NET Framework is a software framework developed by Microsoft that runs primary on Microsoft Windows for building apps for Windows, Windows Phone, Windows Server and Windows Azure.

An Object Oriented programming environment, with a class library of comprehensive, reusable class for software development.

Separate software components in different languages to be combined to form one functioning system.

.NET Framework Cont.

• Some functionality of .NET Framework includes:

•Common libraries (such as string management, data collection, database connectivity, IO)

•GUI (Windows Forms)

•ASP.NET and Web Forms

•ADO.NET for access to various data sources

• XML and Web Services

System.Data

Design

OLEDB

SQLTypes

SQL

System

Globalization

Diagnostics

Configuration

Collections

Resources

Reflection

Net

IO

Threading

Text

ServiceProcess

Security RuntimeInteropServices

Remoting

Serialization

System.Xml

XPath

XSLT Serialization

System.Web

Configuration SessionState

Caching Security

ServicesDescription

Discovery

Protocols

UIHtmlControls

WebControlsSystem.Drawing

Imaging

Drawing2D

Text

Printing

System.Windows.Forms

Form Button

MessageBox ListControl

.NET Framework Classes

.NET’s Solution

• A Common Type System (CTS)• Defines the types found in the supported languages

• A Metadata System• Stores metadata about the types at compile time and query them at

runtime, e.g., name, visibility, base classes, attributes and methods, type descriptions, security permission, etc.

.NET Solution Cont.

• A Common Language Specification (CLS)•Defines a set of rules that limit the type system to certain

groups of facilities provided by CLR, e.g., CLR supports both signed and unsigned integers, and CLS-compliant only supports unsigned integers.

• A Debugger• Allows the programmers to step through programs in

different languages.

.NET vs J2EE (JAVA)

• J2EE: one language (Java), any platform

• .Net: any language (not exactly any but more), one platform.

• Increased performance

• Increased productivity

• Less source code

•More scalability

.NET Framework Release History

Version Release Year Development tool Dsitributed with

1.0 2002 Visual Studio .NET N/A1.1 2003 Visual Studio .NET 2003 Windows Server 20032.0 2005 Visual Studio 2005 Windows Server 2003 R2

3.0 2006 Expression Blend Windows Vista, Windows Server 2008

3.5 2007 Visual Studio 2008 Windows 7, Windows Server 2008

4.0 2010 Visual Studio 2010 N/A4.5 2012 Visual Studio 2012 Windows 8, Windows Server

2012

.NET Framework for Users

Users who are not developing a .NET Framework applications but does use them does not required any specific knowledge about .NET Framework.

Most Windows operating system comes with .NET Framework readily installed.

If you install an application that requires the .NET Framework, the application’s setup program might install a specific version of the .NET Framework on your computer.

.NET Framework for Users Cont.

In general, you should not uninstall any versions of the .NET Framework that are installed on your computer, because an application you use may depend on a specific version and may break if that version is removed.

Multiple versions of the .NET Framework can be loaded on a single computer at the same time. This means that you do not have to uninstall previous versions in order to install a later version.

.NET Framework for Developers

You can choose any programming language that supports the.NET framework to create your application.

Because the .NET framework provides language independence and interoperability, you can interact with other .NET Framework applications and components regardless of the language with which they were developed.

ContactFor Tutorial and NotesCikguhadi.com

[email protected] Media DepartmentPoliteknik Brunei

Welcome to WADT