I tried it and just wanted to get other feedbacks and discuss. Can tell you about my experience.
How it works
There are 3 Steps I’ve made using the Backvendor to make the simple project. You may also review the demo which I’ve found at the GitHub (https://github.com/mobidevpublisher/backvendor-demo.)
Step 1.
Download the extension from the site (https://github.com/mobidevpublisher/backvendor) and put it in the folder with web access (I did not change name from backvendor). After that, type in the command line:
cd/path/to/webroot/backvendor
php bviic.php createmultiapp - path = “/path/to/webroot/my-demo-project”
In a few seconds we get the new project which is located in the my-demo-project. It already has a application structure and the base classes ready to tunning-up for the project purposes.
Step 2.
Before continuing we need to make the database migration (made before and provide the access in the core/config/db.php). To do that type the next commands in the console:
cd/var/www/my-demo-project/applications/backend/protected
php yiic migrate
Step 3.
Configuring the administration panel.
In the new project you will need to generate a model for the required tables with Gii Tool. Its settings are placed in the file/core/config/main.php. During the model generation set the path for them «core.models»
Basic settings for CRUD and models are in the file backend / protected / controllers / SiteController.php, the function reconfigureEntityParamsDictionary. In my demo-project this function looks like:
self::$entityConfigDictionary = CMap::mergeArray(
parent::$entityConfigDictionary, array(
‘user’ => array(
‘modelName’ => ‘User’,
‘excludeFromGridView’ => array(
‘password’, ‘salt’,
),
‘excludeFromDetailView’ => array(
‘password’, ‘salt’,
),
‘modelAlias’ => ‘Blog User’,
‘modelAliasPlural’ => ‘Blog Users’,
‘bool’ => array(‘admin’),
‘datetime’ => array(‘creation_date’),
‘images’ => array(‘image’),
‘title’ => ‘username’,
‘link’ => array(
‘fb_link’ => ‘http://www.facebook.com/profile.php?id={value}’
),
‘password’ => array(‘password’),
‘dropDown’ => array(
‘role’ => array(
1 => ‘Publisher’,
2 => ‘Moderator’,
3 => ‘Writer’,
),
),
‘maxUploadedImageSize’ =>
array(‘width’ => 200, ‘height’ => 200),
‘selectable’ => 2,
‘nuke’=>true
),
‘post’ => array(
‘modelName’ => ‘Post’,
‘notUseTitleOfRelation’ => array(‘author’),
),
‘postCategory’ => array(
‘modelName’ => ‘PostCategory’,
‘linksManyToManyRelation’ => array(‘post’, ‘category’)
),
‘category’ => array(
‘modelName’ => ‘Category’,
‘modelAliasPlural’ => ‘Categories’,
),
));
}
That’s all.
Each key in the array (User, Post, etc.) - is the name of the entity. The settings description you may find in - http://mobidev.biz/backvendor_create_backend.html
Configuring entities properly will help you not to create the CRUD for them manually, also you don’t have to edit the model.
The web service is placed in the folder apllication/webservice. It contains basic API class where you may define API methods.
Links:
-
Detailed information about the project is available here (http://mobidev.biz/backvendor.html)
-
Project documentation:
Full list of documents (http://mobidev.biz/backvendor_overview)
Documentation for the API (http://mobidev.biz/backvendor_create_webservice_api.html)
Deploying code (http://mobidev.biz/backvendor_using_phing_build.html)
- What and where to download:
Backvendor (https://github.com/mobidevpublisher/backvendor)
Demo-version of the project (https://github.com/mobidevpublisher/backvendor-demo)
It`s not a spam, it was an effort to begin an interesting discussion:)