Skip to content
dominiklaubach edited this page Feb 3, 2012 · 50 revisions

Welcome to the Espresso wiki!

Introduction

Espresso is the Build-Tool for The-M-Project. Espresso takes care of all the different files and resources that may exist in the project. The-M-Project is designed to build an application in a structured manner. This means you can split your code into several files, to seperate Controllers, Views, Models, etc. What is good for a developer is "bad" for the loading performance of the app in the browser: it has to download and parse many files, which is slowing done the application startup time. Serving one file on the other hand, is "bad" for a developer because it can be confusing to have all your code in one single file.

Espresso to the rescue!

The project files (Controllers, Views, Models, etc.) are merged into a single JavaScript file. A developer is able to write code and separate it in single files and Espresso merges them together.

Do I need Espresso for The-M-Project?

Espresso takes a lot of work from you by generating an HTML startup page and referencing all the needed resources. Espresso is also taking care of the resource management. You can bundle your code and resources per device. The only thing you´ll have to do is to tell Espresso what target device you want to the build the app for.

Doing this whole stuff by hand, can be a huge amount of work!

That means: Espresso is not mandatory ... but it makes your life much easier!

How to use this documentation

Run Espresso means running the path/to/Espresso/espresso.js file in a node process. If you read a command like 'espresso server' is the same as 'path/to/Espresso/espresso.js server'. To use Espresso as we do, include an alias into ~/.bash_profile like that one: alias espresso=/path/to/Espresso/bin/espresso.js. Now you can use Espresso server instead of /path/to/Espresso/bin/espresso.js server. If you do so, for example running 'espresso server' means running the espresso.js with node and server as a parameter

Configuration (Status: 2012-01-04)

This chapter describes how to configure/customize the build process of the application. All the magic is prepared by making entries in the file config.json in your applications' root directory.

config.json

Resource Management (Status: 2012-01-04)

This chapter is a brief introduction into Espresso's resource management. The resource management lets you organize the project's resources like images and CSS files. In a common folder - the base folder - and in device specific folder that seperates devices like "apple device with resolution 640x960.

Resource Management

Espresso Core Tools

The build tools included in Espresso.

Espresso init

Espresso generate

Espresso build

Espresso server

Running an application on a server

Read this description if you want to deploy and run a The-M-Project application on your own server.

Run on Apache

Espresso Architecture Overview

Architecture

Task Chain

Framework