Openbiz, the next generation

23 views
Skip to first unread message

Agus Suhartono

unread,
Mar 2, 2012, 8:23:58 PM3/2/12
to openbiz-cubi
I think about openbiz,
how about the future

how to make more powerful openbiz
how to make openbiz power can be used in various types of web applications

All Library
-----------------
- use power of namespace
- use Universal AutoLoad and use ClassMap increase performance
- if possible, library of Openbiz is group of components, that each component is independent, can use on other framework

MetaObject
-----------------
- meta-namespace can use dot (.) and back-slash (\)
- can use various storage media (XML, php array, YAML, database, etc)
- location of metaobject can set from out of library, like Universal ClassLoader
  REF :
     https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md)
     https://gist.github.com/221634

   for example:

     ObjectFactory::register('MyLib', '/path/to/mylib', {'xml', 'php', 'yml'}  )
        MyLib                  ==> is prefix of MetaObject (Vendor Name)
        /path/to/mylib       ==> is loacation of MetaObject
        {'xml', 'php', 'yml'}  ==> is type of MetaObject that supported

  - MetaObject is independent component that can use on other framework.
   
DataObject
--------------------      
- DataObject can save data on various storage media, not only database, but can save on text, xml, session, etc
- use base interface and can extend for any use.

Form :
-------------------
Form can handle not only AJAX app, but also clasic web. This good for CMS or other front-end application
For business framework, can handle master detail transaction, exaample POS application

MVC
-------------------
Front Controller cal stillcall View directly
but also can call Controller (on original MVC term)
action on Controller can call View

example :
   class MyController {

      public function actionMemberList() {     
           $view = new Openbiz\View\StandarView();
           $view->setTemplate('.......')
           $view->addForm(...);
           $view->addForm(...);
           $view->render();
      }

      public function actionMemberList2() {     
           $view = new \Openbiz\System\ObjectFactory('Collab\MemberListView');
           $view->render();
      }

      public function actionMemberList3() {     
           $data = new \Openbiz\System\ObjectFactory('\MyPrefix\namespase\Member');
           echo '<pre>';          
           print_r( $data->loadAll() );          
      }

      public function actionOtherAction()
         echo 'Openbiz, the next generation';
     )

  }


Best Regards


Agus Suhartono

Rocky Swen

unread,
Mar 5, 2012, 3:52:50 AM3/5/12
to openbi...@googlegroups.com
Thanks for presenting ideas of improving openbiz.

The goal of openbiz framework is not to provide a general framework like Zend Framework, CodeIgniter and others. The goal is to give developers a platform for writing their business logic.

# Openbiz - library as well as framework
Under the hood, Openbiz is an Inverse of Control (IoC) container like Spring Framework. For details, please check wiki page http://code.google.com/p/openbiz-cubi/wiki/OpenbizIoC. So openbiz object and meta can be hooked into other systems or frameworks.

# Meta Object
Openbiz load meta object from either memory cache (APC), or file cache (as php array), or xml metadata file.
I agree that loading meta from database gives a new option that allows managing metadata from central place.

# Data Object
User can also use Openbiz data object part and write UI with their own way. Jixian has done several CMS applications with such approach.

# Form
The current EasyForm does support both Ajax and traditional form submit. The choice depends on the FunctionMethod in Form Element tag.

# MVC
In openbiz, implicit controller is used. For example, index.php is the front controller, view and form are the action controller, methods in form class are the action handlers.
Developers are free to write their controller code and invoke Openbiz objects in the code. Again this approach was employed by Jixian in his CMS applications.
Reply all
Reply to author
Forward
0 new messages