0%

Book Description

Use the flexible FuelPHP framework to quickly and effectively create PHP applications

  • Scaffold with oil - the FuelPHP command-line tool
  • Build an administration quickly and effectively
  • Create your own project using FuelPHP

In Detail

PHP frameworks have been around for a number of years. FuelPHP was one of the first frameworks built for PHP 5.3. It makes use of more advanced features of the language to allow you to focus on delivering features and code for your projects. FuelPHP allows you to quickly build prototypes using scaffolding and command-line tools, thus allowing you to concentrate on the fun part of trialling ideas and concepts.

This practical guide will show you how to use FuelPHP to quickly create projects more quickly and effectively. You will learn everything you need to know when creating projects with FuelPHP, including how to adapt the project as ideas change and develop.

This guide is packed with several tutorials that will help you to build a powerful and engaging application, and in the process you will learn more about FuelPHP. This book explores how to install and build a FuelPHP project in a step- by- step approach.

Starting with an exploration of the features of FuelPHP, this book then delves into the creation of a simple application. You will then move on to scaffolding your application using the powerful FuelPHP Oil command-line tool. Next, you will be introduced to packages and modules, and also cover routing, which allows for cleaner URL structures.

The book concludes with an introduction to the PHP community.

Book Description

Use the flexible FuelPHP framework to quickly and effectively create PHP applications

  • Scaffold with oil - the FuelPHP command-line tool
  • Build an administration quickly and effectively
  • Create your own project using FuelPHP

In Detail

PHP frameworks have been around for a number of years. FuelPHP was one of the first frameworks built for PHP 5.3. It makes use of more advanced features of the language to allow you to focus on delivering features and code for your projects. FuelPHP allows you to quickly build prototypes using scaffolding and command-line tools, thus allowing you to concentrate on the fun part of trialling ideas and concepts.

This practical guide will show you how to use FuelPHP to quickly create projects more quickly and effectively. You will learn everything you need to know when creating projects with FuelPHP, including how to adapt the project as ideas change and develop.

This guide is packed with several tutorials that will help you to build a powerful and engaging application, and in the process you will learn more about FuelPHP. This book explores how to install and build a FuelPHP project in a step- by- step approach.

Starting with an exploration of the features of FuelPHP, this book then delves into the creation of a simple application. You will then move on to scaffolding your application using the powerful FuelPHP Oil command-line tool. Next, you will be introduced to packages and modules, and also cover routing, which allows for cleaner URL structures.

The book concludes with an introduction to the PHP community.

Table of Contents

  1. Learning FuelPHP for Effective PHP Development
    1. Table of Contents
    2. Learning FuelPHP for Effective PHP Development
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. What is FuelPHP?
      1. A brief history of FuelPHP
      2. Features of FuelPHP
        1. (H)MVC
        2. Modular and extendable
        3. Security
        4. Oil – the power of the command line
        5. ORM
        6. Base controller classes and model classes
        7. The authentication package
        8. Template parsers
        9. Documentation
      3. What to look forward to in Version 2.0
        1. Global scope and moving to dependency injection
        2. Singleton
        3. Multiton
        4. Dependency injection container
        5. Coding standards
        6. Package management and modularization
        7. Backwards compatibility
        8. Speed boosts
      4. Summary
    9. 2. Installation
      1. Preparing the development environment
        1. Apache
        2. PHP
        3. Database interactions
        4. Source control – introducing Git
          1. Further information about Git
      2. Getting and installing FuelPHP with curl and Oil
        1. Clone from GitHub
          1. Continuing the installation
        2. Setting up your project
        3. Using submodules to easily update the FuelPHP core and packages
        4. Committing your code
        5. Composer – the package manager
        6. Configuration
        7. Running in the production environment
        8. Performing migrations
      3. Summary
    10. 3. The Architecture
      1. Environments, constants, and configuration
        1. Server and Apache configuration
        2. The bootstrap PHP file
        3. Configuration
        4. Constants
      2. Models, views, and controllers
        1. Views and ViewModels
        2. Models
        3. Controllers
          1. Template
          2. Rest
          3. Hybrid
      3. Summary
    11. 4. Demo Application
      1. Getting started
      2. Creating a database table
        1. Entries
        2. Categories
        3. Users
        4. categories_entries
      3. Migrations and Oil
      4. Models
      5. Controllers
      6. Views
      7. Generating an administration system using Oil
      8. Summary
    12. 5. Packages
      1. What is a package?
      2. Recommended packages
        1. OAuth
        2. OAuth2
        3. Mandrill
        4. Sprockets
      3. Using the Auth package for user authentication
        1. SimpleAuth
        2. ORMAuth
        3. OPAuth
      4. Composer
      5. An introduction to building your own package
        1. Setting up a repository
        2. Working the package as a submodule
        3. Structuring your package
        4. Configuring your package
        5. Using your package
      6. Letting people know about your package
      7. Summary
    13. 6. Advanced Topics
      1. What modules are and how to use them
        1. Namespaces
        2. The module folder structure
        3. Using the module from the main application
      2. Tasks
      3. Routing
      4. Unit testing
        1. So what is unit testing?
        2. PHPUnit
        3. Running unit tests
        4. Creating unit tests
        5. Grouping unit tests
        6. Configuration and module testing
      5. Profiling
      6. Summary
    14. 7. Welcome to the Community
      1. FuelPHP and GitHub
      2. Getting help and support
      3. FuelPHP on social media
        1. Twitter
        2. Facebook
      4. Parting words
    15. Index
3.14.141.228