Articles


Our first module, part 1: the concept

Difficulty: Easy

Building our first module

For our first module, we’ll build something that introduces some of the most commonly needed aspects of module development:

  • a database to store module-specific data
  • front end template tags
  • a form and corresponding action to handle the processing of the form
  • a Control Panel interface for managing/monitoring data

With this in mind - and a quick scan of devot:ee to see that one does not exist - let’s build an auction module.

Initially, we’ll keep the module as simple as possible so that the main concepts don’t get lost (we won’t be building the next ebay quite yet). Additional features can be added at a later stage.

This is what we want the module to do:

Auction module wireframe

  • display an entry with its current auction price and other summary data (eg, the number of bids placed, the most recent bid).
  • display a form to allow logged in site members to place a bid.
  • display a list of previous bids for the item.

One thing to to note: where possible, we’ll use the pre-existing functionality of EE. In this case:

  • items will be created as normal channel entries
  • the module will use the existing EE membership functionality to control who can place a bid

We’ll also provide some tools for the site administrator to:

  • View the bids
  • Add/edit/delete bids manually

In the next step, we’ll start creating the module.

 

Comments

Add a comment

(Your email address will not be displayed on the site, but will be used for your gravatar)

Notify me of follow-up comments?