Loading ...
Sorry, an error occurred while loading the content.
 

MetaL data persistence layer module released

Expand Messages
  • Manuel Lemos
    Hello, Finally I was able to make a initial release of MetaL persistence module. There is a more detailed news release in the page below, but basically this a
    Message 1 of 5 , Nov 1, 2002
      Hello,

      Finally I was able to make a initial release of MetaL persistence module.

      There is a more detailed news release in the page below, but basically
      this a new meta-meta-programming module for the MetaL compiler engine
      that is able to generate an API that implements a persistence layer to
      store and retrieve objects in persistence storage.

      It takes a description of classes of entity objects in XML and generates
      all the classes and schemas that are needed to provide the persistence
      API. There is much more detail in the news page below.

      Anyway, this module is an alpha stage. I just released it now because I
      would like some feedback on the usage of the module from people that
      know data persistence layers and make some criticisms so I can spot any
      design issues early in the development of this module.

      Currently, I have provide a sample component than you can try simply by
      going into metal/test/persistence and do:

      php -q build.php some.component

      I have provided an example component that could be the what a normal
      Content Management System needs in terms of objects that need to be
      persisted. In the same directory take a look at cms.component . Build it
      with the command line:

      php -q build.php cms.component

      You will see that inside a directory named install it created several
      classes: a factory class, a few classes for each one defined in the
      cms.component XML file, a schema installation class and a database
      schema definition in a XML format.

      Although there could be other types of persistent storage (XML files,
      LDAP, etc..), currently MetaL persistence layer only generates code to
      interface to SQL based relational databases.

      Currently it uses Metabase API to interface with databases. PEAR::MDB is
      expected to work with Metabase API wrapper. It could use other database
      API and maybe in the future it will, but for now Metabase is very
      adequate because it is portable (many databases supported with the same
      code) and provides schema management with schema definitions in XML.

      Anyway, if you are interested in these subjects, please take a look and
      follow up to MetaL mailing list (metal-dev@yahoogroups.com) or mail me
      privately (mlemos@...).

      http://www.meta-language.net/news-2002-11-01-persistence.html

      --

      Regards,
      Manuel Lemos
    • f l
      Manuel, with the attached script I get the display of xml_parser.php and then : Fatal error: Call to undefined function: xmlparsefile() in
      Message 2 of 5 , Nov 22, 2002
        Manuel,

        with the attached script I get the display of
        xml_parser.php and then :
        Fatal error: Call to undefined function:
        xmlparsefile() in
        /usr/local/share/metal/metal/metal_compiler.php on
        line 588

        I this tells you nothing, please let me know I will
        search further. Independently, your application is
        quite impresive.Regards,

        ejuarros



        #!/bin/sh
        echo " ... cvs metal"
        CVS_DIR=/home/cvs
        INSTALL_DIR=/usr/local/share
        SRC_SITE=http://cvs.php.net/
        BCK_DIR=""
        PN=metal
        FN=metal
        TN=metal
        MODULE=metal
        PACKAGE=metal

        mkdir -p $CVS_DIR/$PN
        cd $CVS_DIR/$PN; echo `pwd`
        cvs -d
        :pserver:cvsread:@...-language.net:/opt2/ena/metal
        login
        cvs -z3 -d
        :pserver:cvsread@...-language.net:/opt2/ena/metal
        checkout metal PHPlibrary metabase
        cp -R $CVS_DIR/$PN $INSTALL_DIR
        cd $INSTALL_DIR/$PN/metal/test/persistence
        php -q build.php cms.component


        --- Manuel Lemos <mlemos@...> wrote:
        > Hello,
        >
        > Finally I was able to make a initial release of
        > MetaL persistence module.
        >
        > There is a more detailed news release in the page
        > below, but basically
        > this a new meta-meta-programming module for the
        > MetaL compiler engine
        > that is able to generate an API that implements a
        > persistence layer to
        > store and retrieve objects in persistence storage.
        >
        > It takes a description of classes of entity objects
        > in XML and generates
        > all the classes and schemas that are needed to
        > provide the persistence
        > API. There is much more detail in the news page
        > below.
        >
        > Anyway, this module is an alpha stage. I just
        > released it now because I
        > would like some feedback on the usage of the module
        > from people that
        > know data persistence layers and make some
        > criticisms so I can spot any
        > design issues early in the development of this
        > module.
        >
        > Currently, I have provide a sample component than
        > you can try simply by
        > going into metal/test/persistence and do:
        >
        > php -q build.php some.component
        >
        > I have provided an example component that could be
        > the what a normal
        > Content Management System needs in terms of objects
        > that need to be
        > persisted. In the same directory take a look at
        > cms.component . Build it
        > with the command line:
        >
        > php -q build.php cms.component
        >
        > You will see that inside a directory named install
        > it created several
        > classes: a factory class, a few classes for each one
        > defined in the
        > cms.component XML file, a schema installation class
        > and a database
        > schema definition in a XML format.
        >
        > Although there could be other types of persistent
        > storage (XML files,
        > LDAP, etc..), currently MetaL persistence layer only
        > generates code to
        > interface to SQL based relational databases.
        >
        > Currently it uses Metabase API to interface with
        > databases. PEAR::MDB is
        > expected to work with Metabase API wrapper. It could
        > use other database
        > API and maybe in the future it will, but for now
        > Metabase is very
        > adequate because it is portable (many databases
        > supported with the same
        > code) and provides schema management with schema
        > definitions in XML.
        >
        > Anyway, if you are interested in these subjects,
        > please take a look and
        > follow up to MetaL mailing list
        > (metal-dev@yahoogroups.com) or mail me
        > privately (mlemos@...).
        >
        >
        http://www.meta-language.net/news-2002-11-01-persistence.html
        >
        > --
        >
        > Regards,
        > Manuel Lemos
        >
        >


        __________________________________________________
        Do you Yahoo!?
        Yahoo! Mail Plus � Powerful. Affordable. Sign up now.
        http://mailplus.yahoo.com
      • Manuel Lemos
        Hello, ... You are copying just the metal directort to /usr/local/share/metal . You need to copy also PHPlibrary and metabase directories to that same
        Message 3 of 5 , Nov 22, 2002
          Hello,

          On 11/22/2002 09:10 PM, f l wrote:
          > Manuel,
          >
          > with the attached script I get the display of
          > xml_parser.php and then :
          > Fatal error: Call to undefined function:
          > xmlparsefile() in
          > /usr/local/share/metal/metal/metal_compiler.php on
          > line 588

          You are copying just the metal directort to /usr/local/share/metal . You
          need to copy also PHPlibrary and metabase directories to that same
          directory. MetaL includes scripts from these directories to work.

          Update from CVS again because I have commited some new features. I will
          try to update the cms.component again later showing the new functions
          that it can generate to create new objects, store objects in persistent
          storage (database), set and retrieve references to objects from class
          variables, retrieve collections of objects, etc...

          Just to think that I used to write code for such tasks by hand, makes me
          wonder why I haven't implemented this before. You become so much more
          productive.



          --

          Regards,
          Manuel Lemos



          > I this tells you nothing, please let me know I will
          > search further. Independently, your application is
          > quite impresive.Regards,

          Yes, it is quite big. Just the compiler modules take about 30,000 lines
          of PHP code.


          > #!/bin/sh
          > echo " ... cvs metal"
          > CVS_DIR=/home/cvs
          > INSTALL_DIR=/usr/local/share
          > SRC_SITE=http://cvs.php.net/
          > BCK_DIR=""
          > PN=metal
          > FN=metal
          > TN=metal
          > MODULE=metal
          > PACKAGE=metal
          >
          > mkdir -p $CVS_DIR/$PN
          > cd $CVS_DIR/$PN; echo `pwd`
          > cvs -d
          > :pserver:cvsread:@...-language.net:/opt2/ena/metal
          > login
          > cvs -z3 -d
          > :pserver:cvsread@...-language.net:/opt2/ena/metal
          > checkout metal PHPlibrary metabase
          > cp -R $CVS_DIR/$PN $INSTALL_DIR
          > cd $INSTALL_DIR/$PN/metal/test/persistence
          > php -q build.php cms.component
          >
          >
          > --- Manuel Lemos <mlemos@...> wrote:
          >
          >>Hello,
          >>
          >>Finally I was able to make a initial release of
          >>MetaL persistence module.
          >>
          >>There is a more detailed news release in the page
          >>below, but basically
          >>this a new meta-meta-programming module for the
          >>MetaL compiler engine
          >>that is able to generate an API that implements a
          >>persistence layer to
          >>store and retrieve objects in persistence storage.
          >>
          >>It takes a description of classes of entity objects
          >>in XML and generates
          >>all the classes and schemas that are needed to
          >>provide the persistence
          >>API. There is much more detail in the news page
          >>below.
          >>
          >>Anyway, this module is an alpha stage. I just
          >>released it now because I
          >>would like some feedback on the usage of the module
          >>from people that
          >>know data persistence layers and make some
          >>criticisms so I can spot any
          >>design issues early in the development of this
          >>module.
          >>
          >>Currently, I have provide a sample component than
          >>you can try simply by
          >>going into metal/test/persistence and do:
          >>
          >>php -q build.php some.component
          >>
          >>I have provided an example component that could be
          >>the what a normal
          >>Content Management System needs in terms of objects
          >>that need to be
          >>persisted. In the same directory take a look at
          >>cms.component . Build it
          >>with the command line:
          >>
          >>php -q build.php cms.component
          >>
          >>You will see that inside a directory named install
          >>it created several
          >>classes: a factory class, a few classes for each one
          >>defined in the
          >>cms.component XML file, a schema installation class
          >>and a database
          >>schema definition in a XML format.
          >>
          >>Although there could be other types of persistent
          >>storage (XML files,
          >>LDAP, etc..), currently MetaL persistence layer only
          >>generates code to
          >>interface to SQL based relational databases.
          >>
          >>Currently it uses Metabase API to interface with
          >>databases. PEAR::MDB is
          >>expected to work with Metabase API wrapper. It could
          >>use other database
          >>API and maybe in the future it will, but for now
          >>Metabase is very
          >>adequate because it is portable (many databases
          >>supported with the same
          >>code) and provides schema management with schema
          >>definitions in XML.
          >>
          >>Anyway, if you are interested in these subjects,
          >>please take a look and
          >>follow up to MetaL mailing list
          >>(metal-dev@yahoogroups.com) or mail me
          >>privately (mlemos@...).
          >>
          >>
          >
          > http://www.meta-language.net/news-2002-11-01-persistence.html
          >
          >>--
          >>
          >>Regards,
          >>Manuel Lemos
          >>
          >>
          >
          >
          >
          > __________________________________________________
          > Do you Yahoo!?
          > Yahoo! Mail Plus – Powerful. Affordable. Sign up now.
          > http://mailplus.yahoo.com
          >
          >
          > To Unsubscribe, send a blank message to: metabase-dev-unsubscribe@...
          > Need other Metabase drivers? http://www.egroups.com/surveys/metabase-dev?id=263873
          > Latest beta version: http://www.egroups.com/files/metabase-dev
          > Vote on Metabase: http://www.zend.com/apps.php?id=122&single=1
          >
          >
          > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
          >
          >
          >
        • ejuarros
          Manuel, I was copynig the three directories. I have just found out the problem: I have php configured not to accept the short tag notation:
          Message 4 of 5 , Dec 2, 2002
            Manuel,
            I was copynig the three directories. I have just found
            out the problem: I have php configured not to accept
            the short tag notation: '<?'.
            It is a bit surprising that you use those tags. When
            using sax, as you do, it seems better to use the whole
            notation.

            Once I have substituted the tags, I get the following
            message:
            Building files/component.files ...
            Building files/install.files ...
            Error: it was not specified an existing build
            updatefile from file
            ("../../../metabase/xml_parser.php") (File
            "build.input", Line 143, Column 6, Byte 3760).


            php -q build.php cms.component
            having
            <updatefile>
            <from><databasesourcepath
            />/<databaseschemaparser /></from>
            <to><databaseinstallpath
            />/<databaseschemaparser /></to>
            </updatefile>

            in build.input.
            If this is clear to you, please let me know. If not, I
            will try to find out.

            Regards,
            ejuarros



            --- Manuel Lemos <mlemos@...> wrote:
            > Hello,
            >
            > On 11/22/2002 09:10 PM, f l wrote:
            > > Manuel,
            > >
            > > with the attached script I get the display of
            > > xml_parser.php and then :
            > > Fatal error: Call to undefined function:
            > > xmlparsefile() in
            > > /usr/local/share/metal/metal/metal_compiler.php on
            > > line 588
            >
            > You are copying just the metal directort to
            > /usr/local/share/metal . You
            > need to copy also PHPlibrary and metabase
            > directories to that same
            > directory. MetaL includes scripts from these
            > directories to work.
            >


            __________________________________________________
            Do you Yahoo!?
            Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
            http://mailplus.yahoo.com
          • Manuel Lemos
            Hello, ... I am glad that you brought that up because I forgot to fix the problem. MetaL started to written in PHP 3 days before that was an option. Since I
            Message 5 of 5 , Dec 5, 2002
              Hello,

              On 12/02/2002 06:37 PM, ejuarros wrote:
              > Manuel,
              > I was copynig the three directories. I have just found
              > out the problem: I have php configured not to accept
              > the short tag notation: '<?'.
              > It is a bit surprising that you use those tags. When
              > using sax, as you do, it seems better to use the whole
              > notation.

              I am glad that you brought that up because I forgot to fix the problem.
              MetaL started to written in PHP 3 days before that was an option. Since
              I don't mix XML documents with PHP scripts, it was never a problem for
              me. It is all fixed now.


              > Once I have substituted the tags, I get the following
              > message:
              > Building files/component.files ...
              > Building files/install.files ...
              > Error: it was not specified an existing build
              > updatefile from file
              > ("../../../metabase/xml_parser.php") (File
              > "build.input", Line 143, Column 6, Byte 3760).

              That was also fixed now in the just released public version.


              --

              Regards,
              Manuel Lemos
            Your message has been successfully submitted and would be delivered to recipients shortly.