Download MicrosoftNet

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

URL redirection wikipedia , lookup

Transcript
Microsoft .Net
Jim Fawcett
CSE687 – Object Oriented Design
Spring 2001
Potential of the Web



The web started as an extended library
of relatively static web pages (1991-98).
Web commercialization added a market
place of products, e.g., Amazon.com,
Dell.com, … (1998-2001).
What’s next?
Semantic Web

W3C’s Director, Tim-Berners-Lee sees a
“Semantic Web”.



Web pages with semantic tags and catalogs of
definitions and relationships between tags that
convey “meaning” to computers.
The idea is to develop “automated web services
such as highly functional agents.”
The focus here is a technical model for the
web that supplies more detailed infrastructure.
The Service Bazaar

Microsoft and Sun seem to have a vision of
the web as a bazaar of services, as well as
products.


With the product model you make one large
payment and get unlimited access to one product
version, shipped over the web or via a physical
route.
In the services model you make a per-use
payment and get access to the most current
version, over the web.
Web Services Infrastructure



Package data in self-describing documents
using XML
Support messaging with Simple Object Access
Protocol (SOAP) with XML documents as the
fundamental messages and medium of data
exchange.
Use the XML document structure to
communicate with server data stores.
.Net Architecture



Common language runtime library
C# language
A set of base components



Win Forms and Web Forms


Active Server Pages supporting compiled server side
components
ADO+


New UI framework, simplifying UI implementation
ASP+


provided by the common language runtime
Networking, containers, GUI parts, …
Database access components using XML and SOAP
Scripts can use common runtime library and can be
compiled.
Common Language Runtime (CLR)


Runs bytecodes in an Intermediate
Language (IL) format. This is compiled,
not interpreted.
Scripts now can be compiled and can
use the services and components
provided by the CLR.
C# Language

Looks a lot like Java.

A strong analogy between:







Java Virtual Machine & C# code manager
Java bytecodes & C# Intermediate Language
Java packages & CRL components and assemblies
Both have Just In Time (JIT) compilers
Both support reflection, used to obtain class information at run
time
Both languages lack generics
Differences:

Java and C# do have significant differences




C#
C#
C#
C#
has most of the operators and keywords of C++
has enumerations
plans to add generics in the second release of Visual Studio 7
code supports attributes – tagged metadata
What can you do with C#?


Build console applications
Build windows applications


Build windows controls




Provide information to users via browser and web forms
Build web services


ASP pages are a mix of HTML and script.
The HTML builds a presentation in the client’s browser
The script provides associated processing on the server.
Build web controls


Very like creating an ActiveX control
Create web server programs using ASP


Uses a process similar to Visual Basic applications.
Provide information to other applications on other machines
Build .Net components
Support for Components

C# is designed to support components:

Properties, methods, events, attributes, and documentation
are all first-class language constructs.




Any class can publish a set of events to which objects of
another class can subscribe at run time.
Attributes, defined by the designer, can be attached to classes,
methods, data members, or properties.
The compiler can be asked to generate XML documentation
based on class attributes.
C# integrates with COM


Can build wrappers that create COM objects out of C#
assemblies.
But C# assemblies themselves have a different architecture,
and use manifests instead of the registry.
Base Components from the CLR

The Common Language Runtime library has
components for:









String handling
Mathematical operations
Containers
File and directory access
Accessing the registry
Security
Building user interfaces and handling windows
messages
Network and internet programming
Database access
Win Forms and Web Forms

Win forms build user interfaces using techniques
borrowed from Visual Basic.



Significantly simpler than Win32, MFC, or WTL windows
programming.
Much less powerful in Visual Basic. I don’t know yet how
powerful Win Forms are in C#.
Web forms attempt to build user interfaces based on
HTML pages.



Flexible and integrates well with distributed, web-based
systems
Not as powerful as MFC programming.
Can you drop down to WTL or Win32 programming? I don’t
know yet.
ADO+

Emphasizes the Data Set, which is a
disconnected, in memory, copy of part of the
database, which may have multiple tables.




This is a performance improvement that minimizes
locking that used to occur with ADO recordsets.
You instantiate a DataSet, populate it from the
database, and work on the DataSet.
Send back only changes to the database when you
are done working with the DataSet object.
Transmission back and forth now uses XML, rather
than COM marshaling, as with ADO.
ASP+






ASP code consists of pages of HTML and script.
ASP+ code does a lot of what the ASP scripts did
using attribute tags.
ASP+ pages are compiled into into a .Net class the
first time the page is requested. The compiled class
is cached for future requests.
ASP+ pages can be changed without stopping the
web server.
“Script” part of ASP+ pages can be written in any
.Net language, not just VBScript or JavaScript.
Creation of ASP+ pages is directly supported by
Visual Studio 7.
Will we offer .Net Courses?

.Net will be introduced into the curriculum
when Windows 2000 and Visual Studio 7 are
installed in the ECS clusters. I hope that will
be by the end of the Fall Semester.
When can I start using .Net?


Visual Studio 7 will probably be released this
fall.
You can download the .Net framework and
command line compilers for C# now.


Be careful. They are not entirely stable. I
damaged part of my visual studio installation by
installing the first .Net framework. I can not do
command line compiles until I rebuild Visual
Studio.
Books are starting to become available now –
see the references on the next slide.
References

C# Programming, Harvey et al., Wrox Press, 2000


Microsoft .Net vs. J2EE, Jim Farley,
www.java.oreilly.com/news/farley_0800.html


Covers a lot of the .Net framework as well as C#.
Comparison of .Net with Java 2.0 Enterprise Edition
Deep Inside C#, An Interview with Microsoft Chief
Architect Anders Hejlsberg, John Osborn,
www.windows.oreilly.com/news/hejlsberg_800.html

Interview with the principal developer of C#, who also was
the author of the original Turbo Pascal.