Try the Demo

“Why Magento kicks e-commerce ass (and why i love it)”

Why do I love Magento?  From a design standpoint… you can literally skin this baby anyway you wish. The Design is TRUELY separate from the code. So CSS fanatics dig in ... The team behind Magento has put a lot of time into developing a smart, savvy system that can deliver results amongst a variety of e-commerce stores. Multiple language support, Multiple stores, Smart browsing via layered navigation, RSS product feeds, tagging and reviewing products, comparing products, product wishlists…. even Product Image Zoom is standard right out of the box. Impressive?  Trust me theres more once you pop the hood.

Recent post from NickL’s blog - ibuildstuff. Nick recently launched kanemarie.com on Magento.

RSS comments feed for this entry

User Comments

|4 comments
  1. gamelodge

    1gamelodge from Brisbane, Qld, Australia|posted May 19 2008

    How is code truly separated from design?

    Open any one of the hundreds of phtml Files and you will see a lot of code!.

    For example lets take a simple thing like showing the image in the grid view (template/catalog/product/list.phtml)

    lets assume I want my image to be at the bottom of all the text and, so opposite position to what it is now (css alone cannot do this)

    I wont paste code, here, but if you look at lines 91 onwards, you will see that this is not something a typical designer with little/no php experience would want to take on, for you and me, no problem we understand php, but I can’t see how this is separation of code from design, separation would be to add a simple one liner for the image such as {-image [attributes] -}

    I understand that from the perspective of no controller logic is in the design, this is true, but the reason templating systems where invented was to cut out all the code in the design, code from a designers perspective is still code regardless of what it actually does.

    personally I prefer the use of php as a “templating language” which magento has done, but it does mean that the statement ‘Design is TRULY separate from code’ is true for everyone.

  2. Moshe

    2Moshe from Los Angeles|posted May 20 2008

    @gamelodge: in this file i see:

    * getters ( $this->getAddToCompareUrl($_product) ),
    * helper getters ( $this->helper(’wishlist’)->getAddUrl($_product) ),
    * conditional tags ( if ) and
    * loops ( foreach )

    Please specify which ones you do not think templating language should have and use.

  3. gamelodge

    3gamelodge from Brisbane, Qld, Australia|posted May 20 2008

    <div class="product-image">
    <a href="<?php echo $_product-<getProductUrl() ?>” title="<?php echo $this-<htmlEscape($_product-<getName()) ?>">
    <?php echo $this->helper(init($_product, 'small_image')->resize(170, 170); ?>” alt="<?php echo $this-<htmlEscape($_product-<getName()) ?>">
    </a>
    </div>

    Although this makes perfect sense to me (coder) and i love the flexibility etc etc… for a designer this is code.

    // Controller:
    // Assuming we are not using a simple tamplating language, try create TAGS
    $URL = $_product->getProductUrl();
    $TITLE = $this->htmlEscape($_product->getName());
    $IMAGE_sm = $this->helper(init($_product, ‘small_image’)->resize(170, 170)” alt="$this-<htmlEscape($_product-<getName()) “>
    etc....

    <div class="product-image">
    <?=$IMAGE_sm?>
    </div>

    So now the designer sees those as TAG’s not CODE. This would be much easier to understand for a Designer, point is that although we as coders know that this is not really “CODE” it is TAGS, a designer does not , this “$this->htmlEscape($_product->getName())” is scary for a designer.

    So although for a coder the statement ‘Design is TRULY separate from code’, I think a designer would not agree.

  4. Moshe

    4Moshe from Los Angeles|posted May 20 2008

    So although for a coder the statement ‘Design is TRULY separate from code’, I think a designer would not agree.

    Everyone’s opinion is fully respected, and it is a healthy striving community, when people are allowed and encouraged to have a personal opinion smile

    In such a community common definitions facilitate clear communication and understanding between members, while leaving space for personal freedom of expression.

    In this blog the quote “The Design is TRULY separate from the code” is along the lines with the concept and definition of MVC, or model-view-controller (http://en.wikipedia.org/wiki/Model-view-controller)

    The first paragraph of the definition:

    Model-view-controller (MVC) is an architectural pattern used in software engineering. Successful use of the pattern isolates business logic from user interface considerations, resulting in an application where it is easier to modify either the visual appearance of the application or the underlying business rules without affecting the other. In MVC, the Model represents the information (the data) of the application and the business rules used to manipulate the data, the View corresponds to elements of the user interface such as text, checkbox items, and so forth, and the Controller manages details involving the communication to the model of user actions such as keystrokes and mouse movements.

    In Magento template files there’s no business logic (model definitions) included, and no communication from user actions (controller). Everything that is included in these files are interface considerations, which could vary between interfaces and themes and serve only user interface purposes.

    Nowhere in the definition it says about syntax or flexibility limitations.

    So while you are well within your rights to argue that by your personal opinion templates could have less resemblance to the code, the author of the quote is fully correct in his statements.


RSS: This Entry| All Blog Posts (RSS)