Changes between Version 3 and Version 4 of Concepts/CoreLibs

Show
Ignore:
Author:
demian (IP: 81.170.31.60)
Timestamp:
04/01/06 19:28:19 (7 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Concepts/CoreLibs

    v1 v4  
    1 = The Core Libraries of Seagull = 
     1= Library Organisation in Seagull = 
    22 
    33[[TOC]] 
    66 
    77The library classes used in the Seagull framework basically fall into the following groups: 
    8   * Workflow 
    9   * Utility 
    10   * Task 
    11   * PEAR 
     8  * Controllers - workflow 
     9  * Core - general 
     10  * Tasks - mostly used to do setup tasks 
     11  * Filters - modify the request and response objects as they pass through the filter chain 
     12  * PEAR libs - general 
    1213 
    13 Developing with Seagull involves building modules that include 1 or more manager classes to implement business logic.  Building managers is eased by using the above-listed library resources.  For a typical project you will probably only ever use the Workflow, Utility and PEAR libs. 
     14Developing with Seagull involves building modules that include one or more manager classes to implement business logic.  Building managers is eased by using the module creator wizard and above-listed library resources.  For a typical project you will probably only ever use the Controllers, Core and PEAR libs. 
    1415 
    15 The following sections explain the library groupings and describe the basically functionality of each class. 
     16The following sections explain the library groupings and describe the basically functionality of each class.  This will be of more interest to advanced devs, beginners need not worry as default task and filters are all you'll need for basic web apps. 
    1617 
    17  
    18 === Workflow Classes === 
    19 The workflow classes are Controllers and template helpers, you won't need to modify these. 
    20  
     18=== Controller Classes === 
     19The controller classes manage application workflow, several examples are provided but it's very easy to write your own. 
    2120 
    2221|| '''Class name''' || '''Availability''' || '''Methods''' || '''Description''' || 
    23 || SGL_AppController || default ||  * run || The !AppController is used to organise workflow for particular application types.  You will probably use similar controllers for each application you build, although workflow can be easily customised.  See the [http://trac.seagullproject.org/file/trunk/etc/sglBridge.php unit test controller] versus the [http://trac.seagullproject.org/file/trunk/lib/SGL/AppController.php Seagull] one for ideas on how to customise.[[BR]] || 
    24 || SGL_Output || default || || The SGL_Ouput class is known as a TemplateHelper in other contexts, it wraps methods used by the template engine to transform the data into, eg, html.[[BR]] || 
     22|| SGL_FrontController || default ||  * run || The !FrontController is used to organise workflow for particular application types.  You will probably use similar controllers for each application you build, although workflow can be easily customised.  See the [http://trac.seagullproject.org/file/trunk/etc/sglBridge.php unit test controller] versus the [http://trac.seagullproject.org/file/trunk/lib/SGL/FrontController.php Seagull] one for ideas on how to customise.[[BR]] || 
     23|| SGL_Manager || default ||  * validate[[BR]]  * process[[BR]]  * display[[BR]]  * maintainState || The Manager class is an app controller, it sets out generic validate/process/display workflow.[[BR]] || 
    2524|| SGL_Wizard || default ||  * validate[[BR]]  * process[[BR]]  * display[[BR]]  * maintainState || The Wizard class is a specialisation of the Manager class, use it to create wizard workflows in your applications.[[BR]] || 
    2625 
    2726 
    28 === Utility Classes === 
    29 Utility classes are what you use in your managers to manipulate system, application and user resources.  Availability refers  to whether you need to include the class or not, anything labelled as 'default' is available within the application scope, like default classes in, eg, java.lang.  'Requirable' libs need to be included. 
    30  
     27=== Core Classes === 
     28The core classes are what you use in your managers to manipulate system, application and user resources.  Availability refers to whether you need to include the class or not, anything labelled as 'default' is available within the application scope, like default classes in, eg, java.lang.  'Requirable' libs need to be included. 
    3129 
    3230|| '''Class name''' || '''Availability''' || '''Methods''' || '''Description''' || 
    3331|| SGL || default || ||Provides a set of static utility methods used by most modules || 
    3432|| SGL_Request || default || ||Wraps all $_GET $_POST $_FILES arrays into a Request object, provides a number of filtering methods || 
     33|| SGL_Output || default || || The SGL_Ouput class is known as a !TemplateHelper in other contexts, it wraps methods used by the template engine to transform the data into, eg, html.[[BR]] || 
    3534|| SGL_Config || default || ||Config file parsing and handling, acts as a registry for config data || 
    36 || SGL_Registry || default || ||Generic data storage object, referred to as $input.  Holds references to Url, current Request and Config singletons || 
     35|| SGL_Registry || default || ||Generic data storage object, referred to as $input.  Holds references to Url, Request and Config singletons || 
    3736|| SGL_DB || default || ||Mostly used as a DB resource singleton, also provides dsn building method || 
    38 || SGL_Url || default || ||Provides url related functionality, derived from Net_URL and uses a  parser strategy || 
     37|| SGL_ServiceLocator || default || ||Facilitates switching resources at runtime, eg, so a test database resource can be swapped in for the dev one || 
     38|| SGL_Url || default || ||Provides URI related functionality, derived from Net_URL and uses a  parser strategy || 
    3939|| SGL_HTTP || default || ||Provides HTTP functionality including redirects || 
    40 || SGL_HTTP_Session || default || ||Handles session management, most methods are static || 
     40|| SGL_Session || default || ||Handles session management, most methods are static || 
    4141|| SGL_String || default || ||Various string helper methods || 
     42|| SGL_Array || default || ||Provides array manipulation methods || 
    4243|| SGL_Date || default || ||Provides various date formatting methods || 
    43 || SGL_Array || default || ||Provides array manipulation methods || 
    44 || SGL_Inflector || default || ||Performs transformations on resource names, ie, urls, classes, methods, variables || 
     44|| SGL_Inflector || default || ||Performs transformations on resource names, ie, URIs, classes, methods, variables || 
    4545|| SGL_Delegator || default || ||PHP 4/5 compatible class for aggregating objects || 
    4646|| SGL_Util || default || ||Various utility methods || 
    5555 
    5656 
    57 === Tasks === 
    58 All tasks are optional, configurable, and can be ordered according to need. 
     57=== Filters === 
     58All filters are optional, configurable, and can be ordered according to need. 
    5959 
    60 The process tasks below implement the Intercepting Filter pattern, each filter must extend SGL_DecorateProcess and acts as a filter pass on the Request object. 
     60The process tasks below implement the [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpatterns/html/DesInterceptingFilter.asp Intercepting] [http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html Filter] pattern, each filter must extend SGL_DecorateProcess and acts as a filter pass on the Request object. 
    6161 
    6262 
    8383The install tasks below are simple units of work that can optionally take an argument, ie $data.  Each must extend SGL_Task or a specialisation of it. 
    8484 
     85=== Tasks === 
    8586 
    8687|| '''Class name''' || '''Availability''' || '''Group''' || '''Description''' ||