Part of the EllisLab Network
   
1 of 3
1
CodeCrafter - New Open Source CRUD Code Generation System available for Code Ingiter - Generates entire CI application in seconds
Posted: 12 August 2006 05:28 PM   [ Ignore ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

I’ve released V0.1 of Code Crafter, a code generator utility written especially for the CI framework.

Code Crafter
is a code generator for the Code Igniter framework. One might say, it’s a CRUD utility.

Version 0.1 is my proof of concept product. It is:
- incomplete
- buggy
- unstable
- undocumented
- un-sophisticated
- unsupported

Despite that, I’m using this to convert my “legacy php” apps to Code Igniter. If
you want more than this, then I can’t offer it just yet.

You can download Code Crafter at http://www.datacraft.co.za/codecrafter/

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 13 August 2006 12:17 AM   [ Ignore ]   [ # 1 ]  
Summer Student
Avatar
Total Posts:  15
Joined  07-29-2006

Great, Last night I Talked about such programe with my partner, We can make a php Version Redrails App

 Signature 

CI文档ING…
Win2k3 - Apache/1.3.33 - PHP 4.3.9 - MySQL 4.0.26-nt
Ubuntu 6.06 ~

Profile
 
 
Posted: 13 August 2006 03:45 AM   [ Ignore ]   [ # 2 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

I’ve updated the code slightly. No sigficant changes. Just some code cleanup, and I’ve added some missing layout files.

Oh, and I’ve cleaned up the output screen to provide more meaningful output.

So if you’ve already downloaded the code, and you are missing files dealing with layouts, or your output screen looks REALLY messy. get the updated version.

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 30 August 2006 01:44 PM   [ Ignore ]   [ # 3 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

I’ve made some changes to the codecrafter application, more notably:-
- Now generates a rudimentary ‘grid’ of values (without paging support)
- Delete method is supported (but disabled by default)
- Option to generate code for a single table or the entire database.

I’ll appreciate any feedback.

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 06 September 2006 11:05 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  9
Joined  08-16-2006

Hi Crafter,
Just downloaded and tested your CRUD Code Generator, it is stupendeous to say the least.
This is what one will call a true “pain easing solution”. 

Quick note:
by modifying autoload.php line 54 to

$autoload['helper'] = array('url');

and then codecrafter.php line 74 to

<form NAME='ccoptions' method="post" action="<?= site_url('codecrafter/generate/');?>">

the user will simply have to modify config.php line 14 to reflect their site status such as

$config['base_url']    = "http://localhost:85/codecrafter/";

to make it work.

Thanks to you, and to all others that code and contribute apps such as this to the Growing Community

Olumide Otuyelu

 Signature 

...Give a person a program, frustrate them for a day; Teach a person to program, frustrate them for a lifetime !

Profile
 
 
Posted: 06 September 2006 01:00 PM   [ Ignore ]   [ # 5 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  647
Joined  09-30-2006

Hey Crafter -

This is pretty awesome! Thanks for contributing.

 Signature 

sitesquad.net | < insert catchy tagline here />

Profile
 
 
Posted: 06 September 2006 03:26 PM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  201
Joined  08-28-2006

Would really like to try it. But somehow when I press “Go ahead. Make my code” the link doesnt work.
This is the link I am getting:
http://localhost/codecrafter/codecrafter/generate/

this is my config which usually works:
$config[‘base_url’]  = “http://localhost/codeigniter”;
$route[‘default_controller’] = “codecrafter”;

Greetings Jan

Profile
 
 
Posted: 06 September 2006 09:21 PM   [ Ignore ]   [ # 7 ]  
Summer Student
Total Posts:  9
Joined  08-16-2006

@shocki
If you read and follow the instructions on my previous post on this thread, it will solve your issue of redirecting to the hardcoded url.

 Signature 

...Give a person a program, frustrate them for a day; Teach a person to program, frustrate them for a lifetime !

Profile
 
 
Posted: 07 September 2006 03:29 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  201
Joined  08-28-2006

Hello otuyelu,

thats what I tried to do already. I couldnt find the line numbers in codecrafter.php though. Which version were you using ?

Greetings Jan

Profile
 
 
Posted: 08 September 2006 02:56 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  201
Joined  08-28-2006

Now it works. Very nice.

Check out how Cake does it.
http://cakephp.org/screencasts/view/1

They have some nice advanced features. I really like the validation and DB relations.
Please continue your work. It is really promising.

Greetings Jan.

Profile
 
 
Posted: 08 September 2006 06:12 AM   [ Ignore ]   [ # 10 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

Thanks guys

I so so worried that no-one was using this. I’ve used your kind words to motivate me to finish the changes I was working on. Now I’m so behind on (paying) project, somebody’s close to being fired!

I’ve released version 0.2.1 of CodeCrafter. Some important changes:
- Cleaned up the code somewhat and fixed a few undocumented features here and there.
- Changed model to now generate get_() set() code for table fields. (See the
discussion on model best practices
- Fixed the directory overwrite code.
- Created DOCUMENTATION to install and use
- Made significant changes to the user interface

The last change is probably an indication of where CodeCrafter is heading. My vision is to allow all (most) aspects of code generation to be controlled while still keeping the simplicity of the very first version.

You can download the latest version from http://www.datacraft.co.za/codecrafter/.

Let me know if you are using it to generate serious code.

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 14 September 2006 10:50 AM   [ Ignore ]   [ # 11 ]  
Summer Student
Total Posts:  4
Joined  08-30-2006

This looks intriguing, but I get the following error upon the attempted creation of the database

Clobber option is
Fatal error
: Call to a member function on a non-object in /home/domains/xyz.com/docs/system/drivers/DB_driver.php on line 376

Any ideas?

Profile
 
 
Posted: 15 September 2006 10:03 AM   [ Ignore ]   [ # 12 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

I get the following error upon the attempted creation of the database

Let me firstly clarify that the application won’t create the database for you. Use another tool to do this.

I’m assuming therefore that you have an already existing database, and you mean that you are attempting to create the database code.

Secondly, I should be validating the user input, but I’m not.
However, to circumvent my sloppiness, ensure that you supply all necessary fields so that you can connect to the database.

This should be at least the hostname, username and password. Otherwise you might be NOT be connecting to the database and proceeding to try and query it, therefore giving the error.

Please let me know how it goes.

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 15 September 2006 11:37 AM   [ Ignore ]   [ # 13 ]  
Grad Student
Rank
Total Posts:  31
Joined  08-31-2006

Hey Crafter. I don’t think everything could be generated by autotools.
If a model need several tables, you should still handle on it.
But…
Have you read on my post?
If your generator could rely on my schema, maybe it is a good idea.

Profile
 
 
Posted: 15 September 2006 12:40 PM   [ Ignore ]   [ # 14 ]  
Research Assistant
RankRankRank
Total Posts:  558
Joined  06-17-2006

Thanks Yarco, I was reading your post on scaffalding as your your reply came in. Looks promising.

Let me install and play with it, and absorb what you’ve done.

 Signature 

CodeCrafter - Open Source Code Generation for CI

Profile
 
 
Posted: 16 September 2006 10:25 PM   [ Ignore ]   [ # 15 ]  
Summer Student
Total Posts:  4
Joined  08-30-2006

Nice Work. I like it.  Very straightforward customizability.

Any ideas on how to define and programmatically generate table joins within edit and add screens? If so, any plans to implement in future versions?

Profile
 
 
   
1 of 3
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120166 Total Logged-in Users: 35
Total Topics: 126295 Total Anonymous Users: 7
Total Replies: 664211 Total Guests: 408
Total Posts: 790506    
Members ( View Memberlist )