Hello,
On 09/13/2002 03:21 PM, Alex Black wrote:
>>>Anyone working on some XSLT or other system to generate PHP code? In
>>>particular with respect to generating database schemas with PHP object
>>>wrappers.
>>
>
> Manuel is doing a project called MetaL which is effectively an XML code
> representation -> PHP (or whatever other language).
>
> binarycloud has a means of:
> -writing an "entity definition" XML
> -ripping:
> -schema (XML in metabase format)
> -"data access class" - binarycloud entity record class.
>
> So, depending on what you're trying to do, Metal may be what you're looking
> for, or that part of binarycloud may be what you're looking for.
I have studied several object-relational (O/R) data abstraction layers
(DAL), some more complete than others. I mostly disliked those that rely
on fat base classes or try to do more than just doing object persistence
and do other things like user interface handling.
I liked most of those that just generate code but still it seems that
some generate all the code that you possibly can use but in real
applications you may not need all the methods. So, this is a point to
keep in mind: generate only the code that the developer will hint that
is necessary.
The one that impressed me most is PragmaTier. It generates DAL code in
components that contain the definition of related entities to be
persisted via SQL databases. They have a Component Definition language
that seems very easy but is in some custom format, so it is not XML.
http://www.pragmatier.com/
I also looked at you entity persistence layer. It seems more or less
like what I would like but definitly without those database schema
definitions because that is precisely what I want to avoid to manage
manually.
Too bad that the methods documentation is missing. Do you plan to
document that soon?
>>Database schema generators are already appearing (esp. Java),
>>
>>>but no one seems to be working on a tool to generate the corresponding
>>>PHP classes either through the native PHP database functions or some
>>>intermediate layer (Binary Cloud, Metabase, PHPDo).
>>
>
> Yes we have it!
My plan is to generate Metabase specific code for DAL classes. However,
I would like to keep an open evolution path to generate database
specific stored procedure based code to be abstracted by a MetaL
compiler module that will provide the support for generating stored
procedures for the most used databases that support them and will work
as an alternative to Metabase specific client code that will still be
generated for databases that do not support stored procedures.
This way it will achieve maximum performance while keeping the high
level of the abstraction. Anyway, this is just a bold idea that it will
probably take a long time to happen because it is not a priority.
>>>Are you or anyone you know undertaking such a project? Do you/they want
>>>any help?
>>
>
>>Coincidentally I am starting to work on a module for the MetaL compiler
>>engine that is meant to generate object persistent layers eventually to
>>SQL databases.
>
>
> Yep cool :)
>
>
>>Like you mentioned it will pick component descriptions and generate
>>database schemas for SQL table mappings including any intermediate
>>tables that are needed for many to many relationships. It will also
>>generate classes in MetaL code that can be generated to any of the
>>supported languages.
>
>
> That's very cool. At the moment we do not have extremely sophisticated
> schema generation capabilities based on entity definitions - we will. That's
> where we could use some help.
Yes, at least some brainstorming would be helpful. What I have in mind
is definining a very simple XML format that will resemble the component
definition language of Pragmatier. It may be as simple as BinaryCloud
entity definition format without the database schema specific tags.
Anyway, my main goal is to complete the software project development
cycle. I have defined some XML formats for project specification, risk
analysis, sub-system architecture, use case and actor definition. Now I
want to some how to evolve and document project key abstractions to
define the component structure. The entity abstractions will be defined
via the component format that will be used to generate the DAL classe,
but I still haven't all figured out.
>>Anyway, if you have tried some of my classes from the PHP Classes site,
>>you have most likely used MetaL generated code without knowing.
>
>
> Yep :)
>
> When Manuel releases metal open source, I want to try and get standard metal
> templates working with binarycloud :)
I was considering to move all the stuff to a project in the tigris.org .
I wanted to ask you about how smooth the transition may occur. Do you
have access to the project CVS repository maybe via SSH, so you can
manipulate it directly if necessary? Since it is all related, I may move
Metabase over there too, but I need to know if I will still have direct
control over CVS files.
>>For more information, take a look at this page:
>>
>>http://www.meta-language.net/
>
--
Regards,
Manuel Lemos