2017 © Pedro Peláez
 

library nife

Modern, no-bullshit MVC framework for PHP

image

ryprop/nife

Modern, no-bullshit MVC framework for PHP

  • Friday, November 18, 2016
  • by ryprop
  • Repository
  • 1 Watchers
  • 3 Stars
  • 12,130 Installations
  • PHP
  • 6 Dependents
  • 1 Suggesters
  • 1 Forks
  • 0 Open issues
  • 13 Versions
  • 2 % Grown

The README.md

The Nife PHP framework

Unlike many PHP MVC frameworks, Nife does not force you to code in a brittle, badly-defined subset of PHP. Rather, it is a set of simple classes and interfaces that solve common problems and provide commonly-needed abstractions in a straightforward and conventional way. Copy over the classes that you want, implement the interfaces with your own backends as needed, and ignore the parts that aren't useful to your project., (*1)

Philosophy

  • To maximize reusability, interfaces should be designed to handle a single use case, and provide only a single way to use them.
  • Interfaces should be defined according to how they are used, not how they are initialized. e.g. setXXX methods are generally inappropriate unless part of a storage API.
  • Objects should be as stateless as possible. See: http://davidlesches.com/blog/a-rant-on-the-misuse-of-instance-variables
  • Interfaces should not define 'convenience methods'. Convenience utility functions may be provided, instead.
  • Don't make assumptions about the environment within which objects are being used.
  • Don't use global state.
  • Methods whose implementations are likely to be I/O bound should return futures.
  • When practical, take advantage of language features rather than introducing new APIs. This is somewhat difficult in PHP as the 'language features' are generally pretty terrible, but e.g. clean up resources in __destruct() rather than having a separate close() method, use functions instead of single-method classes when their purpose is obvious enough. (I may change my mind about this point.)
  • Follow standard naming and documentation conventions.

Getting Started

With Composer

If you already have a Composer-based project, add Nife to the requirements in composer.json:, (*2)

```json { "require": { "php": ">=5.2.0", "ryprop/nife": "^0.2.10" }, "minimum-stability": "dev", } ````, (*3)

Nife comes with a program, bin/new-nife-project, that can generate a bit of boilerplate to get you started. This will generate composer.json if it is not already present. If you use the above composer.json example to install Nife, delete it before running vendor/ryprop/nife/bin/new-nife-project., (*4)

The Versions

18/11 2016

dev-master

9999999-dev http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

18/11 2016

0.2.10

0.2.10.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

11/07 2016

0.2.9

0.2.9.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

03/06 2016

0.2.8

0.2.8.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

31/07 2015

0.2.5

0.2.5.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

05/03 2015

0.2.4

0.2.4.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2

 

The Development Requires

mvc nife

04/03 2015

0.2.3

0.2.3.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php ^5.2.0

 

The Development Requires

mvc nife

22/12 2014

0.2.2

0.2.2.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php ^5.2.0

 

The Development Requires

mvc nife

09/12 2014

0.2.1

0.2.1.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php ~5.2.0

 

The Development Requires

mvc nife

09/12 2014

0.2.0

0.2.0.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2.0

 

The Development Requires

mvc nife

08/11 2014

0.1.0

0.1.0.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2.0

 

The Development Requires

mvc nife

19/02 2014

0.0.2

0.0.2.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2.0

 

mvc nife

29/01 2014

0.0.1

0.0.1.0 http://www.nife-framework.org

Modern, no-bullshit MVC framework for PHP

  Sources   Download

The Requires

  • php >=5.2.0

 

mvc nife