FuelPHP Application Development Blueprints
eBook - ePub

FuelPHP Application Development Blueprints

Sebastien Drouyer

Compartir libro
  1. 284 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

FuelPHP Application Development Blueprints

Sebastien Drouyer

Detalles del libro
Vista previa del libro
Índice
Citas

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es FuelPHP Application Development Blueprints un PDF/ePUB en línea?
Sí, puedes acceder a FuelPHP Application Development Blueprints de Sebastien Drouyer en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Programación web. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
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...

Índice