Monday, June 29, 2009

Using Openbravo Forge to develop extensions

Introduction

This post describes the best practices and polices to apply in Openbravo Forge to develop and organize an extension. These are a simplified version of the same guidelines that we use to develop Openbravo ERP core project plus some specific guidelines for the Openbravo Forge usage.

Let's start by defining some key concepts:
  • Module: provides an atomic functionality. Examples of modules are reports, connectors, functional extensions, etc.
  • Pack: group all the modules necessary to enable Openbravo ERP for a mean. For example, a vertical pack that collects all the modules required to enable Openbravo ERP for a specific industry.
  • Template: a configuration file plus a collection of packs and modules
Documentation

Before starting any development, we recommend to create a set of documentation that will guide the development and will help users in the future to understand what the module achieves.

We recommend to have the following documentation:
  • A Main Page that serves as an entry point to the projects' documentation and describes its objective and links to the related documentation.
  • A Functional Specification that describes the functional requirements, use cases and other documentation that describe the needs that the module is willing to cover.
  • A Technical Documentation that covers all the technical aspects to be taken into consideration when developing the module (such as database structure, etc).
You can take a reference the Human Capital Module to better understand how to organize this documentation.

Source Control System

Developers can use the source control system of their choice. Openbravo Forge provides Subversion as source control system. The instructions given in this section apply only to Subversion, including the recommended repository structure for Openbravo modules. You can leverage on your source control system specific features for branching and tagging.

The following is a list of common terminology used when working with Subversion:

Subversion client. Software run by a user to access a Subversion server also called Subversion repository.
  • Subversion repository. The Subversion server stores a copy of the files of the project. The server retains both the most recent version and every historical version (past changes). * Trunk. Development with Subversion progresses similar to a tree. The main development occurs against the trunk.
  • Branch. A split of development off of the trunk or another branch. Branches allow developments to diverge either permanently or temporarily.
  • Tag. A tag or label refers to an important snapshot in time, consistent across many files. These files at that point may all be tagged with a user-friendly, meaningful name or revision number.
Recommended Repository Structure for Openbravo Modules

Openbravo recommends following structure when organizing the source code of your module:

project_name
* tags
* trunk
* branches

When developing a module, the main development activity occurs in the main development trunk.

All developers commit the changes against this branch. When a version is reach, a tag should be done.

If you want to work with a stable version you usually download the tagged version (a released version) and if you want to follow the development you download trunk.

We recommended the Version Control with Subversion free on-line book.

Registering Modules

As a prerequisite to publish modules into the Central Repository, you have to first register them.

This a list of recommendations when registering modules within the Central Repository from Openbravo ERP:

Use the field help to give precise instructions on how to use the module once is installed. For example, the required steps to access it from Openbravo ERP menu.
  • Do not leave the URL field in blank, provide the project's web where users can find more information about your product.
  • Do not leave the author's field in blank. It should be clear to the user who the author is.
  • Package name. Use the standard package name naming conventions from Java, for example com.yourcompany.project. The package name org.openbravo is reserved for Openbravo as a company.
  • If you are registering a module, use the same Single Sign-on username to register and then to associate it.
  • Do not use the name of the client in the code or in the module definition
  • It is fine to develop in other languages than English but the language of the module must be set accordingly
  • If the module has been tested only in one database (Oracle or PostgreSQL), you might want to add that as a note in the module description ("This module should be data base independent; however it has been tested only on Oracle | PostgreSQL").
Creating Packs
Packs
When creating a pack project in Openbravo Forge, we recommend to enable the following services in Openbravo Forge:

  • Module: to publish the pack in the central repository
  • Forums: to discuss issues for the functionality that the pack targets
  • Wiki: to document the configuration and link to the rest of the resources
We suggest to discard the usage of the rest of the services that the Forge provides.

