Stingray Studio : Stingray® Foundation Library User’s Guide : Chapter 1 Introduction to Stingray Foundation Library
Chapter 1 Introduction to Stingray Foundation Library
Welcome to Stingray Foundation Library
Stingray Foundation Library (SFL) is a framework for developing Windows applications and components in Visual Studio. SFL provides a wide range of services that are useful for developing both MFC and ATL programs—such as layout management, model-view-controller framework, printing and preview, OLE drag and drop, a property and event architecture, and application and windowing classes. SFL consists of loosely coupled packages, many of which have no dependencies on either MFC or ATL, so you can use them in either framework. The modular nature makes it an ideal foundation upon which to build components and applications. For example, the Stingray Foundation Library products build upon the architectural framework provided by the SFL.
SFL is useful to developers of components and applications in Visual Studio. Individual packages such as the Layout Manager, model-view-controller, property and event model, and design patterns can be used in conjunction with either MFC or ATL. SFL extends ATL with application and windowing classes, so it can be used to develop entire applications. SFL provides an AppWizard so you can quickly get started writing SFL applications. SFL provides a package that encapsulates the Windows GDI; ATL does not provide an equivalent set of classes. The CString, CMap, CList, and CArray classes emulate the equivalent MFC classes and are implemented using the Standard C++ Library. SFL provides an excellent foundation for Visual Studio developers who are using ATL, MFC, or both. It helps to smooth out some of the differences between the two frameworks and provides an architectural foundation for building components and applications.
The implementation of SFL is based on these design principles:
*Loose coupling and modularity. SFL comprises many loosely coupled packages. An important design objective is to make each package as independent as possible from other packages. This low coupling results in a modular design that makes individual packages more reusable.
*Interface-based programming. Interface-based programming is also a key design principle that is applied to SFL. Interfaces are more reusable than concrete classes, so SFL separates interface from implementation whenever possible. Template classes are used to provide generic implementations of those interfaces.
*Interoperability between ATL and MFC. Isolation of framework dependencies provides a clean separation between code that is framework-dependent and code that is framework-neutral. Framework-dependent code generally extends the framework-neutral code to provide MFC and ATL specific implementations. MFC compatible classes and structures such as the GDI classes, API structure wrappers, string classes, and collection classes allow the same code to be used with or without MFC.
SFL leverages Perforce’s expertise in developing C++|MFC class libraries and components for Windows. It builds upon a solid architectural foundation based on design patterns and provides services that are strategic for building components and applications. SFL’s application development package and AppWizard makes ATL into an outstanding application development environment, which benefits from other SFL packages and components. SFL provides an excellent foundation for Visual C++ development.