NavigationUser login |
What's in store for 0.6Version 0.6 brings significant architectural change to Modern Merchant. It is a release for PHP developers. Look for an alpha release in the next couple months. Read more to learn about the new enhancements. Here are some of the feature of interest for developers:
A typical plugin directory looks like this:
To demonstrate the improvements in MVC, the product controller's "edit" action now has only one line of code:
function runEditAction()
{
$this->product = $this->requireProduct($this->req('product'));
}
The product's "update" action has only 9 lines of code:
function runUpdateAction()
{
$this->product = $this->dao->fetch($this->getRequiredParam('product_id'));
$this->product->setValues($this->req('product'));
if ($errors = $this->product->validateForSave()) {
$this->addWarnings($errors);
return $this->goToView('edit');
}
$this->product->save();
$this->addNotice("Product successfully updated.");
return $this->goToRedirect($this->getListOrSearch());
}
A great deal of what I learned in Ruby on Rails has been sprinkled in to Modern Merchant, making it significantly more simple and easier to develop.
|