BakeMe - Customized cakephp bake templates & application skeleton
Bakeme is a cakephp application skeleton with customized bake scripts, which enables you to create advanced, data-driven websites.
Some of the features are:
- Pasword protected backend, based on users in the database
- Customized form helpers to add fckeditor input fields, server side file browser fields, datepickers for date(time) fields, autocompletion functionality instead of comboboxes (if you set autocomplete to true using the extendedForm helper).
- SoftDeletable behavior, so database records aren’t deleted instantly, but flagged as deleted
- More advanced code generation, to generate nicer looking backends, based on your models
- Option to bake all controllers instantly (using cake bake controller all (admin))
- Option to bake all views instantly (using cake bake view all)
- View code generation, to ajax sort records of models which have a field “order”.
- Integration of cakeswxphp, which enables remoting on your website through swx, amf or json
- …
Some of the features are:
- Pasword protected backend, based on users in the database
- Customized form helpers to add fckeditor input fields, server side file browser fields, datepickers for date(time) fields, autocompletion functionality instead of comboboxes (if you set autocomplete to true using the extendedForm helper).
- SoftDeletable behavior, so database records aren’t deleted instantly, but flagged as deleted
- More advanced code generation, to generate nicer looking backends, based on your models
- Option to bake all controllers instantly (using cake bake controller all (admin))
- Option to bake all views instantly (using cake bake view all)
- View code generation, to ajax sort records of models which have a field “order”.
- Integration of cakeswxphp, which enables remoting on your website through swx, amf or json
- …
Bakeme works with cakephp 1.2, you will need cakephp aswell: http://www.cakephp.org/.
Extract cakephp to your webhost. After that, you will need to extract the files from bakeme to the correct directories. You can download bakeme from http://code.google.com/p/bakeme/
Extract the “template” and “vendors” folders from bakeme, to the directory of you cakephp installation (the directory where you have the folders app, cake and vendors).
You will need a basic database structure aswell. You can find an sql dump of the database in the folder template/config/sql/database.sql. This will create a database user “template”, together with a database and basic tables for bakeme (tables for users & groups to enable authentication).
If everything goes well, you should be able to surf to the template project: http://URL_OF_YOUR_CAKEPHP_ROOT/template/ and login to the password protected section: http://URL_OF_YOUR_CAKEPHP_ROOT/template/admin/ (username: wouter@aboutme.be, password: T3mpl@t3).
You can use the customized bake scripts from the template project. If you run bake (the code generation utility from cakephp) from within the template folder, it will use the scripts from template/vendors/shells/… to generate code.
Extract cakephp to your webhost. After that, you will need to extract the files from bakeme to the correct directories. You can download bakeme from http://code.google.com/p/bakeme/
Extract the “template” and “vendors” folders from bakeme, to the directory of you cakephp installation (the directory where you have the folders app, cake and vendors).
You will need a basic database structure aswell. You can find an sql dump of the database in the folder template/config/sql/database.sql. This will create a database user “template”, together with a database and basic tables for bakeme (tables for users & groups to enable authentication).
If everything goes well, you should be able to surf to the template project: http://URL_OF_YOUR_CAKEPHP_ROOT/template/ and login to the password protected section: http://URL_OF_YOUR_CAKEPHP_ROOT/template/admin/ (username: wouter@aboutme.be, password: T3mpl@t3).
You can use the customized bake scripts from the template project. If you run bake (the code generation utility from cakephp) from within the template folder, it will use the scripts from template/vendors/shells/… to generate code.
Comments
Comment
1 Thanks :)
When baking MVC in interactive mode, the view files couldn't be generated completely. And if type the command 'bake all shops', the controller class will lose some methods necessary in template app.
Comment
2 very nice
Like a small application framework on top of cakephp :)
After a quick look, i like the code - and the sweet integration of useful behaviours, helpers, and so on.
Going to try it for a simple app.
I'm wondering.. (if you are accepting feature requests :) ) is it possible to add a default "filter" or "search" feature? (maybe on the displayfield of the model)
Comment
3 filtering is possible
Thanks for your feedback.
Actually, filtering / searching is possible:
When you have an index page in the backend, with a datatable element, you can add the fields you want to be searchable:
<?php echo $this->element('datatable', array('controllerPath' => 'products', 'filterOptions' => array(array('field' => 'Product.name', 'label' => __('Product name', true)), 'Product.internnr')));?>
There is an option 'filterOptions', which expects an array of fields you want to make searchable. Each item in the array, can be a string (just the fieldname), or an array (which enables you to specify another label for the form search field).
In the example above, I say that I want to have a search form above the datatable, to filter on the fields name and/or internnr of the Product.
Comment
4 Trouble with Bake
Like the first commenter, I didn't have total success with Bake: the 'form' and 'paging' views were absent.
Question
5 bakeme on code.google.com
Maybe this problem with my archive tool? Or this archive really hurt?
Question
6 ACL with bakeme
Besides, i need to use i18n with cakephp, anybody can help me ?.
Thanks in advance !.
Comment
7 How to get this plugin baked? How to use 'cake bake'
Wondering what the proper command usage is to get the application framework baked? Any advice would be greatly appreciated.
Thanks in advance for creating this project and dropping me a quick note to steer me in the right direction.
Comment
8 How to use 'cake bake all [model]' reply to previous post
Anyway Thank's Wouter great project! I guess you need somebody to write the documentation so non ajax java experts can use the code for their applications. An tutorial of a simple model (like customers) including a search field would be a real helper to get people started.
Thanks again Wouter! Hope this helps Jason Miller.
Question
9 How to use
Comment
10 Admin pages...
When I run cake bake, and run it from the /webroot/app directory, it runs the normal bake.php. When I try to run it from the webroot/template directory I get errors.
Thanks.
Dan
Question
11 sorting data in the Deleted Tag
When it comes to sorting data in the Deleted Tag, the whole page is refreshed (instead of just the table view) and as a result the tabular layout for the view is lost.
It seems that the call to the Ajax object is lost when it comes to a second idName in admin_index.ctp.
element('datatable', array('controllerPath' => 'ade_fotos', 'idName' => 'AdeFotosdeleted', 'filters' => array('deleted' => '1')));?>
the last piece of code works only when idName matches a model... check the default users tabular view.