万本电子书0元读

万本电子书0元读

顶部广告

FuelPHP Application Development Blueprints电子书

售       价:¥

1人正在读 | 0人评论 9.8

作       者:Sébastien Drouyer

出  版  社:Packt Publishing

出版时间:2015-02-27

字       数:366.2万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
This book is for intermediary to seasoned web developers who want to learn how to use the FuelPHP framework and build complex projects using it. You should be familiar with PHP, HTML, CSS, and JavaScript, but no prior knowledge about MVC frameworks is required.
目录展开

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

Implementing the base controller

Implementing your first hybrid action

Implementing mappers to control how the information is shared

Improving the listing

Giving JavaScript access to our Mustache views

Generating the templates.js file

The easy and dirty way

Using guard-templates

Integrating template.js and Mustache.js

Implementing the post/list action

Implementing the See more button

Redirecting the home page to the logged user's web page

Unit tests

Possible improvements

Summary

6. Building a Website Using Novius OS

About Novius OS

Getting Novius OS

Configuring Novius OS

Exploring Novius OS

The applications manager

The Novius OS desktop

Novius OS' front and the default homepage

The Webpages application

Novius OS templates

The App Desk

Inserting enhancers in your webpages

The Novius OS file system hierarchy

Applications folder structure

Files extensions

Configurations and classes

Creating an application

Installing the 'Build your app' wizard

Generating the application

Testing your generated application

Application basics

The metadata configuration file

The migration files

The App desk

The edition and creation forms

The front controller

More about Novius OS

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部