Additionally, we recommend:
  • Since a pack groups modules, they should not contain code, and as result, they should not require a source control system.
  • We recommend to report issues, using the bug tracking system, to each particular module instead of reporting to a pack.
  • We only recommend to publish files in the download area during the development cycle, you post your obx file in progress in the download area for early adopters to download and evaluate. We do not recommend to publish the files in the download service once they are released since you can already download files published in the central repository.
  • When registering the project, assign it to the Openbravo ERP -> Packs category.
Module

When creating a module in Openbravo Forge, we recommend to enable the following services:
  • Module: to publish the module in the central repository
  • Code: to develop the code of the module and be able to work in a collaborative manner with other developers
  • Bug Tracking: to allow users to report issues or functionality enhancements
  • Wiki: to document the configuration and link to the rest of the resources
For modules, we suggest to discard the usage of the rest of the services that the Forge provides.

Additionally, we recommend:
  • We only recommend to publish files in the download area during the development cycle, you post your obx file in progress in the download area for early adopters to download and evaluate. We do not recommend to publish the files in the download service once they are released since you can already download files published in the central repository.
  • When registering the project, assign it to the Openbravo ERP -> Modules category.
Template

A template is a configuration file plus a collection of packs and modules. We recommend to enable the following services in Openbravo Forge:
  • Module: to publish the template in the central repository
  • Code: to develop the configuration file
  • Forums: to discuss about the template
  • Bug Tracking: to track issues with the configuration file
  • Wiki: to document the configuration and link to the rest of the resources
Additional Information

Openbravo ERP development guide that includes all the documentation on how to develop extensions

41 comments:

Mithu said...

The article is very useful for me. But I have few enquiry-
1. Once upload a module (type module), can I use the same package name with different type(Template) as updated version in forge?
2. When shall I get the delete module option from the Project in forge?
Thanks in advance
__
Aminur

avril said...

美女交友artdab美女交友cys pm美女交友djgift美女交友ggo美女交友ggoo美女交友locarno美女交友sfr美女交友thcmt美女寫真mat情色a片flashxyz美女交友artdab美女交友cys pm美女交友djgift美女交友ggo美女交友ggoo美女交友locarno美女交友sfr美女交友thcmt美女寫真mat情色a片flashxyz美女交友artdab美女交友cys pm美女交友djgift美女交友ggo美女交友ggoo美女交友locarno美女交友sfr美女交友thcmt美女寫真mat情色a片flashxyz美女交友artdab美女交友cys pm美女交友djgift美女交友ggo美女交友ggoo美女交友locarno美女交友sfr美女交友thcmt美女寫真mat情色a片flashxyz

奇怪 said...

閱讀您的BLOG文章,真是件快樂的事!!........................................

雅雯雅雯 said...

色情論壇080豆豆聊天室avroom080aa片直播尼克成人網正妹空姐寫真正妹走光正妹找樂子sexav999免費影片日本制服美女日本制服美少女寫真集日本制服學生妹日本刺青圖片日本動畫卡通日本動漫卡通h日本十大av女優日本免費AV線上看日本免費試看短片日本免費視訊帳號視訊 辣妹美女 視訊sex888movie影城免費a片go2av免費影片航海王h短片分享go2av免費看影片a圖打飛機專用網情色cu成人bt入口hi5 tv聊天交友sun city性愛俱樂部影音聊天sex520免費影片日本視訊美女視訊聊天台灣論壇女生遊戲台灣論壇女生免費影片下載區性愛方式教學性愛文學小說性愛技巧圖解性愛技巧大全性愛技巧寫真

奕LonniePettus0908希 said...

上班很累,摸個魚輕輕鬆鬆的逛部落 ........................................

童紫勳 said...

What is sauce for the goose is sauce for the gander.......................................................

1hose韻如ak09r_cruickshan said...

nice job! waiting for your new artical. ........................................

勝傑懿綺 said...

幸福沒有鑰匙,只有梯子。..................................................

宛蓉 said...

謝謝您的分享~感恩唷!!..................................................

KimberelyM14165 said...

很喜歡你的blog哦...加油唷 ........................................

Bob0104byWas0104ham said...

