.NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure ...

40
.NET and Java By Mike Elges

Transcript of .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure ...

Page 1: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

.NET and Java

By Mike Elges

Page 2: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Objectives History of programming Application platform .NET structure

Building blocks of .NET Summary

Page 3: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (I) Win32/C programming

Using C language with windows API Disadvantages:

Not a OO language Pointer operation Manual memory management

Page 4: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (II) C++/MFC programming

Object Oriented layer on the top of C Microsoft Foundation Classes provide the

developer with a set of existing C++ classes facilitate the construction of windows applications

Disadvantages: Remains some difficulties given its historical roots in C

Page 5: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (III) Visual Basic 6

VB6 is popular due to it ability to build complex user interface, code libraries, data access logic

Disadvantages: Object-aware instead of Object-Oriented language No intrinsic support for building multi-threaded

applications

Page 6: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (IV) Java

Platform independent Java as a platform provides programmers with a

large number of predefined “packages that contains various classes and interfaces

Disadvantages: little language – independence Long execution time for graphic intensive product

Page 7: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (V) COM programming

“if you build your classes in accordance with the rules of COM, you end up with a block of reusable binary code”

Language independent Location transparent Disadvantages:

No classical inheritance (can not derive a new COM type using an existing COM type)

Complexity of COM

Page 8: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

History of Programming (VI) Windows DNA programming

Distributed iNternet Architecture Requires many technologies and languages (ASP, HTML,

XML, JavaScript, VBScript, COM+, ADO) Disadvantages:

Many items are completely unrelated, for example, Javascript has a syntax like C, VBScript is a subset of VB

Highly confused mishmash of technologies

Page 9: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Application Platforms: Some History1996 1998 2002

Windows DNA- MTS (COM+)- ASP- ADO

Microsoft

Java Java- Java VM- Java language- J2SE

J2EE- EJB- JSP- JDBC

.NET Framework- CLR- C#, VB.NET- Enterprise Services, ASP.NET, ADO.NET- Web services

Page 10: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Objectives

History of programming Application platform .NET structure

Building blocks of .NET Summary

Page 11: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Standard Library

Application Platforms Today

GUI Services

Transaction Services

Web Scripting

Data Access

More

Operating System

Runtime Environment

BrowserApps

Web ServicesApps

OtherApps

LocalApps

Page 12: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Standard Java Packages

The Competition: The Java Environment

Swing Enterprise JavaBeans

JavaServer Pages

JDBC More

Windows, Solaris, Linux, others

Java Virtual Machine (VM)

BrowserApps

Web ServicesApps

OtherApps

LocalApps

Page 13: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

.NET Framework Class Library

The .NET Framework

Windows Forms

Enterprise Services

ASP.NET ADO.NET More

Windows

Common Language Runtime

BrowserApps

Web ServicesApps

OtherApps

LocalApps

Page 14: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

J2EE vs. .NET

Page 15: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Developer .NET Overview Introductions .NET Developer Overview

.NET Runtime Environment .NET Framework .NET Deployment .NET Security .NET Languages

.NET Applications Web Forms Web Services Windows Forms

Page 16: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Microsoft .NETWeb services support across the Microsoft platform Web services support across the Microsoft platform

To

ols

To

ols

ClientsClients

ServicesServices

ServersServers

Ex

pe

rien

ces

E

xp

erie

nce

s

& S

olu

tion

s&

So

lutio

ns

v-paulaw
Crop out the white square and "premium" from around the arrows. Leave the white in the oval inside the arrows.Make the arrows wrap around the outside of the big XML oval. We need to show the 4 areas of the .NET nicely. One idea I had was to do the aperture idea we're currently using for Deborah Tom and swirl 4 quadrants in at the center to show they all get swooshed in to the centeral .net connection. Whatever we do on this slide, needs to be supported on teh next slide.
Page 17: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

5 Key Points to Remember… Developers can use any .NET Language The .NET Framework provides a foundation of

classes for developers to build a wide variety of applications

Source code is compiled to MSIL within an Assembly

Assembles contain rich meta data and are the primary units of deployment

MSIL is compiled to native code and executed by the Common Language Runtime

Page 18: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

A Unified Programming Model

Windows API

.NET Framework

Consistent API availability regardless oflanguage and programming model

ASP

Stateless,code embeddedin HTML pages

MFC/ATL

Subclassing,Power and

Expressiveness

VB Object Model

RAD,Composition and

Delegation

Page 19: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Visual Studio .NET and the .NET Framework

Windows Operating SystemWindows Operating System

Common Language RuntimeCommon Language Runtime

Base Class LibraryBase Class Library

ADO .NET and XMLADO .NET and XML

ASP .NETASP .NETWeb Forms Web ServicesWeb Forms Web Services

Mobile Internet ToolkitMobile Internet Toolkit

WindowsWindowsFormsForms

Common Language SpecificationCommon Language Specification

VBVB C++C++ C#C# J#J# ……V

isua

l Stu

dio

.NE

TV

isua

l Stu

dio

.NE

T

Page 20: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Common Language Runtime Manages running code

Threading, Memory management Eliminates memory management drudgery Kills entire classes of bugs (e.g., memory corruption, ref

counting) Auto-versioning, no more DLL Hell Scalability, performance, reliability all improve

Fine-grained evidence-based security Code access + Role-based Integrated with underlying OS Security model ensures safety

No-touch deployment XCOPY, no registry required

Object remoting with SOAP

Page 21: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

CLR: Internals

Class Loader

IL to NativeCompilers

CodeManager

GarbageCollector

Security Engine Debug Engine

Type Checker Exception Manager

Thread Support COM Marshaler

Base Class Library Support

