Yii Framework Forum: Yii Playground: collaborative demo app. - Yii Framework Forum

Jump to content

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

Yii Playground: collaborative demo app. Working code snippets provided by users; join us! Rate Topic: ***** 10 Votes

#21 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 26 May 2010 - 02:41 PM

Hello,
I've moved the ui examples under the UiModule and commited changes on svn; let me know if you have a look at it ;) Also please let me know what you think about my last post, thanks.

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#22 User is offline   samdark 

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

Posted 27 May 2010 - 09:43 AM

Directory structure looks good for me. Menu Hierarchy too. I like #3 where extensions have a separate area.

About dividing examples into modules / controllers. I think if examples are from the same topic and are really close, they should be done in one module. For example, different form validators could be shown in a single controller. Same for CHtml helpers.

If they are from the same topic but not really connected — different controller from the same module. For example, totally different ajax widgets such as captcha and gridview.

"See also" looks like a good idea.

New renderSourceBox looks good.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#23 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 06 June 2010 - 06:15 AM

Hi samdark,
thanks for your reply.

In the meantime I've implemented a first version of the "see also" box, let me know what you think.

I've also moved the SrcCollect class to a component as suggested to me by mindplay and added a couple of examples (tabs and autocomplete).

For menu I was undecided between #2 and #3, but I think we should move to #3 ;)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#24 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 08 June 2010 - 08:55 PM

Here's the demo:

http://www.yiiplaygr...cubedwater.com/

I'm trying to decide what the best way for you to be able to update it is. Have you used SSH? I could just give you SSH access, that would be simplest
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#25 User is offline   samdark 

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

Posted 09 June 2010 - 05:33 AM

The best thing is to use post-commit hooks to deploy changes on SVN commit.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#26 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 09 June 2010 - 12:59 PM

Often (for all of my cases anyways) you don't want to update a live site on every svn commit.
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#27 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 09 June 2010 - 01:18 PM

@jonah: did you updated something? I just want to enter your site
http://www.yiiplaygr...cubedwater.com/
and the attached error appears.

