This preview shows page 1-2-3-4-5-6-7-53-54-55-56-57-58-59-60-106-107-108-109-110-111-112 out of 112 pages.
Organizational Communications and Distributed Object TechnologiesOverview.NETCommon Language RuntimeFramework Class LibraryC# OverviewHello World 1 Full NamespacesHello World 2 Using SystemHello World 3 Without SystemType System Unification 0Type System Unification 1Type System Unification 2Parameters1 Pass By ValueParameters 2 Pass by ReferenceParameters 3 Passing ObjectsPowerPoint PresentationParameter 4 Passing ObjectsSlide 18Parameters 5 Out ParametersSlide 20Parameter 6 Passing ArraysSlide 22Classes 1Classes 2Classes 3 PropertiesSlide 26Classes 4 InheritanceSlide 28Slide 29Slide 30Classes 5 PolymorphismSlide 32Slide 33Slide 34Slide 35Type Constructors 1Slide 37GUI Programming (1)Slide 39Slide 40GUI Programming (2)Slide 42Slide 43Slide 44Networking 1 Visit a Web SiteSlide 46Distributed ObjectsSlide 48The Remote ObjectPublish the Object with Server.csSlide 51Remote ObjectsMarshaling ClassificationMarshal-By-Value ObjectsMarshal-By-Reference ObjectMBR Objects (1)Slide 57MBR Objects (2)MBR Objects (3)Slide 60Remoting ModelRemote Objects May BeServer Activated ObjectsSingle-Call and SingletonsClient Activated ObjectsThe Object To Be ServedClient Code (along with Student.dll)Slide 68Server Code (with Student.dll)OutputLeasesThe Client Side Lets a Lease ExpireSlide 73Slide 74A Student With A LeaseSlide 76Same Server CodeSlide 78The soapsuds toolThe server codeSlide 81The Client CodeSlide 83Run The ClientWeb ServicesASP.NET Web ServicesSlide 87ASP.NET Server CodeSlide 89Create a virtual directory under IISChecking the serviceTesting With HTTP GetTesting with SOAPSlide 94SOAP ResponseSlide 96Accessing the .NET web service with JavaThe Java ClientINTEROPERABILITY !!More on .NET Web ServicesState ManagementState Management ExampleStep by stepSlide 104The Web ServiceSlide 106PersonName.asmxThe ClientSlide 109Slide 110Slide 111Asynchronous Web Service195-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.Organizational Communications and Distributed Object TechnologiesLecture 12: .NET295-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.OverviewBasics395-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture..NET•Runtime environment called the Common Language Runtime (CLR)•Class library called the Framework Class Library (FCL)495-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.Common Language Runtime•Modern runtime environment•.NET compilers do not target a specific processor •The CLR must be present on the target machine•Safely manages code execution•JIT compilation from MSIL to machine executable•Security and Permission management595-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.Framework Class Library•Object oriented•Collections, console, network and file I/O•Database and XML support•Rich server side event model•Rich client side support for GUI construction•Support for building SOAP based web services•More than 3,500 classes695-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.C# Overview •C# is type safe (hard to access objects in inappropriate ways)•Automatic memory management•Exception handling•Array bounds checking•Support for checked arithmetic795-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.// Hello World 1 in C#class MyApp { public static void Main() { System.String x = "World"; System.Console.WriteLine("Hello " + x); }}Compile withcsc -t:exe -out:HelloUser.exe -r:MSCorLib.dll HelloUser.csExecute MSIL Managed Code withHelloUserThe code runs within the Common Language Runtime (CLR)MSCorLib.dll is oneamong many assemblieswe can include. The Basic Class Library isspread over a couple of assemblies.MyApp is in theglobal namespaceHello World 1 Full NamespacesThe .exe file has bootstrap code to runthe .NET run time.895-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.// Hello World 2 in C#using System;class MyApp { public static void Main() { String x = "World 2"; Console.WriteLine("Hello " + x); }}Compile Withcsc HelloUser.csExecute The MS Intermediate Language .exe file withHelloUserHello World 2 Using System995-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.// Hello World 3 in C#class MyApp { public static void Main() { String x = "World 3"; Console.WriteLine("Hello " + x); }}HelloUser.cs(9,7): error CS0246: The type or namespace name 'String' could not be found (are you missing a using directive or an assembly reference?)And more errors…Hello World 3 Without System1095-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.Type System Unification 0•The object class is the ultimate base class for both reference types and value types•Simple types in C# alias structs found in System•So, Simple types have methods int i = 3; string s = i.ToString();•But follow the same semantics as simple types of old, e.g., i = 3; j = i; j = 2; // i still 31195-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.class MyMathApp { public static void Main() { float x = 2.3F; // Semantics are the same System.Single y = 1.0F; // Only the syntax differs float z = x + y; System.Console.WriteLine("Result = " + z); }}Type System Unification 11295-702 OCTMaster of Information System ManagementQuickTime™ and aTIFF (Uncompressed) decompressorare needed to see this picture.// All types derive from System.Object (which corresponds to the primitive object// type.)class MyMathApp { public static void Main() { float x = 2.3F; // 2.3 is a double so use 'F' for float System.Single y = 1.0F; float z = x + y; object o = z; // object is part of C#, Object is in System System.Console.WriteLine("Object Result = " + o); }}Object Result = 3.3Type System Unification 21395-702 OCTMaster
View Full Document