Qphoria wrote:
I'm no theme expert. But I know that the <div class="breadcrumb"> exists and why can't you use CSS to move that? Forget the fact that you and I both know that the breadcrumb appears at the top of the html, when the page is rendered, it is all considered one-piece. You can move it around all you like using CSS and positioning or margins. Changing 10 tpl files or a few lines in CSS seems like a no-brainer.
To do this you'll have to set the element position as absolute and this can be a bit troublesome in responsive layouts. CSS ordering is not always the best choice. Also, it's just an example that's easy to anyone to see one of the problems.
Qphoria wrote:
Then why do it? First off BEM and OOCSS are like completely different frameworks. You could say "what if I code in ASP instead of PHP".. What if I used Smarty? There is no need to use OOCSS ... it doesn't give you any better options than standard css. It is a personal preference in trendy coding but It only works if you are designing a personal site or building your own blog or ecommerce system and starting with that as your foundation. You said it yourself, when people try to make their own frameworks in Joomla it turns out badly... That is because it is unnecessary and goes against the grain for the sake of being different. It gives no benefit in the end result. In the end, everything comes out as standardized HTML and CSS. That's like adding Prototype or Mootools instead of just sticking with jQuery.. there's just no need to mix or switch to different frameworks just because it is trendy at the moment. In the end plain ol' html and css are still the foundation of any web page and don't get "old".
Sorry, forgot to tell BEM naming scheme and not just BEM. OOCSS is a not a framework it's an efficient way to code CSS. It gives a lot of benefits and is not just a trend. There are a lot of efforts in the front-end area to make things better and OOCSS is one good, consolidated and really useful "method". I don't see why to not use it.
Qphoria wrote:
Because like any platform you need to follow the standards that are already set up. I'm not saying the default theme is perfect, but it has a good level of id and class tags. It follows the rules of a single id name per page. It may not be semantic but that is not a show stopper and being semantic is almost always impossible for more complex setups and is typically considered as more of an ideal than a usable practice.
The default is outdated and doesn't use any HTML5 feature. It's important for SEO, accessibility and even performance. It doesn't have a convention and lacks documentation. You have to dig deeper to understand what is what and follow the dated rules (and aren't even the best to an outdated convention) set by it. Semantic is not just an ideal it's an important topic in front-end development. It should be used, and big guys in the area say it a lot.
Qphoria wrote:
Well If there is one thing to be said about Daniel's code, it's that it is mostly ALWAYS indented. php files have a single tab, tpl files have 2 spaces, but they are almost all indented at the html level (ignore the php in the tpl files as that is purposely non-indented because it follows the html as the master). The only places I've seen it a little off is on some of the
being on the same line. But even still, the indents are there.
I tend to disagree. Maybe the php's files are (by the way, they have comments and are even pretty to look at), but the tpl's are not good indented. They have just the basic, but they are not well indented. By the way the use of tables limits a lot what can be made just with CSS...
Qphoria wrote:
I'll agree that some recent changes (like moving the breadcrumb from the common header into each individual page... ridiculous) weren't the best ideas. But again, most of them are classed correctly and can be adjusted with CSS. But the bigger focus on this topic was the themes that change the actual standard tag name to something similar or use poor coding practices. Things like the product page, id="price" as you can guess would be a pretty important factor in a lot of mods. Changing it to "s_price" or "priceStandard" or "normalPrice" is just unnecessary.
The php code for price is
Changing it to
Code: Select all
<?php echo '<b>' . $price . '</b>'; ?>
is just ridiculous. But it is this type of ridiculous code that I have to deal with all the time when people have issues with my options mods and price update mods. I spend at least 2 hours a day logging into people's ftps to find out that the price tag was changed or the class or they changed it from id="price" to class="price" or id="image" was removed or changed to id="mainImg" or some other unnecessary change.
I totally agree with you. A good front-end developer will even avoid using id's for style and will use them just for js. But if this happens a lot, shouldn't we being discussing (as we are

) what can be changed or improved in the system itself, so it wouldn't happen anymore? I don't think this is a problem where just the theme developers are guilty, I think that this is a big situation where people are just point fingers at each other without seek any (real) solution. Maybe improve the theme system in a way the theme developers don't feel the need to to such strange thing? Or that would make this almost impossible to do... I don't know.
Qphoria wrote:
Well now see, bootstrap is a popular theme framework. It requires ALL elements be classed and I would assume would force good theming practice. Why wouldn't this be better? Aside from the overall theme structuring issues (like the breadcrumb issue I mentioned) the end result of css and html should be a lot cleaner and lot easier to use more CSS changes.
Forcing the use of a (css) framework is not really a good thing. As you said yourself, there're a lot of trends in this area, and Bootstrap is indeed a trend. To be honest it's far from the best. When you use Bootstrap you have to use its not really efficient convention. There're a lot of discussion about this, but to be straight forward, it not a good framework to work with if you're serious about designing and front-end coding... Something like inuit.css would be a great framework to embed in a opensource system.
Qphoria wrote:
OpenCart's theme framework of having separate controller code is a lot like phpbb, wordpress, etc.There is a header.tpl file that handle's the code from the header controller. There is a column left, right, footer all matching their associated controller files. This isn't something new. It is standard MVC style theming. As rph said, Joomla appears to be adding html directly into controller files and then loading that data with a function call. But that defeats the purpose of MVC.
The biggest issue I see with OpenCart theming is like I said above where the individual module code should only have the "module" code in it and not the box structure. That should be controlled by the theme and the module data should be theme agnostic. That would allow one theme to have a wrapper like this:
Code: Select all
<div class="box">
<div class="boxTop"><?php echo $heading_title; ?></div>
<div class="boxMid">
--module_code_call_goes_here--
</div>
<div class="boxBot"><?php echo $heading_title; ?></div>
</div>
and another theme could have
Code: Select all
<div class="boxLeft">
<p><?php echo $heading_title; ?></p>
<div>
--module_code_call_goes_here--
</div>
</div>
and the actual mod contents will display correctly on both themes because it only has its own code to worrry about. The way it is currently in opencart means each theme requires its own tpl file with the box wrapper code specified and it's a pain for module devs. So we have to adapt module tpl files to each crazy ass custom theme which means more work for us.
But theme devs need to follow the standards of the platform, even if you don't like it. Module makers also have to follow the standards. You think we wouldn't prefer a single file for a module instead of a minimum of 6? When you are making car parts for a Chevy then you can't expect the Honda parts to fit.
I can't say much if a system is breaking MVC or not, like I said before, because I just don't have enough knowledge for this.
Theme agnostic, this this the keyword in this whole problem. I totally agree with you. What more could be made to achieve that?
I know that we have to follow the system conventions, but why can't the system be improved to make life easy to both sides? I might be wrong, but to me it seems that there are just developers in the oc team and that the whole platform is made just for developers and end users. It shouldn't be this way. The designers should be considered too and not just treated as bad guys that mess with everyone work.