osHelpers - Help for your osCommerce store
 
oscommerce Seo
  Seo Pack 2
  SE Friendly URLs
  Session ID Removal
  Title and Meta Tags
  Google Sitemap
Magnum Shopping Cart
  Magnum Light
  Magnum Multi Store
  Magnum MVS Basic
  Magnum MVS Advanced
osCommerce Services
  osc / cre patch
  Data Entry
  Data Extraction
  bugs and fixing
  Site Transfer
  creloaded Transfer
  Design Special
  Hosting
osCommerce Templates
osCommerce Contributions
  Credit Modules
  Features
  Images
  InfoBoxes
  Languages
  Order Total Modules
  Other
  Payment Modules
  Reports
  Shipping Modules
  Templates/Themes
  Zones
osCommerce Articles
  osCommerce Article 167
  osCommerce Article 166
  osCommerce Article 165
  osCommerce Article 164
  osCommerce Article 163
  osCommerce Article 162
  osCommerce Article 161
  osCommerce Article 160
  osCommerce Article 159
  osCommerce Article 158
  osCommerce Article 157
  osCommerce Article 156
  osCommerce Article 155
  osCommerce Article 154
  osCommerce Article 153
  osCommerce Article 152
  osCommerce Article 151
  osCommerce Article 150
  osCommerce Article 149
  osCommerce Article 148
  osCommerce Article 147
  osCommerce Article 146
  osCommerce Article 145
  osCommerce Article 144
  osCommerce Article 143
  osCommerce Article 142
  osCommerce Article 141
  osCommerce Article 140
  osCommerce Article 139
  osCommerce Article 138
  osCommerce Article 137
  osCommerce Article 136
  osCommerce Article 135
  osCommerce Article 134
  osCommerce Article 133
  osCommerce Article 132
  osCommerce Article 131
  osCommerce Article 130
  osCommerce Article 129
  osCommerce Article 128
  osCommerce Article 127
  osCommerce Article 126
  osCommerce Article 125
  osCommerce Article 124
  osCommerce Article 123
  osCommerce Article 122
  osCommerce Article 121
  osCommerce Article 120
  osCommerce Article 119
  osCommerce Article 118
  osCommerce Article 117
  osCommerce Article 116
  osCommerce Article 115
  osCommerce Article 114
  osCommerce Article 113
  osCommerce Article 112
  osCommerce Article 111
  osCommerce Article 110
  osCommerce Article 109
  osCommerce Article 108
  osCommerce Article 107
  osCommerce Article 106
  osCommerce Article 105
  osCommerce Article 104
  osCommerce Article 103
  osCommerce Article 102
  osCommerce Article 101
  osCommerce Article 100
  osCommerce Article 99
  osCommerce Article 98
  osCommerce Article 97
  osCommerce Article 96
  osCommerce Article 95
  osCommerce Article 94
  osCommerce Article 93
  osCommerce Article 92
  osCommerce Article 91
  osCommerce Article 90
  osCommerce Article 89
  osCommerce Article 88
  osCommerce Article 87
  osCommerce Article 86
  osCommerce Article 85
  osCommerce Article 84
  osCommerce Article 83
  osCommerce Article 82
  osCommerce Article 81
  osCommerce Article 80
  osCommerce Article 79
  osCommerce Article 78
  osCommerce Article 77
  osCommerce Article 76
  osCommerce Article 69
  osCommerce Article 68
  osCommerce Article 67
  osCommerce Article 66
  osCommerce article 65
  osCommerce article 64
  osCommerce article 63
  osCommerce article 62
  osCommerce article 61
  osCommerce article 60
  osCommerce article 59
  osCommerce article 58
  osCommerce article 57
  osCommerce article 56
  osCommerce article 55
  osCommerce article 54
  osCommerce article 53
  osCommerce article 52
  osCommerce article 51
  osCommerce article 50
  osCommerce article 49
  osCommerce article 48
  osCommerce article 47
  osCommerce article 46
  osCommerce article 45
  osCommerce article 44
  osCommerce article 43
  osCommerce article 42
  osCommerce article 41
  osCommerce article 40
  osCommerce article 39
  osCommerce article 38
  osCommerce article 36
  osCommerce article 37
  osCommerce article 35
  osCommerce article 34
  osCommerce article 33
  osCommerce article 32
  osCommerce article 31
  osCommerce article 30
  osCommerce article 29
  osCommerce article 28
  osCommerce article 27
  osCommerce article 26
  osCommerce article 25
  osCommerce article 23
  osCommerce article 21
  osCommerce article 20
  osCommerce article 19
  osCommerce article 18
  osCommerce article 17
  osCommerce article 16
  osCommerce article 15
  osCommerce article 14
  osCommerce article 13
  osCommerce article 12
  osCommerce article 11
  osCommerce article 10
  osCommerce article 9
  osCommerce article 8
  osCommerce article 7
  osCommerce article 6
  osCommerce article 5
  osCommerce article 4
  osCommerce article 3
  oscommerce Article 2
  osCommerce Article 1
