GithubHelp home page GithubHelp logo

jon-moreira / phalconphp-setup-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ewartx/phalconphp-setup-example

0.0 2.0 0.0 860 KB

Phalcon + Grunt + Composer + Bower

ApacheConf 0.06% CoffeeScript 1.44% PHP 72.65% Volt 0.18% HTML 2.31% Shell 0.78% JavaScript 6.16% CSS 16.41%

phalconphp-setup-example's Introduction

Phalcon PHP is a web framework delivered as a C extension providing high performance and lower resource consumption.

PhalconPHP Sample Project Setup Example

PhalconPHP + Grunt + Composer + Bower + Git

This is an example of how to combine the use of many popular automation tools with the Phalcon PHP Framework. This setup is intended for building web applications with scalability in mind.

Phalcon PHP

In this setup I'm using:

  • Volt templating engine
  • Universal Class Loader is registering the external classes via namespaces (maximizing speed)
  • Config files, libary and plugins are pooled into a resources folder for better organization
  • Under app/models, added a ModelBase.php which serves the same purpose as the ControllerBase.php but for common model functions
  • Extending the PHQL with MysqlExtended plugin so that useful mysql functionalities such as DATE_INTERVAL, FULLTEXT_MATCH can be supported

Grunt

Grunt has become an essential tool for demanding projects. Look through the Gruntfile.coffee for ideas for your own project.

Notable highlights:

  • Gruntfile written in coffeescript
  • Preprocessors such as coffeescript, sass /w compass, imagemin
  • Package.json separates out development and product dependencies

Composer

Simplistic way to include third party php libraries for your projects with autoloading enabled. I've included PHPMailer in this repo as the example

Bower

Bower has been something I've played around for a while. While its great at syncing down the latest resource packages such as bootstrap, fontawesome, it downloads the entire repository. One of the grunt automation I used often is Sails-Linker. It auto-inserts the css and script tags in the layout file. The bloated files bower downloads conflicts /w sails-linker. For those who prefers to manually update the css/js links, bower is still a very useful package manager for you.

Git

This is essential to any collaborative project for both version control and deployment.

Notable highlights:

  • putting .gitkeep in any empty folders, otherwise git won't sync them. This is important for the cache folder that Volt requires
  • gitattributes Auto detect text files and perform LF normalization. This is important if you have both mac and window teammates working on the same project
  • do not sync sourcemap files

phalconphp-setup-example's People

Contributors

ewartx avatar

Watchers

James Cloos avatar Jonas Moreira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.