Categories


Archives


Recent Posts


Categories


Welcome to Magento: Pre-Innovate

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

This entry is part 22 of 43 in the series Miscellaneous Magento Articles. Earlier posts include Magento Front Controller, Reinstalling Magento Modules, Clearing the Magento Cache, Magento's Class Instantiation Abstraction and Autoload, Magento Development Environment, Logging Magento's Controller Dispatch, Magento Configuration Lint, Slides from Magento Developer's Paradise, Generated Magento Model Code, Magento Knowledge Base, Magento Connect Role Directories, Magento Base Directories, PHP Error Handling and Magento Developer Mode, Magento Compiler Mode, Magento: Standard OOP Still Applies, Magento: Debugging with Varien Object, Generating Google Sitemaps in Magento, IE9 fix for Magento, Magento's Many 404 Pages, Magento Quickies, and Commerce Bug in Magento CE 1.6. Later posts include Magento's Global Variable Design Patterns, Magento 2: Factory Pattern and Class Rewrites, Magento Block Lifecycle Methods, Goodnight and Goodluck, Magento Attribute Migration Generator, Fixing Magento Flat Collections with Chaos, Pulse Storm Launcher in Magento Connect, StackExchange and the Year of the Site Builder, Scaling Magento at Copious, Incremental Migration Scripts in Magento, A Better Magento 404 Page, Anatomy of the Magento PHP 5.4 Patch, Validating a Magento Connect Extension, Magento Cross Area Sessions, Review of Grokking Magento, Imagine 2014: Magento 1.9 Infinite Theme Fallback, Magento Ultimate Module Creator Review, Magento Imagine 2014: Parent/Child Themes, Early Magento Session Instantiation is Harmful, Using Squid for Local Hostnames on iPads, and Magento, Varnish, and Turpentine.

Innovate 2011 is just around the corner, and I won’t be able to make it this year. For not, as I’ll be there in spirit if not spirits. While X.commerce has been shrouded in Apple levels of secrecy and mystery, it’s clear that Innovate will expose the eBay, PayPal, and GSI communities to Magento is a very loud way, and I figured all the new nerds, developers, techies, and hackers involved could use a quick 10,000 foot view of the Magento ecosystem as it exists now.

Who am I (i.e. some quick shilling)

Before we get to that you’ll need to suffer through a few paragraphs of crass commercialism. I’m the owner of Pulse Storm, a small software and knowledge product company. I’ve been heavily involved in the Magento community for the past three years and have written a number of free Magento tutorials as well as a book on the Magento layout system.

Pulse Storm’s flagship product is Commerce Bug, a Magento debugging extension that helps newcomers cope with Magento complex/robust object hierarchy, and also helps seasoned veterans cope with poorly outsourced Magento installations they’ve inherited. All of Pulse Storm’s Magento products are focused on helping developers make the most of their time with Magento, and will pay for themselves in the first day.

We now end the commercial portion of today’s broadcast.

What is Magento

There’s really two ecosystems in the Magento universe. The first, and newer system, is Magento Go. This is Magento’s application service provider, software as a service, cloud based ecommerce product. It’s essentially their answer to Shopify, and now that Magento’s been acquired by eBay it’s the likely successor to eBay’s hosted store offering.

As of right now there’s some uncertainty in the community as to what sort of APIs will be available for Magento Go. At Magento’s February 2011 Imagine conference plans for a Google widgets like application infrastructure were announced, but those plans have been on hold since. I wouldn’t be surprised to see a major announcement at Innovate surrounding this.

The older, and more established, ecosystem is the original self-hosted Magento software system. This is a heavily engineered PHP system/application with three different versions. There’s Community Edition, which is free to download and use under the Open Software License. Magento’s commercial products are called Enterprise Edition and Professional Edition, and are based on the same codebase as Community Edition. These commercial versions are available for use after paying Magento an annual licensing fee. Community Edition (CE), Enterprise Edition (EE), and Professional Edition (PE) all share and swap code during their development cycles, but are on independent schedules. It’s clear that Magento Go is based on a fork of this codebase as well.

Third Party Developers

Magento Connect is the next stop on our ecosystem whirlwind tour. Up until now Magento Connect has been part directory listing, part package management system. The web interface for Connect lists free and commercial Magento extensions developed by individuals, companies, and occasionally the Magento core team itself. Free extensions are made available within your Magento system via a Magento Connect section of the application, as well as a command line installer. You enter an extension key or upload a tarball, and the package is automatically installed.

Magento Connect was originally baed on the PHP PEAR packaging system, but in the 1.5 release of Community Edition this was changed to a custom Magento implemented system (that’s still very similar to PEAR). This has been touted as a step towards Magento Connect 2.0, but there’s no concrete details on what that means.

Currently, Magento Connect is not an App Store style marketplace. There’s no way to purchase extensions directly via the web or in-system interface. Instead, commercial extension listings offer a link to the merchant’s website, where the independent extension merchant is responsible for maintaining a purchasing and fulfillment system.

