Skip to content

Latest commit

 

History

History
73 lines (48 loc) · 2.26 KB

001-yii-values.md

File metadata and controls

73 lines (48 loc) · 2.26 KB

001 - Yii goal and values

Goal

The Yii project aims to build and support practical and helpful tools and community.

Values

The values we express in our work support the goal. We try to

Be practical

High performance

Performance is a necessary condition of practicality. Software shouldn't waste machine resources or human resources.

Sensible defaults and flexibility

We prefer sensible defaults and conventions that users can customize. We seek a balance between flexibility, discipline and simplicity that meets common needs.

Be practice-oriented

We prefer practice to theory. For example:

  • Solutions for known use cases should avoid excess complexity by providing only needed flexibility.
  • Standard implementations should take practical use into account.
  • Experience is at least as useful as theory in guiding design.
  • Context is critical in determining appropriateness.

Be helpful

This value guides technical decisions as well as community activity. Consideration of how software features help users should guide development. Community-wise, we value any helpful contribution, be it a pull request or an answer in the forum.

When the other principles could conflict, we choose a solution that's more helpful to the community.

Be simple

Solutions should be simple and expressive:

  • We use as much complexity as needed and no more.
  • We avoid ugly solutions unless there is no alternative.
  • Fewer rules are better than more rules.

Be Explicit

We prefer explicit, obvious solutions and code. Solutions should clearly express exactly what they do. For example:

  • A straightforward solution is better than an abstract one unless the abstraction has practical purpose.
  • Loud fails are better than silent fails or masking errors.
  • Explicit casts are better than PHP type juggling, type hints are good.
  • No magic unless necessary.

Be consistent

We try to be consistent in:

  • Code style
  • Naming
  • Design
  • Structure
  • Values and goals