<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4851655919425072664</id><updated>2012-01-31T05:41:56.006-08:00</updated><title type='text'>Openbiz Cubi</title><subtitle type='html'>This blog is to record all progress of Openbiz framework and Cubi Platform</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-731912632016274172</id><published>2010-05-30T11:23:00.000-07:00</published><updated>2010-05-30T12:04:50.120-07:00</updated><title type='text'>Openbiz Cubi Menu</title><content type='html'>Cubi Menu is the core component that manages the application navigation.&lt;br /&gt;&lt;br /&gt;Normally, a web application (or web site) hand code several navigation elements, such as menus, tabs, breadcrumb and so on. This was the way used in previous Openbiz application - manually add left menu items on each view or template.&lt;br /&gt;&lt;br /&gt;Let's talk how the new menu system works in Openbiz Cubi.&lt;br /&gt;1. Definition of menu&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Menu is a tree structure&lt;/li&gt;&lt;li&gt;Each menu item include navigation attributes like name, title, url, icon...&lt;/li&gt;&lt;/ul&gt;2. Menu presentation on web page&lt;br /&gt;Menu is tree structure. It can be presented as application tab, breadcrumb, navigation menu, sitemap on a web page.&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/_qXgW8WS--Q4/TAKyJ4ZmTGI/AAAAAAAAAsg/emRArna7rAE/s1600/cubi_menu.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;The diagram below shows how the menu tree maps to UI elements.&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/_qXgW8WS--Q4/TAK0BT-s4DI/AAAAAAAAAsw/DXg5M2AYSEg/s1600/cubi_menu_map.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;3. How to add menu in your own module&lt;br /&gt;Each module can add entries in Cubi menu. In module/mod.xml, there is a Menu section to add MenuItem. The key to append module menu to system menu is&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the top MenuItem element, set Parent="existing_menuitem". It will append this menu as a child of specified menuitem&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Or leave the Parent="". It will tell this menu as a root first level menu item.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/_qXgW8WS--Q4/TAK1u0IoORI/AAAAAAAAAs4/vRysCDQp2MQ/s1600/cubi_menu_xml.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;4. How to manage menu in the Cubi application&lt;br /&gt;Once a module is loaded in the system, its menu is inserted as well. Then you can see the menu items appear on proper place like navigation menu or application tab.&lt;br /&gt;&lt;br /&gt;If you are admin, you can manage menu items in "Menu Management" views. This will be cover in separate topic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-731912632016274172?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/731912632016274172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/openbiz-cubi-menu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/731912632016274172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/731912632016274172'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/openbiz-cubi-menu.html' title='Openbiz Cubi Menu'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_qXgW8WS--Q4/TAKyJ4ZmTGI/AAAAAAAAAsg/emRArna7rAE/s72-c/cubi_menu.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-1727220250703161515</id><published>2010-05-23T23:30:00.000-07:00</published><updated>2010-05-23T23:47:57.464-07:00</updated><title type='text'>Cubi module enhancement</title><content type='html'>The goal of Cubi module is to allow developers to write their own components and plug in to Cubi application. So each module should have its own&lt;div&gt;&lt;ul&gt;&lt;li&gt;module description information&lt;/li&gt;&lt;li&gt;database tables and preload data&lt;/li&gt;&lt;li&gt;menu definition. menu tells users where to access the module functionality&lt;/li&gt;&lt;li&gt;depend-on modules who need to be installed before this module&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Let's see how cubi enhance its module management. The mod.xml is the main description file. It schema has 3 major part:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;ACL&lt;/li&gt;&lt;li&gt;Menu&lt;/li&gt;&lt;li&gt;Dependency&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Sample mod.xml can be found in cubi/modules/help/mod.xml&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;module name="menu" description="menu management module" author="Jixian" version="0.1" openbizversion="2.4"&gt;&lt;/module&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Developer can add the module specific sql in &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style=" ;font-size:small;"&gt;mod.install.sql and &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span"  style=" ;font-size:small;"&gt;mod.uninstall.sql&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Cubi provides a command line tool to load module. The command is cubi/install/load_module.php &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# php load_module.php module_name&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;To help prepare fresh cubi installation data, developer can use script at cubi/install/create_cubidb.php&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# php create_cubidb.php&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This script create a fresh database called "cubi_install". You can dump the database to cubi/install/cubi.sql. This database will be used in installation wizard.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-1727220250703161515?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/1727220250703161515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/cubi-module-enhancement.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/1727220250703161515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/1727220250703161515'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/cubi-module-enhancement.html' title='Cubi module enhancement'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-5600110013490602630</id><published>2010-05-17T01:15:00.000-07:00</published><updated>2010-05-18T00:12:53.139-07:00</updated><title type='text'>Cubi cronjob manager</title><content type='html'>Every week Openbiz makes progress on feature implementation and bug fixes. I should have worked more harder to record them in the blog.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cronjob manager is added in Cubi. What cronjob manager does?&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Provide a backend management UI to allow administrator to add/edit/delete command in cronjob format&lt;/li&gt;&lt;li&gt;A job manager script that reads and parses the jobs in the cronjob list, then execute them.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;A cronjob defined in Cubi can have following attributes.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;name&lt;/li&gt;&lt;li&gt;minute, hour, day, month, weekday. Unix cronjob format is used. Note: */N format is not supported.&lt;/li&gt;&lt;li&gt;command. This is the command to run in this job.&lt;/li&gt;&lt;li&gt;sendmail. This field includes the emails to be sent after completing executing the job.&lt;/li&gt;&lt;li&gt;max_run. max_run tells how many concurrent execution of this job. By default max_run=1. It means only single job can run as the same time. If max_run=0, then no limit of the concurrent job execution.&lt;/li&gt;&lt;li&gt;description&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;To start cronjob manager, add "cubi/bin/cronjob/cron.php" in system crontab. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;cronjob log files are outputted to cubi/log. Each job will have its own log.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cubi provides a helper command called run_svc.php that can invoke service with following format.&lt;/div&gt;&lt;div&gt;usage: php run_svc.php service_name method parameter1 parameter2 ...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Cronjob manager can add this command to the job list.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-5600110013490602630?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/5600110013490602630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/cubi-cronjob-manager.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/5600110013490602630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/5600110013490602630'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/05/cubi-cronjob-manager.html' title='Cubi cronjob manager'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-2323943161782909579</id><published>2010-02-21T22:26:00.000-08:00</published><updated>2010-02-21T23:25:15.495-08:00</updated><title type='text'>Cubi clean url</title><content type='html'>In Openbiz baseapp, a typical url to access a view is like http://host/baseapp/bin/controller.php?view=a.b.viewname. We call it raw openbiz url.&lt;br /&gt;&lt;br /&gt;Cubi will map cleaner urls to raw urls by adding an index.php and .htaccess under the root directory of cubi installation.&lt;br /&gt;&lt;br /&gt;View mapping syntax:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;/cubi/a/x maps to /cubi/bin/controller.php?view=a.view.XView. Example: /cubi/system/userList&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/cubi/a/x_y maps to /cubi/bin/controller.php?view=a.view.XYView. Example: /cubi/system/user_list&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/cubi/a/x/number maps to /cubi/bin/controller.php?view=a.view.XView&amp;amp;fld:Id=number. Example: /cubi/system/user_detail/5&lt;br /&gt;&lt;/li&gt;&lt;li&gt;/cubi/a/x/word_number maps to /cubi/bin/controller.php?view=a.view.XView&amp;amp;fld:word=number&lt;/li&gt;&lt;/ul&gt;If .htaccess is not recognized by web server (e.g. installed on IIS), then you need to do the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Add "?" right after /cubi/. This assumes that index.php is the default script configured in web server. For example, http://host/cubi/?/system/user_list&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Or add "index.php?" right after /cubi/. For example, http://host/cubi/index.php?/system/user_list&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-2323943161782909579?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/2323943161782909579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-clean-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2323943161782909579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2323943161782909579'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-clean-url.html' title='Cubi clean url'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-2029717123045151648</id><published>2010-02-20T22:58:00.000-08:00</published><updated>2010-02-20T23:24:29.815-08:00</updated><title type='text'>Cubi new openbiz.js</title><content type='html'>In previous openbiz baseapp, clientUtil.js is the main js library to support openbiz browser end logic. It handles Ajax call, form behavior, popup, dialog, richeditor, auto suggestion ... When more functions are inserted in the js file, the code get more messy.  Cubi replaces clientUtil.js with openbiz.js in order to get the browser code more organized.&lt;br /&gt;&lt;br /&gt;The code structure in openbiz.js&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Openbiz - main Openbiz namespace. It manages the form objects and provide entry of openbiz ajax call&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Openbiz.ActionType. It defines the action types of openbiz ajax call.&lt;/li&gt;&lt;li&gt;Openbiz.Form. Each openbiz form instance will have a javascript Openbiz.Form instance&lt;/li&gt;&lt;li&gt;Openbiz.TableForm. This is the js instance of openbiz List/grid form.&lt;/li&gt;&lt;li&gt;Openbiz.Net. It provides network related functions like ajax call.&lt;/li&gt;&lt;li&gt;Openbiz.Window. It manages popup, dialog logic.&lt;/li&gt;&lt;li&gt;Openbiz.Util. It has some utility functions.&lt;/li&gt;&lt;li&gt;Openbiz.Menu. It has functions to show and hide context menu&lt;/li&gt;&lt;li&gt;Openbiz.CKEditor. It has functions that integrate CKEditor with ajax call.&lt;/li&gt;&lt;li&gt;Openbiz.AutoSuggest. It has functions that initiates autosuggestion control&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Openbiz.Validator. It has functions that validate user entries on client side only.&lt;/li&gt;&lt;/ul&gt;With the replacement of clientUtil.js to openbiz.js, there will be some change needed on the existing template, code that worked with clientUtil.js. For example.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Replace CallFunction with Openbiz.CallFunction in the list template file&lt;/li&gt;&lt;/ul&gt;Most changes are done in the openbiz code already to work with the new openbiz.js.&lt;br /&gt;&lt;br /&gt;Openbiz.js introduce another importance changes.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;User JSON in all ajax call.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-2029717123045151648?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/2029717123045151648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-new-openbizjs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2029717123045151648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2029717123045151648'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-new-openbizjs.html' title='Cubi new openbiz.js'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-830441867159346426</id><published>2010-02-20T22:39:00.000-08:00</published><updated>2010-02-20T22:56:08.209-08:00</updated><title type='text'>Cubi metadata naming convention</title><content type='html'>Before Cubi, Openbiz developers can name their metadata with any name. For example, an user list form can be named as&lt;br /&gt;&lt;ul&gt;&lt;li&gt;FM_UserList.xml&lt;/li&gt;&lt;li&gt;f_userlist.xml&lt;/li&gt;&lt;/ul&gt;In Cubi, metadata name follows the syntax as "NameType". For the user list form, Cubi will use&lt;br /&gt;&lt;ul&gt;&lt;li&gt;UserListForm.xml&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;The advantage of this name besides its clarity is that its custom form class can have the same name. To define a custom class, you just need to set&lt;br /&gt;&lt;easyform name="UserListForm" class="UserListForm"&gt; in the UserListForm.xml&lt;br /&gt;Then add UserListForm.php in the same directory.&lt;br /&gt;&lt;br /&gt;Sample metadata names from Cubi/modules/system directory&lt;br /&gt;For DataObject metadata&lt;br /&gt;/do/UserDO.xml&lt;br /&gt;/do/RoleDO.xml&lt;br /&gt;&lt;br /&gt;For Form metadata&lt;br /&gt;/form/UserListForm.xml&lt;br /&gt;/form/UserEditForm.xml&lt;br /&gt;/form/UserNewForm.xml&lt;br /&gt;&lt;br /&gt;For View metadata&lt;br /&gt;/view/UserListView.xml&lt;br /&gt;/view/UserEditView.xml&lt;br /&gt;/view/UserNewView.xml&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-830441867159346426?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/830441867159346426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-metadata-naming-convention.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/830441867159346426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/830441867159346426'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/02/cubi-metadata-naming-convention.html' title='Cubi metadata naming convention'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-3634248496009308134</id><published>2010-01-27T23:58:00.000-08:00</published><updated>2010-01-28T00:32:32.053-08:00</updated><title type='text'>Cubi Access Control (ACL)</title><content type='html'>Cubi will extend the existing Openbiz access control approach by allowing administrator the manage role access to system resources. The following chapter outlines how ACL is managed in Cubi.&lt;br /&gt;&lt;br /&gt;Basic ideas: define how a &lt;span style="font-weight: bold;"&gt;role &lt;/span&gt;can access application &lt;span style="font-weight: bold;"&gt;resource&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Define resource and its actions&lt;/span&gt;&lt;br /&gt;In each module, it can have mod.xml under the module root directory. In mod.xml, there can be a "ACL" section which can have multiple resources. Each resource can have more than 1 actions. For example,&lt;br /&gt;&amp;lt;ACL&amp;gt;&lt;br /&gt;        &amp;lt;Resource Name="User"&amp;gt;&lt;br /&gt;            &amp;lt;Action Name="Administer_Users" Description="Administration of users"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Link Access resource action to Object&lt;/span&gt;&lt;br /&gt;In each Openbiz object, developer can set Access attribute to certain resource action. For example,&lt;br /&gt;&amp;lt;EasyView Name="UserListView"... Access="User.Administer_User"&amp;gt;&lt;br /&gt;gives the administer user access to the system.view.UserListView&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. Assign Role permission to resource action&lt;/span&gt;&lt;br /&gt;In the role detail page, user can pick "Allow" or "Deny" to all available resource actions. Say, we give role "member" a "Deny" to User.Administer_User. Then when a user with member role tries to access the RoleListView, an access deny page will shown to the user.&lt;br /&gt;&lt;br /&gt;Access attribute can be given to View, Form, Element, DataObj.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-3634248496009308134?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/3634248496009308134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-access-control-acl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/3634248496009308134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/3634248496009308134'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-access-control-acl.html' title='Cubi Access Control (ACL)'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-2859252369284280382</id><published>2010-01-23T22:50:00.000-08:00</published><updated>2010-01-23T23:54:26.003-08:00</updated><title type='text'>Cubi Menu module (1)</title><content type='html'>Menu plays a key role in any application. Not only it helps user to navigation the application, it also help to organize content.&lt;br /&gt;&lt;br /&gt;Generally Menu can be classified into 2 types:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Static menu. Menu items are hard-coded in page, template, metadata files or source code. User cannot change the menu in the application.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Dynamic menu. Menu is generated from the database and user can configure menu in the application.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Static menu is simple and widely used in most applications where navigation in the application is designed in the product. While dynamic menu is commonly used in content rich systems (like CMS, forum ...) where the site administrator can configure menu to let user to navigate into growing content.&lt;br /&gt;&lt;br /&gt;Cubi is going to support both static and dynamic menus. In Cubi first release, static menu will be supported. In Openbiz 2.4, there are 3 different types of navigation components.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Tab. Include top-level application tab and in page tab (2nd level)&lt;/li&gt;&lt;li&gt;Menu. It support pull down menu up to 3 levels&lt;/li&gt;&lt;li&gt;Tree. It organize menu items in tree style&lt;/li&gt;&lt;/ul&gt;All 3 of components are currently have their own metadata even though they are telling the same things internally. In Cubi, we will have a separate Menu module. It is featured with&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Same metadata for tab, menu and tree.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Different template to render tab, menu or tree.&lt;/li&gt;&lt;li&gt;Have "Application tab" and "Admin menu" for Cubi to use.&lt;/li&gt;&lt;/ol&gt;Menu metadata can use the one in openbiz baseapp.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;menu Name="" Class="" TemplateEngine="PHP" TemplateFile=""&amp;gt;&lt;br /&gt;&amp;lt;menuitem url="" target="" text="a" icon="a.gif"&amp;gt;&lt;br /&gt;    &amp;lt;menuitem url="" target="" text="a1" icon="a1.gif"&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-2859252369284280382?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/2859252369284280382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-menu-module-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2859252369284280382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2859252369284280382'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-menu-module-1.html' title='Cubi Menu module (1)'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-6800277717626494915</id><published>2010-01-21T15:34:00.000-08:00</published><updated>2010-01-21T16:19:34.254-08:00</updated><title type='text'>Add more security on the server actions</title><content type='html'>Openbiz framework makes it open for browser client to invoke the server object method through Ajax call. Of course, developers can add rules to protect different actions (e.g. use UpdateCondition and DeleteCondition in 2.3 and use ACL control in Cubi), people may want to have some easier approach to filter out unsafe actions triggered from the browser.&lt;br /&gt;&lt;br /&gt;Here is the proposal for so called "safe actions filter" on Openbiz 2.4. This will be released in the 2.4 SVN before Feb.&lt;br /&gt;&lt;br /&gt;First, only Form object method calls from browser are allowed. Other objects method calls are blocked by the controller.&lt;br /&gt;&lt;br /&gt;Second, EadyForm class will have a new method&lt;br /&gt;public function getMethodsWhiteList()&lt;br /&gt;This method returns a list of methods that are exposed to browser client. By default EasyForm will compose the list with:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;All methods that are defined in the form metadata EventHandlers. Say you have 2 EventHandlers of 2 button elements on user.AccountForm. They link to methods "editAccount" and "resetPassword". Then only these 2 methods are in the white list.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Some safe methods like "selectRecord" which is usually not linking to a event handler.&lt;/li&gt;&lt;/ul&gt;When an server action is invoked (through Ajax for example), the controller will check if the target object is a form object, then check if the called method is in the white list. This approach will give more security on the server side logic.&lt;br /&gt;&lt;br /&gt;getMethodsWhiteList() can be overrided by your any form class to implement custom logic.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-6800277717626494915?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/6800277717626494915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/add-more-security-on-server-actions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/6800277717626494915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/6800277717626494915'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/add-more-security-on-server-actions.html' title='Add more security on the server actions'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4851655919425072664.post-2529242699027713565</id><published>2010-01-19T13:34:00.000-08:00</published><updated>2010-01-19T13:47:57.599-08:00</updated><title type='text'>Cubi - PHP Applicaiton Platform</title><content type='html'>Cubi is a php application platform. It is actually a application built on Openbiz. The goal of Cubi is to provide commonly used functionality in a platform level. It will boost the productivity of Openbiz-based application development.&lt;br /&gt;&lt;br /&gt;Cubi 0.1 is planned to release on Feb 2010. It will include the following features.&lt;br /&gt;&lt;br /&gt;- User management. Administer user and assign roles to user&lt;br /&gt;- Role management. Administer role and assign role with ACL. Permission&lt;br /&gt;control is done here by assigning Module actions to Role&lt;br /&gt;- Module management. Load new module, reload module, check module&lt;br /&gt;resource actions which is related to ACL&lt;br /&gt;- Email queue and log&lt;br /&gt;- Cronjob manager (not done yet)&lt;br /&gt;- Event log manager&lt;br /&gt;- New naming convention of metadata files&lt;br /&gt;- Menu module. This is to manage application menus. (not started yet,&lt;br /&gt;might not be in first release)&lt;br /&gt;&lt;br /&gt;User login and my account&lt;br /&gt;- User login&lt;br /&gt;- Forget password and password reset email&lt;br /&gt;- User registration and welcome email&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4851655919425072664-2529242699027713565?l=phpopenbiz.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phpopenbiz.blogspot.com/feeds/2529242699027713565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-php-applicaiton-platform.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2529242699027713565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4851655919425072664/posts/default/2529242699027713565'/><link rel='alternate' type='text/html' href='http://phpopenbiz.blogspot.com/2010/01/cubi-php-applicaiton-platform.html' title='Cubi - PHP Applicaiton Platform'/><author><name>Rocky</name><uri>http://www.blogger.com/profile/11218963235030700488</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