osCommerce Tutorials
  Installing osCommerce
  Configuring your store
  Adding categories
  Adding products
  Adding product attributes
  Configuring currency
  Adding payment modules
  Adding shipping modules
  Configuring sales tax
  Editing your home page
  Editing columns
  Editing header and footer
  Creating specials
  Managing customers
  Sending out a newsletter
  Sending out email
  Managing your banners
  Backup database
CRELoaded Tutorials
  Add Administrators
  Add Article Author
  Additional Images
  Create a New Page
  Define Mainpage
  Disable cc Encryption
  Disable Company Field
  Disable Country
  Disable Date of Birth
  Display broken images
  Easypopulate Export
  Email confirmation
  Insert Faq
  Max Package Weight
  Require Terms of Use
  Affiliate Newsletter
  Enable Cache
CB Power Affiliate

   OSHELPERS | OSCOMMERCE ARTICLES | OSCOMMERCE ARTICLE 128   



osCommerce Article 128

A Peek Under the Hood: Mambo & osCommerce
By Ric Shreves

One of the challenges of working with open source software is dealing with the variations that exist from product to product. osCommerce and Mambo, two of my favourite open source products, provide a classic example of variations in standards and fundamental approaches to software development.

I started on a new osCommerce project a couple of weeks ago and once again find myself struggling with the customisation of the system. osCommerce, while a powerful and full-featured ecommerce package, is a real beast to customise. In contrast, the newest version of the Mambo content management system is a breeze to use and customise. Both products are open source, but show widely divergent approaches to open architecture.

Working with open source applications is a mixed bag for programmers. While you may love the open architecture, you are unlikely to love some of the other aspects. Insufficient documentation is the common complaint, with inconsistent coding standards coming in a close second.

Both Mambo and osCommerce are mature, successful products. They have a similar technical base, both being written in PHP and running off the mySQL database system. Both have dedicated teams and a well-structured administration process, yet they exhibit a wide divergence in their approach to code. Why the big differences?

The first difference lies in the relative intricacy of the two systems. osCommerce is a very complex catalogue and ecommerce system. It handles products, order processing, shipment and payment systems. It also has a back office component that enables the issuance of invoices and shipping labels and provides the site owners with data concerning their inventory and stock levels. It is an ecommerce application and that means it must be able to deal with the necessary security precautions that go hand in hand with transacting online.

Mambo, in contrast, is a content management system and a web site framework. That is, it provides a foundation upon which you can build what you want by adding in additional modules and components with increased functionality. While it is complex, it does not exhibit the same level of intricacy as osCommerce and does not have to be as concerned with security issues.

So, on the surface at least, it seems logical that Mambo is easier to open up and modify. However, a close look at the code, the file structures, and the database structure reveals a different story.

The Mambo team's approach to architecture is logical, modular, and more consistent with current coding practices. Mambo divorces much of the component functionality from the core, so it is possible to modify individual components and modules extensively without having a negative impact on core functions. Mambo code is also well-commented and consistent. The system also relies heavily on CSS to achieve formatting goals.

In contrast, osCommerce employs less modularity and exhibits a less transparent coding style. Module functionality is often integrated with core functions, requiring a programmer to tread lightly lest they create unintended results. Comments are sparse and not presented consistently. Formatting in osCommerce is dependent on a multitude of tables and spacer gifs, making the code bulky and slow to load. One of the first things I do with any osCommerce site is strip out as many of the spacer gifs and nested tables as possible. This frequently decreases the overall code length for any particular page by 40% and reduces significantly the number of HTTP requests, thereby improving performance of the site. Substitution of an expanded CSS handles the formatting.

In fairness, there are some common problems that plague both systems. Both systems probably have too many features by default, creating unnecessary lines of code and increasing the risk attendant with modifying the code. Both systems lack excellent developer documentation, though both are supported very well by forums and community sites. Neither system is standards compliant nor very accessible for the handicapped. They do not produce XHTML compliant pages and their usage of CSS is inconsistent.

Moreover, while one of the benefits of using Mambo or osCommerce is access to the large number of components that have been developed for the systems by third parties, the quality of components tends to vary widely and standards are often not respected in those bits of code. Integrating those components into a highly customised core can be a challenge.

The Mambo development team claims that the next version of Mambo will provide better XHTML and XML support and that some of the shortcomings in accessibility will be addressed. I can only hope that the next version of osCommerce brings improvements as well.

Still, at the end of the day and despite their various shortcomings, these two systems are good examples of the bazaar approach to software development, that is, as you walk through the bazaar it all looks to be a bit of a mess, a bit chaotic, but if you look at the large picture, the bazaar is very efficient at meeting the varying needs of a wide number of consumers. They are also living proof that robust, reliable open systems can be built in very different fashions and still achieve their users' goals.

osCommerce Article 128
box_bg_l.gif.
box_bg_r.gif.
 

osHelpers

osHelpers