Category: DBDesigner2CakePHP


dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.6 - Minor Release

April 5th, 2008 — 1:26pm

Hello All,

A minor release of dbdesigner2cake is available. Those who are using the release 1.0.5 or previous are recommended to upgrade to 1.0.6.

These issues were addressed:
- Changed the website on the license text from cirello.org/dbdesigner2cake to dbdesigner2cake.cirello.org
- Now it forces the PrimaryKey according to the XML
- strtolower’d table’s names.
- avoid a special condition on which a hasMany/belongsTo table would be somehow linked to a HABTM table. (workaround)
- Corrected few typos.

Well, as I usually finish such release notes:

You are welcome to download the 1.0.6 version at
http://dbdesigner2cake.cirello.org/download.html

Bye

4 comments » | DBDesigner2CakePHP, Technology

Eric Raymond’s How to Become a Hacker.

February 27th, 2008 — 12:25am

This is an open letter to Raymond about his essay named “How to Become a Hacker”.

Hi Raymond,

I have read your howto about becoming a hacker. First off, according to your definitions of hacker, I am not a hacker - and also I do not consider myself as hacker. Therefore, as not being a hacker I do not know how great is my allowance to send this letter to you. I do not want to challenge your ideas, nor I have desire to enhance your thoughts.

However, I feel I should share a thought I had: “Rails-like framework considered harmful in early stages”.

RubyOnRails, CakePHP, DJango and many more. Are they wonderful tools that does a lot of auto-magic for us? Yes, they are indeed. They offer us DRY, MVC and force unto us OO thinking.

I think this auto-magic is a double-handed feature of them, because as it facilitates for us the day-by-day dirty work, they also hide from usrelevant knowledge on how things are done. Therefore, beginners tend trying fit their needs into the framework boundaries. “Well, I need ABC feature to use in this XYZ system I am developing - let me check if there is a component that does it for me. Alas! There is not, what am I going to do?”, perhaps a lazy beginner would say. Develop the ABC feature may not ever come across his mind. (”It is reinventing the wheel” some would say, but trying to reproduce things is a very good way to gain knowledge).

Understanding the laying logic beneath the whole magic is very significant - it is a very special kind of logic, because it enlighten us about the real limits of what things can or cannot be done and how they could or should be done.

Concluding, I would like to ask you to put in this essay of yours the following paragraph by the end of the second one in “1. Learn to Program” session:

“[...]you have to know what the components actually do. The same goes for the Rails-like framework (RubyOnRails, CakePHP, DJango &c), although they are magical on getting things done, they hide from you significant knowledge of how they perform their magic. Now I think it is probably best to learn C[...]“

I have written a web log post further developing this point of view of mine. I pray you read, if you will, at

http://blog.cirello.org/2007/09/24/imho-cakephp-made-php-bondage-and-discipline/

Yours sincerely,

Dérico Filho

Comment » | DBDesigner2CakePHP, Technology

dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.5 - Minor Release

December 4th, 2007 — 10:29am

Hello All,

A minor bug release of dbdesigner2cake is available. Those who are using the release 1.0.4 are recommended to upgrade to 1.0.5.

A small bug on a global variables turned the new parameter –core almost useless.

Well, as I usually finish such release notes:

You are welcome to download the 1.0.5 version at
http://dbdesigner2cake.cirello.org/download.html

Bye

4 comments » | DBDesigner2CakePHP

dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.4 - Minor Release

December 1st, 2007 — 3:51pm

Hello All,

A minor change in dbdesigner2cake is available. If you are comfortable with current release, there is no need of upgrade.

A new parameter is now available:

–core DIRECTORY             uses CakePHP core files in the given directory

This parameter should be used when CakePHP core files are located in some non-standard directory.

Well, as I usually finish such release notes:

You are welcome to download the 1.0.4 version at
http://dbdesigner2cake.cirello.org/download.html

Bye

Comment » | DBDesigner2CakePHP

dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.1.0 UNSTABLE BRANCH

October 2nd, 2007 — 1:09am

Hello All,

Dbdesigner2cake has branched to 1.2 roadmap. Until it is unstable, its release number shall be 1.1.x. When it’s ready, it will be released as 1.2.

One new parameter is now available:

-c, –check-for-changes It keeps checking the XML file for changes
and triggers the scaffolding routine. Implies -f.

Take care using the unstable release, it might or not destroy your PHP codes or DBDesigner XML files.

Well, as I usually finish such release notes:

You are welcome to download the 1.1.0 version at
http://www.cirello.org/dbdesigner2cake/download.html
or
http://cakeforge.org/frs/?group_id=162 .

Any doubts please submit to
http://groups.google.com/group/dbdesigner2cake.

Bye

Comment » | DBDesigner2CakePHP

DBDesigner2Cake 1.2 Roadmap.

September 25th, 2007 — 12:11am

Hi all,

As many may have noticed, dbdesigner2cake was made stable and many of the fundamental features are already implemented.

