- Getting Started
- Initial Prototyping
- Post Management
- Comment Management
- Portlets
- Final Work
This tutorial describes how to use Yii to develop a blog application shown as the blog demo which can be found in the Yii release files. It explains in detail every step to be taken during the development, which may also be applied in developing other Web applications. As a complement to the Guide and the Class Reference of Yii, this tutorial aims to show practical usage of Yii instead of thorough and definitive description.
Readers of this tutorial are not required to have prior knowledge about Yii. However, basic knowledge of object-oriented programming (OOP) and database programming would help readers to understand the tutorial more easily.
This tutorial is released under the Terms of Yii Documentation.
I still say look at the video first because it helps a LOT, AND it shows good tools, AND because the guy is funny.
BUT, on CAREFUL reading, there is an SQL file listed on one of the demo pages that will instantiate all the tables and columns. Good thing, I was ready to give up guessing what the demo wanted for data types :-)
So far, still impressed. I think that I will eventually develop something that automates the relations part of Yii. It seems cumbersome to have great design tools for dbases (Dezign for Databases) and then have to design php code that shows the relationships when it's already in the SQL. I'll have to figure this out.
The video is great and really helped my but I was a little late and when using the video (made for yii-1.03) with the new demo and new guide (yii-1.06)... it can be confusing.
I recommend the video for good practices and practical stuff like command-line tips & tricks.
But as the author himself said, the PDF explains things better if you actually want to learn how to use the framework!
Comment #234 says there is SQL file listed on one of the demo pages. I don't know where that is or exactly what that means. I searched the PDF for CREATE TABLE and none found. I think that is about as carefully as you can look. I am hobbled at creating the database, which has nothing to do with YII. As #234 says we could trying to guess data types etc. for this blog demo. I'm sure I could come up with a good blog schema but I'd like to use the one the tutorial is using.
The demo talks about schema files located somewhere in the application itself but I just have a standard yii installation. I search all over the site for where to download the complete blog demo but no luck. WHERE IS IT????? or at least just the schema. please????
aha it is in the distro after all. OK. on the road again.
There are a lot of assumptions in this tutorial that are much easier (though not always easy) to make sense of if you are reading the blog demo code alongside the tutorial.
Based on a recent exchange with the author, the tutorial has always been intended for use alongside the blog demo. To my eyes though, this intro page implies that you don't need to read the demo code, q.v. "It explains in detail every step to be taken during the development" above.
Ah well, now we know. At least all those that read the comments do anyway.
Here are links to "Getting Started" documentation beyond the blog demo (you are here) and Creating First Yii Application. I hope the convenience of having these links in one place is useful. (And to be clear, I'm not connected to these documents or their authors.)
Never worked with a framework? The whoopass tutorial - and its forum thread - Where to Start with Yii have some useful perspective.
Kevin Korb's Yii Framework + MySQL tutorial is usefully concise.
Questions? The General Discussion forum is the place to ask.
The Tips, Snippets and Tutorials forum has helpful posts on many topics.
The Tips forum above has a thread about this topic.
I'm sure that there are other valuable sites out there that folks can point to. Please reply to that thread with corrections or links to other newbie tutorials of fairly general scope. And yes, I too am a newbie.
There are a lot of assumptions or left out steps. 1/ You need to make the database directory yourself 2/ You need to make the database yourself 3/ You need to make the tables yourself.
I highly recommend someone make a .sh and a .bat file that does all of those and has links in it for all the relative downloads. (Mabye the links will be google searches grouped by 'windows','redhat','ubuntu','mac'. I would do it, and will do it, when I have the time . . . . a month or two from now