Application Refactoring With Design Patterns
Upcoming SlideShare
Loading in...5
×
 

Application Refactoring With Design Patterns

on

  • 3,303 views

This presentation will describe the object-oriented substructure ...

This presentation will describe the object-oriented substructure
developed to manage, validate, and process survey data.
Experience with classes or objects or design patterns is not
necessary for this presentation, but it will help to know how to
code a class and instantiate an object with SCL (SAS Component Language).

Statistics

Views

Total Views
3,303
Slideshare-icon Views on SlideShare
3,295
Embed Views
8

Actions

Likes
0
Downloads
28
Comments
0

3 Embeds 8

http://marktab.net 4
http://www.marktab.net 2
http://www.slideshare.net 2

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Application Refactoring With Design Patterns Application Refactoring With Design Patterns Presentation Transcript

    • Application Refactoring with D i P tt ith Design Patterns Mark Tabladillo, Ph.D. March 31, 2003
    • Introduction The YTSS (Youth Tobacco Surveillance System) started in 1998 y ) YTS = Youth Tobacco Survey GYTS = Global Youth Tobacco Survey Since 1998, over 1,000,000 surveys have b h been processed f 35 states and d for t t d 100 international sites
    • Design Patterns Inherency “Design Pattern” = Routine solution to a reoccurring p g problem Observer Pattern = Model/View Mediator Pattern = SAS/AF Frame Singleton Pattern = Frames and SCL standalone code Point: Patterns are inherently inside SAS and operating systems
    • How to Start with Design Patterns Shalloway and Trott (2002), Design p Patterns Explained Patterns do not stand alone, but interact Pattern relationships improve with refactoring (defined as the intentional restructuring of classes)
    • When to Create Design Patterns A previous project has reusable code Current code is large Good for long-term or complex applications (especially to allow for modifications)
    • Specific Development Strategy Customized nonvisual classes First version 6 12 was used 6.12 Datasets generate code (see other paper) Conversion to version 8 and consolidation lid ti
    • Output Class Changing printer orientation (landscape vs. portrait) p ) Changing printer font and font size In Windows 2000 margin specification 2000, needs to drive linesize and pagesize
    • Win32 Class Put all Windows functionality in one p place Accesses a table with Windows 32 errors Calls Win32 API with SASCBTBL Interfaces a windows Visual Basic I t f i d Vi lB i control
    • Region Class “Region” is the base level of y customization for surveys Drives the assignment of LIBNAMEs Defines output filenames
    • SurveyAnalyzer Strategy Design Pattern – have five p g programs to run, and the class , determines which one to use Consolidation: Later refactored along with the region class
    • Dataset Attribute Classes ATTRC/ATTRN information Open and Close Datasets Children have: Al Always VARNUM Sometimes VARLEN Sometimes VARTYPE S ti Sometimes values
    • Final Classes Expansion: enumerated structure Hierarchy SurveyYear State Region AnnualCode (periodically updated) SentenceParser (functional)
    • New Changes Expansion: enumerated structure SurveyYearAnalyzer StateAnalyzer RegionAnalyzer Analyzer classes form abstract base for processes, processes now in their own classes Total Classes Currently: 44
    • Applying Refactoring How organized is organized?? Refactoring is choreographed Sometimes expansion Sometimes consolidation Coding frameworks are increasingly important, important even for web work
    • Four Lessons Recognize that all intentionally structured languages have inherent design pattern structure. Consider adding design patterns even if it means more code.d Expect to continuously apply refactoring to large or complex applications. l l li ti Continuously learn and apply design patterns.