O'Reilly logo

Shared Source CLI Essentials by Ted Neward, Geoff Shilling, David Stutz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Transforming Metadata in the CLI

The sequence of annotation, transformation, and continuous refinement results in constant production of metadata and interpretation of that metadata. As we mentioned in Chapter 1, this sequence defines a data-driven architecture, onto which it is easy to graft new services. The integration costs of a data-driven architecture for extensibility are low compared to one based on API definitions, and since component integration is the most important feature enabled by the CLI specification, a data-driven architecture is the right choice for the task. Using this approach, one subsystem’s data becomes another subsystem’s executable code. (The programming community has known this since the fifties, and it is as good an idea now as it was then.)

Figure 8-1 shows some of the transformations and augmentations that occur in the SSCLI. Starting from the left, an abstract type, written as code in a high-level programming language, is transformed by a high-level compiler into CIL and type metadata, which is bundled into an assembly. After this, file loaders, module loaders, and class loaders sequentially transform an on-disk PE file to an in-memory structure that is optimized for the JIT compiler and the execution engine. With these structures in place, the JIT compiler can produce native code from the intermediate representation. Unlike traditional compilers, a JIT compiler makes decisions in the context of the current execution environment; as it generates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required