HMS A Modern Software Design Principle Applied To SAS Macro Programming: The Inversion Of Control Concept HMS Analytical Software GmbH - Dr. P. Warnat.

Slides:



Advertisements
Similar presentations
PhUSE 2010 Unit Testing and Code Coverage Assessment with SASUnit - Key Technologies for Development of reliable SAS Macros - HMS Analytical Software.
Advertisements

Idaho National Engineering and Environmental Laboratory What is a Framework? Web Service? Why do you need them? Wayne Simpson November.
DETAILED DESIGN, IMPLEMENTATIONA AND TESTING Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Goal Directed Design Author: Alan Cooper This article originally appeared in the September, 1996 issue of Dr. Dobb's Journal.
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
Alternate Software Development Methodologies
This presentation is intended as a detailed WebEx, to bring potential customers to an understanding of Dream Report capabilities. This presentation focuses.
1 Software Testing and Quality Assurance Lecture 2 Software Verification & Validation.
1 CODE TESTING Principles and Alternatives. 2 Testing - Basics goal - find errors –focus is the source code (executable system) –test team wants to achieve.
File Systems and Databases
1 Building with Assurance CSSE 490 Computer Security Mark Ardis, Rose-Hulman Institute May 10, 2004.
SOLID Partners and You. SOLID Partners is : A Consulting Company Specialist in Data Warehouse and Business Intelligence Solutions We help our clients.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Automating the Build Process using ANT SE-2030 Dr. Mark L. Hornick 1.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Your Interactive Guide to the Digital World Discovering Computers 2012.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
© WMD Vertrieb GmbH 2009 Welcome to WMD - Your Partner for Workflow Management & Document Consulting.
Dr. Peter Bewerunge © 2009 HMS Analytical Software GmbH Calling R Functions from SAS… PhUSE 2011 – ….with PROC IML.
Week 1 Lecture MSCD 600 Database Architecture Samuel ConnSamuel Conn, Asst. Professor Suggestions for using the Lecture Slides.
5.1 © 2007 by Prentice Hall 5 Chapter Foundations of Business Intelligence: Databases and Information Management.
Principles of Computer Security: CompTIA Security + ® and Beyond, Third Edition © 2012 Principles of Computer Security: CompTIA Security+ ® and Beyond,
I. Pribela, M. Ivanović Neum, Content Automated assessment Testovid system Test generator Module generators Conclusion.
360° view of the customer in sales, marketing and service - using the example of update.seven CRM suite Mag. Norbert Künzl| Director Financial Services.
Automating the Build Process using Ant SE-2030 Dr. Rob Hasker 1 Based on material by Dr. Mark L. Hornick.
Managing the Validation and Migration from SAS ® to 9.2 on a New Server Carey Smoak Sy Truong.
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
Aspect Oriented Programming Scott Nykl CSSE 411 Senior Seminar.
Chapter 1 Introduction to SAS ® Enterprise Guide ®
Tunis International Centre for Environmental Technologies Small Seminar on Networking Technology Information Centers UNFCCC secretariat offices Bonn, Germany.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
Real World Case Study KM Summer Institute June Rano Joshi, Vorsite.
Institute for Parallel Processing Bulgarian Academy of Sciences MySQL, PHP and Apache Server in Development of Database for Scientific Research in Defence.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Chapter 6 Server-side Programming: Java Servlets
Metadata driven application for data processing – from local toward global solution Rudi Seljak Statistical Office of the Republic of Slovenia.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
CASE STUDY: NEW NAMING CONVENTION IN SHAREPOINT David Schlachter.
LUCIDITY SOFTWARE GREATER CLARITY MAKES ORGANISATIONS MORE INTELLIGENT.
Mining Logical Clones in Software: Revealing High-Level Business & Programming Rules Wenyi Qian 1, Xin Peng 1, Zhenchang Xing 2, Stan Jarzabek 3, Wenyun.
Ad Hoc Graphical Reports Ad Hoc Graphical Reports Copyright © Team #4 CSCI 6838 Spring CSCI Research Project and Seminar Team# 4 (
Master Data Management & Microsoft Master Data Services Presented By: Jeff Prom Data Architect MCTS - Business Intelligence (2008), Admin (2008), Developer.
Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.
Software testing techniques Software testing techniques Object-oriented software testing Presentation on the seminar Kaunas University of Technology.
Implementing and Using the SIRWEB Interface Setup of the CGI script and web procfile Connecting to your database using HTML Retrieving data using the CGI.
Design and Planning Or: What’s the next thing we should do for our project?
Dime.Scheduler Hold on…the broadcast will start in a minute. Resource Planning with.
On Implementing CSPA Specifications for Editing and Imputation Services Donato Summa, Monica Scannapieco, Diego Zardetto, Istat, Italy Istituto Nazionale.
Clinetics Data Merge Overview Andreas Schwarzer and Ralf Schaefer-Pregl – Clinical Data Center, Bayer Vital GmbH, Leverkusen.
Final Fantasy ½: IOC Overview Team Q CSE 403 Winter ‘03 I’ve got something special for you.
Eclipse.NET An Integration Platform for ProjectIT-Studio João Saraiva IST & INESC-ID (GSI)
Rationale Databases are an integral part of an organization. Aspiring Database Developers should be able to efficiently design and implement databases.
RPA – Robotic Process Automation
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Using Stored Procedures ADO.NET - Lesson 07  Training time: 15 minutes  Author:
Template Package  Presented by G.Nagaraju.  What is Template Package?  Why we use Template Package?  Where we use Template Package?  How we create.
Your Interactive Guide to the Digital World Discovering Computers 2012 Chapter 13 Computer Programs and Programming Languages.
Enterprise PHP PHP applications in the big business.
Text by: Lambert and Osborne
Datacenter Transformation
ICT Database Lesson 1 What is a Database?.
IBM AS 400 online Training in Hyderabad
Un</br>able’s MySecretSecrets
BRING TWO WORLDS TOGETHER
File Systems and Databases
Azure Enables Developer to Produce a Digital Solution That Delivers Invaluable Data Insights Partner Logo “New Elements Constellation software exploits.
Dependency Inversion principle
Working towards a central Register : Simple, Complete and Widely Accessible September 29, 2010 Session no 5 - Register quality as a common task : Cooperation.
Demo for Partners and Customers
Presentation transcript:

