Monthly Archives: January 2012

Ecomapi: Finding all of the use cases

This is the third post in creating an open source project series.

In order to better understand the system and organize the project in optimal way it is always a good idea to include Use Cases in project analyses. In simple terms, use case represents a system functionality initiated from the user of the system in order to achieve a certain goal. Prerequisite for finding all of the use cases is understanding who are the users of the system. Let’s follow the standards and call them Actors. This is because they act on the system, but they actually represent a role that the concrete user can have.

Like on any other journey it is always easier when someone else walked the same path before you. In this case there are plenty of eCommerce offerings on the market currently. They were very useful in helping me recognize an already established and proven list of actors and use cases for the problem at hand.

In my analysis I found three actors and around fifty use cases (google docs spreadsheet). That is a lot of work for me to do in this short span of time. So I am going to organize the list a bit and reduce it to necessary use cases only.

More on this in the next post.

Open Source Project Definition

My yesterday announcement didn’t gain much traction or feedback. I guess that is what you get when you neglect your blog for almost a year. It would be much better to do this with a push from the broader audience, but I guess I have to prove myself worthy of the attention. Let’s begin by defining the problem.

Problem definition

To be honest I am an entrepreneur in my hart. During my work for clients many startup ideas develop in my mind. Since I am working with eCommerce all of those ideas at their core include basic eCommerce setup: products organized in catalogs, customers can order products, payment processing, shipping processing, etc. It would be nice to focus on the parts that will differentiate those ideas from competition and leave the eCommerce part to some stable library.

Sometimes client came with request to transform their current site into an eCommerce system. Until now clients were using some well known or custom built CMS platform and they want to continue to use it. They want to keep their existing data and reduce transitional costs as much as possible. It would be a nice thing to just plug in some stable library that will hook into the existing data.

Emerging pattern in both of these cases is a need for a generic, well executed, and tested library that would encapsulate eCommerce business logic.

Project name

I thought about project name for a while and decided it will be called ecomapi. It’s nice, simple and it’s descriptive enough (ecommerce api). I registered the domain and will soon point it to my Linode instance (referal link) where all of the documentation will be hosted.

Project description

ecomapi is an open source library that encapsulates eCommerce business logic. If you look at it from the MVC pattern point of view it will represent the Model. It is designed to be embeddable into any existing system or a framework but can also be used as a basis for developing new projects. By using it in your project you can completely remove e-commerce business logic from your planing, development and maintenance phase to gain on time and resources.

Library is designed using OOP methodology and practices and consists of set of classes that allow these features:

  • Product management
  • Product types
  • Product categorization
  • Product relations
  • Catalog searching and filtering
  • Customer management
  • Order management
  • Shipping processing
  • Payment processing
  • Tax calculation
  • Defining custom business rules for order processing
  • Reports generation

Project guidelines

Development of the library needs to be guided by these statements:

  1. Fully documented
  2. Embeddable into en existing systems
  3. Flexible enough to allow usage in non-standard use cases
  4. Properly tested to assure reliability
  5. Fast (inducing as little overhead as possible)

Project goals

There are only few for now:

  1. Develop a working prototype until January 23rd, 2012.
  2. Continue with iterations until stable version 1.0 is reached.

Programming language

This was a tough decision to make and I decided to go with PHP. I really love Python and I think it’s one of the best designed platforms for development. But PHP’s much bigger audience prevailed in this case. If you consider all those WordPress, Drupal, Zend, CodeIgniter, Cake, etc. powered websites out-there that could use this kind of library, Python would not be an optimum choice. Huge barring on this decision have the fact that PHP is my primary tool at the current position.

I would also like to mention that I considered making this library language agnostic. This could be done by making the communication with the library going through some protocol (HTTP, SOAP, Custom, etc.). Reasons I rejected this idea:

  • Library is a more general case. User can add which ever protocol they want on top of the library if the need comes for something like that.
  • It will turn project into a specialized server. Users will have to deal with setting up the server instead of embedding the library into their project and knowing it will work.
  • It will add another layer that will increase possibility for errors and bugs, it also needs additional testing.
  • There are speed considerations. Library calls will always outperform service calls.
  • Last but not least target audience for this project doesn’t have a need for something like that.


On this page I set some of the crucial elements of the ecomapi project. Without farther delay I will start with concrete organization and implementation process to validate my assumptions about this project.

In the next post I will explain the work flow of the project.

I have 10 days to bring an open source project to life

I am on a vacation until January, 23rd. Vuhu!

And you know what that means. Gym workouts every morning to make the spine muscles strong again. Relaxing afternoons on the good old couch. A quick walk in the park. And at last, a time to work on something that doesn’t have $$$‘s written on it. It’s been all capitalism for me in the past few years and a hippie college days were long gone. I want to do something for the open source community for a change.

Contributing to the open source has always been my desire. But times were tough and I only recently gained financial independence to stand on my own two feet. In the mean time I’ve been using open source software and made my living out of it. Even this post is written in a Firefox running on a Ubuntu installation. But enough about me let’s talk about the project.

Every day for the next ten days I will work on a open source project. I will use this blog to document as much as I can of my decision making process. This includes strategic decisions, requirements gathering, diagrams, architectural decisions, code samples, guides and anything else that I think will be interesting for a community to know and get a feedback on. I will try to put my knowledge, experience, and creativity to good use and you will be given an opportunity to witness the birth of an open source project.

I will try to make continuous stream of posts everyday:

  • For every open source project good documentation is crucial, and this is a step in a right direction
  • You will be given opportunity too give feedback and influence project future
  • We can collectively learn by discussing project development and learning from each other
  • Future users will know why is something implemented in a certain way
  • And interest from the community(if any) will give me a will to continue with my undertaking

And now on to the crucial thing that I need your feedback on. What project idea should I undertake? What software does the community need that I can fulfill with my field of expertise? Do you remember any library that you wanted to have and thought: “Oh, it would be cool if there was an open source project that implemented this for me”? I have an idea set on my mind and I will go on with it if there are no other options. But I would like to hear other opinions about this.

Also I am aware that 10 days isn’t much, but in my opinion it will be enough to get the basic stuff done and get to the version 0.1. Later on I will continue to maintain the project and hopefully get it to the version 1.0.

Like any other attention seeking blogger I will submit this post to Hacker News and Reddit because those two communities are the ones I respect the most and would like to hear their opinion so you can discuss this post over there.

If you are interested to be involved in the project then you should contact me on twitter and subscribe to keep yourself updated.