
Originally Posted by
lastcraft
I am afraid I found it about as clear as mud

.
Of course, this is all new to you and unless somebody explains or you read the documentation, it is natural that you did not find it clear. Don't worry, you just need to experience it more.

Originally Posted by
lastcraft
Assuming I want getters, setters, lazy loading, etc (which I always do) is this definition correct for the example above?
As I said, setters/getters are an option that is not yet implemented but they will be. Keep in mind that this a project being developed like any other Open Source project. I developed it to address my own needs and then I decided to document it to make it useful to others, so you can provide feedback that will help the project evolve.
So, you will find that some things that you would like are not yet implemented, but if you would like them, you can always tell me what you think it should have.

Originally Posted by
lastcraft
Code:
<class>
<name>Contact</name>
<variable><name>name</name><type>text</type></variable>
<variable><name>email</name><type>text</type></variable>
</class>
How much is missing?
This is just a definition of data variables. You need also to specify whatever types of functions you need to manipulate your objects.

Originally Posted by
lastcraft
1) I could do without the strict adherence to canonical XML

. XML is verbose enough without making it any worse. What is wrong with a few attributes?
XML attributes are not extensible, ie, you can't use tags in attribute values. This is against the meaning of X in XML, eXtensible markup language. So, using attributes limits what can be done to make the format more flexible and convinient.
Anyway, ideally you will use a more productive tool to edit your component definitions. I have a friend that told me that he will be working on a Dreamweaver template for Metastorage. Since I don't use Dreamweaver, I do not know how much more productive you can be with it.
In any case, component definitions are simple. You will not be editing them all the time to get so bothered with their verbosity.

Originally Posted by
lastcraft
2) How do I inherit/use this storage class for domain objects?
This is explained in
Metastorage documentation but it will detailed in a simpler to understand way in the
tutorial.html]Metastorage tutorial that is being written as we speak.
Basically, all objects are created by a factory class of which you need to create one instance per script/program. That applies to either objects being created from scratch or retrieved from storage. From than on, you just access the objects to do whatever you want and call a persist function to store the changes.[/font]

Originally Posted by
lastcraft
Apart from a single generated persist method there does not seem to be much control over exactly what gets written out. Do I just decorate that method? If I do, how do I tell the internal factories that I want my version, not the raw one?
Metastorage generates final code. You should not edit the code generated by Metastorage. You should not need to edit the generated code either. What Metastorage generates it is like an API that was written by somebody else for a given purpose that you have. The way it works is that you just call this API to build your application.
If you need to customize any details, you do it in the component definition. If for some reason, you realize that the generated API does not satisfy any particular needs, you just need to tell me what you want so I can figure what can be done to address your needs consistently.

Originally Posted by
lastcraft
3) How are transactions handled?
Transactions are not yet support but it will be like any database transactions, you need to start and end transactions by commiting or roll back any changes.
Bookmarks