Each extension merchant offers their extensions in a different format. Some offer Magento Connect compatible packages which may be manually loaded via the in-system Connect interface. Others offer a tarball with with installation instructions. Still others make you install their package management system and use it to install your purchases and manage your DRM.

Licensing terms are similarly cowboy. Some extensions are available for a one time fee. Others are licensed on a per-site, per-system, or per-domain-name basis. Still others have complicated algorithms for charging you based on number of customers, products, and sales volume. Again, Magento offers no standard way of enforcing a licensing scheme, it’s up to the individual merchant to decide how much DRM their extensions will have.

Rumors about an App Store style marketplace have been circulating for some time, and given the buzz around X.commerce I wouldn’t be surprised to see some sort of announcement at Innovate. Whether this is for the self-hosted systems, Magento Go, or something new remains to be seen.

For the Nerds

Magento was, in part, a response to the shoddy late 1990s style PHP engineering found in other open source carts available at the time. Magento heavily leverages PHP 5’s object oriented programming features, so much so that it more resembles an n-tier Java application than any PHP application that’s come before it. Magento is often marketed as being based on the Zend Framework. While Magento makes use of Zend Framework components, it has its own application bootstrap logic, its own controller dispatch logic, its own system for module based code organization, its own layout system, its own ORM, and many other sub-systems that have no opposite number in the Zend Framework. Magento is a framework in and of itself. Most of my articles focus on explaining on how Magento is slightly, but not totally, different from other PHP frameworks.

Earlier we mentioned Magento extensions. Interestingly, for all its software subsystems, the core Magento code contains no concept of an “extension”. Instead, an extension is simply a collection of PHP files that are copied into place on a Magento system. A extension could be a well formed Magento code module that follows the practices set forth in the core modules. It could also be a completely separate application that’s installed in the root Magento directory.

Front End Nerds Too

As mentioned, Magento contains its own layout and theming system. Themes are collections of phtml template files controlled by nested PHP block objects. There’s an XML based meta-programming language that allows designers control over the system without having to touch the core business logic code. It’s complicated enough that I’ve written an entire book on the subject. Although complicated, once coming up to speed front-end web developers and designers will quickly be able to change the appearance and functionality of individual components without accidentally impacting other areas of the site. Multiple sets of best practices have emerged, but nothing’s that considered canonical.

There are many commercial Magento themes available. However, themes are often not 100% compatible between versions of Magento, as there’s often complicated view logic that relies on other parts of the system behaving in a certain way. Also, during development of the 1.4x CE branch of Magento, the theming engine changed dramatically. Long story short, make sure you’re buying a theme that works with your version of Magento.

Content Management

Magento contains its own content management system. Content management in Magento is a GUI for editing individual CMS pages. URL structure is managed manually by creating URL identifiers for each Magento CMS page. The Magento CMS also allows you to create reusable chunks of free-form content call “static blocks”. Static blocks may be inserted into pages via the GUI admin. Finally, Magento also offers the ability to create widgets. Widgets are like static blocks, only they contain structured data that users enter via a GUI. Widgets may also be inserted into different structural areas of your site via an admin interface. Rumors abound about widgets being the basis for a future WYSIWYG style content editing interface. If you’re interested in learning more about widgets, I’ve got a screencast based on my Imagine 2011 talk.

Magento’s routing architecture contains the capacity to integrate with other CMS systems, but no mature projects have emerged from the community in this vein.

Magento’s Architecture vs. Performance

Standard LAMP deployment solutions won’t get you far with Magento. Because Magento leverages so many PHP classes and objects, because its EAV ORM produces extra SQL queries, because it makes heavy use of large XML trees, and more generally because Magento’s guiding development principle has been “code the features first, performance is a secondary engineering task”, a default installation of Magento will not run well, if at all, on cut-rate shared hosting platforms.

Magento has a compiler mode that will reduce file system based overhead by creating a flat, single directory hierarchy for a large percentage of its class files. Magento also released a white paper that covers some sane defaults for your server setup. There’s also Magento Speed Test, an independent service that speed tests Magento hosts using Siege. It’s a great resource for finding Magento optimized hosting providers.

Performance and hosting is another area where no good canonical solutions have emerged from the community. The ability to successfully deploy and maintain a Magento system is one of those competitive advantages that (thus far) firms have been unwilling to share with the world. If you’re a savvy DevOps engineers there’s lot of opportunity here.

Wrap Up

All of this just scratches the service of what Magento has been, and no one knows what’s waiting at Innovate 2011. With eBay’s funding and reach behind Magento’s relentless team, the platform is sure to be a mainstay in online retail for years, if not decades, to come.

Originally published October 10, 2011
Series Navigation<< Commerce Bug in Magento CE 1.6Magento’s Global Variable Design Patterns >>

Copyright © Alana Storm 1975 – 2023 All Rights Reserved

Originally Posted: 10th October 2011

email hidden; JavaScript is required