Open Source Content Management System

A quick note about MidCOM 3 services

  1. A quick note about MidCOM 3 services

    Fri April 25 2008 04:25:05 UTC
    Hi!

    I just made some major cleanup in how MidCOM 3 loads services:

    * Services (except the two ones we must "hardcode": dispatcher and
    configuration) are all loaded via magic getter in the
    midcom_core_midcom class. This means they will be loaded only on
    demand

    * Services are supposed to be singletons, i.e. only the one instance
    made to $_MIDCOM->$servicename exists

    * Services consist of two or three parts: service interface class
    (midcom_core_services_$servicename), possible abstract service
    baseclass (midcom_core_services_$servicename_baseclass, can be in same
    file as interface), and then implementation classes
    (midcom_core_services_$servicename_$implementation)

    * Service implementation is defined by midcom_core configuration key
    service_$servicename with value $implementation

    Please follow these conventions when building new services. Because of
    the on-demand structure we should be able to accommodate even quite a
    large number of services as needed.

    Another cleanup we should still do is midcom_core_helpers. I'm very
    unsure what to do with the various items there:

    * comet: currently implements two simple static methods. Can stay here
    or be merged with a more universal Ajax service or helper
    * context: could be moved to be a service, or stay here
    * head: methods for populating HTML HEAD data. Should be moved into a
    "metadata service"
    * metadata: static methods for handling approvals and locking. Should
    be moved into a "metadata service"
    * navigation: I'm unsure of this, probably needs full redesign and
    move to services
    * snippet: some static methods for snippet content loading only used
    in dm schemas. Maybe should be moved there instead?
    * toolbar: the actual toolbar object used by toolbars service. Maybe
    this is the good place?

    Comments welcome.

    Let us keep MidCOM 3 architecture as clean as lean as possible so we
    can live with it for the foreseeable future.

    --
    Henri Bergius
    Motorcycle Adventures and Free Software
    http://bergie.iki.fi/

    Skype: henribergius
    Jabber: henri.bergius@gmail.com
    Jaiku: http://bergie.jaiku.com/
    _______________________________________________
    dev mailing list
    dev@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/dev
    •  Reply
    • stock-icons/16x16/stock_help-agent.png Report abuse
  2. Re: [midgard-dev] A quick note about MidCOM 3 services

    Fri April 25 2008 07:55:02 UTC
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Howdy, I'm not very up to date wrt to MidCOM 3 but I thought I'd babble
    about anyhow :)
    > * comet: currently implements two simple static methods. Can stay here
    > or be merged with a more universal Ajax service or helper
    > * context: could be moved to be a service, or stay here
    > * head: methods for populating HTML HEAD data. Should be moved into a
    > "metadata service"
    > * metadata: static methods for handling approvals and locking. Should
    > be moved into a "metadata service"
    > * navigation: I'm unsure of this, probably needs full redesign and
    > move to services
    The redesign should probably also consider separating out the breadcrumb
    service.
    > * snippet: some static methods for snippet content loading only used
    > in dm schemas. Maybe should be moved there instead?
    Or removed? The reason these were used loong agou was that we didn't
    have Midgard schemas so it was impossible to extend the db.

    > * toolbar: the actual toolbar object used by toolbars service. Maybe
    > this is the good place?

    Move the toolbar object into the service directory. Keep everything
    related to a service in one place.

    regards,
    Tarjei

    >
    > Comments welcome.
    >
    > Let us keep MidCOM 3 architecture as clean as lean as possible so we
    > can live with it for the foreseeable future.
    >

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

    iD8DBQFIEY1gYVRKCnSvzfIRAvpyAJ9UiH+m9NHTp+jOgiu0oytrsEqEuQCgiJw/
    wU+oNdb2g37jluljBMoc1ew=
    =uNvh
    -----END PGP SIGNATURE-----
    _______________________________________________
    dev mailing list
    dev@lists.midgard-project.org
    http://lists.midgard-project.org/mailman/listinfo/dev
    •  Reply
    • stock-icons/16x16/stock_help-agent.png Report abuse
Designed by Nemein, hosted by Anykey