I love readding, and thanks for your artical..............................................

517SeritaG_Jamar0 said...

成人分享 視訊, 未成年聊天 免費色情片觀賞 交友 日本av女優 性感美女 成人影片免費下載 偷拍成人貼圖站 6k聊天室 台灣愛愛片 情趣貼徒區 18免費線上 台灣美少女自拍a片免費 光碟影城 a片家庭教師姊姊h的偏差 情色五月天 日本色情短片 性感美女成人一夜情 免費影片下載383 完美女人影音 美女視訊 完美女人 辣妹成人網 人妻熟女bt 歐美熟女作愛 視訊做愛 空姐 a片a圖貼圖網 情色寫真集 85cc免費影城長片 18禁微風 成人嘟嘟往 www.777 皮卡丘貼圖 援交綱站 嘟嘟情人網  鋼管 av女憂 洪爺影音館 大奶av女優 gogosexy 遊戲下載 強姦 女性性高潮 後宮無碼情色網 限制級小說作者 0204成人影片欣賞 無碼性愛 林志玲走光

清民 said...

能猜得出女人真實年齡的男人也許耳聰目明,但肯定毫無大腦。哈哈!......................................................

苑淑淳如 said...

從人生中拿走友誼,猶如從生活中移走陽光 ............................................................

慶天 said...

真正的朋友不會把友誼掛在嘴巴上 ............................................................

juliancu said...

The shortest answer is doing. ............................................................

tyroneb said...

舊書不厭百回讀,熟讀深思子自知。........................................

RoseH_Huls21365 said...

More haste, less speed...................................................................

劉彥皓 said...

路過看到好的blog,不推對不起自己.................................................................

孫陽泉 said...

所有的資產,在不被諒解時,都成了負債....................................................................

江婷 said...

死亡是悲哀的,但活得不快樂更悲哀。.................................................................

彥安彥安 said...

成熟,就是有能力適應生活中的模糊。.................................................................

天花天花 said...

如果成為一支火柴,也要點亮一個短暫的宇宙;如果是一隻烏鴉,也要叫疼閉塞的耳膜。.................................................................

芸茂芸茂 said...

來幫推 你個blog影d相真係好靚,係我至愛~ ..................................................................

淑娟淑娟 said...

一棵樹除非在春天開了花,否則難望在秋天結果。..................................................

婷珊 said...

想別人怎樣對你,你便怎樣對待別人。.......................................................

馬旖 said...

IS VERY GOOD..............................

溫緯李娟王季 said...

如果你批評他人。你就沒有時間付出愛............................................................

黃威宇 said...

死亡是悲哀的,但活得不快樂更悲哀。. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

莊雅和莊雅和莊雅和 said...

甘巴嗲!祝你愈來愈好!.................................................................

劉士賢劉士賢 said...

男女互悅,未必廝守終生,相愛就是美的。.................................................................

文吳云 said...

No one knows the weight of anothers burden. ..................................................

家唐銘 said...

噴泉的高度,不會超過它的源頭。一個人的事業也是如此,它的成就絕不會超過自己的信念。............................................................

黃子黃麗旺軒 said...

人生是故事的創造與遺忘。............................................................

子怡谷怡谷怡谷翔 said...

愛情是盲目的,但婚姻恢復了它的視力。......................................................................

韋陳富 said...

Never put off till tomorrow what may be done today..................................................................

翊翊翊翊張瑜翊翊翊 said...

困難的不在於新概念,而在於逃避舊有的概念。......................................................................

江仁趙雲虹昆 said...

第一次睇你blog,鐘意!............................................................

林陳欣樺陳欣樺陳欣樺浩天 said...

好的blog需要我們一起努力!

SadeRa盈君iford0412 said...

原來天鵝嫁給癩蛤蟆就會生出醜小鴨。。。...........................................................

tenax_technologies said...

Thanks for sharing.

Tenax Technologies is a Belarussian software development company delivering complex web solutions. We provide comprehensive Java development of complex internet systems.
software company