Presentation is loading. Please wait.

Presentation is loading. Please wait.

Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.

Similar presentations


Presentation on theme: "Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc."— Presentation transcript:

1 Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc.

2 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Agenda Introduction Demo Requirements Getting Started Interfaces Examples Wrap-up

3 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction History of SAS and ‘open environment’ What is a custom add-in How does an add-in compare to a SP

4 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction Pre v8 Multi-Platform Stand alone

5 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction v8 IOM Opened SAS

6 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction v9 Studios DI, Cube Studio Java client

7 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction Enterprise Guide 4.1.NET application Integration into MS Office “SAS is too hard to use” Drag-and-Drop Interface Project oriented SAS Tasks encapsulate underlying PROC syntax Process flows link Tasks and Data

8 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction SAS Enterprise Guide SAS on Windows SAS on Mainframe SAS on UNIX Code Results

9 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction An Enterprise Guide project can be thought of as a basket, or container: Healthcare To which you assign a name In which you place data source(s) Within which you define tasks

10 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction Interfaces – Part 1 EG Custom Add-in Tasks Friendly front-end to a existing SAS programmes Access SAS and non-SAS resources Package SAS PROCS not part of EG

11 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Introduction Interfaces SAS Stored Process SAS programme that is centrally managed Two components Metadata programme Runs on a server Simple user interface

12 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Agenda Introduction Demo Requirements Getting Started Interfaces Examples Wrap-up

13 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Agenda Introduction Demo Requirements Getting Started Interfaces Examples Wrap-up

14 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Requirements Fundamentals Visual Studio.NET Framework v1.1 EG 4.1 A ‘problem’ or solution

15 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Requirements Implement Interfaces

16 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Main Entry: in·ter·face Pronunciation: 'in-t&r-"fAs Function: noun 1 : a surface forming a common boundary of two bodies, spaces, or phases 2 a : the place at which independent and often unrelated systems meet and act on or communicate with each other b : the means by which interaction or communication is achieved at an interface - in·ter·fa·cial /"in-t&r-'fA-sh&l/ adjectiveinteraction

17 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Main Entry: in·ter·ac·tion Pronunciation: "in-t&r-'ak-sh&n Function: noun : mutual or reciprocal action or influence - in·ter·ac·tion·al /-shn&l, -sh&-n & l/ adjective

18 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Requirements Interfaces – Part 2 Separates the name of a method from its implementation ‘Contract’ between your programme and SAS

19 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Agenda Introduction Demo Requirements Getting Started Interfaces Examples Wrap-up

20 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Getting Started Project templates Available from the SAS site Adds a new project type to Visual Studio Creates a project with the required interfaces

21 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Getting Started Rules to Remember in Visual Studio The project name and directory When you create the new project Rename the default files and classes CustomTask1, CustomTaskForm1 Change the properties of the add-in reference Change the strings in ISASTaskDescription Search for ‘PLACEHOLDER’

22 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Getting Started Demo

23 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.New project

24 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 2 1.Project Type 2.SAS EG 4 AddIn (from SAS template) 3.Project Name and Location 3

25 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Default File Names need to be changed

26 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Names in the project need to be changed

27 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.References 2.Local Copy property set to FALSE 2

28 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Project Properties

29 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Configuration Properties set Debug Mode to Program NOTE: click Apply after changing the Debug Mode to ‘un-grey’ the Start Program property

30 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Configuration Properties Navigate to your EG executable

31 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Change the descriptions in the source code

32 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Strings are changed

33 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Build the project

34 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Demo – creating a project 1 1.Success!!

35 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Agenda Introduction Demo Requirements Getting Started Interfaces Examples Wrap-up

36 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces Separates the name of a method from its implementation ‘Contract’ between your programme and SAS

37 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces You agree you will implement ISASTaskAddin ISASTaskDescription ISASTask You can implement if you want ISASTaskSubmitSink ISASTaskDataSink

38 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskAddin This connects the application (i.e. Enterprise Guide) to your Add-in. It provides basic information back to EG. EG will not recognize your add-in if you do not implement this interface. The template automatically creates all the members of the interface for you.

39 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskDescription This interface is used by the application to determine basic task information which is not dependent on the task state. ISASTaskDescription2 is an optional extension of this interface with a few additional properties for advanced features. Implement one or the other

40 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces - ISASTask Public Properties Label The label of an instance of the task as it appears in the project. Both a “property set” and a “property get” have to be implemented OutputDataCount The number of output datasets the task expects to create. Only a “property get” has to be implemented

41 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTask This interface is used by the application to control the runtime state of the add-in

42 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTask2 Extends ISASTask with additional properties and methods Implement SASTask OR SASTask2

43 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces Properties ISASTaskAddin ISASTaskDescription ISASTask You can implement if you want ISASTaskSubmitSink ISASTaskDataSink

44 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskSubmitSink Supplies notifications to the add-in that the input data has changed, or that it needs to take some action regarding output data that it intends to create.

45 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskDataSink Supplies notifications to the add-in that the input data has changed, or that it needs to take some action regarding output data that it intends to create.

46 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces SAS agrees to implement ISASTaskConsumer ISASTaskData ISASTaskDataAccessor ISASTaskDataDataColumn SAS agrees it might implement ISASTaskSubmit ISASTaskUtilities

47 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskConsumer Provides information about what the application supports and access to other supported interfaces. Also provides access to options specific to the particular instance of the add-in. The implementation of this interface by a host application is required, although not all properties and methods are required to be supported.

48 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskData These interfaces allow the task to obtain information about the active data. Different host applications might not be able to provide values for some of these methods.

49 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskDataAccessor These methods allow the task to access the data values in a specific data object.

50 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskDataColumn Provides information about a single column in a data source

51 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces SAS agrees to implement ISASTaskConsumer ISASTaskData ISASTaskDataAccessor ISASTaskDataDataColumn SAS agrees it might implement ISASTaskSubmit ISASTaskUtilities

52 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskSubmit This interfaces allow the task to submit SAS code from within the task.

53 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces ISASTaskUtilities This interfaces allow the task to surface some utility functionality to the task.

54 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Interfaces Examples

55 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Recap Download the Templates from SAS Create the initial project Change the default name and location of the project Change the string descriptors sFriendlyName etc Set the Copy Local property to false Compile the project

56 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Recap Set the options for the project debug using program Compile and step through with the debugger Register the add-in with the Add-in manager Make sure it runs

57 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Recap Do your thing!! Change code Compile Debug Copy completed DLL to the deployment folder C:\Program Files\SAS\Shared Files\BIClientTasks\Custom

58 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Recap Go for a beverage of your choice to celebrate a job well done

59 Separating the Interface from the Engine: Creating Custom Add-in Tasks for Enterprise Guide ® Peter Eberhardt, Fernwood Consulting Group Copyright © 2007, SAS Institute Inc. All rights reserved. SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. peter@fernwood.ca


Download ppt "Separating the Interface from the Engine: Creating Custom Add-in Tasks for SAS Enterprise Guide ® Peter Eberhardt Fernwood Consulting Group Inc."

Similar presentations


Ads by Google