Yii Framework Forum: Giix — Gii Extended - Yii Framework Forum

Jump to content

  • (14 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

Giix — Gii Extended a code generator for Yii PHP framework (scaffolding/code generation) Rate Topic: ***** 4 Votes

#1 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 12 November 2010 - 01:58 AM

*
POPULAR

Dear folks,

Here comes giix.

giix on Google Code

giix is gii Extended, a code generator for Yii PHP framework.

giix is inspired and based on gii-template-collection (gtc), by Herbert Maschke (thyseus).

Acknowledgements

giix is inspired and uses code from Yii PHP framework and gii-template-collection. Many thanks to Qiang Xue, Herbert Maschke and the contributors of these software.

Features

giix extends Yii's gii by providing:

  • Proper handling of related model attributes, rendering appropriate form fields based on relation type.
  • More support for HAS_MANY and MANY_MANY relations.
  • Native support for saving MANY_MANY relations with the new method GxActiveRecord::saveWithRelated.
  • Native support for saving multiple (related or not) records with the new method GxActiveRecord::saveMultiple.
  • Automatic string representation for a model via GxActiveRecord::representingColumn() and GxActiveRecord::__toString().
  • Better i18n support and easier to maintain: support to active record labels. You change the label once in the model and it is automatically updated in the views. This is especially useful for plurals.
  • Out-of-the box i18n support by using Yii::t().
  • Appropriate form fields are rendered based on model attribute/table field data type.
  • Separated model and basemodel. Basemodel can be regenerated without overwriting your code in the model.
  • Smart methods can query your database for just the needed data (usually the primary key and the field with the string representantion), avoiding manual setup or a "select *".
  • Extensive use of default method parameters. Appropriate data is found automatically.
  • Some (incipient) support for tables with composite primary keys.
  • Generated code is completely free from styling and formatting. Your CSS controls the presentation.
  • Generated code is (almost) free of comments.
  • Well documented and commented source code. Ohloh says that 40% of the lines in the code are comments! You can understand and modify anything you want.


And a lot more! Read the CHANGELOG file and the (richly commented) source code to fully leverage giix's power.

Some of these features come from gtc.

Installation and upgrading

Please see INSTALL and UPGRADE files for instructions.

Please check the README file for more information.

Already using giix?
Posted Image Show how you love giix on this forum and on its extension page
Posted Image Upvote giix
Posted Image Show everybody that you are using giix in Powered by giix
Posted Image Donate (see below)

If you have any trouble, please open a ticket in Google Code

Do you like giix? Then please let people know at www.yiiframework.com/extension/giix/

This extension is also a way to say thank you to the people who work on the free software I use everyday.

giix is a personal project turned into an extension. It is not fully tested now, so please test your application and be careful using it in production code.
If you are using it, please let me know about your opinion. And don't forget to vote! :)

Icons by famfamfam.com
7

#2 User is offline   got 2 doodle 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 247
  • Joined: 12-December 08
  • Location:Beautiful Nova Scotia, Canada

Posted 12 November 2010 - 10:00 AM

Why are there so many thumbs down or negative votes for this extension? Seems a bit pointless if people don't know why a negative vote was entered.

Nothing I can see seems negative??

doodle
Check out myYii powered website
0

#3 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 12 November 2010 - 10:08 AM

Beats me as well. ???

I think this is an excellent extension. :D

May I suggest that people are not allowed to thumb down without adding a comment.
Cowardly bastards..

I am definitely going to take this for a spin. ;)
"Less noise - more signal"
1

#4 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 12 November 2010 - 10:31 AM

First of all, thank you for your efforts.

When I tried to check the extension, I followed up your installation steps and got this error when I tried to create a GxModel

::::::::::::::::::::::::::::::::

Parse error: syntax error, unexpected $end in

/----------/protected/extensions/giix-core/giixModel/templates/default/_base/basemodel.php on line 120

Call Stack: 0.0003 649720 1. {main}()

/--------/index.php:0 0.0147 3133968 2. CApplication->run()
/--- ....
10. CCodeGenerator->prepare() /------/yii/framework/gii/CCodeGenerator.php:61 0.1186 7014464
11. GiixModelCode->prepare() /-------/yii/framework/gii/CCodeGenerator.php:158 0.2050 7140784
12. CCodeModel->render() /-----------/protected/extensions/giix-core/giixModel/GiixModelCode.php:90

:::::::::::::::::::::::::::::::::

I apologize for not being able to debug your code as I am currently working in three projects. But I will have a better look.

Thanks again for your efforts to help us.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#5 User is offline   got 2 doodle 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 247
  • Joined: 12-December 08
  • Location:Beautiful Nova Scotia, Canada

Posted 12 November 2010 - 11:53 AM

View Postjacmoe, on 12 November 2010 - 10:08 AM, said:


May I suggest that people are not allowed to thumb down without adding a comment.
Cowardly bastards..



My sentiments exactly!

doodle
Check out myYii powered website
0

#6 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 12 November 2010 - 02:34 PM

View Postgot 2 doodle, on 12 November 2010 - 10:00 AM, said:

Why are there so many thumbs down or negative votes for this extension?


View Postjacmoe, on 12 November 2010 - 10:08 AM, said:

Beats me as well. ???


I'll tell you the story.

In 2010-10-16 I registered the giix extension in the Yii extension repository, but I had to stop the development for a while. Meanwhile, the extension received 9 downvotes because its page was empty.
The downvotes were against the blank page.

I am happy you liked giix. Thank you!
0

#7 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 12 November 2010 - 03:13 PM

That figures!
Now I can sleep tonight. :lol:

In that case it's no wonder.

But I'm happy it's here.
About time we had some extended Gii-ness.
"Less noise - more signal"
0

