Giter VIP home page Giter VIP logo

continous-integration-vanilla-module's Introduction

Vanilla Enterprise Module

Best practices

This repo is trying to take the best practises that the development community has and the standards we in Scandinavia Online are using to create a vanilla module that could be used as the basic for any php module.

To see the best alot of good practises for php development, We recommand http://phptherightway.com/

#Prerequisites

  • phing
  • composer
  • php

We could say that the only thing you need to install is composer and php, and then we could download all the dependencies via composer. But to keep the repository to a minimum, we also expect that the system has installed phing. To run all the tests in the provided build.xml you also need sass, csslint and jshint.

#Choosing a standard ###The nice thing about standards is that there are so many of them

Spaces, indentations and bracket positions is meaningless in and of itself, but when it causes programmers to loose workflow, it can mean a great deal.

Following a code standard means that everyone who works with our code know how to it should be structured. This makes it easier for everyone to read, and this increases the work flow.

###Code Sniffer Using a code sniffer is the first step in our automatic code review control. We're using PHP Codesniffer.

You can install it here:

http://pear.php.net/package/PHP_CodeSniffer/

Or you can include it in your project by adding the following to your composer.json:

"soldotno/sol_codestandards","dev-master",
"squizlabs/php_codesniffer","1.*",

#####Codesniffer is easy to configure and easy to set up against a specific code standard

######Composer Run this in your terminal to get the latest Composer version:

curl -sS https://getcomposer.org/installer | php

######Zend Framework 2 Our main framework is Zend Framework 2. It's a solid and well maintained framework with a proven track record.

#######Javascript For Javascript validation, we're using JSHint (http://www.jshint.com/). You can install it system wide via node (npm install -g jshint), which creates an executable that can be run by executing 'jshint js/' (which will validate every file in the js/ folder).

######CSS For CSS validation we're using CSSLint. You install is system wide via node (npm install -g csslint) which creates an executable that can be run by executing 'csslint css/' (which will validate every file in the css/ folder).

######QUnit Installed with Node:

npm install -g qunitjs

or downloaded from http://qunitjs.com/.

More information: API Documentation, Cookbook

######PHP unit Can be installed system wide like this (OSX)

wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit

Or be included in composer.json and executed from the vendor folder

######Continous integration To continously integrate everything we've talked about above, we're using Phing.

Phing can be included via Composer

"phing/phing","dev-master"

or be installed system wide.

You configure phing with a build.xml file. A sample build.xml is included in this repo.

#Get Started Rename the folder called ./module with your desired module name

Delete the .git folder and re-initalize with your new git repo

Then enter your module folder and execute

composer.phar install

Build the system with the following command

phing build

continous-integration-vanilla-module's People

Contributors

robbestad avatar sindresvendby avatar

Watchers

 avatar

Forkers

soldotno

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.