Jump to content

REMOVE SMARTY


Recommended Posts

Hi OC2PS,

 

1) I never said that Wordpress is not complex (once again you're changing the meaning of my comment and once it annoys me !). I just said that Wordpress and PS are differents so they have differents priorities : WP works hard on theme manager, PS works hard on e-commerce functionnalities.

2) I never said the feature is not interesting, I just said that it is not our priority right now. It will surely be cool to add this (if I have nothing else to work on, I will probably already been working on it because I would love to see this functionnality in PS :P).

3) I know that there are several plugins e-commerce, and they are probably pretty good but for what I saw (I may be wrong), I don't think plugins are made to handle very huge large shop and do not have as much e-commece functionnailities than we have.

4) 19 votes ? Umm... I hope you're aware that there are more than 19 members in PS community ? ^^

Everybody asking for new functionnalities are (unfortunately) not posting on the forge. We met a lot of people on events that are asking us new functionnalities. But I am sure this feature will be asked a lot for 1.6 so do not worry :P

Link to comment
Share on other sites

1) I never said that Wordpress is not complex (once again you're changing the meaning of my comment and once it annoys me !).

we have many features to handle with (price, stock, sales, ...). Features that wordpress do not have to handle with.

 

Maybe you didn't intend to say that WordPress is not complex. But when you follow up "they are different" with "we have a lot of features", that implies that "we are complex, they are simple". But if that's not what you meant then I apologize for reading more into the comment than there actually was.

 

1) Wordpress and PS are differents so they have differents priorities : WP works hard on theme manager, PS works hard on e-commerce functionnalities.

That is fair enough. But focusing on e-Commerce capabilities should not be an excuse for ignoring the front-end. The front-end and aesthetics contribute a great deal to how end-customers may behave and whether PS stores are successful.

 

Many people use opensource because they can't afford to pay for commercial software or hire developers to work for them. And anything PS can do to make it easy for them to be successful will be a force multiplier for PS.

 

it is not our priority right now. It will surely be cool to add this (if I have nothing else to work on, I will probably already been working on it because I would love to see this functionnality in PS :P).

It's good to know that you would love to see this functionality in PS. Not so good to know that it is not a priority right now. (it's fine if it's not your top priority...surely security, stability and speed come before this...but it is disheartening that it doesn't even figure in your priority list)

 

*If I have nothing else to work on...* sounds a bit denigrating to these concerns. But learning from previous experience, I hope that's not how you mean it.

 

3) I know that there are several plugins e-commerce, and they are probably pretty good but for what I saw (I may be wrong), I don't think plugins are made to handle very huge large shop and do not have as much e-commece functionnailities than we have.

Actually I was quite surprised to see how sophisticated some of the eCommerce plugins are. They used to have some scalability issues, but beginning from WordPress 3, most of them use WordPress custom post types and custom taxonomies for products, categories etc, and therefore can handle massive shops and massive traffics. Because they can focus on eCommerce functionality and leave several big aspects like theming, update management, user management, content management, etc to WordPress, you'll be surprised at how good some of them are and how fast they are developing. Nearly all of them have multiple payment gateways, multiple shipping options, great deal of i18n including collaborative translation via GlotPress, coupning, reporting, guest checkout, cross-sell/upsell, integration with Google Base, and multi-store, and a few have multi-vendor.

 

This is not to say that they are already better than PrestaShop. PS is still much ahead in many eCommerce features. But some of the WP plugins are nibbling on your heels and are already better than things like Spree Commerce and Opencart.

 

I hope you're aware that there are more than 19 members in PS community ?

Yes, I know that. Guest checkout process redesign has 26 votes!

 

But seriously, while in absolute terms, 19 votes seems like nothing, when you compare to the other features on Forge and see how they compare, then this seems quite popular.

 

Everybody asking for new functionnalities are (unfortunately) not posting on the forge. We met a lot of people on events that are asking us new functionnalities.

And you should pay attention to what they say. But how do you determine how to set priorities?

 

