Skip to content

Module Separation Strategy

EvanDotPro edited this page Jul 24, 2012 · 15 revisions

For maintainability, re-usability, and rapid development, SpeckCommerce will be making full use of Zend Framework 2 modules. This document outlines how these modules may be divided up.

It will provide basic foundations of authentication, registration, password reset, etc. See the ZfcUser wiki for a detailed explanation of how ZfcUser will work.

Builds on top of ZfcUser, making use of Zend\Acl to provide a powerful and flexible ACL implementation for other modules to utilize. It could also provide an admin UI section for administrating roles/permissions if the SpeckAdmin module is available.

ZfcUserProfile? (Maybe not Zfc)

Provides an easy-to-extend user profile system that works with ZfcUser.

Allows for persistent sessions tied to a user account. For example, a user logs in, makes a cart, logs out, gets on another computer, logs back in, and still has their shopping cart.

EdpAddress

Module which provides a generic model for representing addresses. Could either ship with a standard set of countries and states, or utilize geographic data provider modules which could be maintained and updated separately, as well as swapped out depending on needs of the applications and modules consuming them.

EdpUserAddress

Simple module which combines EdpUser and EdpAddress in a logical way, allowing users to store and manage addresses. Could allow for defining certain types or tags on addresses such as "shipping" or "billing". Provides an interface for managing users via EdpUserProfile if present.

Provides a method for managing cross-domain session and session separation. For example, domain.com/store1/* and domain.com/store2/* could have totally separate sessions or foodomain.com and bardomain.com could share sessions. In the case of cross-domain sessions, a group of domains is defined, with one domain decided as a "master" domain. When a user lands on a non-master site without a valid session, they are redirected to the master domain, given a valid session ID, and redirected back to the referring site with the new session ID in the URL. Upon landing back on the returning site, the session ID is verified to be valid. This allows users to have a network of sites where users could take their cart with them across domains, etc. For an example of this, see kmart.com, sears.com, and landsend.com.

SpeckThemeManager

Some sort of application theme manager module.

SpeckDefaultTheme

Default theme shipped with SpeckCommerce.

SpeckAdmin

Depends on EdpUser and probably EdpUserAcl. Provides an easy-to-extend framework for an admin interface.

This module will provide the models, schema, services, controllers, views, etc for representing a wide variety of product data. It will have support for categories, product specs, prices, images, etc. This will be one of the largest and more complex modules for SpeckCommerce. This would provide a search engine for searching through products. Zend\Lucene or Sphinx Search could be used.

SpeckCustomerReview

Obviously this module allows customers to leave reviews; probably on products, but it could be made more generic so they could apply to any entity like movies, etc.

SpeckCart

The actual shopping cart, for storing items / configured items in a session in preparation of an order.

SpeckSpecials

An advanced product specials module which allows for configuring complex special pricing based on multi-step logic. For example, by $50 worth of products from category A, and get $10 off a product in category B. (There an infinitely more scenarios than this.)

SpeckTax

Module to accurately calculate sales tax based on shipping source and destination. Will have a 'default' mode where the user will have to maintain tax jurisdiction information manually, with a plugin structure for external calculation services.

SpeckOrder

SpeckPayAuthnet

SpeckPayPayPal

SpeckPayGWallet

SpeckPayBillMeLater

SpeckPayCCBill