#8 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 12 November 2010 - 03:53 PM

View Postjacmoe, on 12 November 2010 - 03:13 PM, said:

But I'm happy it's here.
About time we had some extended Gii-ness.


gii-template-collection has been around for a while. It is worth checking also.
Besides, giix is based on gii-template-collection.
0

#9 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 12 November 2010 - 03:58 PM

View PostAntonio Ramirez, on 12 November 2010 - 10:31 AM, said:

When I tried to check the extension, I followed up your installation steps and got this error when I tried to create a GxModel
(...)
I apologize for not being able to debug your code as I am currently working in three projects. But I will have a better look.


Antonio Ramirez, would you mind opening a ticket in Google Code with more information?
Thank you.
0

#10 User is offline   kcackler 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 15
  • Joined: 10-November 10

Posted 12 November 2010 - 10:03 PM

Please forgive me as I am completely new to Yii. What are the differences in the Authentication types in the CRUD setup? When I used the Yii User management access control, for instance, I was unable to do anything with my controller (Logged in as the default admin/admin)

Just curious what each one of those options means.

I'm loving the additional features, though. I especially like that it handles my table relationships so effortlessly. Very nice!
0

#11 User is offline   Antonio Ramirez 

  • Elite Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 1,448
  • Joined: 04-October 10

Posted 13 November 2010 - 12:20 AM

I will buddy,

Again, thank you very much for your efforts. Is people like you that makes Yii the most amazing network i have been involved with.

Do not worry about the negative votes, its a great idea.
¿How long would it take for you to understand that you own nothing in this world?

www.ramirezcobos.com
www.2amigos.us
www.github.com/tonydspaniard
www.github.com/2amigos


Posted Image
0

#12 User is offline   David Greene 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 5
  • Joined: 12-November 10

Posted 13 November 2010 - 10:39 AM

Out of curiosity, what exactly is the support for:

"More support for HAS_MANY and MANY_MANY relations."

If I have a widgets table and a widget_users table

widgets:
id
name

widget_users:
id
name
widget_id

How does giix help me create a has_many relationship (besides going into the controller and updating the file like I would with gii).

I love the changes/updates you've made to the default gii so far... keep it up! Maybe they'll incorporate your giix changes into the default gii module on a future release.
0

#13 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 13 November 2010 - 09:13 PM

View Postkcackler, on 12 November 2010 - 10:03 PM, said:

What are the differences in the Authentication types in the CRUD setup?


Please check the source code as there is no documentation for them yet. You can look at the files in giix-core/giixCrud/templates/default/auth/
If you have trouble to understand the code, the Yii guide may help you:
http://www.yiiframew...sics.controller
http://www.yiiframew.../en/topics.auth


View PostAntonio Ramirez, on 13 November 2010 - 12:20 AM, said:

Again, thank you very much for your efforts. Is people like you that makes Yii the most amazing network i have been involved with.


I don't think I deserve so much. There is a lot of people doing a lot more for Yii than I am able to :)

View PostAntonio Ramirez, on 13 November 2010 - 12:20 AM, said:

Do not worry about the negative votes, its a great idea.


Qiang removed the downvotes, since they were given to the blank page.
0

#14 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 13 November 2010 - 09:31 PM

View PostDavid Greene, on 13 November 2010 - 10:39 AM, said:

Out of curiosity, what exactly is the support for:
"More support for HAS_MANY and MANY_MANY relations."


giix generates a view (view.php, for action "view") where related items (HAS_MANY and MANY_MANY) are listed.
Also, appropriate controls are shown depending on the relation type.
Note that there's no built-in functionality such as offered by CSaveRelationsBehavior.

Also, giix does not "create a relationship" as it does not change your schema. It just reads it.
0

#15 User is offline   pcastro 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-November 10
  • Location:Portugal

Posted 17 November 2010 - 08:07 PM

Hello,

I'm having the same problem as Antonio Ramirez.

Parse error: syntax error, unexpected $end in ....\protected\extensions\giix-core\giixModel\templates\default\_base\basemodel.php on line 120

Thanks
0

#16 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 17 November 2010 - 08:45 PM

/* me wonders what's on line 120 of basemodel.php ... ::) */
"Less noise - more signal"
0

#17 User is offline   Rodrigo Coelho 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 664
  • Joined: 05-August 10
  • Location:Rio de Janeiro, Brazil

Posted 18 November 2010 - 12:20 AM

View PostAntonio Ramirez, on 12 November 2010 - 10:31 AM, said:

When I tried to check the extension, I followed up your installation steps and got this error when I tried to create a GxModel


View Postpcastro, on 17 November 2010 - 08:07 PM, said:

I'm having the same problem as Antonio Ramirez.


Could you please check code.google.com/p/giix/issues/detail?id=1 ?
0

#18 User is offline   pcastro 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 17-November 10
  • Location:Portugal

Posted 18 November 2010 - 08:29 AM

View Postmentel, on 18 November 2010 - 12:20 AM, said:



Perfect, many thanks!
0

#19 User is offline   ortenheim 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 29-August 10

Posted 18 November 2010 - 01:38 PM

This is an awesome addon, it actually made me do the final switch from cakephp to yii. Keep up the good work! You are making my life/work much easier and more fun to program!

Respect from norway.

Best regards,

Mikael
0

#20 User is offline   ortenheim 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 22
  • Joined: 29-August 10

Posted 18 November 2010 - 01:46 PM

i have found a possible bug. i have three tables:

visitor bleongs to one order
one order has many visitors.
orders belong to transport
transport has many orders.

i scaffolded using giix.

When creating an entry, for example a visitor from the scaffolded "visitor/create". it creates lots of duplicates visitor. this is the same in all the different cases.

How can i find the error? is this a bug?
0

Share this topic:


  • (14 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users