HMS A Modern Software Design Principle Applied To SAS Macro Programming: The Inversion Of Control Concept HMS Analytical Software GmbH - Dr. P. Warnat PhUSE 2011

Company HMS Analytical Software is a specialist for Information Technology in the field of Data Analysis and Business Intelligence Systems Profile – 40 employees in Heidelberg, Germany – SAS Institute Partner for 15 years – Doing data oriented software projects for more than 20 years – Focus on life science industry Technologies – Analytics and Data Management: SAS, JMP, R, Microsoft SQL Server – Application Development: Microsoft.NET, Java HMS Analytical Software GmbH - Dr. P. Warnat

Our IT Services for the Life Science Industry (SAS, JMP, R and Microsoft) Independent Consulting Programming Data Management Data Mining / Analysis Training and Individual Coaching Application Development and Integration Software Validation HMS Analytical Software GmbH - Dr. P. Warnat

Two everlasting questions.... in software development: „Are we building the right product?“ (-> Validation) „Are we building the product right?“ (-> Verification) Are we done, if our code is free of errors? HMS Analytical Software GmbH - Dr. P. Warnat No! Software quality is more than lack of errors!

Overview Inversion of Control – A Software Design Concept Inversion of Control applied to SAS programming Conclusion HMS Analytical Software GmbH - Dr. P. Warnat

Inversion of Control (Ioc) General principle: implement high-level source code more independent from low-level code Dependency relations are inverted or decomposed Advantages: – more reusable code – Decoupled code with less risk of side-effects when code has to be changed HMS Analytical Software GmbH - Dr. P. Warnat

