[Erp5-users] A question regarding ERP5Types

Jean-Paul Smets jp at nexedi.com
Mon Jun 27 09:20:19 CEST 2005


Le vendredi 24 Juin 2005 16:54, Alexey Morozov a écrit :
> Hello!
>
> I'd like to ask if there's a documentation about programming w/
> ERP5Types beside the Kevin's tutorial which is more ERP5-centric.
>

I am sorry but not yet.

> Currently I'm not sure if ERP5Types is an appropriate tool for us, so
> please tell me if I'm wrong about its functions and possibilities.
>
> To describe what I'm looking for let me first describe what we have now
> and what we need (in future). Right now we have a custom /solution/
> which includes a Zope site (some parts w/ CMF, some just pure
> DTMLs/ZSQLs etc) which acts as "an inventory and support" application.
> Some parts of this solution are ZODB-level stuff (DTMLs, scripts, ZSQLs
> etc) describing users interface to the relational database. This stuff
> is partially auto-generated from the [database] scheme using Apache
> velocity engine w/ custom templates. In the generated area "classes" are
> represented as Folders in Zope, their methods and properties are
> DTML methods, ZSQLs, python scripts etc.

OK.

> Now we have a growing need to make a transition from these
> "pseudo-classes" to real (disk-based?) python classes which instances
> could be put into ZODB (smth like Formulator forms but we need
> a richer set of properties types and these properties could be 'complex
> types' defined earlier). Well, it seems that these classes should be
> generated from declarative descriptions (i.e. class name, properties
> list w/ their types and a list of possible actions w/ object instances
> like 'show itself', 'edit itself' etc). We also need in a really near
> future to track changes in instances of these classes and have an
> instance-based security settings, so transition from RDBMS to ZODB seems
> feasible.

Sounds reasonable.

> That is I'm looking for a way to generate these classes and to minimize
> well, intellectual efforts to do everything correctly. Probably it would
> be wise to use an existing technology/product for Zope, which could
> provide necessary functionality for the generator. As far as I
> understand ERP5Types could be used for this, but is it a really worth

Yes. I think it is worth. 

> idea? Could it be efficiently used without the rest of ERP5 (I know that
> it doesn't depend on it directly)? What are possible
> problems and objections? Are there developer-level docs for it?

ERP5Type can be used without ERP5 (the product). It was designed for that. 
There might still be useless dependencies. If you can point them, I can try 
to remove them.

What ERP5Type provides is
	- ability to define data schema and semantic constraints in python without 
restarting zope (PropertySheet)
	- ability to create new classes on the fly in python (without restarting 
zope)
	- ability to define menu actions (CMF)
	- ability to define complex local role definition (ERP5Type)
	- ability to specialise data schema on a per-portal type base (no need to 
subclass for that)
	- complete separation of data model (PropertySheet), object behaviour 
(ERP5Type) and object presentation (ERP5Form)
	- relations (if you have CMFCategory installed)

Although it is not necessary. It is better to consider using ERP5Type 
together with ERP5Catalog and ERP5Form. 
	- ERP5Catalog provides ability to query Zope objects in SQL, which is 
afterall very useful
	- ERP5Form provides extended Formulator with a very useful ListBox widget 
and some other tools for PDF generation for example

And if you need high performance, CMFActivity is a must because it 
distributes the load over nodes in a cluster. It is not required though.

If you combine ERP5Type, ERP5Catalog  and ERP5Form, you can develop new 
applications which are completely unrelated to ERP5. One great aspect of 
the combination of ERP5Type / ERP5Catalog  / ERP5Form is that is has been 
tested on ZEO clusters with millions of catalogued objects and that all 
performance issues related to size and load are now solved.

If you want to try, my suggestion would be that you first create a mock up 
of a mini application based on Kevin tutorial  then remove one by one 
products. I will be glad to change code in ERP5Type / ERP5Catalog  / 
ERP5Form so that useless dependencies are removed.

> I'm really sorry for the long introduction to few short questions but I
> don't know how to describe what I need shortly. Thank you for your
> attention.
>
> Alexey Morozov.
> _______________________________________________
> Erp5-users mailing list
> Erp5-users at erp5.org
> http://erp5.org/mailman/listinfo/erp5-users

-- 
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Rentalinux: Desktop Linux Server
http://www.rentalinux.com




More information about the Erp5-users mailing list