Page 22: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Framework Classes Spans all programming languages

Enables cross language inheritance and debugging Integrates well with tools

Object-oriented and consistent Increases developer productivity by reducing the number

of APIs to learn Common type system built-in Extensible

Makes it easy to add or modify framework features Secure

Allows creation of secure applications

Page 23: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

System & Runtime Functions Windows & Web Development Web Services Data Access & XML Services Networking & IO Enterprise Services (COM+ & MSMQ) Directory & Security Services Diagnostics, Perf-Mon, Debug And many more…

.Net Framework ClassesUnified and Comprehensive API

Page 24: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

System

System.Data (ADO .NET) System.XML

System.Web (ASP .NET)

Globalization

Diagnostics

Configuration

Collections

Resources

Reflection

Net

IO

Threading

Text

ServiceProcess

Security

Design

ADO

SQLTypes

SQL

XPath

XSLT

RuntimeInteropServices

Remoting

Serialization

Serialization

Configuration SessionState

Caching Security

ServicesDescription

Discovery

Protocols

UIHTMLControls

WebControls

System.Drawing

Imaging

Drawing2D

Text

Printing

System.WinForms

Design ComponentModel

.Net Framework Classes

Page 25: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Referencing the Framework

Page 26: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

26

Source CodeSource Code

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

csc.exe or vbc.execsc.exe or vbc.exeCompilerCompiler

AssemblyAssembly

DLL or EXEDLL or EXE

.Net AssembliesCompilation

Page 27: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

VBVBSource Source codecode

CompilerCompiler

C++C++C#C#

CompilerCompilerCompilerCompiler

Operating System ServicesOperating System Services

Common Language RuntimeCommon Language Runtime

JIT CompilerJIT Compiler

Native CodeNative Code

ManagedManagedcodecode

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

AssemblyAssemblyIL CodeIL Code

.Net Execution ModelCommon Language Runtime

Page 28: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

.NET Security Role-based Security

What the user is allowed to do within the application

.NET Roles = Windows Active Directory® groups Code Access Security

What the code is allowed to do on this machine Evidence Based (Policies, Permissions, Evidence)

Cryptography Built In to .NET FX

Page 29: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Visual Basic .NET Evolution, not revolution, of language used

by developers worldwide Builds on existing technology while adding

power True OOP Multithreading NT Services Web Services

The fastest way to build scalable applications for industry

Page 30: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Visual C# .NET Component Oriented Language C# is the first “component oriented” language

in the C/C++ family Component concepts are first class:

Properties, methods, events Design-time and run-time attributes Integrated documentation using XML

Enables one-stop programming No header files, IDL, etc. C++ heritage – simplification with no

unnecessary sacrifices

Page 31: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Visual J# .NET

Native support for XML Web services Fully integrated with Visual Studio .NET

development environment Full access to the .NET Framework

ASP.NET, ADO.NET, Windows Forms Integration with >20 other languages

Protection of existing investments Use java language syntax on .NET Move applications and skills forward

Page 32: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Visual C++ .NETContinue to provide most powerful and flexible language

Better ANSI/ISO conformance Enable seamless, incremental use

of .NET Framework Enhanced ATL Servers Improved ATL and MFC Clients Enhanced STL

Page 33: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

.NET Applications

Web Form – Next Generation ASP Page Win Form – Next Generation Win32 App Web Services – Key to Interoperability Others –

Server Objects Console Applications Window Services Mobile Clients Many more…

Page 34: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

ASP.NET Server-side Web Forms and Web Services

components separate code from content Developer productivity increases Tools easily use ASP.NET Any programming language: full VB, JScript, C++,

COBOL, Perl, etc. 40% to 70% reduction in lines of code

Compiled No-touch deployment system Intelligent state management Backwards compatible with ASP Controls sense client and adapt output: HTML,

DHTML, WML

Page 35: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

What Is an XML Web Service? A Component That Uses XML & HTTP To

Define and Deliver A Service Global reach Based on open set of standards Reuse across platforms Works with any operating system, programming

language, or network Expose legacy code

Different systems can actually talk

Page 36: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Web ServicesOpen Standards & Protocols

XML Universal data format Standards-based integration User-customizable

HTTP Ubiquitous protocol Universally understood

Page 37: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Summarizing the Technologies (1).NET JavaApplication

Server.NET

FrameworkIBM WebSphere, BEA

WebLogic, others

Runtime Environment

Common Language Runtime (CLR)

Java Virtual Machine (VM)

Standard Libraries

.NET Framework class library

J2SE, J2EE

GUIs Windows Forms

Swing

Transactions Enterprise Services

EJB

Page 38: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Summarizing the Technologies (2).NET Java

Web Scripting

ASP.NET JSPs

Data Access

ADO.NET JDBC

Development Tools

Visual Studio.NET WSAD, Borland JBuilder, others

Web Services Support

ASP.NET, .NET My Services, others

WSAD, ECLIPSE, more planned

Small Device Platform

.NET Compact Framework

J2ME

Page 39: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Summarizing the Non-Technical Issues

.NET Java

Vendor Issues:

Locked into Microsoft

Locked into IBM or BEA

Trust Microsoft isn’t a traditional enterprise vendor

IBM and BEA have longer enterprise histories

Installed Base New, but builds on Windows DNA

Older than .NET, but younger than Windows DNA

Operating System Support

Windows Windows, Unix, others

CostLow Usually medium to high

but getting cheaper

Page 40: .NET and Java By Mike Elges. Objectives History of programming Application platform.NET structure  Building blocks of.NET Summary.

Conclusions The development world has bifurcated

Microsoft .NET The Java environment

Both have similar architectures Both will survive

Which is a good thing .NET will dominate in the Windows

environment