Sellvana

New kid on the PHP E-Commerce block Sellvana has been released as a private beta.  I was fortunate enough to get access and take her for a test drive.

“There is a revolution in e-commerce open-source software. Sellvana is easy to use, and learn.”

“We are building a new platform that removes all technical roadblocks for merchants, developers, and designers and puts community back at the center. Based on our own Fulleron PHP Framework, Sellvana provides powerful features that are easy-to-use. In starting afresh, we have looked at every aspect of an ecommerce platform and worked out how to improve on it. We have delivered the changes that the open source ecommerce community has been calling out for, with radical improvements in functionality, flexibility, performance, and security.”

“The goal is to create an easy to install, maintain, extend and customize eCommerce suite, which would provide most of the functionality of Magento, while solving inherent Magento framework issues (memory, speed, complications, number of files/tables)”

Overview:

  • Closed a $5 million seed round from unnamed investors in New York.
  •  Sellvana is a six-person team based in Portland, Ore. Cofounder Boris Gurvich.
  • Boris was a lead architect/developer of Magento, and also maintains quality Magento modules at Unirgy.

Buckyball magnets

Buckyball framework: PHP is fun again (Just don’t swallow them mask)

What I believe the term Fulleron and Buckyball names are derived from:

Buckyball is the underlying PHP framework to Sellvana and is somewhat similar to lib/Varien and Zend Framework most are familiar with in Magento.  Except Buckyball solves a lot of problems both have.  I think the biggest core piece the Buckyball framework achieves is the true modular approach, hence the framework name. As My favorite key points of the framework:

  • Providing more flexibility than Magento framework, but much more efficiently.
  • Complication of implementation should be proportional to complexity of specification.
  • Easy Bootstrapping. Module requires only bootstrap callback. Everything else is up to the developer.
  • Keep folder structure and number of files as minimal as possible.
  • Module files are confined to one folder.
  • IDE friendly (autocomplete, phpdoc, etc)
  • Conserve memory by not storing unnecessary data or configuration more than needed.
  • Inner file/folder structure within the module folder is up to the developer.
  • Debug friendly (concise print_r, debugbacktrace, debug augmentation GUI on frontend)
  • Everything non essential is a module, and can be disabled.
  • Lots of Event hooks.

3rd Party tools and utilities included in the framework:

  • Idiorm & Paris – Object oriented ORM and Active Records
  • Twig Templates via Symfony Twig Class
  • PHPTAL – Template Attribute Language for PHP
  • FireLogger – Firefox Logging utility
  • Ganon – PHP Based Access to HTML/XML documents in a very simple object oriented way
  • Markdown Extra  –  A text-to-HTML conversion tool for web writers
  • HAML – MTHAML is a PHP implementation of the HAML language which can target multiple languages (PHP/Twig).
  • BUI – Homegrown Grid manager?
  • reCAPTCHA

If you’d like to read more about Fulleron Buckyball it is open sourced and available now, without the need of a private access to the Sellvana code:

Fulleron API:

“Fulleron is built upon Buckyball library and inherently is not rigid in its structure or implementation. However, the following set of conventions is recommended for clean, uniform and maintainable application.”

Some of the advantages to the Fulleron API from my perspective:

  • No more XML configuration files! YAML used instead, all relative to the module directory itself.
  • Configurations options are saved as a simple PHP file with Array definitions. (see /storage/config/)
  • Layout files are also YAML based.
  • No sight of EAV anywhere!

The Sellvana File/Folder Structure:

Installing Sellvana:

Installation was fairly straight forward as those may be familiar with Magento. A quick extraction of the codebase, a few chmod to web server writable directories (dlc, local, media) and an empty MySQL Database.  Access codebase via configured URL and begin installation.

Sellvana administration:

Overall the administration feels a lot like how WordPress’s admin feels and functions.  With the modularity of the framework, the “Manage Modules” and “Install from Market” should hopefully be as painless as installing a new WordPress plug-in.

sellvana-admin

Final thoughts:

With other similar packages in Alpha/Beta stages: Forward, as well as Magento 2,  it will be interesting to see which developer friendly e-commerce framework wins majority.  If you want to help shape the future of E-Commerce, make a request for access.

construction Note at the time of writing this article: Keep in mind Sellvana is in private alpha/beta stages and its safe to assume there are bugs/issues and is NOT something to be used in production environments yet.

Sellvana will be released officially, later this year, under the Open Source Licence (OSL v3.0). Ahead of this, the firm is providing limited access to its private alpha technology preview.

Getting Started with Magento

First and foremost get more familiar with ZendFramework and PHP (obviously) if you’re not already.

Next like others mentioned Alan Storm has put together quite a bit of information for you to soak up. He also has written both the book “No Frills Magento Layout” Edwin van Maastrigt mentioned as well as a multi-part Knowledge Base Getting Started Developers article, Which I believe is probably the best place to start amongst anywhere else if you are already familiar with ZF/PHP.

