1 / 25

OpenBiz Tutorial

OpenBiz Tutorial. Open Business software framework Sep. 2003. Note: this tutorial is for openbiz 1.1.x and lower version. Please use it as a reference document for openbiz 2.0. OpenBiz Introduction. What is OpenBiz? OpenBiz is an open php business software framework How can OpenBiz help?

amaris
Download Presentation

OpenBiz Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OpenBiz Tutorial Open Business software framework Sep. 2003 Note: this tutorial is for openbiz 1.1.x and lower version. Please use it as a reference document for openbiz 2.0

  2. OpenBiz Introduction • What is OpenBiz? • OpenBiz is an open php business software framework • How can OpenBiz help? • Build data-oriented complicated web application in an easy way • Build your application by constructing metadata file, not by coding • Easily extending for special requirements

  3. Build your application • Data model design • Database schema • BizObj design – business logic unit • What properties in the BizObj • What functions provided by the BizObj • BizForm design – presentation unit • Map BizObj properties and functions on UI • BizView design – presentation container • Contain multiple BizForm • Define relationship between BizForm • HTML Template design – GUI

  4. Data model design • Entity Relationship Graph • Modeling business data into database table schema • Please refer to database design book for details • Create tables in database • Create tables/indexes using GUI tools or scripts • Specify “Prefix” in id_table for each table so that SYSID of new record will be auto-generated as “Prefix”+sequence format. i.e. PLY_101 • Add your database connection information to config.xml. i.e. replace the “Default” database

  5. Data model design (example) event {SYSID, NAME, HOST, LOCATION… } player {SYSID, NAME, EMAIL, PHONE…} regist {SYSID, PLAYER_ID, EVENT_ID, FEE} A registration system modeling

  6. BizObj design • Each BizObj is based on a database table – base table • Properties in the BizObj • Map a field from a base table column • Map a field from a foreign table column • Does a field need pick data from other BizObj? • Functions provided by the BizObj • Basic functions are provided by OpenBiz • Implement special functions by extending BizObj

  7. BizObj design (example) • BORegist - base table = regist • Properties • Id  regist.SYSID • Player Id  regist.PLAYER_ID • Player Name  player.NAME (foreign table) • Event Id  regist.EVENT_ID • Event Name  event.NAME (foreign table) • Fee  regist.FEE • Functions – BizObj provides enough functions, no special requirement

  8. BizObj design (example cont.) Add BORegist BizObj in OpenBiz Objects Browser

  9. BizObj design (example cont.) XML metadata file for BORegist BizObj Fill Attribute value • Use Edit Attributes frame: • Click Table icon to select a table • Click Column icon to select a table column • Click BizObj icon to select a BizObj • Click BizField icon to select a BizField

  10. BizForm design • BizForm is the UI proxy of BizObj – base BizObj • A BizForm can have difference presentation mode (default, edit, query) associated with templates • Map a field control from BizObj field • Map a field control from base BizObj field • Does a field need pick data from other BizForm? • Is the field editable, visible? • Add functions on BizForm • Map functions provided by BizForm class to buttons. • Implement special functions by extending BizForm

  11. BizForm design (example) • FMRegist - base BizObj = BORegist • Default mode uses list Template • Edit, query mode uses group Template • Map BizObj fields to UI • Registration Id  [Id] • Player Id  [Player Id] Noneditable • Player Name  [Player Name] Noneditable, Need select field data from Player BizForm • Event Id  [Event Id] Noneditable • Event Name  [Event Name] Noneditable, Need select field data from EventPopup (a popup view contains FMEvent BizForm) • Fee  [Fee] Need select field from 2 values $15, $20.

  12. BizForm design (example cont.) • Add function buttons on UI toolbar • Search button  SearchRecord() • Go button  RunSearch() • New button  NewRecord() • Edit button  EditRecord() • Copy button  CopyRecord() • Delete button  DeleteRecord() • Save button  SaveRecord() • Cancel button  CancelRecord() • Add Navigation button on UI Navbar • Go Previous Button  MovePrev() • Go Next Button  MoveNext()

  13. BizForm design (example cont.) Add FMRegist BizForm in OpenBiz Objects Browser

  14. BizForm design (example cont.) XML metadata file for FMRegist BizForm Fill Attribute value • Use Edit Attributes frame: • Click BizField icon to select a BizField of the Bizobj defined in root element • Click BizForm icon to select a BizForm

  15. BizView design • BizView is the container of BizForms and other HTML controls • Page layout is defined in templates • Define the relationship between BizForms • A BizForm can help subforms that depend on its current data • A BizForm can depend on the current data of other BizForm

  16. BizView design (example) • What can a user do on the view? • Add/edit a new player • Add/edit registered event for a player • What should a user see on the view? • A player BizForm • A registration BizForm • What the relationship between Forms • The registration form depends on the current data of the player form

  17. BizView design (example cont.) List of players (FMPlayer BizForm) SubCtrls="FMRegist" Dependency List of registered events of the player (FMRegist BizForm) Dependency="reg_plyid=FMPlayer.ply_id" UI name of FMRegist “Player Id” UI name of FMPlayer “Player Id”

  18. BizView design (example cont.) • Create a BOPlayer BizObj • Id  players.SYSID • Name  players.NAME • Email  players.EMAIL • Phone  players.PHONE • Create a FMPlayer BizForm • Player Id  [Id] • Player Name  [Name] Sortable • Player Email  [Email] • Player Phone  [Phone] • Add function buttons and templates as FMRegist

  19. BizView design (example cont.) • Redesign FMRegist • Because FMRegist depends on FMPlayer, the player shown on FMPlayer is same as the player shown on FMRegist. It’s reasonable to hide Player Name in FMRegist • Hide Player Name in FMRegist • Player Name  [Player Name] Noneditable, Hidden

  20. BizView design (example cont.) Add RegistView BizView in OpenBiz Objects Browser

  21. BizView design (example cont.) XML metadata file for RegistView BizView Fill Attribute value • Use Edit Attributes frame: • Click BizForm icon to select a BizForm • Click Text icon to input long text

  22. HTML Template design • Typical templates • Table template – a HTML table contains multiple BizForm records • Group template – a HTML group contains single BizForm record • Other templates • Tree template (todo) • Special templates • All templates must has format <form id={$name} name={$name}>…</form>

  23. HTML Template design (cont.) • Data output from BizForm.Render • {$title}, {$name} as value • {$toolbar}, {$navbar} as array • {$columns} as array – field labels/headers • In table format • {$cells} as 2D array – fields values of multi-records • {$selRow} as array – current selected row flags • In array format • {$controls} as array – fields values of a record • These output variables can be used in your template files • Please refer to http://smarty.php.net/ for details

  24. HTML Template design (cont.) • Design UI theme of your application • Build color theme using CSS • Build button theme • GUI templates included in OpenBiz • Gray • Ocean (todo) • Land (todo) • Rose (todo)

  25. Summary • Development steps with OpenBiz Requirements Data model Create BizObj User Interface Create BizForm Create BizView Create Templates

More Related