THROUGH the loanking glas

zhaozj2021-02-11  160

Due to the limited ability, it is impossible to translate its original flavor, so there is no translation. I hope everyone will forgive me :) THROUGH the loanking glass july 2001

Subtle Signs Point To a Marked Transformation, A Dismation, A DISRUPTIVE TECHNOLOGY ON The Horizon.

by grady booch

<-! IMPORT ARTICLE TEXT HERE -> Visualize, for a moment, the most recent application you've developed Focus on an interesting code fragment, a particularly elegant script or method, or something in the main line of a primary use. case realization. Imagine seeing that code, just as you created it, in your IDE or editor. Now, pop up one level of abstraction and consider the neighboring classes that provide the context for your code along with the instances of those classes that collaborate as your code runs. Line by line, walk through your code and imagine how its execution progresses, touching and manipulating the state of each instance. Finally, pop down one level of abstraction and visualize your compiler's mapping of that code to the raw instructions that ultimately Direct Your System's underlying hardware.

The existence of this one-to-one mapping of code (as seen in your IDE) to execution (on your target hardware) is a primary conceptual model that millions of programmers have in their heads every day as they code. It's also a primary model that generations of programmers over the past several decades have used. All in all, this von Neumann model of the world is wonderfully simple yet powerful, for it helps us build complex systems that are ultimately grounded in useful, executable artifacts.

It's also a complete illusion.

Galaxies of AbstractionsAs I've said in my earlier writings, the task of the software development team is to create an illusion of simplicity We build abstractions to help us create this illusion;. These abstractions are an essential way we mitigate the intellectual complexity that lurks within our systems. Indeed, the entire history of software engineering can be traced by studying the manner in which our programming languages ​​and methods have tried to raise the level of abstraction in our systems. That's why structured programming was effective in its time-those methods provided guidance in helping us manage the complexity of algorithmic decomposition. That's also why the object-oriented movement has been effective in its time-these methods help us organize our systems around societies of collaborating objects.Visualize again the system architecture you considered earlier. If IT's Non-Trivial, You'll See a universe of classes, Some Clumped Closely Together, Some More Distant, Dependi NG Upon Their Degree of Semantic Relation. If You've Used Patterns to Direct Your Design, You'll See Common Structures and Behaviors That Cut Across these Galaxies of Abstractions.

Yet, at runtime, all of this beautiful structure evaporates. We raise our systems from the ground up, place a scaffolding of abstractions around them as they grow-and tear down that scaffolding once we're done. We might keep some scaffolding around or we could simply make it easy to reassemble if we need to extend, repair or preserve the system we've built. Ultimately, however, all of these abstractions are irrelevant to the system itself once it's in use.

Three Subtle SignsThere came a time when I'd reached "nerdvana," that state in which I was able to peer beneath the covers of the programming universe and witness the brilliant simplicity of its underlying machinery. The first time I really grasped the wonderful power of object-oriented abstractions, I thought I'd seen the ultimate model on which all kinds of complex systems could be grown. I also thought I'd encountered the most elemental structures of development-similar to the physicist's elemental model of protons, electrons And Neutrons That Described Phenomena At The Atomic Level.however, I Was Wrong: There's Something Deeper, Something That Truly Beyond Objects.

Admittedly, this is not a concept that's easy to explain, because I'm still so steeped in an object-oriented view of the world. However, just as a sailor can sense a changing sea, I note subtle signs that point to a Marked Transformation, A Disruptive Technology, on the horizon.

From Where I Stand, I See Three Such Signs.

First, there's the patterns movement (The seminal work in patterns is Design Patterns:. Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides [the Gang of Four], published by Addison-Wesley in 1995 , which has been followed by a veritable flood of pattern books over the past several years.) At the time-and I still believe it-I declared patterns to be the one really refreshing idea since objects entered the scene. Object-oriented abstractions are great, but patterns are something subtly different, something from a truly alternative dimension of programming reality. Although classes help us organize our systems, patterns help us organize our classes, giving us guidance in extracting and exploiting common structures and behaviors. Whereas the mapping of Classes to Executables Is Only A Modest Conceptual Leap, The Mapping of Patterns To Classes and the MAPPINGTABLES IS A Bit Deeper, But Well Worth The Effort for The Complexity-ManagementM ent capacity that they provide. Patterns are indeed a sign of a break from the traditional von Neumann model of computation, because they name things that are somewhat orthogonal to the basic mappings of code to executables we have in our heads.

