SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 591 | Next

Steven Kelly and Juha-Pekka Tolvanen

"Domain-Specific Modeling"

Java is particularly strong in this ?¬?eld, in part
because of the language??™s tendency to forbid many tricks commonly used to in?¬‚uence
already compiled code. C# allows the use of partial class ?¬?les: the framework could
contain the main class ?¬?le, and the generator could produce an extra partial class ?¬?le
for that class, adding new behavior.
These approaches are best used to provide reasonably limited amounts of code to
the framework. Should you ?¬?nd the need to add signi?¬?cant amounts of code, or add
code that also de?¬?nes newor extended data structures, you will probably want to move
on to the next section.
FIGURE 12.6 Generated function hooking itself into framework
322 DOMAIN FRAMEWORK
12.3.3 Customizable and Extensible Components
In many object-oriented component frameworks, a large share of the workload is
shouldered by abstract classes in the framework. The developer building on the
framework uses and extends these classes by subclassing them. This allows the full
range of behavior customization, extension, and modi?¬?cation:
. A subclass can ?¬?ll in data structures de?¬?ned in the superclass.
. A subclass can provide concrete implementations of methods de?¬?ned as
abstract in the superclass.
. A subclass can add new data members for its code to use.
. A subclass can add new methods for its code to use.


Pages:
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6