2

I have to installe magento 2.0.7 and I was asked what framework it will use. I have read magento 2 should use zend framework though I don't really see that it is something like bootstrap for easy creation of responsive websites.

So did I miss something or is the best way to include bootstrap to create a proper responsive shop that can be used for own designed landingpages and such things too?

3

I assume you're talking about Twitter Bootstrap right?

So no Magento does not include it but it includes a lot of frameworks.

You can find the technology stack in the official doc here: http://devdocs.magento.com/guides/v2.0/architecture/tech-stack.html

However the Luma theme shipped with Magento 2 is responsive so it's your choice to start a new theme with Bootstrap or base it on the Luma theme

| improve this answer | |
  • I will receive a layout, a picture showing how the shop should look alike. Then I would have to create that layout as the frontend of the shop. And of course that layout will be responsive so showing a nice page on all displays, so smartphone, tablet, desktop and so on. So luma and blank are only themes that contain some js and css that makes this special theme responsive? Or are these css- and js-files part of magento 2 from the start? – user789660 May 26 '16 at 20:38
  • @Magento2noob The luma theme is extended off of the blank theme, and they are very similar, and share much of the same CSS and JS – andyjv May 27 '16 at 11:33
  • 3
    A quick tip, do not base any websites that will be going live on Luma. It is Magento's demo theme and they may change it in the future. As for Blank it is nothing like Bootstrap (it looks more like a backend dev has attempted some frontend work), it's much easier to start from scratch and import Bootstrap manually. In my opinion Magento should not try to create frameworks, front-end is far from their strong point. – Ben Crook Sep 12 '16 at 16:54
2

Magento 2 has two responsive themes right out of the box (blank and Luma), with blank being Magento's own version of bootstrap.

So, you can create a theme that extends from blank, or if you prefer bootstrap you could create a new theme based on nothing at all but that takes some extra work (you would need to change RequireJS).

| improve this answer | |
  • Why would I have to change RequireJS? Can't I replace it simply with what bootstrap delivers? – user789660 May 26 '16 at 22:16
  • The default themes in Magento 2 (blank and luma) use LESS and JS to create responsive layouts. The JS is included via requireJS, which is actually not directly part of the theme. If you created a new Magento 2 theme without extending blank or luma, you would still have to deal with requireJS including JS that moved HTML elements. However, if you're creating a theme from scratch, responsive.js and menu.js probably are not going to do what you want them to. – andyjv May 27 '16 at 11:34
  • Ah ok, so I have to use less and js... well, that are probabls names I can tell the designer. With JS you mean Javascript I guess? – user789660 May 27 '16 at 11:58
  • You can use SASS or pure CSS. LESS pre-processing comes out of the box though. JS does mean Javascript. – andyjv May 27 '16 at 12:16
  • Hm, I now found that less is a preprocessor, so that means that magento built their responsive design without a framework that can provide such functionality out of the box. :/ – user789660 May 27 '16 at 12:17
0

Magento choose not to use a frontend framework such as bootstrap for a good reason, frontend technologies like bootstrap come and go and what is relevant now may not be relevant in say 5 years time. Developers don't want to be stuck using old technology because it is a fundamental part of the system and a requirement. Instead they implemented their own UI component library which, put basically, consists of some styling for a bunch of UI patterns commonly used on ecommerce websites, it is based on Less. These components are used extensively in the default luma theme.

Magento being Magento of course it was built to be flexible. There is nothing stopping you from discarding this component library completely in your own theme and making use of your preferred framework such as bootstrap. To do this you would need to inject the bootstrap javascript into the page using requireJs, you would also need to either add bootstrap CSS to the page or make use of bootstrap Less/Sass components in your own theme files. A similar question has been asked here, the answer provides some insight into whats involved.

It is probably worth noting too that Magento has recently announced that due to feedback from the frontend developer community Magento 2 will be moving from Less to Sass. This means that in future versions of Magento the UI Component Library will likely be based on Sass rather than Less.

| improve this answer | |
0

You can embrace the way Magento did on frontend side, It's not that hard to understand.

If your building a project with a short deadline then I think you can consider extending one of their theme(luma and blank) BUT just be aware of their future changes.

But if you still want to use Bootstrap then I think you should start creating theme from scratch which I think will takes time but it's also a good thing because of the learning curves/process that you might experience which I thick would be pricesless, It's your choice actually you can use or do whatever you want, just follow Magento coding standard when building themes from scratch and if you do I don't see any problem with that.

Thanks

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.