[Erp5-dev] new business template model

Guillaume MICHON guillaume.michon at e-asc.com
Tue Oct 18 09:58:15 CEST 2005


Is the old format of business templates still loadable ?

Guillaume



Yoshinori Okuji wrote:
> Hello,
> 
> Thanks to Aurélien's work, we now have a fine-grained control over business 
> templates. I'd like to describe new features and a proposal for the future 
> maintenance of business templates.
> 
> Until now, Business Templates are maintained in the form of an XML file, which 
> is merely an exported form of a Zope object. This form is monolithic, that 
> is, all objects are packed into one XML file, and this was very inconvenient 
> when we wanted to examine a difference between two business templates or even 
> merge two versions of a business template. In the CVS repository, each 
> business template has one file entry.
> 
> The idea behind Aurélien's work is to split the exported representation into 
> multiple parts in a per-object basis. This way, we can compare, for example, 
> only one object between two versions easily. Since the XML file corresponding 
> to one object is very small, it is feasible for human to look at a diff (at 
> least, when you know how an object looks like).
> 
> This new approach has pros and cons. Having multiple files is convenient for 
> the development, but not convenient for file transfers (such as download, 
> send by e-mail). So the Template Tool supports two different forms of 
> business templates: plain format and archived format.
> 
> The plain format is a directory and its subdirectories and files. For example, 
> the template "erp5_core" has a top directory "erp5_core", and has more 
> directories and files under the top directory.
> 
> The archived format is just an archived form of the plain format. Currently 
> only tar+gzip is supported, but it is not difficult to support more, if 
> required. In this format, all files are compacted into one file, so it is 
> easy to distribute business templates in this format. However, this format is 
> not for human at all, because it is a binary format.
> 
> Now, about the maintenance of business templates. To utilize the advantage of 
> the new form, we should turn the business templates in the CVS to the plain 
> format gradually. Once this is finished, we won't have to share the same 
> server for development any longer, because it is so easy to merge changes.
> 
> When you commit business templates in this form, what you must take care of is 
> to check differences between the repository and your local one before 
> committing (i.e. cvs update, cvs diff, then cvs commit). Even with this 
> format, if you skip the checking, you would easily overwrite others' changes 
> mistakenly. Not all human mistakes can be covered by computers.
> 
> YO



More information about the Erp5-dev mailing list