Mark and Carl have by now run several polls here and on Facebook to determine what the community wants. What happened to these? We never got to know what the results were or what became of these polls...whether they were utilized for anything or just thrown away.

 

 

But I am sure this feature will be asked a lot for 1.6 so do not worry

Hallelujah! :)

  • Like 1
Link to comment
Share on other sites

It seems that the initial "Remove Smarty" subject has derived on a debate about PS frontend capabilities :)

 

This reminds me the debate about using or not a framework for PS...

Most of the people against using a framework have the same argument: PS is for e-commerce, it does not need to have all the features of a framework.

 

Actually, this is not true: PS is an e-commerce sofware, but the frontend needs to be customized 99% of the time.

The problem is that the UI layer seems to have been patched over and over to add features, without a real design behind. The 1.5 version fixes some of these lacks, but there is still a long way to travel.

 

The PS team has made a great effort to redesign this layer, but most of the MVC features were already available since ages in frameworks like Zend or Symfony. All the time to write these classes could have been gained...

I think in the future PS should rely on third party software, rather than adding new features that already exist.

 

I think the following could greatly help :

 

CSS

 

Uniformize the CSS styles to have very few of them, and don't let the developer hardcode the CSS ids & classes, but rather put them in, say, Smarty variables.

Why not rely on something like http://lesscss.org/ to manage this with CSS variables ?

 

JS

 

Make JavaScript pseudo classes under a clean namespace. Right now the JavaScript is a real mess ! Build a JS library for PS on top of jQuery, grouping all the features.

  • Like 1
Link to comment
Share on other sites

Congratulations OC2PS,

 

You definitively convince me to not argue with you anymore :)

Most of your ideas are very good and you even made discover some stuff about wordpress I was not aware of (I thank you for that). But I can't continue to discuss with someone who will try all the time to change the meanings of my sentence.

 

I let you discuss with Raphaël I'm pretty sure you will be able to discuss together :)

You have a lot in common (except for Wordpress, Raphael do not like project coded in PHP 4 :P)

Link to comment
Share on other sites

You definitively convince me to not argue with you anymore :)

 

I can't continue to discuss with someone who will try all the time to change the meanings of my sentence.

I'm sorry you feel that way. But I did not and do not try to change the meaning of your statements. What have I got to gain by antagonizing someone on the PS team? I am not a troll - I am a PS user and "apprentice" who knows he can only get what he wants implemented into PS by befriending the people in PS team, by convincing them...I have absolutely nothing to gain by arguing.

 

But as in the above case, anyone who can add 2+2 will interpret your statement in a way that you say is different from what you meant. In this situation, the best course I can suggest is for you to say clearly what you mean. And truly, I don't mean that in a condescending way.

 

 

 

We will certainly use grid css (lesscss is not the one we will choose). I used the word "certainly" because I'm not the one in charge of this part for 1.6 and I don't want to speak for him

See? Good thing you clarified. Because by using "certainly" (as opposed to, say, "probably"), you were actually speaking for him.

 

You have a lot in common (except for Wordpress, Raphael do not like project coded in PHP 4 :P)

Actually WordPress has required PHP5 from version 3.2 onwards (current version is 3.3.1) :)

 

I don't think WordPress is the holy grail, but they are certainly doing many things right that other projects can learn from. Among them is user-friendliness in installation, usage and customization.

Link to comment
Share on other sites

I'm sorry you feel that way. But I did not and do not try to change the meaning of your statements. What have I got to gain by antagonizing someone on the PS team? I am not a troll

 

I heard some people complaining about you because of your trolls.

But maybe I misunderstood them too :)

 

But as in the above case, anyone who can add 2+2 will interpret your statement in a way that you say is different from what you meant. In this situation, the best course I can suggest is for you to say clearly what you mean. And truly, I don't mean that in a condescending way.

 

I make my post reread by others members of the PS team, no one understand my answer your way.

I have more than 1300 messages on the forum, you're the first one with who I had problem of comprehension.

