This book is a step by step tutorial in developing a real-world application using the incremental and iterative approach to software development. You learn about agile software development by leaning on the agile nature of the Yii application development framework. You touch on each aspect of the so
Agile Web Application Development with Yii1.1 and PHP5
β Scribed by Jeffrey Winesett
- Publisher
- Packt Publishing
- Year
- 2010
- Tongue
- English
- Leaves
- 368
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
For PHP developers who know object-oriented programming, this book is the fast track to learning the Yii framework. It takes a step-by-step approach to building a complete real-world application - teaching by practice rather than theory. Overview A step-by-step guide to creating a modern, sophisticated web application using an incremental and iterative approach to software development Build a real-world, user-based, database-driven project task management application using the Yii development framework Take a test-driven design (TDD) approach to software development utilizing the Yii testing framework Write less code by using Yii's application generation and scaffolding tools Enhance your application by adding Web feeds, adapting it to multiple languages, and by utilizing themes to provide beautiful skins and design flexibility What you will learn from this book Take a "test first" approach to software development using the Yii testing framework Auto-generate skeleton web applications as well as CRUD scaffolding for the domain object model using the built-in command-line interface Create user-based applications with Yii's authentication model Enhance your user-based application to control a user's access to feature functionality Write an administrative console application to extend the features provided by Yii's powerful command-line tools Integrate other frameworks and libraries into a Yii application to further extend its feature set Spend less time managing application configuration by taking advantage of Yii's sensible defaults and conventions. Learn how easy it is to implement a multi-user application by utilizing Yii's authentication and role-based authorization models Update your code to properly mange the user's last login time and store it in the database Achieve pre- and post-action method request processing using controller filters Tap into the CActiveRecord validation workflow to allow for pre- and
β¦ Table of Contents
Cover
Copyright
Credits
About the Author
About the Reviewers
Table of Contents
Preface
Chapter 1: Meet Yii
Yii is easy
Yii is efficient
Yii is extensible
MVC architecture
The model
The view
The controller
Stitching these together: Yii request routing
Blog posting example
Object-relational mapping and Active Record
Active Record
The view and controller
Summary
Chapter 2: Getting Started
Installing Yii
Installing a database
Creating a new application
Hello, World!
Creating the controller
One final step
Reviewing our request routing
Adding dynamic content
Adding the date and time
Adding the date and time, a better approach
Moving the data creation to the controller
Have you been paying attention?
Linking pages together
Linking to a new page
Getting a little help from Yii CHtml
Summary
Chapter 3: The TrackStar Application
Introducing TrackStar
Creating user stories
Users
Projects
Issues
Navigation and page flow
Defining a data scheme
Defining our development methodology
Automated software testing
Unit and functional testing
Benefits of testing
Test-driven development
Testing in Yii
Unit tests
Installing PHPUnit
Functional tests
Installing Selenium
Running a quick example
Hello TDD!
Summary
Chapter 4: Iteration 1: Creating the Initial TrackStar Application
Iteration planning
Creating the new application
Connecting to the database
Testing the connection
Yii and databases
Adding a db connection as an application component
Summary
Chapter 5: Iteration 2: Project CRUD
Iteration planning
Running our test suite
Creating the project table
Naming conventions
Creating the AR model class
Configuring Gii
Using Gii to create our Project AR class
Testing out our newly generated code
Creating the unit test file
Testing create
Testing read
Testing update and delete
Was all that testing really necessary?
Enabling CRUD operations for users
Creating CRUD scaffolding for projects
Creating a new project
Adding a required field to our form
Reading the project
Updating and deleting projects
Managing projects in admin mode
More on testingβfixtures
Configuring the fixture manager
Creating a fixture
Configuring this fixture for use
Specifying a test database
Using fixtures
Summary
Chapter 6: Iteration 3: Adding tasks
Iteration planning
Running the test suite
Designing the schema
Defining some relationships
Building the database and the relationships
Creating the Active Record model classes
Creating the issue model class
Creating the User model class
Creating the Issue CRUD operations
Using the Issue CRUD operations
Creating a new Issue
Adding the types drop-down menu
Getting the test in the "Red"
Moving From "Red" To "Green"
Moving Back To "Red"
Getting back to "Green" once again
Adding the issue type dropdown
Adding the status dropdown: Do it yourself
Fixing the owner and requester fields
Enforcing a project context
Implementing a filter
Adding a filter
Specifying the filtered actions
Adding some filter logic
Adding the project id
Altering the project details page
Removing the project input form field
Returning back to the owner and requester dropdowns
Generating the data to populate the drop-down menu
Adding User and ProjectUserAssignment fixtures
Making one last change
Finishing the rest of the CRUD
Listing the issues
Altering the ProjectController
Altering the project view file
Making some final tweaks
Getting the status and type text to display
Adding the text display to the form
Changing the issue detail view
Getting the owner and requester names to display
Using relational AR
Making some final navigation tweaks
Summary
Chapter 7: Iteration 4: User Management and Authentication
Iteration planning
Running the test suite
Creating our User CRUD
Updating our common audit history columns
Adding a password confirmation field
Adding password encryption
Authenticating users using the database
Introducing the Yii authentication model
Changing the authenticate implementation
Updating the user last login time
Displaying the last login time on the home page
Summary
Chapter 8: Iteration 5: User Access Control
Iteration planning
Running our existing test suite
accessControl filter
Role-based access control
Configuring the authorization manager
Creating the RBAC database tables
Creating the RBAC authorization hierarchy
Writing a console application command
Assigning users to roles
Adding RBAC roles to projects
Adding RBAC business rules
Implementing the new Project AR methods
Adding Users To Projects
Altering the Project model class
Adding the new form model class
Adding the new action method to the project controller
Adding the new view file to display the form
Putting it all together
Checking authorization level
Summary
Chapter 9: Iteration 6: Adding User Comments
Iteration planning
Creating the model
Creating the Comment CRUD
Altering the scaffolding to meet requirements
Adding a comment
Displaying the form
Creating a recent comments widget
Introducing CWidget
More on relational AR queries in Yii
Completing the test
Creating the widget
Summary
Chapter 10: Iteration 7: Adding an RSS Web Feed
Iteration planning
A little background: Content Syndication, RSS, and Zend Framework
Installing Zend Framework
Using Zend_Feed
Creating user friendly URLs
Using the URL manager
Configuring routing rules
Removing the entry script from the URL
Adding the feed links
Summary
Chapter 11: Iteration 8: Making it Pretty - Design, Layout, Themes, and Internationalization(i18n)
Iteration planning
Designing with layouts
Specifying a layout
Applying and using a layout
Deconstructing the main.php layout file
Introducing the Blueprint CSS framework
Understanding the Blueprint installation
Setting the page title
Defining a page header
Displaying menu navigation items
Creating a breadcrumb navigation
Specifying the content being decorated by the layout
Defining the footer
Nesting the layouts
Creating themes
Building themes in Yii
Creating a Yii theme
Configuring the application to use a theme
Translating the site to other languages
Defining locale and language
Performing language translation
Performing message translation
Performing file translation
Summary
Chapter 12: Iteration 9: Modules - Adding Administration
Iteration planning
Modules
Creating a module
Using a module
Theming a module
Applying a theme
Restricting admin access
Adding a system-wide message
Creating the database table
Creating our model and CRUD scaffolding
Adding a link to our new functionality
Displaying the message to users
Importing the new model class for application-wide access
Selecting the most recently updated message
Adding a little design tweak
Summary
Chapter 13: Iteration 10: Production Readiness
Iteration planning
Logging
Message logging
Categories and Levels
Adding a login message log
Message routing
Handling errors
Displaying errors
Caching
Configuring for cache
Using a file-based cache
Cache dependencies
Fragment caching
Declaring fragment caching options
Using fragment cache
Page caching
General performance tuning tips
Using APC
Disabling debug mode
Using yiilite.php
Using caching techniques
Enabling schema caching
Summary
Index
π SIMILAR VOLUMES
For PHP developers who know object-oriented programming, this book is the fast track to learning the Yii framework. It takes a step-by-step approach to building a complete real-world application - teaching by practice rather than theory. Overview A step-by-step guide to creating a modern, sophistica
This is a step-by-step tutorial for developing web applications using Yii. This book follows the test-first, incremental, and iterative approach to software development while developing a project task management application called "TrackStar". If you are a PHP programmer with knowledge of object ori
This book is a step by step tutorial in developing a real-world application using the incremental and iterative approach to software development. You learn about agile software development by leaning on the agile nature of the Yii application development framework. You touch on each aspect of the so
This book is a step by step tutorial in developing a real-world application using the incremental and iterative approach to software development. You learn about agile software development by leaning on the agile nature of the Yii application development framework. You touch on each aspect of the so
Yii is a high performance PHP framework used for rapid web application development. It is well designed, well supported, easy to learn, and easy to maintain. This book embraces the learn-by-example methodology to show you the most important features of the Yii 2 framework. Throughout the course of t