https://github.com/integralist/mvcp
Implementing the Presenter architectural pattern alongside MVC (using Sinatra)
https://github.com/integralist/mvcp
Last synced: 8 months ago
JSON representation
Implementing the Presenter architectural pattern alongside MVC (using Sinatra)
- Host: GitHub
- URL: https://github.com/integralist/mvcp
- Owner: Integralist
- Created: 2013-10-20T19:22:04.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-24T08:30:04.000Z (over 12 years ago)
- Last Synced: 2025-04-07T17:21:14.003Z (about 1 year ago)
- Language: Ruby
- Size: 119 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MVCP (Model View Controller Presenter)
This is a Sinatra based application running an MVCP architecture
## Usage
First install the dependencies: `gem install bundler && bundle`
Then from there whenever you want to run the Sinatra app: `bundle exec shotgun`
## Application Architecture
Within the `config.ru` we load a helper module and the main Application
Controller.
Routing is handled within `config.ru` using the Rack `map` method and that loads
the relevant Controller.
All other Controllers inherit from the Application Controller.
We get data from our Models and because we have lots of components (all of which
potentially have lots of data that would normally be set-up by the Controller)
we will use the Presenter pattern to get the data from the Models instead and
then have a presenter handle the preparation of view data.
## Directory Structure
- app
- controllers
- helpers
- models
- presenters
- views
- components
- public
- scripts
- styles