Maybe we just can't discuss together, that's why I prefer to stop there and let Raphael discuss with you (I'm not angry, I just want discussions to be constructive :P)

Link to comment
Share on other sites

I heard some people complaining about you because of your trolls.

But maybe I misunderstood them too :)

Thanks for letting me know. Because I was not aware of that.

 

I have 412 posts on these forums, and I don't consider any of them to be inflammatory - I have a reputation rating of "Good" (same as you). I have only posted specifics about feature requests, solutions to queries from users, and generic FAQ-type posts.

 

So I am surprised that some of these are considered trolling posts. I'd request you ask people who feel that way to PM me with specific instances so that I can understand their perspectives and be more sensitive.

 

 

 

I make my post reread by others members of the PS team, no one understand my answer your way.

I have more than 1300 messages on the forum, you're the first one with who I had problem of comprehension.

Perhaps there is a problem with my comprehension. Because I re-read it, and I still read it that way: PS and WP are different. PS handles many features that WP doesn't. Ergo, PS is more complex.

 

 

 

I just want discussions to be constructive

 

 

As do I.

Link to comment
Share on other sites

  • 2 weeks later...

There are other eCommerce projects that are happily using Smarty.

 

Pinnacle Cart for one.

 

I can understand the point that adding an extra layer of abstraction doesnt help a lot of people.

Then again, I do agree that there are probably bigger fish to fry right now.

And version compatibility is REALLY important.

Link to comment
Share on other sites

As a newby to online E-Commerce, I looked at all of the open source options available and liked prestashop the best.

It is the easiest to get started and to install.

In saying that, my programming skills are far from good.

I do know how to understand and modify html/css and html5/css3.

If this was implemented as an option, then even I could understand and make my own layout.

I can even go to w3schools to get the code I need for this most of the time.

Yet they don't have a tutorial on smarty.

As they have modules on their site for the most common languages, you would think they would have included this if it were the best option.

 

As a newby this would have made the choice of os software a whole lot easier...

Keep up the good work guys.

Link to comment
Share on other sites

  • 2 weeks later...

It's much better and wise if new PS will not only hear from prestashop user but also consider how the world cms are moving. Use common technology of mainstream will save the future of prestashop since mainstream means a lot of support and sources. I love prestashop very much and I hate smarty.

Link to comment
Share on other sites

I hope you release 1.5 soon. If I am right, multistore is the big feature of 1.5

 

For the next version (1.5.1?), absolutely the big feature should be: clean up MVC, remove all logic from View, and removing all display from Model and Controller.

 

The next version (1.5.2) should introduce PHP templating.

 

The next version (1.5.3) should kill Smarty in Prestashop. RIP.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Back to the topic, I really hate working with Smarty and the frontend view system is a complete mess...

Like a lot of PS users, I spent a lot of time trying other ecomm solutions and choose PS for its features, admin interface and extensibility advantages.

 

But after trying to design my own theme: what a mess!!!

For my latest projects (still under work), I used Kohana3 and Fuelphp. Switching from Mustache/Handlebars, auto-mignifying of css/js assets and a fully HMVC framework to PS (1.5.0.13) and the jungle of tpl file full of logic is a real pain.

 

I understand that everybody has its own taste regarding templating systems. Same for the need to maintain compatibility with previous themes and modules.

But keeping both smarty and the current frontend display logic in place will hurt the future of PS.

Thank you to keep that in mind if the roadmap for release 1.6 is still open.

Link to comment
Share on other sites

Yep,

 

