Total fresher in PHP frameworks and Yii, I don't understand tutorials


(Dingdog) #1

Hello.


Update 14d/10m/2011y:

I’m trying to rewrite the PDF manual into Yii Wiki. You can read it online here:

http://www.yiiframework.com/wiki/250


Brief manual for Yii and MVC bellow. See Updates 1-3 of this post.

Update 08d/09m/2011y:

Version 7 available!

Statistics:

Versions 1-5 were downloaded totally cca 1500x

Version 6: 1000x

And version 7? :rolleyes:


I can create any program in PHP. It’s no problem. But now I need to work with Framework YII and I’m lost. Every single tutorial, that is ment to be a tutorial for beginers, is too complicated for me.

I don’t understad why I need the “basic aplication” that is generated via command line. Every manual begins with it and the author than only changes and breafly describes the huge generated project. I dont want to change existing project, I want to create my own and brand new one.

My task is to create database and connect it to web pages. Show it’s content to users. I want to create my own folder structure, logics and design. I understand, that command line can generate model of my DB. (model = recognise DB structure) That is OK. Why not.

But I dont know where to begin with my application. I dont understand how YII works.

Can anyone paste here working code of a SIMPLE application that would just read data from table and showed them in a simple CSS box? I dont want to use design that "Basic application" uses. I want to create my own.

If I could write my web pages using standard PHP it would be question of 1-2 days. But now, I have been learning and trying to understand YII for 1 week and I’m still lost.

I would love to read some “complete idot’s introduction to YII” (but in simplified version) where would be shown how to create primitive application without generating any “default application”. I want to create my web just using text editor! No command line, no auto generating code, only a few files …

So I could understand meaning of all commands that are used in "Bacis application" that is generated using command: "yiic webapp test".

Thanks for replies.

Update1:

I found this helloWorld application description, which was very helpful, because it explained everything it mentioned.

http://code.google.com/p/yii/issues/detail?id=86

It’s the kind of useful tutorial I like. But it, of course, didnt teach me everything. If anyone has something similar, let us know.

Update2:

Second thing that helped me a lot was this video.

(this link does not work any more) http://www.yiiframework.com/screencast/blog/

I think that following videos are ther same:

http://code.google.com/p/yii/downloads/detail?name=blog.mov&can=4&q=

http://www.yiiframework.com/news/14/screencast-how-to-create-a-blog-system-using-yii-in-less-than-30-minutes/

I recommend to download it, because when you pause this video a form appears and hides the screen.

To download this video you need a special Addon to firefox named "Fast YouTube Download":

https://addons.mozilla.org/cs/firefox/addon/15002

Update3: :rolleyes:

Now I understand basics od MVC and Yii and I’d like to help another beginers who are lost as same as I was one month ago. So I work on a brief introduction to MVC (Model-View-Controller) architecture and Yii. It will be written in english and published in PDF. I’d like to broaden the text as I understand Yii more and more and have more and more time… It will contain not only boring theory, but also peaces of code that could simplify beginer’s work. PDFs will be available in this forum.

Leave me here comments please, so I know what is good or bad and wheather someone reads my paper…


(Sanderb) #2

Frameworks like Yii (and others) use something called ‘Convention over configuration’. This means that they will significantly ease programming your webapp, but you’re going to have to adhere to some predefined rules, such as directory structures and file names. Try finding some generic introductions into MVC (model-view-controller) programming, they will help you understand the logic behind them.


(Eskimobeats) #3

downloading your PDF now. I hope it helps because I am about as lost as you were. I’ll send feedback


(Dingdog) #4

Thanks, I’m looking forward. I hope it’s understable. In next versions I’ll try to rewrite some parts. Now it’s main for me to show code examples and basic facts…


(Sealtrip) #5

Nicely written.wish I came across this 8weeks ago. I have read it and still found it very useful.


(Dingdog) #6

Thank you for your compliments :)

Now I don’t have time to finish this paper, but I hope you will be able to read more soon…


(Mito Asoy) #7

I’m just started learning Yii and i’m in same condition with you before. Lost and confused. I don’t even know how to use my designed GUI on Yii. Downloading your PDF now and i hope i can get a hold on this framework using your tutorial.

Will inform you how’s the result :D


(Darknsf) #8

Reading through the Definitive Guide seemed to be more than enough for me. I’m a person that likes to deploy the skeleton and start breaking and changing stuff to see how it works.

I generally only check documentation to find proper ways of implementing (to avoid reinventing the wheel) or if I am confused about an API.


(Simon) #9

The complete idiots guide to Yii was very useful, I also learned and installed

mysqlbench which seems a lot better than the phpmyadmin, thanks. :D


(Lemeurtrier) #10

Thanks for your effort, rackycz.


(Ahmad Firizal) #11

thanks so much im newbie to in YII !! this tutorial help me so much !! THANKs !


(Temirbek) #12

dear rackycz, thanks a lot.

about your 2nd update, the link to video doesn’t work, can you give me a tip on where i can find it?

Temir


(Arcticwindowcleaning) #13

Thanks Rac, Im in the process of Updating my 1st Website , this helps a lot.

Cheers


(Jacob Moen) #14

If you’re looking for the screencasts:

http://www.yiiframework.com/screencasts/


(Kakibox) #15

Great tutorial !

Thank you


(Jsfousseni) #16

Thanks rackycz!

Every beginner should this topic


(Jsfousseni) #17

How to make that TheSimpliestYiiApplication work?


(Rasika Sherman) #18

Nice effort

You can include condifuring gii, so that you don’t need to use command line to generate models, controllers.

it is just uncommenting the gii module in config/main.php

	'gii'=>array(


		'class'=>'system.gii.GiiModule',


		'password'=>'password',


	),

and then access the following URL

http://localhost/demo/index.php?r=gii


(Geencj) #19

Don’t know if you’re still here, but this is fantastic it answered my ajax questions


(Dingdog) #20

Thank you :) I’m glad that I made something usefull :)