PHPackages                             carlescliment/moco - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. carlescliment/moco

ActiveProject[Framework](/categories/framework)

carlescliment/moco
==================

PHP Model-Controller microframework

1.5.1(12y ago)04.0kApache-2.0PHPPHP &gt;=5.3.2

Since Jul 29Pushed 12y ago1 watchersCompare

[ Source](https://github.com/carlescliment/moco)[ Packagist](https://packagist.org/packages/carlescliment/moco)[ RSS](/packages/carlescliment-moco/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

MoCo
====

[](#moco)

MoCo is a Model-Controller framework. Built on the Symfony Dependency Injection component, it lets you building HTTP-agnostic applications and focus in the bussiness logic your system needs. The goal is to obtain the better possible design by removing the annoyances of web-oriented frameworks. It is also not intended to generate views, albeit you could do it.

Once your bussiness logic has been properly coded and tested, you can then include your application in an HTTP framework that will handle the requests and provide responses in HTML, JSON or whatever you need.

Installation
------------

[](#installation)

Create a directory that will contain your PHP application. Write a `composer.json` file in it. At first it will be something like this:

```
{
    "name": "my/moco-app",
    "require": {
        "php": ">=5.3.2",
        "carlescliment/moco": "dev-master"
    },
    "autoload": {
        "psr-0": { "": "src/" }
    }
}

```

Execute `php composer.phar update`. MoCo will be installed as a vendor.

Building your app on MoCo
-------------------------

[](#building-your-app-on-moco)

MoCo does not provide any standard to build your directory structure. Here is an example:

- Create a directory `src/Configuration/` inside your project.
- Create a new class `ApplicationBuilder` in `src/Configuration/ApplicationBuilder.php`.

    ```
