FuelPHP Application Development Blueprints
eBook - ePub

FuelPHP Application Development Blueprints

Sebastien Drouyer

Share book
  1. 284 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

FuelPHP Application Development Blueprints

Sebastien Drouyer

Book details
Book preview
Table of contents
Citations

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is FuelPHP Application Development Blueprints an online PDF/ePUB?
Yes, you can access FuelPHP Application Development Blueprints by Sebastien Drouyer in PDF and/or ePUB format, as well as other popular books in Informatik & Webprogrammierung. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783985401

FuelPHP Application Development Blueprints


Table of Contents

FuelPHP Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Building Your First FuelPHP Application
About FuelPHP
Development process of a FuelPHP application
Installing the environment
Windows
Mac
Ubuntu
Recommended modules and extensions
Getting the FuelPHP framework
Installing FuelPHP 1.7.2
Downloading the appropriate ZIP file
Using Composer
Updating FuelPHP
Installation directory and apache configuration
The simplest way
By setting up a virtual host
FuelPHP basics
The FuelPHP file system hierarchy
The app directory
The packages
Class name, paths, and coding standard
MVC, HMVC, and how it works on FuelPHP
What is MVC?
How it works on FuelPHP
Actions and controllers
Views
Parameters
Routes
Presenters
What is HMVC?
The oil utility and the oil console
Building your first application
Database configuration
Scaffolding
Migrating
Using your application
Refining the application
Refining the monkey listing
Refining the monkey detailed view
Allowing an empty description
Checking whether the height is a float
Using a checkbox instead of an input for the still_here attribute
Setting custom routes
Removing useless routes and files
A few notes about deploying your application
Summary
2. Building a To-do List Application
Specifications
Conception
FuelPHP installation and configuration
Scaffolding
Routes configuration
The profiler
Models, relations, and the ORM
Differences between CRUD and ORM
The FuelPHP ORM
DB and ORM basics
Executing queries without the ORM
Creating new objects
Finding specific objects
Updating an object
Deleting an object
Loading several objects
Using method chaining
More complex requests
ORM relations
Defining relations inside the models
Testing the relations
Getting objects' relations
Updating objects' relations
Observers and events
Implementation of the to-do list
Allowing the user to see and change tasks' status
Allowing the user to add tasks
Allowing the user to change tasks' order
Axis of improvements
Summary
3. Building a Blog Application
Specifications
Conception
Preliminary steps
Scaffolding the posts
Migrating part 1
The administration panel
The Auth package
Creating the Blog module
Moving files to the Blog module
Improving the navigation bar
Scaffolding the rest of our project
Scaffolding categories
Generating files
Moving categories to the blog module
Migrating
Scaffolding comments
Scaffolding posts (front)
Refining the administration panel
Refining the posts administration panel
Improving the post creation and edition forms
Removing and automatically filling the slug
Changing the small description input to a textarea
Editing the post content using a WYSIWYG editor
Replacing the category input by a select box
Replacing the user_id field by author
Removing the View link
The posts' list
Removing the Slug, Small description and Content columns
Displaying the category and author names
Removing the view link
Refining the categories administration panel
Removing the View link
Adding the number of post's column
Solution 1: using count
Solution 2: using related
Solution 3: using DB::query
Refining the comments administration panel
Improving the comments listing
Removing the view and adding a new comment link
Removing the Email and Content columns
Replacing the Post id column by Post
Improving the comment edition form
Changing the Status input to a select box
Replacing Post id by Post
Removing the View link
Protecting your website against CSRF attacks
Protecting links
Protecting forms
Refining the front-end
Refining the posts' listing
Deleting useless features
Changing how the posts' listing is displayed
Adding pagination
Using posts' slug
Listing posts by categories
Adding indexes
Refining the posts' visualization webpage
Changing the post layout
Adding the comment form
Displaying comments
Notifying the author when a new comment is posted
Clearing rejected comments
Additional improvements
Summary
4. Creating and Using Packages
What are CAPTCHAs?
Preliminary steps
Generating the sample application
The reCAPTCHA solution
Installing the recaptcha package
Configuring the recaptcha package
Integrating the recaptcha package
Creating your own package
Conception
Generating the package
Generating the Captcha_Answer model
Migrating the package
Integrating the package into our application
Implementing the get_html method
Implementing the CAPTCHA verification method
Cleaning old captchas
Possible improvements
Summary
5. Building Your Own Restful API
Specifications
Conception
FuelPHP installation and configuration
The Parser package and template engines
A major benefit of language-agnostic template engines
Subscription and authentication features
Implementing the subscription and authentication forms
Handling the signup form
Handling the signin form
Allowing the user to sign out
Allowing the user to create and view posts
Generating the Post model
Allowing the user to create new posts
Implementing the user interface
Implementing the post creation action
Implementing the profile page
Configuring the routes
Creating the user model
Implementing the show action
Implementing views
Implementing the API
I...

Table of contents