Update [2014-02-16] — Many (but not all) of the artifacts produced for Operation Frontend Steward have been migrated into this repo. We are working directly with Magento 2's product teams to ensure these concerns are addressed within the product. We are preparing a survey for partners and independent developers to provide feedback to Magento on each issue. Please read through the articles and we'll let you know when the survey is ready.
- Define strategic overarching principles Magento 2's frontend needs to uphold (think "10 commandments").
- Create public documentation of frontend patterns used in Magento 2.
- Refactor outdated, ignored, and abused frontend code with standardized, lean, extensible, and future-friendly code.
- Propose frontend architectural changes outside the Hackaton's scope to modernize Magento 2.
Project Charter — The Origin Story
Principles — Overarching Frontend Goals
- The perfect CMS does not constrain or coerce its frontend output
- The core frontend package cannot be Magento's demo
- Invest in Magento's frontend patterns. Stay lean and framework agnostic
- Treat frontend performance as the bottleneck it is compared to backend performance
- Use tools to evaluate and test frontend code quality
- Decouple HTML, CSS and JS from PHP classes
- Decouple visual (CSS) layer from the functional (JavaScript) layer
- Decouple functional (JavaScript) layer from the markup (HTML)
Pivots — Major Technical Shifts Needed in Magento 2
- Mobile First — Adopt a mobile-first methodology across the design system.
- Atomic Templates — Write templates atomically to contain the smallest possible output.
- DRY Principles — Embrace DRY (Don't Repeat Yourself) principles consistently.
- Checkout UX — Use (Woven Checkout) not (Accordion + Sidebar) for OnePageCheckout.
- CSS Architecture — Write HTML classes for (OO-CSS) not (chained-classes CSS).
- CSS Pre-Processors — Use (Sass + Compass) not (LESS) for CSS pre-processing.
- JavaScript Architecture Use (RequireJS) or (Browserify) not (HeadJS) for JS loading architecture.
- Responsive Images — Use (PictureFill) and plan for the technology to change.
- Retina Icons — Use (SVG Sprites + PNG Fallback) or (Retina PNG Sprites) not (Icon Fonts) for icons.
- Comments — Write comments in code, and sign comments as Magento.
Issues — Specific Code-Level Problems in Magento 2
See: https://docs.google.com/spreadsheet/ccc?key=0AgkHIW0ExJHqdGFydXNoQnNFR010MUx3V3V1S1dIbmc
Patterns — Extensible UI Components and Markup States
Code Style — Writing Consistent, Readable Frontend Code
This resource was entirely community-driven, and was created during (and after) the January 2014 Magento Hackathon: http://www.mage-hackathon.de/passed/online-hackathon-worldwide-31st-jan-1st-feb.html
- David Alger @ http://www.classyllama.com
- Kris Brown @ http://www.briteskies.com
- Brendan Falkowski @ http://gravitydept.com (Project Lead)
- Erik Hansen @ http://www.classyllama.com
- Tom Robertshaw @ https://www.meanbee.com
- Kimberely Thomas @ http://www.redlightblinking.com