Example Task HMS Analytical Software GmbH - Dr. P. Warnat Search a directory tree for SAS files….. and für every SAS file….. generate a PDF report.

First Solution Approach To Example Task HMS Analytical Software GmbH - Dr. P. Warnat Main Program (MP) “traverseDirForSasFilesAndDoTask” Sub Program (SP) “getSimplePdfReportOfSasFile” call SP SP What if there are other tasks to be done for every SAS file in a directory tree? MP

Support several file tasks: Solution approaches For every new task, copy and rename main program and call a different Sub Program -> bad solution Create a new parameter for the main program for selection of subtask to be executed, coditional call of sub programs -> better solution Make your main program independent of actual subprograms, rather program against a certain subprogram-signature (interface); create one or more parameters defining the actual subprogram to be executed -> even better solution HMS Analytical Software GmbH - Dr. P. Warnat

Ioc Solution Approach To Example Task HMS Analytical Software GmbH - Dr. P. Warnat Main Program (MP) “traverseDirForSasFilesAndDoTask” Sub Programs (SP) “getSimplePdfReportOfSasFile” “convertSasToCsv” … Call SP X SP 1 SP 2 SP N MP Call MP( subProgram X = SP 2 ) New SP Programs can be used without changing the MP SPs sharing a common signature (interface)

Inversion of Control applied to SAS programming HMS Analytical Software GmbH - Dr. P. Warnat Simple example macros: %MACRO callTwice(aString, outputVariant); %DO i=1 %TO 2; %&outputVariant(&aString.); %END; %MEND callTwice; %MACRO simplePut(stringToOutput); %PUT(&stringToOutput.); %MEND simplePut; %MACRO upcasePut(stringToOutput); %PUT(%UPCASE(&stringToOutput.)); %MEND upcasePut; Examples for the call of the main macro are: %callTwice(testString, simplePut) %callTwice(testString, upcasePut)

Inversion of Control applied to SAS programming HMS Analytical Software GmbH - Dr. P. Warnat Application to the example task, searching a directory tree: %traverseDirForSasFilesAndDoTask( dir=C:\Temp\TestIoC, taskMacro=convertSasToCsv ) %traverseDirForSasFilesAndDoTask( dir=C:\Temp\TestIoC, taskMacro=getSimplePdfReportOfSasFile )

Inversion of Control applied to SAS programming HMS Analytical Software GmbH - Dr. P. Warnat Using a flexible number of parameter for submacros: %MACRO callTwice2(mNameToCall, mParameters); %DO i=1 %TO 2; %&mNameToCall(p0=a, %UNQUOTE(&mParameters)); %END; %MEND callTwice2; %MACRO m1(p0, p1); %PUT outputM1: &p0 &p1; %MEND m1; %MACRO m2(p0, p1, p2); %PUT outputM2: &p0 &p1 &p2; %MEND m2; %callTwice2(mNameToCall=m1, mParameters=%STR(p1=first Call)) %callTwice2(mNameToCall=m2, mParameters=%STR(p1=second, p2=Call)) Alternatives: String lists that you explicitly process with %SCAN Parameter tables consisting of name-value pairs

Conclusion HMS Analytical Software GmbH - Dr. P. Warnat The IoC can be easily applied to SAS programming Macros only rely on a certain interface describing a group of sub-macros.  More reusable code that is decoupled from specific sub- macros Caller-macros that are calling sub-macros do not have to be changed if you need to call a new variant of the sub-macro  Less risk of side-effects when you change your code

HMS Analytical Software GmbH - Dr. P. Warnat Dr. Patrick René Warnat HMS Analytical Software GmbH Rohrbacher Str Heidelberg Germany Dr. Patrick René Warnat HMS Analytical Software GmbH Rohrbacher Str Heidelberg Germany Thank you for your attention