This morning (I'm from Argentina) the site works perfectly!!

Attached File(s)

  • Attached File  error.JPG (29.58K)
    Number of downloads: 38

Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#28 User is offline   samdark 

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

Posted 10 June 2010 - 03:05 AM

Works fine now.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#29 User is offline   PoL 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 506
  • Joined: 05-November 08
  • Location:Buenos Aires, Argentina

Posted 10 June 2010 - 07:18 AM

Yeah, may be was something temporal...
Keep the good work!!
Don't say what you think, think what you say
The problem is communication! Excess of communication!
0

#30 User is offline   jonah 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 733
  • Joined: 27-November 08
  • Location:California (US)

Posted 10 June 2010 - 02:27 PM

Sometimes I think DreamHost acts funny :/. One time I released a site on dreamhost and we got all sorts of reports like this from users... Then we switched to jaguarpc and no more weird reports. Dreamhost is awesome in many other ways though that other hosts lack
http://php-thoughts.cubedwater.com - my bloggings about Yii
0

#31 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 14 June 2010 - 04:24 PM

Hi,
I were thinking of adding a right menu (optional) like the one in the jQuery UI docs (http://jqueryui.com/demos/button/ - "radios, checkboxes, icons, ..") to avoid having the main menu with too many items.

For example today PoL added a demo about advanced ajax request that was on the same topic of the ajax request one.. and I'd also like to add more examples for CGridView that could take too much space if everything is put on one single page.

So imho, it would be nice to have a widget that allow you to pass a list of links and creates for you a menu with links to other examples of the same topic. Other examples could be a link that point to another page/url or to the same page using an anchor.

What do you think? With this one the UI should be complete.

I'm also going to store in session the value of the show/hide source toggle so that if you change page it keeps the behavior you choose.

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#32 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 16 June 2010 - 04:55 PM

Hi,
there is another "important" update regarding database (as it will be more "definitive" I'll write a few lines about it in the wiki too)

We've now setup the playground so that we have two database files:

- factory.db
- user.db

the second one won't be committed on svn, and it is automatically generated (where possible) copying it from the factory.db one.

The factory.db file is the file that you want to edit when you want to make available a new table for an example that uses database data or when you edit an existing table. You change this file and then you commit it.

When you first run your demo app, the factory.db file will be copied to user.db and you'll be going using this one, so if you input some test data the original/clean database won't be touched and you won't end up committing all your tests on svn ;D

You can also reset the user.db database whenever you want clicking the reset database link that it is also useful if your user.db gets out of date. (at this time you'll have to guess it or compare by hand the two files)

..so.. hopefully you are going to see some examples that involves db data input soon B)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#33 User is offline   samdark 

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

Posted 16 June 2010 - 05:10 PM

Maybe it's better to use SQL instead of solid SQLite DB? SQL is easier to merge and can be reviewed without a special tool.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#34 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 17 June 2010 - 12:51 PM

Hi,
you mean to have factory.sql with the schema and then use that file to create the user.db one? and then just keep the factory.sql on svn?

This could be a better alternative, but if you want to keep some demo data on your factory.sql database you'll have to remember to reset your user.db database before altering it / adding a new table to it to then export it to factory.sql (for example in case you need to change it for a new demo). also it was more easy for me to do in that way (just copy the file) that is easy to implement also on the live website and can be set as a cron..

But your I agree with your points too so maybe we could change this as you suggested.. but for me isn't a priority right now as I'd like to try to write some demos about other topics and I have few free time available. Of course if some one is willing to improve this, is more than welcome ;)

But as I said there are things I like in the current solution and some other I like on the one suggested by samdark.. ::) ..what do you guys think?

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#35 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 24 June 2010 - 07:20 PM

Hello,
I've completed the advanced date and time user input / output example.. please see:

http://www.yiiplaygr...etime/userinput

http://www.yiiplaygr...e/localeManager

As you can see it relies on a custom component, but I wanted to do it in this way cause I were not able to find an equivalent built on Yii..

Please also consider that I'll have to do some small updates in the example, like a switch to show input from formatted to raw and vice-versa and this is also why, for the example, I don't convert data types in the model.. mh.. actually I could maybe use a scenario but there is room for improvements.

Anyway.. I don't know if I've done it in the best way, so we can discuss it in this topic. Also the LocaleManager component gives an example on how to use the Yii's built in functions to manage the date in your locale. And btw.. this example is also probably missing a thing: timezone and dst :(

Also please notice that I'm "extending" the Yii built-in locales with files in protected/i18n/data/ that are merging custom data with yii's defaults, using the same technique used for the config files.

Let me know what you think; imho at this time the yii's built-in functions for date formatting are nice for date output but they are not flexible for date input.

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#36 User is offline   Giovanni D. 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 238
  • Joined: 23-December 08
  • Location:London (UK)

Posted 26 June 2010 - 10:52 AM

Hi,
we now have the RightMenu widget ;)

Have a look at:
http://www.yiiplaygr...jax/ajaxRequest
http://www.yiiplaygr...ziiAutocomplete

..enjoy B) ;D

imho, this makes the user interface "feature complete".. so now we can focus on contents. This "sub-menu" will allow better content organization, using the main menu mainly for each single topic, and then providing N "sub-examples".

As you can see you can also hide the menu, that can be useful for smaller monitors.. and.. it looks better if your browser has some css3 support ;) (!=IE)

bye,
Giovanni.
- Yii Playground: collaborative demo app with small examples to play with.. join us ;) [Fork on github]

- DeploYii: Yii powered task runner and deployment solution

- Social: LinkedIn · Twitter
0

#37 User is offline   nasrul 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 98
  • Joined: 14-April 09
  • Location:Sorowako - Indonesia

Posted 21 July 2010 - 06:40 PM

AWESOME,,
big thanks
0

#38 User is offline   samdark 

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

Posted 23 July 2010 - 03:41 AM

Virtual DarKness
RightMenu is a bit funny. Try moving mouse around it and it will keep sliding right and left for some time.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#39 User is offline   PrplHaz4 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 108
  • Joined: 28-September 09
  • Location:Boston, MA

Posted 23 July 2010 - 04:56 PM

View Postsamdark, on 23 July 2010 - 03:41 AM, said:

Virtual DarKness
RightMenu is a bit funny. Try moving mouse around it and it will keep sliding right and left for some time.


I'm not seeing this behavior in chrome 5.0.375...maybe a "standards" issue?
0

#40 User is offline   samdark 

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

Posted 23 July 2010 - 05:49 PM

Maybe. I've tested in latest Opera.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

Share this topic:


  • (7 Pages)
  • +
  • 1
  • 2
  • 3
  • 4
  • 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