Professional Documents
Culture Documents
Anybody with say 2 years of experience in any object oriented language like Java
, PHP5 or C++ is able to catch up with the minimum required level of Python prog
ramming for OpenERP in one to two weeks. Beginners can even start on Python alth
ough they will need more time.
Also bare in mind that despite not being that popular Python is one of the simpl
est object oriented programming language around. It's probably because Python st
ates "there should be only one way to do things". Python is also a good trade-of
f between a first class OOP abstraction and a good speed: almost an order of mag
nitude faster than PHP (while still being an order of magnitude slower than Java
or C++; there is no free lunch). Of course, those are only algorithmic consider
ations. Better productivity leading to more time for architectural or database o
ptimizations always make more difference. And Python is still rising in populari
ty, reaching rank #6 in the famous Tiobe index.
Also, believe my deep comparison or check by yourself, OpenERP requires somewhat
10 times less code than Java ERP's around to do the same functional stuff (let'
s call those two "Java based" even if they are actually more like PSQL/procedura
l coding oriented, at least for their business code layer, which unfortunately i
s the one that matters) Needless to say OpenERP actually does much more instead.
Just investigate data migration, cost of customization, versatility, fixtures l
oading, project management, CRM, complex stock management...
Finally, this would be quite off-topic, but I think the key why Python or any go
od Dynamic OOP language (like (J)Ruby) is the good choice to build an ERP is bec
ause an ERP really needs both functional flexibility and a good relational datab
ase persistence system. But achieving both modularity, runtime data model flexib
ility and a static language like Java is really a hard thing that real Java ERP'
s generally failed to achieve so far.
Indeed, in a static language, the OOP model, mapped to the database structure is
supposed to be mostly fixed at compilation time. Gaining runtime flexibility li
ke with the application dictionary of Compiere or Openbravo means too often losi
ng some OOP power like inheritability or encapsulation. Oh yes that would still
be possible, but that would mean over-engineering an ERP platform just like OSGI
or the Eclipse RCP. Ultimately, you'll find guys able to do that. But will they
do it as open source and will they master also the functional part of an ERP? Q
uite unlikely. So choosing a static language as the main language for an ERP res
ults either in non functional/non mature boiler plate code, either functional co
de that is really to badly designed to fit any different context without a ton o
f non maintainable coding. So a dynamic OOP language is the good choice, at leas
t for the business layer of an ERP.
Also, for those fearing runtime errors in OpenERP because it uses a dynamic lang
uage, I would say that in OpenERP:
there is roughly 5 times less code than is an equivalent Java language based cod
e, or even 10 times less code than a procedural ERP like SAP, Openbravo or Compi
ere. So that's much less code to watch for the same features. Also bare in mind
that PLSQL, HSQL, JSP, XML IOC like Spring and all those usual techs won't provi
de you more static security either: they are dynamic stuff too even if they are
bad at OOP.
OpenERP comes with some unit and functional testing.
The compiler might do less work, there is a huge community testing the software,
that's valid too.
So Finally, a dynamic language such as Python is a very good choice for an ERP.
The runtime errors that might occur will always be discovered and fixed at imple
mentation time, so they will not be a trouble at runtime.
OpenERP howto
First, look at the demos: http://openerp.com/demonstration.html (also the flash
based demos) http://www.openobject.com/index.php?option=com_content&task=view&id
=30&Itemid=72
Now dive into the OpenObject framework, again practicing during roughly a week:
Old but still 99% valid and simple tutorial: http://openerp.com/wiki/index.php/D
evelopers:MinutesCustom/HomePage full doc: http://doc.openerp.com/developer/inde
x.html#book-develop-link
IDE howto
Install Eclipse and the PyDev plugin, you'll thus avoid indentation errors, have
a great editor with advances code navigation and debugging. Having OpenERP runn
ing inside PyDev is almost automatic on Linux but is way harder in Windows due t
o the use of native library you'll need to have properly installed. Depending on
you, you might even win time running a Linux VM inside Windows in such a case,
but again, that's up to you.
Here is an example debugging OpenERP with Eclipse and PyDev:
Good luck.
Comment by cristian...@gmail.com, Jan 8, 2009
Nice article
Comment by ernad.husremovic, May 10, 2009
great retrospection
Comment by jpba...@gmail.com, May 11, 2009
Hi, I'm interesting to develop under Windows, so
several dependencies and Eclipse+PyDev?. I have
e that includes these directories: - bin - doc lected the directory bin as source in the python
ese errors: Traceback (most recent call last):
57, in <module>
<module>
in <module>
in position 12: unexpec