generation gap by kurt rehwinkel l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Generation Gap By Kurt Rehwinkel PowerPoint Presentation
Download Presentation
Generation Gap By Kurt Rehwinkel

Loading in 2 Seconds...

play fullscreen
1 / 9

Generation Gap By Kurt Rehwinkel - PowerPoint PPT Presentation


  • 341 Views
  • Uploaded on

Generation Gap By Kurt Rehwinkel. Generation Gap. Introduction – What is the Generation Gap? The author describes it as a pattern. It is potentially as much a strategy as much as a pattern. Generation Gap: Intent.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Generation Gap By Kurt Rehwinkel' - dominique


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
generation gap
Generation Gap
  • Introduction – What is the Generation Gap?
    • The author describes it as a pattern.
    • It is potentially as much a strategy as much as a pattern
generation gap intent
Generation Gap: Intent
  • Support for auto-generation and regeneration of source code by software development tools.
  • To modify or extend generated code such that the regeneration of the source does not effect the implementation.
generation gap applicability
Generation Gap: Applicability
  • Code is generated automatically.
  • Generated code is encapsulated.
  • Regenerated code retains form in interface and instance variables.
  • Generated classes do not tend to be integrated into inheritance hierarchies. To do so requires the ability to specify super-classes and may require multiple inheritance support in the language.
generation gap participants
Generation Gap: Participants
  • CoreClass
    • Abstract class containing tool generated implementation.
    • Never modified by hand.
    • Written and/overwritten by the software development tool.
  • ExtensionClass
    • A trivial subclass of CoreClass.
    • Provides concrete implementations and extends or overrides the behavior in the CoreClass.
    • Preserves developer generated software implementations.
  • Client
    • Instantiates and refers ONLY to ExtensionClass.
generation gap example
Generation Gap: Example

class Clock : public Clock_core {

public:

Clock(const char*);

void Run();

virtual void SetTime();

virtual void SetAlarm();

virtual void Snooze();

virtual void Update();

private:

void GetSystemTime(int& h, int& m, int& s);

void SetSystemTime(int h, int m, int s);

void Alarm();

private:

float _time;

float _alarm;

};

class Clock_core {

public:

Clock_core(const char*);

protected:

Interactor* Interior();

virtual void SetTime();

virtual void SetAlarm();

virtual void Snooze();

protected:

Picture* _clock;

SF_Polygon* _hour_hand;

SF_Rect* _min_hand;

Line* _sec_hand;

};

generation gap consequences
Generation Gap: Consequences
  • The Good
    • Modifications/Implementations are decoupled from generated code.
    • CoreClass and ExtensionClass may be developed and tested independantly.
  • The Bad
    • Doubles the number of classes.
    • Changes to interfaces in the tool must be reflected in the Extension.
  • The Ugly
    • Integration into inheritance may be difficult.
generation gap related pattern
Generation Gap: Related Pattern
  • Use of other patterns such as Template Method, Factory methods, or Strategy Patterns may serve to make generated code more flexible and reusable.