By Jeffrey Winesett
For personal home page programmers with a craving so as to add modernity and class to their net functions, this publication could be a revelation. A step by step educational to Yii, it talks you thru the advance of a whole real-world application.
- A step by step consultant to making a latest net software utilizing personal home page, MySQL, and Yii
- Build a real-world, user-based, database-driven undertaking job administration program utilizing the Yii improvement framework.
- Start with a normal proposal, and end with deploying to creation, studying every thing approximately Yii inbetween, from "A"ctive checklist to "Z"ii part library.
This publication is a step-by-step instructional in constructing a real-world program utilizing the incremental and iterative method of software program improvement. You know about agile software program improvement through leaning at the agile nature of the Yii program improvement framework. You contact on each one point of the software program improvement lifecycle via construction a undertaking job administration software from suggestion via construction deployment.
After a quick, common creation to the Yii framework and outlining the software program improvement process taken through the publication, the chapters holiday down within the comparable manner as software program improvement iterations do in real-world initiatives. After the first generation, you could have a operating and validated program with a legitimate, confirmed connection to a database.
In the 2d and third iterations, we flesh out our major database entities and area item version and get to grips with Yii's object-relational-mapping (ORM) layer, lively list. We additionally find out how to lean on Yii's auto-generation instruments to instantly construct our create/read/update/delete (CRUD) performance opposed to our newly created version. those iterations additionally concentrate on how Yii's shape validation and submission version works. through the top of the 3rd new release you've a operating program in an effort to mange initiatives and concerns (tasks) inside these projects.
The 4th and fifth iterations are devoted to consumer administration. We find out about the integrated authentication version inside of Yii to help in software login and logout performance. We then dive into the authorization version, first benefiting from a Yii's basic entry keep watch over version, then imposing the extra subtle role-based entry regulate (RBAC) framework that Yii presents.
What you are going to study from this book
- Auto-generate skeleton internet functions in addition to CRUD scaffolding for the area item version utilizing the integrated command-line interface
- Use Yii database migrations to model and deal with your database changes
- Create user-based purposes with Yii's authentication version
- Enhance your user-based software to manage a user's entry to add performance
- Write an administrative console software to increase the positive factors supplied via Yii's strong command-line instruments
- Integrate different frameworks and libraries right into a Yii software to additional expand its characteristic set
- Spend much less time coping with program configuration through benefiting from Yii's brilliant defaults and conventions.
- Learn how effortless it truly is to enforce a multi-user program by using Yii's authentication and role-based authorization types
- Update your code to correctly deal with the user's final login time and shop it within the database
Quick preview of Web Application Development with Yii and PHP PDF
The version direction box we could us specify the place within the program listing constitution to output the hot dossier. The default is secure/ versions/ (alias program. models). The construct kin checkbox helps you to make a decision even if to have Gii immediately outline relationships among AR items by utilizing the relationships outlined among MySQL database tables. it really is checked through default. The final box permits us to specify a template on which the code new release is predicated. we will be able to customise the default one to fulfill any particular wishes we've that may be universal to all such classification documents.
All different performance may be constrained to authenticated clients. An authenticated consumer is any consumer that has supplied legitimate authentication credentials during the login technique. In different phrases, authenticated clients are clients that experience logged in. Authenticated clients may have entry to the most function performance of the appliance, comparable to developing and coping with tasks, and undertaking matters. tasks coping with the venture is the first goal of the TrackStar software. A venture represents a basic, high-level objective to be completed through a number of clients of the appliance.
Baby is a connection with tbl_auth_item. identify [ 163 ] User entry keep watch over $this->addForeignKey("fk_auth_item_child_child", "tbl_auth_item_ child", "child", "tbl_auth_item", "name", "CASCADE", "CASCADE"); //create the auth task desk $this->createTable('tbl_auth_assignment', array( 'itemname' =>'varchar(64) now not NULL', 'userid' =>'int(11) no longer NULL', 'bizrule' =>'text', 'data' =>'text', 'PRIMARY KEY (`itemname`,`userid`)', ), 'ENGINE=InnoDB'); //the tbl_auth_assignment. itemname is a reference //to tbl_auth_item.
In case you try to input a person that has already been additional to the venture, you'll obtain an blunders telling you so. And upon profitable additions, you'll find a quick flash message indicating good fortune. Now that we have got the power to assign clients to tasks and upload them to our RBAC authorization hierarchy, we should always regulate our good judgment for once we are including a brand new undertaking. while a brand new venture is further, it's going to assign the consumer who's including the venture because the proprietor of the venture. this manner, the author of the venture could have complete administrative entry to the undertaking.
For that reason, it may simply comprise letters, digits, or underscore characters. Yii takes the enter identify parameter, and appends a UTC timestamp (in the structure of yymmdd_hhmmss), with the letter m for migration, to take advantage of as either the filename and the personal home page type identify. Let's cross forward and create a brand new migration for our venture desk, and this naming conference should be made clearer. From the command line, navigate to the appliance safe/ listing after which factor the command to create a brand new migration utilizing the identify create_project_table: This creates the dossier /Webroot/trackstar/protected/migrations/ m121108_195611_create_project_table.