CSC/ECE 517 Fall 2010/ch5 5f SN: Difference between revisions
(first submission) |
(submit of 5f_sn) |
||
Line 3: | Line 3: | ||
__TOC__ | __TOC__ | ||
= | =Background= | ||
[http://en.wikipedia.org/wiki/ | [http://en.wikipedia.org/wiki/SAS_(software) SAS software] provides a suite of software for manipulation, analysis and reporting of large datasets. First released in 1966, SAS has grown into a comprehensive set of commercial products that run on multiple platforms, including Unix, Windows, and IBM mainframes. While SAS software provides its own data storage mechanism, capabilities exist to extract information from external DBs into SAS for analysis and reporting. | ||
SAS is a proprietary set of software products developed by [http://en.wikipedia.org/wiki/SAS_Institute_Inc. SAS Institute, Inc.] | |||
[http://www.sas.com/technologies/bi/appdev/af/index.html SAS/AF (SAS Applications facility)], introduced in 1985, extended SAS with a set of tools allowing creation of GUIs. | |||
SAS/AF provided two primary components: AF Frames, which allow create a graphic display comprised of GUI widgets, and the SAS Component Language which provides an interface between the GUI and the base SAS software. | |||
Together, these components formed a [http://en.wikipedia.org/wiki/Model%E2%80%93View%E2%80%93Controller model/view/controller (MVC)] application architecture, with SAS tables, SAS/AF Frames, and SAS/SCL forming model, view, and controller functions, respectively. | |||
SAS/AF | [http://support.sas.com/documentation/cdl/en/sclref/59578/HTML/default/a000308113.htm SAS/SCL (SAS Component Language, originally called Screen Control Language)] provides the mechanisms for accessing window variables and enabling event driven responses to SAS/AF user interfaces. SCL programs associated with a UI frame have the following general structure: | ||
<pre> | |||
INIT: (This section runs when the frame opens) | |||
SCL Code; | |||
RETURN; | |||
MAIN: (This section responds to user events) | |||
SCL Code; | |||
RETURN; | |||
TERM; (This section runs when frame closes) | |||
SCL Code; | |||
RETURN; | |||
</pre> | |||
SAS frames can contain a number of component objects that specify the specific information that will be displayed and interaction with the user, as well as interaction between components and underlying SAS data. | |||
=Overview of SAS Component Object Model= | |||
The [http://support.sas.com/documentation/onlinedoc/v8/whatsnew/tw5508/z1313746.htm SAS Component Object Model (SCOM)] provides a framework for developers to create modular user interface elements. | |||
SCOM Objects consist of: | |||
* Attributes (which contain info traditionally stored as instance variables, as well as metadata) | |||
* Methods | |||
* Events sent by the component | |||
* Event handlers that respond to other events | |||
* Supported and Required Interfaces | |||
SCOM builds applications using Component Objects, which can represent viewers (classes that display info), models (classes that manage the data tables), or defined interfaces between viewers and models. | |||
SCOM deviates somewhat from a traditional MVC architecture by tightly coupling controller functions into both model and view objects, essentially creating a model/view architecture. | |||
SAS provides a number of predefined view, model, and interface classes which can be used as-is for rapid application development or extended to create specialized versions. | |||
[[Image:5f_sn_pic1.jpg]] | |||
There are several mechanisms by which SCOM objects can communicate: | |||
* attribute linking, which allows modification of a component's attributes when another component's attribute is changed. | |||
* model/view communication, which enables communication using a set of common methods defined by an interface. | |||
* event handling, which enables a component to send an event that another component can respond to by using an associated event handler. | |||
SCOM Objects can also be configured to "drag-and-drop" attributes between each other. | |||
=SCOM Models= | |||
SCOM model objects are able to access methods for accessing and modifying data. | |||
SAS/AF models can provide access to SAS tables, SAS catalogs and entries, and external files. Models can be specified to support a particular interface to allow communication with viewer objects. | |||
SCOM | =SCOM Views= | ||
SCOM Viewer objects display and interact with users and other models to create a visual application. | |||
A number of pre-defined widgets exist, including: | |||
* charts, histograms | |||
* check boxes, combo boxes, radio boxes, and list boxes | |||
* icons | |||
* list boxes | |||
* maps | |||
* push buttons | |||
* scrollbars | |||
* text entry fields, text labels | |||
These viewer classes can be extended in user defined classes. | |||
=SCOM Interfaces= | |||
Interface objects provide a set of methods for model/view component communication. | |||
* | SAS/AF provides the following built-in interfaces: | ||
* Static String List | |||
* Range | |||
* | |||
Like other SCOM classes, users can define their own interfaces for model/view interaction | |||
As an example, to display a list of colors in a list box, the built-in ColorListModel which supports the StaticStringList interface can be linked to a built-in List Box viewer object that requires the same interface. | |||
The linkage between model and viewer object can be made using SCL code, or using the graphic development environment (which will allow the linkage due to the common interface supported by both objects). | |||
= | =SCOM Pros/Cons= | ||
SCOM Advantages: | |||
* While SAS software is proprietary, its tightly integrated development suite including IDE allows rapid development | |||
* GUI displays can be created in a near-WYSIWYG fashion using predefined widgets, thus minimizing required View coding | |||
* Commonly used objects are predefined | |||
* SCOM is available on legacy enterprise systems such as IBM mainframes | |||
* SCOM is integrated with SAS, which brings a wealth of data manipulation, data mining, and statistical capabilities to applications | |||
SCOM Disadvantages: | |||
* A proprietary software product, so no ability to enhance the base product | |||
* Clients require SAS to be installed. No generic web browser deployment model for applications | |||
=References= | =References= | ||
# [http://en.wikipedia.org/wiki/ | # [http://www.sas.com SAS] | ||
# [http://en.wikipedia.org/wiki/SAS_(software) Wikipedia, SAS] | |||
# [http://en.wikipedia.org/wiki/SAS_Institute_Inc. Wikipedia, SAS Institute] | |||
# [http://www.sas.com/technologies/bi/appdev/af/index.html SAS/AF (SAS Applications facility)] | |||
# [http://tdiasug.dartmouth.edu/presentations/20040618_sk_af.ppt SAS/AF presentation by Stephen Kearing at SAS Users Group] | |||
# [http://support.sas.com/documentation/cdl/en/sclref/59578/HTML/default/a000308113.htm SAS/SCL (SAS Component Language)] | |||
# [http://www.tau.ac.il/cc/pages/docs/sas8/sclr/z0635650.htm SAS OO Concepts Reference: Object-Oriented Development and the SAS Component Object Model] |
Latest revision as of 23:05, 2 November 2010
SAS Component Object Model
Background
SAS software provides a suite of software for manipulation, analysis and reporting of large datasets. First released in 1966, SAS has grown into a comprehensive set of commercial products that run on multiple platforms, including Unix, Windows, and IBM mainframes. While SAS software provides its own data storage mechanism, capabilities exist to extract information from external DBs into SAS for analysis and reporting. SAS is a proprietary set of software products developed by SAS Institute, Inc.
SAS/AF (SAS Applications facility), introduced in 1985, extended SAS with a set of tools allowing creation of GUIs. SAS/AF provided two primary components: AF Frames, which allow create a graphic display comprised of GUI widgets, and the SAS Component Language which provides an interface between the GUI and the base SAS software. Together, these components formed a model/view/controller (MVC) application architecture, with SAS tables, SAS/AF Frames, and SAS/SCL forming model, view, and controller functions, respectively.
SAS/SCL (SAS Component Language, originally called Screen Control Language) provides the mechanisms for accessing window variables and enabling event driven responses to SAS/AF user interfaces. SCL programs associated with a UI frame have the following general structure:
INIT: (This section runs when the frame opens) SCL Code; RETURN; MAIN: (This section responds to user events) SCL Code; RETURN; TERM; (This section runs when frame closes) SCL Code; RETURN;
SAS frames can contain a number of component objects that specify the specific information that will be displayed and interaction with the user, as well as interaction between components and underlying SAS data.
Overview of SAS Component Object Model
The SAS Component Object Model (SCOM) provides a framework for developers to create modular user interface elements.
SCOM Objects consist of:
- Attributes (which contain info traditionally stored as instance variables, as well as metadata)
- Methods
- Events sent by the component
- Event handlers that respond to other events
- Supported and Required Interfaces
SCOM builds applications using Component Objects, which can represent viewers (classes that display info), models (classes that manage the data tables), or defined interfaces between viewers and models. SCOM deviates somewhat from a traditional MVC architecture by tightly coupling controller functions into both model and view objects, essentially creating a model/view architecture. SAS provides a number of predefined view, model, and interface classes which can be used as-is for rapid application development or extended to create specialized versions.
There are several mechanisms by which SCOM objects can communicate:
- attribute linking, which allows modification of a component's attributes when another component's attribute is changed.
- model/view communication, which enables communication using a set of common methods defined by an interface.
- event handling, which enables a component to send an event that another component can respond to by using an associated event handler.
SCOM Objects can also be configured to "drag-and-drop" attributes between each other.
SCOM Models
SCOM model objects are able to access methods for accessing and modifying data. SAS/AF models can provide access to SAS tables, SAS catalogs and entries, and external files. Models can be specified to support a particular interface to allow communication with viewer objects.
SCOM Views
SCOM Viewer objects display and interact with users and other models to create a visual application.
A number of pre-defined widgets exist, including:
- charts, histograms
- check boxes, combo boxes, radio boxes, and list boxes
- icons
- list boxes
- maps
- push buttons
- scrollbars
- text entry fields, text labels
These viewer classes can be extended in user defined classes.
SCOM Interfaces
Interface objects provide a set of methods for model/view component communication. SAS/AF provides the following built-in interfaces:
- Static String List
- Range
Like other SCOM classes, users can define their own interfaces for model/view interaction
As an example, to display a list of colors in a list box, the built-in ColorListModel which supports the StaticStringList interface can be linked to a built-in List Box viewer object that requires the same interface. The linkage between model and viewer object can be made using SCL code, or using the graphic development environment (which will allow the linkage due to the common interface supported by both objects).
SCOM Pros/Cons
SCOM Advantages:
- While SAS software is proprietary, its tightly integrated development suite including IDE allows rapid development
- GUI displays can be created in a near-WYSIWYG fashion using predefined widgets, thus minimizing required View coding
- Commonly used objects are predefined
- SCOM is available on legacy enterprise systems such as IBM mainframes
- SCOM is integrated with SAS, which brings a wealth of data manipulation, data mining, and statistical capabilities to applications
SCOM Disadvantages:
- A proprietary software product, so no ability to enhance the base product
- Clients require SAS to be installed. No generic web browser deployment model for applications