Book Image

Learning FuelPHP for Effective PHP Development

By : Ross Tweedie
Book Image

Learning FuelPHP for Effective PHP Development

By: Ross Tweedie

Overview of this book

<p>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.</p> <p>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.</p> <p>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.</p> <p>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.</p> <p>The book concludes with an introduction to the PHP community.</p>
Table of Contents (14 chapters)

Preface

FuelPHP is a great tool, focused on writing web applications in a simple and fast way that requires less PHP code. It allows you to quickly build prototypes using scaffolding and command-line tools, allowing you to concentrate on the fun part of trialing ideas and concepts.

Learning FuelPHP for Effective PHP Development contains several tutorials that will help you build a powerful and engaging application, and in the process, you will learn more about FuelPHP. This book gives the experience of installing and building a FuelPHP project in a step-by-step way.

The book starts by detailing the features of FuelPHP and then delves into the creation of a simple application. We then move on to scaffolding our application using the powerful FuelPHP Oil command-line tool. We conclude the book with an introduction to the community.

What this book covers

Chapter 1, What is FuelPHP?, gives you a quick introduction to FuelPHP and some of the changes expected in Fuel PHP Version 2.0.

Chapter 2, Installation, covers installing FuelPHP and setting up your development environment.

Chapter 3, The Architecture, gives you a basic overview of the FuelPHP architecture and will cover where to store your project code followed by the summary of this chapter.

Chapter 4, Demo Application, will cover the creation of a project with example code and a step-by-step guide. It will also cover creating the administration system, easy form creation, and using the HTML5 Boilerplate with templates.

Chapter 5, Packages, will introduce packages and highlight important ones for use on projects.

Chapter 6, Advanced Topics, will introduce more advanced topics including modules, routing, and unit testing.

Chapter 7, Welcome to the Community, covers getting help from the community.

What you need for this book

This book assumes you have a computer with Apache and PHP installed.

Who this book is for

This book is for PHP developers looking forward to learning more about using the FuelPHP framework for effective PHP development. It is assumed that the reader has a basic understanding of general PHP development.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: " There is no need to detail the id, created_at, or updated_at fields, as these will be automatically generated."

A block of code is set as follows:

<?php
return array(
    'default' => array(
        'connection' => array(
            'dsn' => 'mysql:host=localhost;dbname=journal_dev',
            'username' => 'journal_dev',
            'password' => 'journal_dev',

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

[default]
exten => s,1,Dial(Zap/1|30)
exten => s,2,Voicemail(u100)
exten => s,102,Voicemail(b100)
exten => i,1,Voicemail(s0)

Any command-line input or output is written as follows:

$ git checkout -b develop
$ git push origin develop

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "On the Initializr website, choose the Classic H5BP option and then the Responsive Bootstrap 2.3.2 template option. Finally, click on Download it!".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking onthe errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.