Second, there's the growing understanding of the importance of multiple views in the science and practice of software architecture. In "The 4 1 View Model of Software Architecture" (IEEE Software, Nov. 1995), Philippe Kruchten observes that there is no single , elementary view of a system sufficient to describe its architecture; rather, different stakeholders best view a complex system from different perspectives Kruchten goes on to suggest a set of necessary and potentially sufficient views (using his more recent terminology, the design, process,. implementation, deployment and use case views) that individually represent a point of entry for different sets of stakeholders and which collectively form the executable system. Perhaps Kruchten's most interesting observation is that it is reasonable-indeed, almost necessary-to grow a system by advancing Each View Somewhat Simultaneouslyly, That Process Will Reveal Tensions Among The Competing Interests of Each S .

Third, there's the emerging area of ​​aspect-oriented programming (AOP). According to the aspect-oriented programming homepage hosted by the Xerox PARC Software Design Area (www.parc.xerox.com/csl/projects/aop/), AOP is "a new programming methodology that enables the modularization of crosscutting concerns. Experience has shown that in using standard procedural or object-oriented programming languages ​​it can be difficult to modularize." AOP is subtly different than OOP, but it appears to complement-not replace -traditional OOP. AOP, in a manner similar to classic patterns and Kruchten's architectural views, recognizes that there are abstractions on a plane different than object-oriented abstractions, which in turn are on a plane different than our executable systems. Some of the seminal AOP papers include "Aspect Oriented Programming: A Position Paper from the Xerox PARC Aspect Oriented Program Project" (Xerox PARC, 1996), by Gregor Kiczales and others, and "Aspect Oriented Programming" ( ECOOP 97 [European Conference for Object-Oriented Programming 1997]), by Gregor Kiczales, John Lamping, Anurag Medbeker, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier and John Irving. (See the sidebar, "What Is Aspect-Oriented Programming? "for more information.) It's a Bird, It's a Plane, It's ... collectively, Gregor Kiczales (formerly with Xerox PARC), John Vlissides (who works for IBM), Charles Simonyi (who works for Microsoft) and I've .

We are not alone in identifying this coming change. For example, IBM Research has been working on a concept called Hyperspaces that addresses building systems through what they call multidimensional separation of concerns (see www.research.ibm.com/hyperspace/). The UML community's work to bring deeper executable semantics to the language pushes the world subtly in this direction, as well.As software practice advances, we reach out to solve problems of increasing complexity. Most of the time, our methods fall short of our reach , but as experience grows, we can codify best practices to construct a higher, stable platform from which we can reach even higher Structured programming represented one such platform;. object-oriented technology represents yet another; and multifaceted software may be our next launchpad.

What is Aspect-Oriented Programming? The latest methodology supports a new unit of software modularity that crosscuts traditional boundaries. From their earliest days, programming languages ​​have stressed various units of modularity, including subroutines, functions, procedures, modules and objects. Aspect-oriented programming (AOP) is the latest methodology to support a new unit of software modularity:.. aspects Aspects are elements such as security policies and synchronization, optimization, communication or integrity rules that crosscut traditional module boundaries At design time, a typical AOP scenario separates aspects from the classes and methods that make up application components. A code weaver (either an interpreter, compiler or pre-processor) then produces the extended classes in which aspect functionality intertwines with application components in a specific target programming language. AspectJ from Xerox PARC IS an aspect-oriented extension to the java programming logage that enables the modularization or separation of Java concerns related to error checking, design patterns, resource sharing and distribution policies. As documentation at www.aspectj.org points out, AspectJ allows Java developers to apply the "Design by Contract" style of programming popularized by the Eiffel language (www.eiffel.com) and implement pre- and postcondition testing in modular form for example, the following code implements the bounds-checking aspect of precondition testing for point-moving operations:. aspect PointBoundsChecking {pointcut setXs (int x):

Calls (Void FigureElement.setxy (x, int)) ||

Voids (Void Point.setx (x));

Pointcut setys (int y): ...;

Before (int x): setxs (x) {

IF (x max_x))

Throw New IllegaArgumentException ("x is out of bounds.");

}

Before (int y): sets (y) {

...

}

}

Similar to AspectJ, the AspectR project adds aspect-oriented programming concepts to Ruby, an open source, object-oriented scripting language from Japan that is used like Perl to process text files and to do system management tasks. As is the case with many or Most Programming Topics, The Wiki Wiki Web Is A Good Place To Start Your AOP Research: www.c2.com/cgi/wiki?aspectorientedprogramming.

-Roger Smith

转载请注明原文地址:https://www.9cbs.com/read-5390.html

New Post(0)