Yii Framework Forum: gii view code generation - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

gii view code generation Should improve gii view code generation

#1 User is offline   masum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-February 10
  • Location:Dhaka, Bangladesh

  Posted 01 May 2012 - 01:26 AM

Dear yii framework developers,

I think after generating code from gii still there has some repetitive work for datetime, bool, enum,text, one-to-many, many-to-many relational column. But if gii generate code for those type of table column then it will be more useful for developers. For datetime a calender control can attached with text field, for boolean type column a dropdown list can be added with two text true/false, for enum type a dropdown list can be added with 1,2,3 value,For tex type column a textaria or an opensource text editor like ckeditor or tyniMce code can be generated. For one to many a dropdownlist populated with relative model data can be generated. for many-to-many check list group box can be generated. also from generation time there should an option for generate those fields or flat textbox.


Thanks
0

#2 User is online   Maurizio Domba 

  • Yii - Yesss It Is !!!
  • Yii
  • Group: Yii Dev Team
  • Posts: 4,231
  • Joined: 12-October 09
  • Location:Croatia

Posted 01 May 2012 - 05:04 AM

Check the giix extension - http://www.yiiframew.../extension/giix
Find more about me.... btw. Do you know your WAN IP?
0

#3 User is offline   saegeek 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 244
  • Joined: 09-December 09
  • Location:Montpellier - France

Posted 07 May 2012 - 10:25 AM

How about a webpage like Gii to access and modify the config.php file ?
And [for] their saying, "Indeed, we have killed the Messiah, Jesus, the son of Mary, the messenger of God ." And they did not kill him, nor did they crucify him; but [another] was made to resemble him to them. And indeed, those who differ over it are in doubt about it. They have no knowledge of it except the following of assumption. And they did not kill him, for certain.Rather, God raised him to Himself.
0

#4 User is offline   masum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-February 10
  • Location:Dhaka, Bangladesh

Posted 07 May 2012 - 11:05 PM

Thanks mdomba for your reply. But actually we want it as a part of Yii v2.0 framework not as an external extension. Also at that extension it is mentioned that is not a fully tested extension and also they have suggested only use the extension for testing purpose not for development. But we aspect a development ready Gii in replace of current version of Gii


Again thanks for your replay.



View Postmdomba, on 01 May 2012 - 05:04 AM, said:

Check the giix extension - http://www.yiiframew.../extension/giix

0

#5 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 2,679
  • Joined: 17-January 09
  • Location:Russia

Posted 08 May 2012 - 02:03 AM

Idea of adding type-based generation to Gii was there for a long type. It sounds very cool at first but there are problems.

1. We don't know what type of input we should generate. For example, it's not clear if we should generate checkboxes, radios or just a textfield for enum. What's bad is that it will be very annoying if we'll generate wrong types all the time and developer will have to change more complex code.
2. Gii have custom templates support so one can create his own templates with all necessary checks.
3. Adding CKEditor or TinyMce is definitely a bad idea. It's up to developer to decide which one to use and if it should be used at all.
0

#6 User is offline   Psih 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 112
  • Joined: 30-June 10

Posted 08 May 2012 - 02:41 AM

View Postsamdark, on 08 May 2012 - 02:03 AM, said:

Idea of adding type-based generation to Gii was there for a long type. It sounds very cool at first but there are problems.

1. We don't know what type of input we should generate. For example, it's not clear if we should generate checkboxes, radios or just a textfield for enum. What's bad is that it will be very annoying if we'll generate wrong types all the time and developer will have to change more complex code.
2. Gii have custom templates support so one can create his own templates with all necessary checks.
3. Adding CKEditor or TinyMce is definitely a bad idea. It's up to developer to decide which one to use and if it should be used at all.

I have plans to make my own templates for my projects and I came up with the idea to add the ability to select what type of inputs and filters to generate for the fields at the preview phase. Why? Because that really depends on the situation: at one time I have a small related table and I can render a select box for filter and _form.php. At the other situation I can have a big table (say Users) - so I would generate an text input for filters and hand-craft some sort of picker for the _form.php. And for ENUM fields I, for example, always use the select box - it's more compact that radio buttons and feels natural.
0

#7 User is offline   masum 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 21-February 10
  • Location:Dhaka, Bangladesh

Posted 08 May 2012 - 06:04 AM

Dear samdark,

At the end of the post I have mentioned "also from generation time there should an option for generate those fields or flat textbox." . If anyone do not need that they will not generate with those controls. Advanced option may initially collapsed. If someone wish then he will expand advanced option and will check relative control from possible combination of control list. ( I am apologizing for my sentence. But I have just shared my thinking about Yii, Cause I love Yii so much ).

There for Yii developers have done a great job definitely no doubt about it. Not only great job but also they have been removed PHP developers may kind of pain and given them a waya of standard quality programming. Thanks Yii developer team for that.


View Postsamdark, on 08 May 2012 - 02:03 AM, said:

Idea of adding type-based generation to Gii was there for a long type. It sounds very cool at first but there are problems.

1. We don't know what type of input we should generate. For example, it's not clear if we should generate checkboxes, radios or just a textfield for enum. What's bad is that it will be very annoying if we'll generate wrong types all the time and developer will have to change more complex code.
2. Gii have custom templates support so one can create his own templates with all necessary checks.
3. Adding CKEditor or TinyMce is definitely a bad idea. It's up to developer to decide which one to use and if it should be used at all.

0

#8 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 2,679
  • Joined: 17-January 09
  • Location:Russia

Posted 08 May 2012 - 08:10 AM

masum
Yeah, this way it makes sense.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

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