2017 © Pedro Peláez
 

library vanilla-enterprise-module

Vanilla Enterprise Module

image

soldotno/vanilla-enterprise-module

Vanilla Enterprise Module

  • Friday, December 13, 2013
  • by soldotno
  • Repository
  • 13 Watchers
  • 0 Stars
  • 0 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

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., (*1)

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

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., (*3)

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., (*4)

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., (*5)

Code Sniffer

Using a code sniffer is the first step in our automatic code review control. We're using PHP Codesniffer., (*6)

You can install it here:, (*7)

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

Or you can include it in your project by adding the following to your composer.json:, (*8)

"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:, (*9)

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., (*10)

#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)., (*11)

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)., (*12)

QUnit

Installed with Node:, (*13)

npm install -g qunitjs

or downloaded from http://qunitjs.com/., (*14)

More information: API Documentation, Cookbook, (*15)

PHP unit

Can be installed system wide like this (OSX), (*16)

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, (*17)

Continous integration

To continously integrate everything we've talked about above, we're using Phing., (*18)

Phing can be included via Composer, (*19)

"phing/phing","dev-master"

or be installed system wide., (*20)

You configure phing with a build.xml file. A sample build.xml is included in this repo., (*21)

Get Started

Rename the folder called ./module with your desired module name, (*22)

Delete the .git folder and re-initalize with your new git repo, (*23)

Then enter your module folder and execute, (*24)

composer.phar install

Build the system with the following command, (*25)

phing build

The Versions

13/12 2013

dev-master

9999999-dev https://github.com/soldotno/vanilla-enterprise-module

Vanilla Enterprise Module

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.3

 

vanilla module