Smarty is not to be blamed (even if it's outdated and almost obsolete), but the real problem is the usage of Smarty.

As we have already said on this topic, and like you said, there is WAY too much logic in the templates, lots of ugly JavaScript coupled with the HTML, and so on...

 

And this is NOT fixed in the 1.5 version, templates are still a mess

Link to comment
Share on other sites

I think you are confusing stable and obsolete. Smarty is a fully developed product that has all of the needed features and stability. I think it would be irresponsible to change over to another engine that who knows if it will have the longevity of smarty. It still gets regular updates and works great. IMHO it is a preference type thing, that should cause you to pick with software you use. Use a shop that works off of the other engines if you like them better.

Link to comment
Share on other sites

It is an interesting discussion here. I've read most of it, so I have some thoughts too.

 

First of all, I still cannot see any strict and clear arguments why Smarty is so bad except "that it should not be used" or I have just missed them trough those discussions. :) In addition, I do not think that changing templating engine will solve anything. There's no really any point to change template engine because you will still need to use one of them and Smarty is already there. Why to bother with new one and I am not even talking about older versions compatibility.

 

Secondly, I agree that there's too much logic in Smarty files. I believe that if there were not so many logic there, there will not be this discussion and more problems. It is easy to blame Smarty for something, but if you are skilled and professional developer you will not add logic to the Views and it seems to me now that people here discussing are not very satisfied with this. I think removing Smarty will let them write bad and not high quality code just by adding even more logic in Views. I think there are too much logic especially in product page already there.

 

Thirdly, Smarty is not really that big problem. Translations are. I need to translate hundreds of the same words in different fields which could be grouped or something. But it is a whole different discussion.

 

Regards,

Richard

Link to comment
Share on other sites

I think it totally depends on what you are doing. If you are writing your own themes, there is as much logic as you want to be in there. If you are buying themes or using the default theme, sure there is a lot of junk in there.

 

Think about wordpress. No real developer uses the default 2011 theme. But look at how it is put together, it has a lot of loops and different things. More than most people will encode in a custom theme. Write your theme to serve the purpose of the site and you won't have a bunch of unnecessary things in it. Use someone else's theme and you are at their mercy.

Link to comment
Share on other sites

There are standards which everyone should meet and MVC pattern which should be implemented well. If you are selling themes etc., those standards should be implemented and done well. If you are using for your own, it is really your own problem how you do this, but if you are an experienced professional or working for a high quality programming company there's no other way. I think in .NET community this kind of questions are not even discussed as they have even more rules and holds on more standards than us here in PHP.

 

What I meant to say that the code must be written right and there's no difference if you are selling as product, developing for client or doing for yourself. Smarty helps to maintain that in a way where you cannot add too much logic in View part (why do you think they removed

 tag in Smarty3?).

 

WordPress is not really a good example, it is still mostly functional, they also do no really implement MVC structure there except that everything should be held in functions.php. And PrestaShop has a bad pattern of having static methods everywhere. It is easier, but it breaks some OOP logic.

Edited by Richard S (see edit history)
Link to comment
Share on other sites

Actually I would have to disagree. If i develop a theme to sell I want to add everything and for everything to work. It really circumvents people emailing you ad asking why the color picker or translations do not work.

 

For a custom theme that is selling MP3's in only America, I don't need the color picker, or translations. So they don't get added. Saves time, reduces codes, loads some what quicker.

 

Wordpress's default theme was only used against prestashops default theme. I think they are both designed in a way to give you an idea of all the things that you can do.

Link to comment
Share on other sites

I agree with the functionality (color picker, buttons, etc.) add or take out.

 

I am talking about pure PHP and what would happen if you started adding some calculations, getting info from database etc. in template files and not the controllers. Smarty does not allow this and this is way it is good.

 

In addition, core functionality should be left in this kind of things, but it is I think separate topic of best practices and what should or should not be done :)

Link to comment
Share on other sites

Sorry for the spam, but again, for those interested, take a look at {pan} (in my signature)

It's a free and open source module that adds useful Smarty plugins specific to PrestaShop's usage.

 

I gave up removing Smarty, so I decided to give more power to it ;)

 

https://github.com/alexsegura/pan

 

 

That's what I wanted to see. I was about to write a module to use mustache templating instead of smarty, but as I'm running out of time and you already packaged your solution, I will give it a try.

 

Thanks for your work.

Link to comment
Share on other sites

×
×
  • Create New...