frustated learn Yii :( need help

folks, i never learn about PHP, and i used to develop software with asp.net mvc. i am struggling to understand Yii Framework, i do not see clear structure or syntax, workflow. i have spent almost 1 week, i still do not get the big picture of yii framework. could you give some idea how i can pick it up ? thanks a million

I think here’s your mistake: Yii isn’t really that great for learning PHP.

i want to learn PHP with MVC framework. could u advise where i should start? :(

Start with pure PHP. No frameworks, just the bare programming language ;)

wah learning curve php very long

Well, how did you learn asp.net? And please be reasonable with your expectations ragarding frameworks: No framework is made out of fairy dust and magic. They are there to assist you, not to automaticaly turn all your wishes into code ;)

i can recommend a book

anyway if you know asp its gonna be very easy for you to transfer to php

I’m the opposite to you. I’ve started my MVC journey with Yii-framework and had a problem to figure out how to find may way through the MVC framework, and decided that it was too much to try to learn both ASP.Net and Microsoft MVC at the same time and go for the simpler Web Forms approach. Several things that I find useful in Yii-framework, I couldn’t figure out how to do it right in Microsoft MVC.

Since you already practice ASP, you may want to start with Larry Ullman’s Learning Yii Series

Source: http://www.yiiframework.com/tutorials/

I was in your place in the end of the last year. Just to say I had to hard work 2 months to begin seeing the big picture. I want to make a quite big/complicate site for me so I need to learn a lot. Then I had the idea to develop simpler sites like mine for clients to face the real problems of developing. Since then I made 2 sites for clients and I say it’s the best lesson rather than reading all kind of tutorials.

PM me your e-mail, as I have time and the knowledge I’ll help you. Docendo discimus.

Like others do, I reserved a domain to make a blog about the achieved PHP-Yii knowledge. As I finish the current development I plan to start building this blog.

i really still struggling to understand yii. i fell that learn cakephp is easier than yii due to there are plenty of tutorial and sample of code at www.cakephp.org

From whatbive heard, Microsoft mvc is actually pretty decent and actually makes sense to certain degree. A grown up language like java would actually probably make even more sense.

Although I love php and find it easy to use, I can see your point!

Cakephp didn’t make any sense to me. Symfony2 os wonderful hit I don’t have a year to learn it. Kohana looks good but something ??? Just told me stay away. People say code igniter is the easiest to learn and probably is a great place to start – but I don’t want to see php4 code anymore! Fuelphp looks good but is too young for my standard and there lots lots more! Ahhh zend … I don’t want to go back to college ;)

I came to Yii understanding I’m going to have to invest time and to live with a big memory footprint. But, it seems to offer a nice balance between not being as crazy difficult as symfony2 yet still almost as powerful.

I picked up php pretty fast coming from the perl world. I picked up php5 / mvc pretty fast too after not programming for several years.

Why don’t you install Yii and tinker with blog demo?

It actually does something and has most pieces already there. It also provides enough room to add in extra pieces and get a taste of what is going on.

I have some php experience so I’ve been tinkering with a few different Yii projects to get my feet wet and get a chance to see how people have been using Yii for real.

Most programming books suck! They hand feed you code and then just go on to explain what they did rather than why they choose to do such and such. Then there’s the other side that goes over board on API and fictions but never really tie it together for you.

I like to jump in and tweak and break code. I learn by being in the trenches. Way more difficult and time consuming and I end up learning things in the wrong order or skip important things like how to build proper arrays and such but it’s for me and I want to study the way I want.

I would suggest downloading different projects from different frameworks, pop open the hood, kick the tires and see what speaks to you.

Why do you want to learn php?

You always have python/django, ruby/rails, java/grails, and js/node :)

Find a language to love and you’ll be amazed at how easy hard study is :)

@sapporroguy, I really appreciated your sharing and advise. well, i am now trying to pick up bit by bit of yii framework, the main reason I learn PHP, I have been working with microsoft product for almost 10 years, well i am developing my own product,the reason i am using php coz the OS using linux (free) :) and I just want to know more deeply about open source world. I learn a lot how powerfull is community software :D

Opensource wonderful but Microsoft / oracle really have made things for their users!

Opensource is a do it yourself idea and a community can either help a lot or give you nothing. So sometimes you get free beer other times it’s your friend who buys :)

Although, I like php, please find a language that you’ll love too! Once you find that language you’ll really see how opensource can be joy.

Did you try the demo blog yet?

If you do stay with php, please remember that you’ll get angry that sometimes ms mvc does things better.

I wish I knew about asp .net :(

But you google for topics that people talk about the differences! That should help you more than a hello world tutorial!

:)

I found MVC very difficult at first because my knowledge of Objects and Classes to be sub standard. The one thing that helped me a lot was the book "PHP Objects, Patterns and Practice" http://www.amazon.com/Objects-Patterns-Practice-Experts-Source/dp/143022925X/ref=sr_1_1?s=books&ie=UTF8&qid=1333096857&sr=1-1

After just the first 4-5 Chapters MVC started to make a lot more sense to me. I am not an expert yet but the learning process has been great fun but takes a lot of time. You cant expect to go from 0-100 in just a few weeks.

In talking to other ASP.Net programmers I have heard a lot struggle to move away from Visual Studios. The culture shock is to much for some .net devs and it seems to move from MS is more than just changing languages.

I will say one thing, I am really enjoying Netbeans. I only moved to it recently and it has really be great.

I think you need to take it in steps, learn on thing at a time and Yii should be last on that list. Learning Linux, Apache, mySQL, PHP and Yii all in one go will be overwhelming, unless you already have experience in some then move to the next thing you think you need to learn. Slowly all the pieces will make sense.

Just my experiences and $0.02.

I just started learning Yii 2 weeks ago after skimming through PHP for beginners. Didn’t find that learning PHP for beginners helped me in any way to understand learning Yii. I have been working in C++ OOP and moving to MVC is hard for me to grasp the concept. But, after going through Larry Ullman’s tutorials, I have began to understand how the modules connect with each other although not thoroughly. I went ahead and purchase his book to further my understanding of the framework.

All in, I would say, Yii is a steep learning curve and has not much to do with any beginner PHP tutorials. Just keep an open mind and learn the concepts from scratch.

My two cents - I’ve been trying to learn Yii with MongoDB, and Gii does not work, so I’ve been forced to write the model classes by hand.

This has been a great learning experience, both to understand the architecture a little better, and to have a reason to dig into the API without copying all of the examples.

In fact, since MongoDB isn’t supported very well (the best extension halted development two years ago) I’m using two versions of the same site to learn: an SQLite version and a MongoDB version. I try to get the same results with both, which really helps define my goals. I was panicking a bit, feeling overwhelmed (found this thread) but now there’s a light at the end of the tunnel.