BakeMe - Customized cakephp bake templates & application skeleton

By Wouter Verweirder (wouter)
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
- …
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.

 

Comments 902

CakePHP Team Comments Author Comments
 

Comment

1 Thanks :)

Thanks for the great work.

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.
Posted Jan 13, 2009 by Finjon Kiang
 

Comment

2 very nice

wow, looks great

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)
Posted Jan 14, 2009 by Stefano Manfredini
 

Comment

3 filtering is possible

wow, looks great

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)

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.
Posted Jan 15, 2009 by Wouter Verweirder
 

Comment

4 Trouble with Bake

Thanks for this great idea :)

Like the first commenter, I didn't have total success with Bake: the 'form' and 'paging' views were absent.
Posted Jan 22, 2009 by David Harrison
 

Question

5 bakeme on code.google.com

I have downloaded bakeme_0.1.zip, but it has appeared hurt.
Maybe this problem with my archive tool? Or this archive really hurt?
Posted Jan 25, 2009 by Roman Ermakov
 

Question

6 ACL with bakeme

how can use acl located in the folder template/config/sql/ with bakeme ?.

Besides, i need to use i18n with cakephp, anybody can help me ?.

Thanks in advance !.
Posted Feb 6, 2009 by Eudris Cabrera Rodriguez
 

Comment

7 How to get this plugin baked? How to use 'cake bake'

I'm a newbie with CakePHP and have been reading the docs on how to run the shell command 'cake bake' but was running into trouble trying to get your plugin baked. I was able to get the basic app working as you instructed (i.e. successfully created DB, logged into admin interface with basic framework). Your instruction mentions, to bake, all you need to do is change directories to '/PathToInstall/template' and run the command 'cake bake' which you then mention it will find the "vendors/shells/tasks" files however this is not the case when I run the command. I have made sure I have both PHP and '/PathToInstall/cake/console' in my PATH variable too so that is not the issue.

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.
Posted Feb 11, 2009 by Jason Miller
 

Comment

8 How to use 'cake bake all [model]' reply to previous post

Great idea Wouter! I love the screen fades and slick java tabbed pages. Way advanced cake interface. To respond to the subject line "How to" I could only get "bake all [model-name]" to work (...sort of) using strict naming conventions for model habtm's and such. Also, I had to copy $this->layout = "admin" close to the begining of the beforeFilter() function, so it would come before the Auth as I was working an example without Auth. Struggled with that for a a bit.

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.
Posted Feb 13, 2009 by Bill
 

Question

9 How to use

I cant quite get to use this, i have the same problem with poster number 7. I set up everything but how do i use the customised bake scripts?
Posted Feb 17, 2009 by Okalany Daniel
 

Comment

10 Admin pages...

Not sure what I am doing wrong, but I cannot even get to the admin page by the http://URL_OF_YOUR_CAKEPHP_ROOT/template/ URL. The page shows up, but there is no login information.

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
Posted Jun 9, 2009 by Dan
 

Question

11 sorting data in the Deleted Tag

I am digging around in your code for a solution to the following problem. Maybe you can help!

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.
Posted Jun 26, 2009 by José Coelho