There are many Design Patterns that Magento uses and it definitely helps to have some in-depth knowledge into these. There is a good list of these here on StackOverflow.

You will also need a deep understanding of EAV (Entity Attribute Value) Data Model.

It also helps to have an understanding of how the end users work with Magento as well, familiarizing yourself with how the it operates both on the front end and back end will help you in the long run as well. Magento does offer a “Users Guide” for general purpose use.

Books (for me at least) tend to be on the “healing edge” and by that I mean they are usually about 3 months behind latest releases and may not always be on the “bleeding edge” of current releases and changes. Lots of books for 1.4, for example, and 1.5 is already out in the fray.

To answer your initial question: there are official Video Developer Trainings from Magento Inc, currently for free, that are worth a good look.

In a nutshell there is a lot of inside, that is Magento and don’t expect to pick it up over night unless; being already familiar with a lot of design patterns and data models would be the ideal candidates to get up to speed with using Magento. At times though it can still throw you for a loop. I have a massive amount of Bookmarks and still keep finding new things, with that in mind…

A few authoritative names to look for both on StackOverflow and else where would be: Alan Storm, Inchoo, Branko Ajzele, Colin Mollenhour, Ashley Schroder, Unirgy (Boris Gurvich), Clockworkgeek, Johnathan Day, Joseph Mastey, Fooman, and countless others on StackOverflow.

Magento vs X-Cart

Saw this article today, and haven’t posted up here in awhile, thought I would share the article and my comments (currently pending) here for others as well.

arrow http://expertmagentodevelopers.wordpress.com/magento-vs-xcart/

While I agree with most of the article, having used both systems extensively I wanted to share a few of my own personal opinions on X-Cart and Magento.

  • Varian is now Magento, Inc. which is now owned by Ebay.
  • X-Cart is NOT OOP and is VERY difficult to follow an upgrade path when new releases come out, this was my biggest reason for switching to Magento after having many Clients with X-Cart and spending countless hours just to upgrade a client to the latest X-Cart release.
  • Magento is a very complex system (almost overly engineered) but after spending enough time with it, it starts to make sense why this is the case, and how its easy to rapid prototype client requested features without FUBAR’ing the upgrade path.
  • You are also correct on Magento being slow, it uses a huge amount of abstraction layers, ORM, EAV data models to make it easy to extend both on the Client side and Programmers side. This is where I would say X-Cart wins because of its procedural code if speed is your only consideration. However, for example, adding a new multi-option drop down on a product is far more cumbersome in X-Cart than in Magento.
  • I would disagree on the documentation for Magento, there forums aren’t very helpful however StackOverflow and people like Alan Storm, Inchoo, etc. really help in understanding Magento easier.
  • Smarty templates are just overhead IMO, simply doing PHP wrapped in HTML like Magento does makes sense from a performance stand point, most designers/FEDs are going to have to learn one or the other either way and it doesn’t separate business logic from presentation very well either.

Conclusion: I am by no means saying X-Cart is a horrible E-Commerce package, it works very well and has/had served many of my clients well. However if a client doesn’t have many new features, doesn’t care about upgrade paths and wants a cheap reliable hosting that is responsive. X-Cart is the way to go. If you are wanting a robust E-Commerce system that can grow with your business easily, and you have lots of time, money and programming resource at your disposal Magento is the best choice. I know that statement sounds like Magento is just a money/time waster. It is not as your investing in your companies future more so with Magento than, X-Cart. That being said, for small shops that want a similar route to X-Cart now have the Magento Go! option as an affordable SaaS solution to get an E-Commerce store up and running without having hardly any programming, design and/or e-commerce experience.

Magento version 2.0 (X.Commerce) and eBay

eBay Acquisition

the bad(maybe?) news.

As everyone may know for the most part, eBay now owns Magento. (at least the details are still being worked out, currently.)

Overall I’ve seen some mixed feelings in regards to this, I myself am pretty up in the air; if it’s a good or bad thing, and I think the only thing that will tell is time.

With all the talk, I’m suspecting a fork or two will show up of Magento granted if the OSL will allow for such which I’m pretty sure it will, long as its made freely available:

arrow Magento Community to Enterprise version when its open source?

With that said, during the developers paradise there was mention that eBay’s X.Commerce package would in fact be “Open Source”.

Related Links:
arrow Inchoo on the acquisition

[warning]…when deep-space exploitation ramps up, it will probably be the megatonic corporations that discover all the new planets and map them. The IBM Stellar Sphere. The Philip Morris Galaxy. Planet Denny’s. Every planet will take on the corporate identity of whoever rapes it first. Budweiser World. ~Chuck Palahniuk, Fight Club, Chapter 23[/warning]

Magento 2.0

the good news.

The most interesting news was information about a 2.0 version of Magento, I’m going to assume this will be under the new name X.Commerce with eBay ownership. It will NOT be backward compatible with 1.0 and is NOT a rewrite but a refactoring. It is due to release around the middle/end of this year.

