Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Outline
In the last lecture, we continued our discussion of Objects…
By finishing our our own custom Collection: JTrainCollection
By inheriting from the .NET System Class, CollectionBase.
And illustrated its use, with a generalized Multiple-JTrain Example,
Including the addition of two Shared Members.
Examples:
When a file is to be written or read, a standard DialogBox is provided:
From the API’s Common Dialog Box Library.
When a Window is to be drawn on the screen:
The API’s User Interface is used, together with the Common Control Library.
Application Isolation:
Individual applications should run separately :
So that they may crash separately from the OS.
Idea: Prevent software-based system crashes (Blue Screen of Death)
Applications now have built-in security:
Code requires ‘evidence’ to run in CLR (determined via programmer-set policies).
In contrast, old Windows applications have unlimited access to system data.
Inter-language Interoperability:
Available Data Types are shared by all managed languages…
Exception Handling and Memory Management:
Provide appropriate structures for error recovery (we’ve discussed this).
Formally, the CLR consists of 4 elements:
A JIT Compiler and a Virtual Execution System (VES, or Virtual Machine)
The Common Language Runtime (CLR) and Specification (CLS)
Achieving Language Interoperability
Language interoperability in .NET goes beyond common compilation:
The idea is really much more general:
It would be best if classes which are defined/extended in one language…
Are then freely available to all.
Example: Our JTrain Class should be extendable by a C# Programmer
So that the Classes will function properly in a C# program (!)