1 / 14

COMS W4156: Advanced Software Engineering

COMS W4156: Advanced Software Engineering. Prof. Gail Kaiser Kaiser+4156@cs.columbia.edu http://york.cs.columbia.edu/classes/cs4156/. .NET Components. What is .NET?. An object-oriented software development platform, with

drew-bray
Download Presentation

COMS W4156: Advanced Software Engineering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMS W4156: Advanced Software Engineering Prof. Gail Kaiser Kaiser+4156@cs.columbia.edu http://york.cs.columbia.edu/classes/cs4156/ Kaiser: COMS W4156 Fall 2007

  2. .NET Components Kaiser: COMS W4156 Fall 2007

  3. What is .NET? • An object-oriented software development platform, with • peer to peer multi-language interoperability (as opposed to Java’s “native methods”) • common intermediate language (CIL) • common language runtime (CLR) • common data representationbased on XML • TheC# language is the most comfortable for .NET, but not the only one and not mandatory Kaiser: COMS W4156 Fall 2007

  4. How Does Multi-Language Support Work? • A compiler from any languagecompiles an application into CIL (also referred to asMS IL – Microsoft Intermediate Language) • The compiler also generatesmetadata in XML – information on the types and named entities (classes, methods, fields, etc.) defined and used in the application • At runtime, the CIL code isJust-in-Time (JIT)compiledinto the target platform’s native code • The CLR uses the metadata to perform runtime checks for type-safety and security (“managed code”) Kaiser: COMS W4156 Fall 2007

  5. Ngen Common Language RuntimeExecution Model Source code VB C# C++ Compiler Compiler Compiler Assembly Assembly Assembly MSIL Common Language Runtime JIT Compiler CLR Native code Managed Code Managed Code Managed Code Unmanaged Code CLR Services Operating System Services Kaiser: COMS W4156 Fall 2007

  6. So Where’s the Component Model? COM+ (and Web Services) Kaiser: COMS W4156 Fall 2007

  7. .NET Serviced Components • COM+ 1.5 = COM 1.0 with performance and scaling improvements • .NET components derive from the System.EnterpriseServices.ServicedComponent class and use the System.EnterpriseServices namespace • Must be registered with a COM+ application • But can also use COM+ services outside components Kaiser: COMS W4156 Fall 2007

  8. Example Kaiser: COMS W4156 Fall 2007

  9. Example using System.EnterpriseServices; using System.Runtime.CompilerServices; using System.Reflection; // Supply the COM+ application name. [assembly: ApplicationName("BankComponent")] // Supply a strong-named assembly. [assembly: AssemblyKeyFileAttribute("BankComponent.snk")] namespace BankComponent { [Transaction(TransactionOption.Required)] public class Account : ServicedComponent { [AutoComplete] public bool Post(int accountNum, double amount) { /* Updates the database; no need to call SetComplete. Calls SetComplete automatically if no exception is generated. */ return false; } } } Kaiser: COMS W4156 Fall 2007

  10. .NET vs. COM+ • No IUnknown base interface • No reference counting, uses garbage collection • No class factories, the .NET runtime resolves to a particular class within an assembly • No apartments, programmer synchronizes (or uses automatic .NET synchronization domains) Kaiser: COMS W4156 Fall 2007

  11. .NET vs. COM+ • No IDL (Interface Definition Language) files, the compiler generates the assembly metadata and dependencies are captured during compilation (in manifests) • No GUIDs (globally unique identifiers), instead uses scoping based on namespaces and “strong names” (unique digital signature using an encryption key) • Evidence-based security (where component came from), in addition to role-based • Doesn’t rely on registry, reduces DLL Hell Kaiser: COMS W4156 Fall 2007

  12. IDA #3 Due Next Week! • Tuesday 2 October, 10am • Assignments posted on course website • Submit via CourseWorks • Individual Development Assignment #3 Kaiser: COMS W4156 Fall 2007

  13. Upcoming Deadlines • Revised project concept due October 9th – first iteration begins • First iteration plan due October 16th • First iteration progress report due October 23rd • First iteration demo week October 30th – November 8th • First iteration final report due November 9th Kaiser: COMS W4156 Fall 2007

  14. COMS W4156: Advanced Software Engineering Prof. Gail Kaiser Kaiser+4156@cs.columbia.edu http://york.cs.columbia.edu/classes/cs4156/ Kaiser: COMS W4156 Fall 2007

More Related