Intro to Pepper Development

Mint 1.2 just entered a semi-public beta phase (available to all licensed users in the Mint Account Center). This new version of Mint has been almost completely rewritten to make updating Mint and developing Pepper even easier for everyone. Because Pepper development took off so quickly—using what was essentially a sketch of the new Pepper API—existing Pepper are not compatible with this new version of Mint. This semi-public beta period will give Pepper developers time to rewrite their Pepper and beta test Mint on a far greater variety of server configurations than would be possible with a private beta. (Not to worry Pepper developers, just about all of your custom code will be directly portable to the new API.)

This series of articles will walk through the new parent Pepper class and discuss its properties and event handlers. We’ll cover expected property values and when event handlers are called and what they should do or the type of data they should return. Along the way we’ll pop into the Default Pepper class file as an example of how this parent Pepper class can be extended when creating your own Pepper, greatly simplifying development. Finally, we’ll take a stab at writing our own simple Pepper that touches on key concepts described in the first two articles.

Before we start, a word on coding standards. My personal coding style has evolved quite a bit over the course of Mint’s development. As a result these conventions may not be apparent in certain parts of the source code. I will be continuing to address discrepancies as the project continues to evolve. The source code for Mint conforms to the coding standards for Cake with the following exceptions:

  • Mint does not use PhpDoc tags when commenting code
  • Including files is not limited to the require_once function
  • Try to avoid declaring new functions and variables in the global namespace to prevent collisions in the event that Mint or your Pepper becomes an embed-able application no longer isolated by a JavaScript include
  • Pepper class names should be CamelCase prefixed with a developer token and an underscore, eg. My developer token is my initials, SI, and my Pepper name is Secret Crush resulting in my Pepper class name being SI_SecretCrush

On to the articles:

Questions? Visit the Mint Forum.

Tomorrow’s Mint Today
Pepper Properties
Shaun Inman
October 21st, 2005 at 1:43 pm