Beside the basic homework (code organisation and documentation), I have few ideas for dbdesigner2cake 1.2 branch:

  • Reverse Engineering: It would analyse Model classes and create a DBDesigner XML file.
  • Automated Scaffolding: It would watch a XML file for changes, whenever it realised a file change it would automatically re-scaffold the application.
  • Non-destructive scaffolding: It would modify Model classes thus preserving the developer created methods.

Another idea I had was a modified version of app_model.php that would parse DBDesigner XML file on fly, simplifying the Model Classes files. An example, instead of this:

<?php

class Post extends AppModel {

        var $name = “Post”; 

        var $hasMany = array(’Tag’ => array(’className’ => ‘Tag’));

        var $belongsTo = array(’Subject’ => array(’className’ => ‘Subjects’)); 

        function yetAnotherMagicalMethod(){

                …

        }

}

?>

It would be:

<?

class Post extends DBDesignerModel {

        var $name = “Post”; 

        //Relationships would be automagically loaded - and cached.

        function yetAnotherMagicalMethod(){

                …

        }

}

?>

Bye!

Comment » | DBDesigner2CakePHP, Technology

dbdesigner2cake supports CakePHP 1.1 and 1.2

September 21st, 2007 — 7:28pm

Hello All,

Dbdesigner2cake now officially supports CakePHP 1.1 and 1.2. Actually, when you use it on CakePHP 1.2 it offers a new parameter, which is shown below:

  -wb, –with-bake             generate controller and view code using bake shell.

This options scaffold your application creating the controller and view files instead of activating the $scaffold variable. I think it’ll be even more handy for those who want to save time.

Well, as I usually finish such release notes:

You are welcome to download the 1.0.3 version at
http://www.cirello.org/dbdesigner2cake/download.html 
or
http://cakeforge.org/frs/?group_id=162 .

Any doubts please submit to
http://groups.google.com/group/dbdesigner2cake.

Bye

Comment » | DBDesigner2CakePHP, Technology

Preliminary Tutorial for DBDesigner2Cake

September 12th, 2007 — 11:44am

Hi!

 I am preparing yet a more complete tutorial, but as appeared some demands on how to use dbdesigner2cake I decided to release a preliminary tutorial.

 Well, I assume you know how to use DBDesigner, your database of choice and some shell operation. I assume also that you have unpacked CakePHP’s files into a directory and had it configured, and the tables drawn in DBDesigner are stored in database too.

Let us take an ER diagram like this:

ER Modelling by DBDesigner

 Please note that the relationships created fields on the tables, for instance, users relates to posts through “user_id” field. You will also notice that DBDesigner create fields in plural instead of singular (tags_id versus tag_id), thus you should rename then to singular flexion. Also we have both a hasMany relationship and a hasAndBelongToMany relationship.

  Unpack CakePHP’s zip file, put dbdesigner2cake.php and save DBDesigner’s XML file in the same root directory like this:

# find -maxdepth 1
.
./sql
./app
./cake
./docs
./index.php
./vendors
./.htaccess
./dbdesigner2cake.php
./modelling.xml <– the ER diagram saved as XML by DBDesigner.

 Now you should generate the scripts using dbdesigner2cake.php

# php dbdesigner2cake.php modelling.xml
Scaffolding Post — done
Scaffolding User — done
Scaffolding Tag — done
Skipping PostsTag - HABTM table.
Done

Well, point your browser either to
http://yourhost/application/post/ or
http://yourhost/application/user/ or
http://yourhost/application/tag/

And you’ll see that your application is working (at least in theory).

14 comments » | DBDesigner2CakePHP, Technology

dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.0 FINAL

September 8th, 2007 — 1:08am

Hello,

The final version is released. Just a tiny bug found regarding the –app parameter.

I hope you guys enjoy it as much as I did.

Currently I am working on the tutorial and perhaps a screencast, afterwards I will look for CakePHP 1.2 support.

You are welcome to download the final version at
http://www.cirello.org/dbdesigner2cake/download.html 
or
http://cakeforge.org/frs/?group_id=162 .

Any doubts please submit to
http://groups.google.com/group/dbdesigner2cake.

Bye

Comment » | DBDesigner2CakePHP, Technology

dbdesigner2cake : DBDesigner 4 Scaffold Tools for CakePHP - 1.0.0 RELEASE CANDIDATE 1

August 30th, 2007 — 2:28pm

Hello All,

I just released the RC1 for dbdesigner2cake. Now you can:

  1. Create HABTM relationships
  2. Validate fields
  3. Change APP dir for outputting source code

You are welcome to download the RC1 version at
http://www.cirello.org/dbdesigner2cake/download.html 
or
http://cakeforge.org/frs/?group_id=162 .

If no bug is reported within a week I shall release it as Final.

Anyway, I’ll be on the works for creating a tutorial which covers the database modelling up to source code generation. This tool is not intended to replace Bake.php script, actually I am to commit the first steps of integration between them.

Any doubts please submit to
http://groups.google.com/group/dbdesigner2cake.

bye!

Comment » | DBDesigner2CakePHP, Technology

Back to top