The list of new shinny exciting things:

  • eregi_replace(“^(.*).js$”,”prototype.js”,”jQuery.js”); // No more Prototype!
  • PHP5.3 Native.
  • Simpler file structure, no more app/etc/modules I believe.
  • GUI Design Editor (WYSIWYG?)
  • Class Mapping: No more searching 3 directories of code pools.
  • EAV can be optional (for performance I presume).
  • A deeper theme fallback support.
  • Unit Testing, Selenium, TDD Support.
  • Staging before applying any core updates/modules.
  • Better server side validation.
  • More database options: Oracle, MSSQL, PostgreSQL, etc.
  • No more Magic getter/setters.
  • More API options: RPC/REST
  • Name space collisions detection with advice on how to resolve dependencies.

Related Links:
arrow Magento 2 (in German)

Debugging tips & tricks with Magento Commerce

If you are new to Magento then the vast amount of code to digest can be quite overwhelming. cold_sweat However, here are some tips I’ve learned about over the past on some means to tear down Magento and figure out what’s making it work.

Zend_Debug::dump

Use Zend_Debug::dump($foo); instead of using var_dump($foo); or print_r($foo); it is essentially the same, just a wrapper with pre HTML tag for formatting and escaping of special characters.

idea More details about arrow Zend Frameworks dump method.

However there will be times that simply dumping objects to the screen can be too much and cause browser hangups or even crashes. The best practice I’ve learned is to always use the getData() method that Magento has built-in to the Varien Object, this way your not getting redundant amounts of data dumped to the screen but only the bits you really care about.


Varien Object getData, debug

Magento also has a built-in debug() method in the Varien Object as well that you can use to display data in a string representation of itself.

exclamation Keep in mind debug does NOT always get attached to every object.

idea More details about the arrow Varien Object debug method, arrow Varien Object getData method


Log files

What if your having difficulty displaying things to screen or don’t want any users to see debug output. With this in mind you can also use a built in logging function, similar to arrow Zend_Log and is essentially a wrapper as well. You can find it defined in app/Mage.php.

    /**
     * log facility (??)
     *
     * @param string $message
     * @param integer $level
     * @param string $file
     * @param bool $forceLog
     */
    public static function log($message, $level = null, $file = '', $forceLog = false)
...

And here is an example:

Mage::Log($foo);

Which will log the output the contents of $foo to /var/log/system.log by default.

You can also specify your own log file with an extra argument, your custom log file will appear in /var/log/mylogfile.log

Mage::log($foo, null, 'mylogfile.log');

You can also use combinations of functions/methods to output the contents of an array for instance:

Mage::log(var_dump($fooArray), null, 'mylogfile.log');

exclamation Logging MUST be enabled within the admin: Configuration -> Developer -> Log Settings -> Enabled = Yes


XML Configuration

Most of the time, I have have issues with my XML configurations. Since Magento is very configuration based driven, one improper case or underscore can render things useless. Magento doesn’t validate the XML or throw any errors when such are encountered but rather ignored. The best means I’ve found to figure out whats going on is to display the entire XML built from all XML configurations files with.

header("Content-Type: text/xml");
die(Mage::app()->getConfig()->getNode()->asXML());

xDebug

xDebug is probably one of the more well known and most used debugging tools available. If your IDE does support it, I would highly suggest taking the time to get your environments setup so that you can connect and use it. I’m not going to cover the general use and configuration of it, however Classy Llama has a nifty post that helps keep Magento from letting xDebug take over error handling.

arrow Classy Llama’s Enable xDebugs Error Handler

exclamation It requires modification to the Core files and cannot be extended since the class is final. Make note of your change when doing this, or merely use it on a per need basis and removing it after your done with it. You can also setup your version control to ignore any changes with it.


Built-in PHP functions

If you’re using a bare bones editor without any type of auto complete looking up available class methods can be a pain digging through Magento’s numerous files and folders. To get all available methods from any class you can use var_export, get_class_methods and get_class in combination.

print "<pre>"; var_export(get_class_methods(get_class($this)));

idea More details on: var_export(), get_class(), get_class_methods()

You can also use it in combination with Magento’s getData() to display data with key values intact.

print "<pre>"; var_export(array_keys($this->getData()));

Developer Mode

One last tip I’ve been doing lately is modifying index.php and adding ini_set('display_errors', 1); to the condition checking for the developer mode flag: MAGE_IS_DEVELOPER_MODE. By default the display_errors ini_set is commented out. Here is what my change looks like:

if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
  Mage::setIsDeveloperMode(true);
  ini_set('display_errors', 1);
}

Then use .htaccess SetEnv to enable and disable developer mode per environment:

SetEnv MAGE_IS_DEVELOPER_MODE "true"

If you have any tips or if I missed something please feel free to comment and I’ll add it to the article.