Where to Start with Yii

Yeah sure, do me a favour pm me with the information of the link where you downloaded it so I can see what the package includes and help you from there.

thnks it works… :)

Hi,

your problem is, that file php.exe (and yiic.bat probably too) is not registred in your "Windows Enviromental Variable".

In XP - Right click "My Computer" and choose "Properties". Click the "Advanced" tab and find the "Environment Variables" button. In the 2nd list box, scroll down to the entry named "Path", select it and click "Edit".

This variable is named Path and it’s value should look cca like this:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\

And you need to add 2 paths (separated by ;) cca like this:

;C:\Program Files\wamp\bin\php\php5.3.0;C:\Program Files\wamp\www\yii\framework

First address shows folder with file “php.exe” (it’s where your PHP is installed)

Second address leads to you yii framework folder.

Thats all.

This works with WinXP. If you have windows 7 (or maybe Vista), everything will be the same except for 1 thing. When you right click “My computer” and select Properties, you won’t see classical window with tabs, so you won’t be able to find the “Advanced” tab. In the window that will appear, you have to look to the right side where you will (at the top) find cca 4 links with names like: “Device manager, Remote acces settings, System protection, Specify system setting”. Choose “Specify system setting” and you will see classical window with tab Advanced and button “enviromental variables”.

… CHtml::link(‘Here’, ‘/message/show’) … and other links

If the input parameter is a non-empty string, it is treated as a valid URL and will be returned without any change.

If the input parameter is an array, it is treated as a controller route and a list of GET parameters, and the CController::createUrl method will be invoked to create a URL. In this case, the first array element refers to the controller route, and the rest key-value pairs refer to the additional GET parameters for the URL.

so, if messaage/show is in form controller/action … CHtml::link(‘Here’, array(‘message/show’)) … should be used instead

Hey

Thats what im searching for. Very nicely written step by step.

Can you upload another tutorial for batchupdate (single form used to update multiple tables at a time).

Thank you for your tutorial. I’m totally new to MVCs so it helped me a lot.

I’ve found a small mistake in the pdf version of tutorial. In line:

<p><?php echo CHtml::link(‘Back’, array(’/message’)?> </p>

one right parenthesis is missing.

Great tut…hope to see more writing from you.

Do you know about any other tutorials? Blog tutorial at this site is as good as yii framework website template :(

There is no way how to learn Yii? Maybe yii team should look at django site and finally help the beginners. I’m sure this can help more people to join the comunity.

Writing documentation takes on many forms and it’s not easy. People have different levels of capability and you have to create documentation that is suited so that all levels can understand and benefit from it. This means they should be simple to follow and should explain the process in which they are working.

The major guru’s who establish this framework, maintain and improve it also keep track of main level documentation on all the class structures and information so that way you can search and understand the process of each class, each method or attribute without having to read through 1000’s of lines of code. To expand beyond that is hoping the community can get involved and put the time and effort into it. Some of us have made contributions and sure they may not be enough but we will get there.

For now, know that there are several very committed and intelligent people on this forum who go out of their way to assist you with the framework when you have problems. All you have to do is ask your problems. Make sure when you do, you give it an appropriate title, you provide the information regarding what’s the problem (clearly) and what you’ve done to try and fix it or get around it. Posting code is also important as that’s how those around can help understand and see what’s happening.

Every day this framework grows, so all you have to do is be patient if you want the easy sweet tutorials to come through. Maybe even try some stuff yourself and get others to help you along the way and who knows, you might be contributing to the very process in which you’re looking for :)

hi, I am beginner in php framework. thanks a lot for this tutorial. made me understand how yii works.

anybody knows where I can find the "Where to Start with Yii – Project 2" which is mentioned on this Closing page tutorial???

I would like to read that next tutorial…

thanks.

Thanks for your tutorial.

I’m new to yii and have started to poke around without really knowing exactly how everything is glued together. In my own php programming I’ve came to a point where I’ve built something that is a small framework. So eventually I decided to try to learn an existing framework where someone else has already made the thoughts about data/logic separation than trying to reinvent the wheel.

I like the content of your tutorial, but I find that the font + colors make the text hard to read. However, it’s not a big issue as your website is coded so that it works fine also with CSS disabled.

I will pretend that I do not know anything, but I hope that there are sensitive souls that would understand what I will be mentioning here.

I hope that this thread is good one to point to some needs as it purpose is to introduce framework and that purposely yii framework to the newcomer to frameworks and yii.

Please do not take this as personal critics but how I see it it becomes a trend in programming documentation. It looks like this:

  1. say hey this one is great to do something

  2. claim at the beginning ITS EASY (and cool)

  3. select simple special case request is framework is specially geared for

  4. dump a number of iterative steps using various tools add to this bunch of code examples showing special case modifications

  5. show that it works

  6. stir in couple of programming techniques, concepts, approaches, methods touch them lightly to increase compatibility to other people work

  7. show two to three more complex examples

  8. say you now know how to use it! Go ahead.

I’m sorry but no. I still do not understand how it works. And no, I do not find it easy. And no, I do not know how to use it. Consequently it becomes not cool.

Why?

  1. Simply there is no explanation what whole system purpose to solve from 50000 ft high view.

In case of yii after spending some days exploring, reading tutorials, some books, writing examples and tweaking code here and there, with more or less success, main impression I got that it is specially suitable to write internally usable database applications working on the web. I have found virtually no advices, tutorias, books in the fashion how to use yii to make your web site automated. I am perfectly aware that yii can do that, but i find more about being agile, tdd, crud, model, view, controller, sending messages, than how to get out of the yii box and make yii work for you, instead that you work for yii in yii.

  1. There is no explanation of concept of philosophy behind this framework so someone new can quickly find where to modify what in order to get desired result. Any text get too much distracted with some example adding even more jargon on the way. In essence what OO programming approach usually does is tossing framework api at you. Class tree is not self explainable. Framework needs explanation how conceptual ideas of final product are mapped to conceptual ideas of the framework.

For example, I simply want to add sub menu, or i want to extend yii with some specialized component that I am going to write, I want to completely redesign how application works. I want to make user system to work for my model of operation. Quick examples how to do simple needs would be much more benefitial.

  1. It may turn out after some investigation that one is better off taking another approach to building final product, time is wasted, and good piece of work is put aside. Claims of being easy and quick, quickly loose its claim.

What is needed for yii is giving conceptual view rather than repeating recipes how to create database, create crud controller and following test/add functionality agile paradigm.

What is needed is tutorial or book on how to utilize yii to build a web site with various page components that are needed on modern web sites.

And what it the possibly most important what yii IS and even more what yii IS NOT. (for example yii IS NOT CMS, but it can be used to make CMS)

Maybe better idea would be to make crude CMS in yii and use that as example how yii can be utilized to build web sites with web application built into it.

Or I completely missed the concept of YII (no wonder if that is, i am stupid)

Possibly best beginning reading is provided in guide http://www.yiiframework.com/doc/guide/ at least gives some concepts how yii is built.

I use XAMPP buddy, what’s wrong? I can help

check this post out it might help you get started

http://www.yiiframework.com/wiki/250/yii-for-beginners/