Ecommerce and Entrepreneurship Blog | About | Contact | Store

Website Design and Architecture: Eight Musts for Scalability and Reusability

Posted on April 16, 2008 by Archives

As you may or may not know, we at have just completed the process of launching a brand new site in a completely new market, For the 7 week time period it took us to launch I was in the middle of making that happen. Our plan was to simply take our existing site and infrastructure, and copy it over and start a new site. We call it our “Ctrl-C, Ctrl-V” plan. Sounds simple, right?

Well, yes and no. Our site has been around for about 3 ½ years, and in that time a lot has changed. We’ve made many improvements and modifications along the way, and left some things alone. All that to say that after more than 3 years of coding, the task of doing this copy/paste has left me thinking more about proper site architecture methods and the modularizing of code and processes. Fortunately we’ve done a lot of that all along, though not perfectly and not everywhere.

So given that it’s on my mind right now, I thought I’d share my thoughts to help you eCommerce developers out there as well as remind myself of some of the more important things to consider when it comes to site design and architecture.


  1. Plan on Succeeding – You will grow. You will increase sales. You will offer more products. Don’t build anything thinking “ah, this will be good enough for now”. Don’t take shortcuts because it’s good enough for your current needs. It just adds layers of problems once you finally do outgrow it but are dependent on that piece. A small example is our name, We only sell brand new, top notch products. Nothing “surplus”. And we sell a lot of non-plumbing products, including power tools and lighting. Very early on, we had no idea how broad our product line would get. 

  2. Separate Your Layers – This is kind of a no-brainer to programmers, but we all get lazy, rushed, or think something is so small and trivial it doesn’t matter. And we all eventually regret those decisions. Take the time to separate your data, business, and interface layers. To the lay-persons out there, what I mean is this: don’t hard code your site based on your current products, database, email system, etc. Because when you need to change something out, the world blows up. Renaming our mail server was a bit more tedious than it needed to be due to numerous references to it by name throughout the site. Now we use a global setting to refer to our mail server, so when we need to change it again it is a one line change. Even things as simple as a state drop down list; you may say “well how often are the states going to change?” They may not, but what if you start shipping to Canada? Now you have to add those provinces to all of the associated drop downs you have. It is much better to utilize your database for data and save your interface for content and actions. 

  3. Stretch the Limits With Third Party Vendors – One thing that our legal department is so good at is thinking ahead when negotiating contracts. Some vendors have arbitrary limits on products, categories, requests, bandwidth, etc. These are mostly arbitrary, as in not due to technical or physical capabilities. So if a vendor says they can support 40K SKUs, get them to bump that number up to 100K. You may only have 1500 products, but by agreeing to a ceiling you increase the chances of having to renegotiate later on. And most of the time it doesn’t cost them anything extra to change that number in your contract. 

  4. Imagine Everyone in Their Underwear – OK, so maybe that is a tip for public speaking. Skip that one. 

  5. Imagine Quadrupling Your Estimates – If you are just getting going, you really have no way to estimate your growth. You never know when you’ll land that major supplier, customer, or piece of market share. So plan as best as you can; just make sure you build it to handle a lot more. 

  6. Modularize –As much as is possible, develop your site so that components are hot-swappable. One thing we struggle with is our shipping logic. Our logic is based on many layers: boxing (how many packages to ship this order), warehouses (where is each package shipping from), weights, dimensions, etc. It is a cumbersome mess. This leaves us with a huge black hole that does not easily lend itself to upgrading or making relatively minor changes. As much as possible, spend the time modularizing and breaking out segments so that if you ever need to change one component you can with no problem. If you are writing custom shopping cart code, make the part that does the credit card processing its own piece. You give it the data, and it gives you the response. That way if you ever change credit card processors, it’s a simple integration with your existing checkout page rather than a page rewrite. 

  7. Globalize – So many times something needs to be referenced in multiple places. Things like a merchant ID for third party software, an ftp location, or even the aforementioned email server. Don’t hard code these references! You will only regret it later. Instead, put all these variables in a global location and reference them that way. In .NET, use the web.config <appSettings> section to refer to all your connections strings, account IDs, mail servers, email notification addresses… well, you get the idea. You will save yourself a lot of time down the road. Extensive utilization of globalization has made the copy/paste that much easier for me. 

  8. Strategize – Develop your code as if you were going to expand to other sites and industries. It will probably help you architect your site a lot better using a lot of the above mentioned techniques regardless of whether or not you ultimately do your own copy and paste. However, when you do come to that road (or quit this business and start a new one), you won’t have to do it all from scratch again. A few minor techniques planned in advance can save you so much time later on. One example: throughout our site, none of our links, pages, or images (in code, not rendered) link to In code they all look something like this: [SiteName]/images/imageName.jpg. Our site is built for multiple domains, so now instead of looking for hundreds of references, I just change our site name variable and it’s all there. This is just one small example of how to develop your site with expansion in mind.

Hopefully these thoughts will prove helpful to you. Just writing them down has brought even more thoughts to mind for future development. Feel free to share any thoughts you have on this or other tips in the comments section.

blog comments powered by Disqus