Should osCommerce use a Templating System

Interesting conversation ongoing at the osCommerce forum. Some people for, some against.

On the one hand the beauty of a monster mess of code that is osCommerce means that it is possible to do anything you want with it if your skill level is suitable.

On the other hand separation of logic from presentation is important I suppose.

So, should osCommerce use a templating system? Well, first of all, we need to define templating. When you think of a template, what do you think – I bet you are thinking a new look for your site. The sort of thing sold by “Template Monster”, or the sort of thing that STS (Simple Template System) was designed to be used for. Forget it, this is just simple themage that anyone can do given enough time.

More to the point, when we talk about templating, it is meant that we take osCommerce and recode it to use a framework setup. We then poke and prod that framework to produce results rather than poke and prod osCommerce directly – hopefully this makes sense?

Now, what framework to use? There are many out there;

Smarty, Dwoo, PHPTal and many more. In the osCommerce forum thread, the author is talking about integrating SUIT.

All of these solution are similar. All of them could be used in osCommerce. Is it -really- needed? No, in my opinion. Would I like to see one (or more) of them implemented? Yes! I’d love to change my opinion.

We will see if any of these, or others ever make it into an osCommerce repository.

86 Replies to “Should osCommerce use a Templating System”

  1. PHP is templating language. All that I see is a request for another layer of complexity. osC 3 is already going in the right direction with MVC and osC 2 can’t be helped, only hindered, since adding a templating system just makes adding contributions a nightmare.

  2. PHP is a horrible templating language, as described in the topic. Whether or not implemented on OSC2 or OSC3 is rather irrelevant.

    Your argument is also rather flawed; “adding another layer of complexity”? OSC3’s DB-API is an unnecessary wrapper around MySQL functions (considering it doesn’t even support SQLite, PGSQL or any other RDBMS) when I could have just used raw MySQLi, but I don’t see anyone attempting to dispute the “adding a layer of complexity” to things. The entire issue with simple problems is that they become very complex very fast, and templating is no exception to this.

  3. @Faltzer

    So since you consider PHP a terrible templating language it then makes sense to add another templating system based on the aforementioned templating language on top of it. Great! Now we have 2 problem when we only had one before.

    To me that’s like a used car lot sanding down and painting up a rust-bucket. In the end it will look great, but pity the pure sucker that buys it when the untreated rust starts popping through the shiny new coat of paint.

    The solution is in fixing the underlying code, not hiding it.

    You then go further and say my argument is flawed by going off topic. I don’t see how osC 3 adding an unnecessary DB wrapper justifies adding a templating system.

    By the way, I didn’t know that had happened in osC 3 (I’m still having to work with osC 2 code) and I personally find the addition distressing. 🙁

  4. I hate it when someone tries to use car analogy and fails at it. SUIT is the solution to the problem of templating, not a part of it. The rust-bucket you’re describing is PHP, and the con artists you speak of are the ones who added the easily-pealed glossy paint on the idea that PHP is a great templating engine. It sounds like a great idea at first, but when the rust (security issues, unmaintainable spaghetti-code, etc.) begins to pop out, you see that it really does not address the problem of a templating system.

    My example was not off-topic. I cited the DB-API as an example of “further unnecessary complexity”, which you claim that in the case of templating is unnecessary, as you contend that, “PHP does this already,” but that is barely enough of a reason in itself.

  5. SUIT is a possible solution – but …

    Why not use one of the more well-known frameworks? What does SUIT bring that make it “the winner”? Looking at the forum, it’s dead. I can see no large projects using SUIT.

    Basically I have similar concerns to Sparky. Why bother with SUIT when others out there have a history of usage, a team of people etc. But then again, it might be well to use something new. Faltzer; get it up on github and start the recode – you already wasted time by opening the thread, arguing with people and all the rest. Just do it – if it turns out to be the success you hope for, that would be great.

  6. Perhaps someone could post a brief primer on what a template system like SUIT actually does. Intuitively, without knowing anything about SUIT or other templating language, it just seems like a template system is going to add ‘overhead’, complexity, in exchange for the benefit of being able to plug in templates, to be able to easily change the look of a site, like you can in WordPress.

    It just seems like the interweaving of html and php you have in OScommerce, is so efficient, and that the only way to separate the ‘presentation from the logic’ is to add lots of calls to a whole new set of files.

  7. Jason – a templating system such as SUIT is not really for creating a pretty site (I’m not really sure that ecommerce sites should ever change their look once a look has been decided upon). As you rightly point out, it’s more for “hooking” other areas of ecommerce in. If we add the ability to simply upload (for example) a discount module – enter admin, turn it on. Done. No more poking with in 20 files to install it – that’s the beauty of a template system.

    Having said that, I actually enjoy having to change multiple files – because I am a coder and that’s what I get paid to do. Why would I want a template system, when such a thing could damage my business?

  8. So if I think ‘plugin’ I’m closer to the point of a template system like SUIT than if I think ‘template’. ? When I think template, what comes to mind is the system I had on my CRE Loaded site. It came with 4 templates, you could install with a click. Which worked for a short time and then got progressively misaligned and screwy as contributions and modifications were installed.

    BTW, ‘enjoy’ is not exactly the word that comes to mind when I’m in the middle of installing a contribution on my site, scrolling through yet another page of code and endless tables to find that place to paste some snippet of code.

  9. Jason – pretty much – yes. If you think “framework” rather than template, you would be closer. In other words;

    oscommerce is the engine of the car.

    SUIT (or other) is the steel outer body of the car.

    Onto that body you can put new wheels, a new paintjob etc etc. Is that making a bit more sense?

  10. “Having said that, I actually enjoy having to change multiple files – because I am a coder and that’s what I get paid to do. Why would I want a template system, when such a thing could damage my business?”

    I hope you realize that although SUIT might be a conflict of interest to your business, it also means that it’s the right thing for OSC? I mean, really, isn’t the goal of a system to be as easy to manage as possible? Your services exist because OSC is difficult to manage. This is not a reason why OSC should implement it; if anything, it is a reason to implement it.

    That being said, it’s also another opportunity for you. The same people who wouldn’t want to edit the core would also not want to work with SUIT. It also makes your solutions easier to distribute, saving you time and giving you a reputation for doing the fastest modifications to OSC around. I wouldn’t worry about it.

  11. We both know that SUIT will never be used with osCommerce unless someone actually integrates it.

    Even then, the take up will be non-existent as it will never be an official release.

    Pointless to do so, is my opinion, due to osc v2 being abandoned shortly and osc v3 having it’s own framework.

    My “I’M A CODER” comment was to be taken tongue in cheek 😉

  12. Gary, the car analogy doesn’t really help me, in that it fits more my quaint notion that a template is something you use to create the look of a site (the body and wheels), rather than install functions (contributions), like better engine components.

    I’m pretty familiar with the structure of OSC, and somewhat so with php, and since we have the SUIT folks on line, what I’m really kind of asking for is perhaps a simple, specific example of how would the structure of OSC look different to me if it had a template structure, and I went to install say a discount coupon contribution that does sprawl across a number of files.

    Intuitively, it just seems like that template system would not really change the fact that programming gets spread about, or even how it functions, but rather instead of you, the coder, manually pasting stuff about, the various components of the program just compile themselves from more files, and levels of files to find that ‘stuff’.

    In other words, to risk offending Brandon, templating just seems like it requires more ‘overhead’. And that all you gain is a far better way of installing functions, without really improving the functions, and at the expense adding complexity to the entire shop.

  13. ps –
    “Pointless to do so, is my opinion, due to osc v2 being abandoned shortly and osc v3 having it’s own framework.”

    Do you have some inside info? I mean, define ‘shortly’, I’m pretty much married to v2.

  14. “We both know that SUIT will never be used with osCommerce unless someone actually integrates it.”

    Well, when Arnold / Chris / Whatever he wants to call himself finishes his fork, hopefully we’ll have something to look at. I’m pretty sure he’s working on OSCv3.

    As far as OSCv3 goes, I figure they are compatible systems as Harald said he was planning on making it so that the template engines were pluggable. I sincerely doubt OSCv3 actually built a template parser, and if they did, I can’t imagine it’s very good because they must have so many other components to worry about that they wouldn’t be able to devote a lot of time to this one. I’m assuming when he says there’s a template class, he’s referring to one that loads a template from a file and does various functions. Again, the implementation is up to him, not me.

    To Jason, if you read several of my posts in the topic, you’d see that I made a clear argument about how SUIT might even be able to reduce overhead in comparison to using regular PHP templates. I’m not sure if there’s a good analogy for SUIT, but all you need to know is that the end result of most things generated in PHP is HTML. HTML contains various data in various places. This data is generated by PHP. The problem with this, though, is that PHP and HTML tend to clash, and often, people add extremely unnecessary things to the template section of the file, or don’t separate them at all, leading to a very difficult system to modify. SUIT attempts to separate these elements as clearly as possible using a very simple syntax that essentially forwards information to PHP, allows PHP to transform it, and puts it back.

    You can see live and editable examples on suitframework.com (I’d like to see PHP try and do that without risking their server’s security). If you play around with that, you’ll see that this is not just theory; this is practice.

  15. BrandonE,
    I will be honest with you, I had to turn off my b$#%@t detector to get through your post. You will make more sense, at least to me, if you stop using random generalities, such as ‘HTML contains various data in various places’.

    Could you be specific?
    1) Please give me one example of a ‘place’ in HTML where you can store data.

  16. I love how everyone assumes I’m speaking bull and that I’m trying to sell you the Brooklyn Bridge. Do you think you could look at this from an open perspective? Jesus Christ…

    Example: http://slexy.org/view/s2MRcqwndm

    Again, there’s many live examples of SUIT in action substituting this information and handling logic flow on suitframework.com. Can you honestly say you have looked at any of them?

  17. @Jason – v3a5 is defunct. oscom3 is being worked on at github, which will be the only officially supported release of osCommerce once it is released. v2 will be abandoned to the community to take forward (not much different to how it is now to be fair).

    @BrandonE, ChrisS (Faltzer) – more transparency please. You know each other very well, I think?

  18. I assumed, considering that he was PMing you, that he told you the scenario. Initially, he foresaw that people would be upset about him opening the topic with a name in the copyright of SUIT. So, he used one of his many aliases (uramagget). Soon after, he showed me the topic and I was like “Chris, why was that necessary? I did the vast majority of the programming. All you did was criticize x, y, and z, and because your influence shaped a lot of the philosophy and standards, I figured you deserved credit. This is primarily my project and you have nothing to gain by promoting it other than having people use something you like and supporting a me.” So eventually, he used the same avatar he uses on the site, and changed his real name to Chris Santiago, and leave it up to the community to figure out his silly little scheme. Let it be known I had nothing to do with him starting the topic or using an alias, and that in no way is he profiting by doing so.

    Now that we got that nonsense out of the way, back to the issues.

  19. Nope, he didn’t mention it. It ruins credibility, you see that…

    Anyway – I’m not overly interested in having any framework added to osc. If it happens, for sure I’ll try it out.

    I guess until Chris gets the fork coded, we’ll never know if suit can scale to a full on ecommerce app – I think it could work, but as I say, it won’t work until it’s integrated….

  20. I don’t think the person discussing a program can make the program worse. Chris’s charade is not going to make SUIT less practical.

    Believe me, I’ve been bugging him about making the fork. I’m positive it can work with any dynamic web application…the question is will it work under huge loads. I think it will, simply because logically, SUIT does not add overhead, and if cached, might even reduce the overhead. Pages I’ve run it on seem to load just as fast as pages that don’t. I know this isn’t the most accurate benchmarking, but I’m not exactly sure what’s the best way to benchmark PHP, nor have I seen any load problem that would indicate that SUIT needs reworking.

  21. @brandon, the way you are pushing your template system is spammy. You mentioned it once, I believe is enough for other developers to take note and try it. Mentioning it continuously does not make it popular (actually Gary already setup a link for it with his initial comments)

    Few comments about the template system and osc. I had a very hard time to find methods and use a template system for the ms2.2 which I am using for a CMS. I am trying to avoid complexity and coding overhead for other developers and having another set of files that have the template part of the page in them, adds complexity to the whole framework. I have checked multiple frameworks and no matter how clean initially they look once you start adding various custom features the template complexity increases exponentially.

    If the user adds
    [title]My Title[/title]
    you need to have the parser to process title. That means you need in your arrays of processed variables to add the title and for each custom segment in the html, xml etc you need to have code that will do a replacement, processing or whatever. The straight forward PHP would be:

    which IMO there is no difference in complexity. The advantage is it gives flexibility to the developer faster coding etc. The disadvantage is, it is not readable nor easily editable for users who want to concentrate on the layout only. Using a template helps the user more but complicates things for the developer. Also keep in mind ideally to use a template system, the template must drive the code generation. And that’s something I haven’t seen yet. Don’t forget ajax here where most frameworks become ugly real fast, once you start accommodating it, because they weren’t designed with that in mind.

    The best I managed to come with was to isolate common presentation files and separate the layout section without duplicating files.

    As of the python vs PHP and where the one is better for templating than the other what I see is python is moving in the right direction, PHP isn’t. A lot of complexity in PHP v5 brought in lots of new duplicated functions, lots of OOP features copied from C++ which I found totally unnecessary, adding complexity and everything takes longer to be done. Python is moving in the opposite direction. Lots of cleanup with the new versions, reduction of duplicated or unused functions, I wish the PHP developers would take note.

  22. @enigma As far as my supposed spamming, note every post I have made in this thread was a response to claims about my software that I thought were inaccurate or needed clarification. In no way am I shouting “Use me!” over the other systems as no one has mentioned anything else in detail. I welcome criticism, so long as it’s valid. The funny thing is that Mark from the forum wanted me to talk about it over and over again until there was a shadow of a doubt that SUIT was better than the other systems. I’d love if you guys compared for yourself, but seeing that I’m the new kid on the block, I figure it’s necessary I defend my project.

    Again, as far as the OSC thread, yes I know the guy who made it, but he showed me the link after he made it. In no way do I think it was right to use an alias, as I think it was very counterproductive and dishonest, but who am I to stop him? It’s not like he works for me; all he did was criticize SUIT, which helped me shape the code, and I figured that was grounds for crediting. I know that many Open Source softwares like having a pseudo staff (Such as OSC and MyBB), but that’s simply not how we operate.

    Regarding your pasted code, the same happened to me before. Use a pastebin and paste the link. Based on your surrounding text, I’m going to assume that you pasted some kind of regex that replaces [title]My Title[/title] with some other variable (Not sure what based on the syntax though). Originally I thought the same thing with SUIT, as I wanted as little logic as possible to be used in the templates. In this, there are two problems:

    1. I’m going to assume your code does not allow nesting, simply because you said it was a straightforward solution. Parsers that generate actual parse trees take quite a bit of code. If your code actually does allow nesting, I look forward to seeing it.

    2. When you can’t use conditions or loops, you are required to create way more templates than if you could. If the goal of templates is to remove all of the HTML from the core PHP, then to loop, you’d have to load a template for each iteration and parse the unique variables into them. This can get bloated. The goal is to do these constructs with as little logic as possible. I think all of the systems mentioned here do this fairly well (Syntax wise), my biggest complaint being what Smarty actually translates the templates into.

    As far as Python vs. PHP, Python is going in the right direction as far as templating simply because you can’t template with Python by default. They knew that they can’t possibly write everything right, so they created a fantastic and flexible language and allowed people like me to create our own engines to use templates. In particular, Mako stands out. Python is to Mako as PHP is to PHP’s Template Engine. I think both, used properly, are great for separating the programming and the template for personal projects. After all, if you coded the software yourself, why would you have trouble editing the programming in your templates?

    But, with distributed software like OSC, it’s nice to have an engine that doesn’t directly execute the logic so that these templates can be stored in databases, edited from an admin panel, and in general keep the person trying to make minor edits to the template from doing anything catastrophic. The question remains which available software, for either language, does this job the best. You’re all aware which I’m backing, and I don’t think you’ll have to look far to figure out why I am.

  23. Guys, the paste problem is something to do with wordpress – I’ll try to get it corrected asap. It is annoying!

  24. @brandon, if you are looking for what I did with templating you can check the cms under by name/site. But there isn’t a template system that I am using. It’s PHP with the sections of scripts dedicated to the layout, separate than the framework logic. That’s all I did to specifically speed up custom site development I am always talking in terms of layout, as the core engine is based on MS2.2 but geared towards content management not online shopping as a demonstration of the capabilities of the so called “ancient” osCommerce engine.

    Back into templates having templates stored in a database will adds latency on most servers (unless you’re on a dedicated server perhaps), storing them in files is more efficient and the outcome is exactly the same.

    Anyways every template system or engine I run across, adds significant overhead to the site development. Every single one. Even simple code logic like a for/while loop with conditionals adds an immense complexity to the interaction mechanism between template and parser. Author needs to specify conditionals, loops and learn the template engine (even if he isn’t a programmer) then he needs to know the template engine/structure how to expand it (adding new variables, conditions etc)

    So having an additional layer for template processing will take you much longer to develop and customize sites. More resources required, has a higher cost harder to convince clients to go for it. Don’t forget site owners they’re after a site that does what they want. A site that brings results for their business, that helps them make the living.

    So where a template system would be useful? IMO it can greatly help development of a project inside a company where developers are disciplined enough to follow specifications and knowledgeable of s/w principles so the overall effort is not wasted. And of course they are paid to learn and excel in specific areas of the framework whatever that is. But that’s not the case with the stock osC where each one of the users comes from a totally different background.

    So if I check the template system you have has exactly the same principles as every other one. Harder to do web-development with. Not only the developer needs to know html, css, php, js, osc etc but now he needs to know another scripting language for the template. And that is going to be hard to for others to accept use and maintain.

    And here is a fact with the other template systems that are already in use for osC like sts, bts etc,. Customer wants a new feature or a feature update having to do with his site layout. Freelancer checks the code sees a template system adds to the cost for the work a 50% easily. That’s what is happening I’ve seen it before and I have to do it too every single time for my clients too. It’s not faster, is not efficient and in 99% of the cases I see, the template isn’t even utilized. Every single page in the site has the exact same layout.

  25. “And here is a fact with the other template systems that are already in use for osC like sts, bts etc,. Customer wants a new feature or a feature update having to do with his site layout. Freelancer checks the code sees a template system adds to the cost for the work a 50% easily. That’s what is happening I’ve seen it before and I have to do it too every single time for my clients too. It’s not faster, is not efficient and in 99% of the cases I see, the template isn’t even utilized. Every single page in the site has the exact same layout.”

    Agree 100% with this comment. And in fact with everything you have just said, points very well made.

    I avoid template systems as much as possible – in the hundreds (possibly thousands) of deployed sites I have never once delivered to a client an osCommerce site that has STS or BTS. I’d be ashamed to do so.

    As for a framework – still waiting on Chris to actually do action and not just words 😉

  26. I sent you a PM a few days ago asking you questions and I’ve gotten no response whatsoever. You said you wanted to help; prove it by responding to my PM.

  27. “Back into templates having templates stored in a database will adds latency on most servers (unless you’re on a dedicated server perhaps), storing them in files is more efficient and the outcome is exactly the same.”

    I wasn’t suggesting that OSC does this, all I’m saying is that you can store SUIT templates in any format while you can’t with PHP. I like options.

    “Author needs to specify conditionals, loops and learn the template engine (even if he isn’t a programmer) then he needs to know the template engine/structure how to expand it (adding new variables, conditions etc)”

    I’m having trouble understanding what the difference between these two points are. Again, I think you’re generalizing template systems. It seems like you even admitted you didn’t check out my system. If you did, I think you’d find that the things you need to do to setup the server-side take very little information to know. The only difference is that instead of defining variables like $variable, you have to define them as $templating-var->variable (Not that you couldn’t define them regularly and convert them at the end), and that instead of including the template file like you’d do in PHP, you have to call a function. The magic that’s performed behind the scenes of that function doesn’t concern the user in the slightest. Pretty straight-forward if I do say so myself.

    The only valid argument regarding learning additional things to use SUIT is the syntax. Yes, SUIT syntax is unique to SUIT, and although I think it’s VERY self-explanatory, others might think differently. The difference between SUIT and seemingly every other template engine is that SUIT’s syntax can be completely reworked. If you wanted, you could make the syntax look like PHP (Why would you want to?), and you’d still have all the other benefits we mentioned here and elsewhere.

    “And here is a fact with the other template systems that are already in use for osC like sts, bts etc,.”

    I’m perplexed why we’re bringing STS up when the blog post says that STS is nothing like any of the other proposed systems, as it merely handles themes.

    Again, Gary, I’m looking forward to seeing what he comes up with as far as OSC too. He once mentioned that considering OSCv3 might be using a pluggable engine that he plans to only convert part of it for an example. So, we’ll see what his application looks like. However, as I stated time and time again, not having a live version of OSC using SUIT doesn’t change that it has worked on live applications. It can be downloaded from the site, and we essentially gave you a sandbox to play around with the syntax on it as well. I’d encourage you to do so, but I’ve said this over and over again, so I’m wondering why I should even bother.

    By all means, call me on problems with SUIT if you come across them, but you have to try it first!

  28. @Chris/Faltzer – I need prove nothing to you. I answer emails and PMs in my own time, not to your schedule.

  29. @Brandon – it’s up to you guys to take SUIT and integrate into an application that has real world use (be that osCommerce or not). It would be a great example for your own site and may increase take-up of the framework. Get your name out there…

  30. “Again, I think you’re generalizing template systems. It seems like you even admitted you didn’t check out my system”
    Yes I generalize, yes I did see it, same principles,

    Framework has to set up parser, parser processes template, template must have the placeholders in place so the html is set by the parser.

    The things I see using it:
    Designer must not mess with the tags in the template file and needs to understand the template placeholders.
    Developer needs to know how to setup the parser and the stock template

    And by not using it:
    Designer must not break the PHP and needs to understand PHP.

    Tell me where the extra scripting layer is going to help or make things faster for either the designer or developer. For the designer he will either need to identify the opening/closing of PHP tags and strings and in the other case to identify the template tags. And the developer needs to go through yet another scripting language.

    You are only saying half the story. The parser processing is the one part. The template is the other and the code to setup the template rules is yet another. See what happens when you start adding nested conditionals in the template file.
    [while]this[if]that[for]loop[/for][else]break[/else]default[/if][/while]
    along with multiple vars?

    And sts is a template system. It may look big because it has the specifics of osc built-in but in principle it replaces template files with processed html code like yours does too.

    There are many parsers available some with DOM parsing some with expression replacement but all fall in the same category. When they are go for a template system they add complexity.

  31. @Gary, it has been 6 days since I sent the original PM, and you responded by going on a tangent about who I am and regurgitating information that I was made aware of five times already by different people in the forum thread. To top it off, nothing in your response answered my concerns at all, despite you explicitly offering help in the forum thread and then confirming it later on via PM.

    If you can’t answer any of my concerns, then just tell me, and I’ll stop wasting time conferring with you since you can’t even live up to your own offer. And then you talk about us.

  32. “Tell me where the extra scripting layer is going to help or make things faster for either the designer or developer.”

    Certainly. Firstly, I’ve never seen someone use PHP for templating and use it right. Although you CAN separate logic and structure, people just don’t. In my opinion, the only way to properly use it is define all of your variables in the logic file, include a separate PHP file, and have said PHP file do nothing but handle those variables. Often people will create some convoluted if or loop condition in the template. I believe the only loop you need to use in the templates is a foreach loop, and that’s the only one SUIT uses. Clear and concise, it extracts the keys and values of the data you generated in the logic file. Again, I’ve never seen someone do this in pure PHP, while SUIT’s templating ruleset forces you to.

    Secondly, the syntax is simpler. There is absolutely no learning curve. [if condition=”somevariable] contents [/if]. Unlike several things I’ve seen in PHP, this really can’t be misinterpreted.

    Thirdly, although as a person who presumably mostly uses PHP for server-side processing, you wouldn’t particularly care about this, I don’t think that templates should be bound to a particular language. As a template is mostly a markup based resource, it should be treated as such. You don’t need to know a separate language to use CSS with PHP, Python, etc. I don’t think you should need to in order to structure your dynamic website, either.

    I’ve already explained to you that setting up the parser with SUIT takes one additional concise line in order to use. This argument is bunk. If you have a major problem with the syntax, that’s one thing, but the developer has to make next to no changes to his / her code in order to use SUIT. But again, there’s very little you can do to attack the syntax as you can modify it with next to no knowledge of programming.

    “See what happens when you start adding nested conditionals in the template file.
    [while]this[if]that[for]loop[/for][else]break[/else]default[/if][/while]
    along with multiple vars?”

    I have no idea what you’re trying to get at here. Firstly, only one of the tags you have mentioned here exists in SUIT, as like I’ve said, SUIT has one loop statement. I’m assuming you’re trying to attack SUIT’s ability to nest because you’re essentially comparing it to STS and STS cannot nest. SUIT can. STS uses str_replace. SUIT actually parses the document. STS is a theme system plus one parsing feature that anyone who knows anything about PHP can implement. SUIT contains a flexible parser that took years of work to handle every foreseeable scenario.

    I understand that when you see a program in a certain category with horrible implementations (I’m sure the ones you are most familiar with are Smarty and STS), you tend to negatively associate their flaws with this program. I don’t think the idea of Smarty is a bad one, I just think it was horribly, horribly executed. I don’t know much about STS, but I know it’s not a comparable software and has no grounds for being mentioned here. The questions that remain are:

    1. Should a software like SUIT exist?
    2. Is this kind of software right for OSC?
    3. Does SUIT do the best job in comparison to the others?

    I can easily support items 1 and 3. 2 is up to the OSC community, and they might determine it’s not for them. However, I’m not going to concede this without valid arguments against it. Please give me some; I’m powered by criticism.

  33. You are bringing an “if” example but you know full well that’s not realistic. You need to present a actual piece of code where the rules of the template show how it can be applied to an existing script that right now the php logic to generate html is spread in different areas in osc.

    If you really going to demonstrate it with the osc 2.2 then you will have to restructure the framework. Afterwards you will deploy the parser and the template. I want to see the end result.

    The reason STS became popular was very simple. The key was the regular expression replacement, html overrides and the php buffering. These things made the module possible to integrate it without major code changes in osc2.2. The rest was simple implementation. And the author had knowledge of the osc. The end result is that you had something at least to change the layout of certain pages you wanted with the store at the expense of the overhead and complications mentioned earlier.

    Now because of your parser at the DOM level I think you will be able to follow a similar approach but upto a point. In other words, create the override mechanism so the template file can be invoked but then you need to setup your parser’s logic so parts of the osc core code that generate the html go through your parser and can be adapted with your template style. And there I believe you will see the problems.

    So if I size it and I had to choose between STS and your module, I would have less difficulty using the STS because it wouldn’t require the parser part.

    And no I am not attacking anything. But show us an implementation. Basically you need to create a module that attaches to the existing osc framework if you want it to be successful and it is easy for existing users to modify their stores. At least it requires less integration time than the existing osc template contributions.

    Also feel free to try it with my CMS where there is at least a primitive breakdown between presentation and script logic and it is osc 2.2 based.

  34. “2. Is this kind of software right for OSC?”

    SUIT could be good for osCommerce, and osCommerce could be good for SUIT.

    However, you guys went about this the wrong way;

    Chris should never have posed as a general user of SUIT, which he is clearly not – he should not have lied about his affiliation.

    Brandon, you’ve been very strident in your viewpoint, to the detriment of your product – what you have done whilst promoting your product is get peoples backs up by dissing other products, or appearing to.

    I have zero interest in helping to implement SUIT, but would have an interest in seeing the finished result, if it ever happens.

  35. @enigma1: I’m assuming this section is explaining how STS works with OSCv2 without modifying the core. I’m not planning on writing a OSC implementation, and I’m fairly certain Chris was writing one for OSCv3.

    “So if I size it and I had to choose between STS and your module, I would have less difficulty using the STS because it wouldn’t require the parser part.”

    You’re going to have to reword this as I can’t understand why you’d think adding a parser that actually works in a sane way would be a problem.

    “You are bringing an “if” example but you know full well that’s not realistic. You need to present a actual piece of code where the rules of the template show how it can be applied to an existing script that right now the php logic to generate html is spread in different areas in osc.”

    Which if are you referring to? Are you asking me if this could be implemented into OSC, or are you asking if SUIT can work with any dynamic website? I don’t know why the former would be impossible if the latter is possible, and if you’re still unconvinced of the latter, then you’ve obviously not looked at suitframework.com (Powered on it) or any of the example templates that you can EDIT LIVE (Such as http://www.suitframework.com/tryit/templating/loop/). Do you want a comparison of a script using PHP compared to the same thing in SUIT along with some notes of its philosophy? Certainly:

    http://www.suitframework.com/docs/comparison/

    If someone wants to accuse me of trying to raise my PageRank or something along those lines, note that I’ve waited many posts to link this. I assumed that you guys would actually find it yourself before making any further statements. Apparently not.

    “Also feel free to try it with my CMS where there is at least a primitive breakdown between presentation and script logic and it is osc 2.2 based.”

    I’m not going to convert your software for you to prove a point to you. If you’d like to see the full source for suitframework.com, you can view it in the repository. It’s written in Python, but like I said, the templates look exactly the same, so you should be able to get an idea of how the PHP implementation would look. Again, Chris is the person (attempting) to write the OSCv3 example, and I’m looking forward to it just as you do. But please, stop claiming that SUIT’s compatibility with OSCv3 is a hypothetical. There doesn’t seem to be a major difference between OSC and every other web script to warrant that claim.

    @gary: Again, if you think that I went up to Chris and said “Hey, make a fool of yourself by pretending to be someone else,” I didn’t. The first thing I said when he put it up is “Why would you do that?” But, I’m not his mom, and I’m not going to tell him how to conduct himself.

    As far as being strident, of course I’m going to defame projects like Smarty. It translates what is essentially PHP syntax into even more convoluted PHP. I’ve never met one person who likes it, so I figured it was common knowledge that Smarty was a bad idea (Someone in the thread even going as far as saying it ruined ZenCart). As far as STS, you said in the first paragraph that STS has nothing to do with this discussion, so I’m simply confused why enigma is bringing it up, especially when the creator himself said STS would not be the solution for OSCv3.

    More importantly, I’m not sure why I have to defend the other softwares. If any of you have kind words to say about any of the alternatives, say them. You’re obviously not convinced of item three of my checklist, so let’s debate it. In the thread, I compared Smarty, PHPTal, and Dwoo, and everything I said was factual or noted as an opinion. If you think I was wrong about any description of it, call me out on it.

  36. Gary, I AM a general user of SUIT. I’m not a developer; I haven’t coded a single line of the program. And again, who I am is irrelevant; it is the substance of my arguments you should be focusing on, not who I am. By concerning yourself with who I am, you are implying that it somehow affects the solidity of the ideas I’ve presented, which is a logical fallacy (Appeal to motive.)

    Brandon is only defending his project; he’s not here actively promoting it. I’m not sure how you’re missing that. I don’t see anyone calling out bkellum for defending his own ideals, so why should he be an exception? I started the original discussion, and once he saw that many people were discrediting the project with red herrings or otherwise silly arguments, he jumped in to defend himself. Everything he has posted has been a response to what has already been said. I don’t see where strident applies to his end of the spectrum, since I’m the one supplying the strident viewpoints, which seemingly have yet to be addressed. “Show us the implementation,” is not an argument, I’m afraid.

    Also, you are not interested in SUIT’s implementation; stop lying. You’ve shown that you are’t interested in the implementation because you don’t care enough about it to help out with anything.

  37. Have you ever watched dragons den? Sometimes the idea might be -brilliant- and has the potential to make lots of money. But the person behind it just has no clue about how to promote the product in the correct way. “I’m out”.

    If this thread turns out to become more abusive than it already has, then I’ll simply lock it.

  38. @Brandon – you don’t have to defend other software. You’re missing my point entirely…

    What you have done is jumped in feet first and attempted to promote your product over others. When ever anyone has tried to say anything about other systems, they have been “shouted” at by you (stridently), and told in no uncertain terms that yours is better. Well, now you (or someone else) need to prove it.

    Personally and professionally, I have no interest in ANY framework system, as I said in the original blog post up there ^ – all of them would mean more work for me as a developer of osCommerce, which leads to more cost for my clients. That’s my opinion, but equally as a fairly balanced individual, I’d like to see the finished osC-SUIT so that I can look to broaden my horizons and maybe, just maybe, change my opinion.

  39. Gary, that’s not how burden of proof works. If they were the ones saying things about other systems in contrast to SUIT, then it is their obligation as the ones who made the claims to back them up, not his own.

  40. Gary, at this point, you’re simply putting words in my mouth in order to dodge having an actual discussion. When have I shouted at anyone about supporting another system? The only person who mentioned a system other than STS or SUIT in this topic was me (Mentioning factual flaws of Smarty). When STS was mentioned, I pointed enigma to your words: “When you think of a template, what do you think – I bet you are thinking a new look for your site. The sort of thing sold by ‘Template Monster’, or the sort of thing that STS (Simple Template System) was designed to be used for. Forget it, this is just simple themage that anyone can do given enough time.” Did you consider your original post offensive? Take it out on yourself, not me.

    I understand you might be skeptical that SUIT can actually save time, but I’ve pointed you to several examples and resources. I understand you want to see the fork as well as I do, but you have plenty other examples that would help you make up your mind, so I don’t know why you have to disqualify all of those just because you don’t have the one you want.

    I do have to defend my software and will continue to. I didn’t post SUIT without it being mentioned, and I certainly didn’t interrupt a conversation about another system. If you somehow interpret this as offensive bashing, that’s your problem. But, I have hard time believing that “In the thread, I compared Smarty, PHPTal, and Dwoo, and everything I said was factual or noted as an opinion” is more offensive than “BrandonE, I will be honest with you, I had to turn off my b$#%@t detector to get through your post.” But hey, that’s just me.

    Let’s move forward on this conversation. Tell me another thing SUIT does that bothers you. Suggest an alternative that you think is superior. If PHP is this system, show an example of how OSC could use it better than it currently does. I’d love to hear something new instead of the same recycled unsupported opinions and straw man arguments.

  41. I don’t particularly want to have a conversation about ANY framework – I’m interested only as a bystander to;

    a/ see if it (SUIT integration) actually happens
    b/ see if it’s usable (in a real, operational, business sense)

    Note, Brandon – I know you have never said that you particularly want suit< ->osc. Neither have I. Only 1 person has…

    Again – absolutely nothing about SUIT bothers me. It could be a really good addition to oscommerce. I really don’t like how suit was introduced to the oscommerce community, that’s all and how the subsequent snippets from Chris have at all times been very defensive (rather than “simple apology, I’m a dick, let’s start over”).

    As I already said, I think I’m a fairly balanced individual so I am completely happy to give SUIT a fair chance if/when it is integrated into osc. At that time, I’ll give it a good test spin and make a new post here to which the developers of “oscsuit” can/will hopefully reply. I cannot be more fair and amicable than that, I think.

  42. @brandon, Why don’t you post your module as a contribution to the osCommerce repository. If you truly believe in it why not following down that path instead of trying to pushing it by other means?

    As of me I try to stay on topic. I mentioned STS because it is mentioned in the original comments btw and it is implemented for osCommerce. The whole blog here discusses issues or features that have to do with osCommerce.

    And because I did check the docs and examples you mention I explained the issues that you will encounter. If you think implementing for v3 your module by all means go ahead. The reason I mentioned the v2.2 is that the framework is in production not in alpha or beta stage.

    And concentrate on the argument. Which is, having any template system vs not having one for a framework.

    From your example
    [if condition=”loggedin”]
    Welcome, [var]username[/var]!
    [/if]
    [if condition=”loggedin” not=”true”]
    Please log in.
    [/if]

    Who’s Online?

    [loop value=”value” iterable=”members” join=”,”]
    [if condition=”value.admin”][/if]
    [if condition=”value.banned”][/if]
    [var]value.name[/var]
    [if condition=”value.admin”]
    [/if]
    [if condition=”value.banned”][/if]
    [/loop]

    ——————————–
    and with plain php

    echo ” . ($loggedin?(TEXT_WELCOME . ‘, ‘ . $username . ‘!’):(TEXT_PLEASE_LOGIN)) . ”;
    echo ” . TEXT_WHOS_ONLINE . ”;
    foreach($members as $value) {
    if( isset($value[‘admin’])) echo ‘‘;
    if( isset($value[‘banned’])) echo ‘‘;
    echo $value[‘name’];
    if( isset($value[‘banned’])) echo ‘
    ‘;
    if( isset($value[‘admin’])) echo ‘
    ‘;
    }
    echo ”;
    ————————————–

    I fail to see the benefit. And you will need to setup the parser logic too so the variables are translated while with plain php nothing more needs to be done.

    And the language strings btw.

  43. We’ve kept trying to tell you we don’t need to show you an example of OSC being integrated to let you see how SUIT works or to have a valid debate. But, considering you have no intention on stopping, here:

    @Gary, way to passively call someone a dick and ignore the fact that you called someone abrasive with absolutely no back-up at all, which is the entire epitome of dickery. I have no need to apologize to anyone; I haven’t done anything wrong, and I certainly don’t owe the lot of you anything. If you’re mad that I’m not giving you the “respect” you think you deserve, then tough; you earn that; I don’t care if you’ve been around since 2002.

    @enigma1, you took the PHP example on the comparison page and made it worse, to the point where you absolutely threw away every possibility of it ever being readable. For starters, the use of ternaries in “templating,” a messy string concatenation scheme, and an overall mess of echo statements that could be reduced to one if a templating system was used. To top it off, you took the example completely out of context and got the conditionals wrong; you’re supposed to be evaluating their truth values, not whether they’re set or not. Plus, there’s not even a delimiter specified in the PHP version, so your output would be completely mushed together, therefore it is not even an equivalent of said output, which indicates you don’t know what the fuck you’re talking about anymore. You truly do not know what it does, therefore you cannot argue about its issues nor disadvantages. As such, all of the arguments that you’ve presented regarding, “issues that we will encounter” are moot and invalid. Like that, your entire argument is destroyed.

    Constants as language strings are a terrible idea due to the fact that they both pollute the global namespace, and not the right approach to take when internationalizing your web app. If you’re going to do internationalization, do it right and use gettext. It was specifically built to solve this issue, it’s a standardized approach, and much more efficient than what you are doing. As a side-note, Brandon, this example needs to be added to the SUIT docs; it’s much nastier than the one on the comparison page. 🙂

    You keep bringing up the point about “setting up the parser logic” and about it being a hassle, therefore templating systems are unnecessary. That’s a straw man argument against templating. By your logic, we should continue to do things low-level just for the sake of “keeping things simple,” which is counter-productive and rather stupid, coming from someone who claims to be a programmer. By your logic, we should be using procedural programming in place of object-oriented approaches simply due to the fact that it is less complex. Template systems exist so that people won’t do what you just did in your example, which I, and many other coders and designers concerned with cleanliness and readability of code will consider a huge benefit in their book.

  44. Not to mention that I don’t think anyone was suggesting you use echo statements. I thought this was PHP templating (As in, PHP sections embedded in mostly HTML documents) vs. a templating framework.

    “As a side-note, Brandon, this example needs to be added to the SUIT docs; it’s much nastier than the one on the comparison page.”

    You can see gettext usage in the docs for the “suitlons” ruleset. I would have made gettext a rule in templating, but that’d require me including gettext class files into the PHP package, and I really didn’t want to get into that. Obviously though, you can easily create a gettext rule for PHP SUIT if you do a very tiny bit of research.

    As I’ve said before, Chris is his own person, and I don’t agree with everything he says. His language in the last post is no exception. I thought we were moving toward a more civil tone, and that post seems to just want to escalate things, and I obviously don’t want that. You can easily get your point across without being hostile. But then again, I’m apparently strident, seeing that Gary never responded to my claim that I’m not, so perhaps cursing is considered polite here. Regardless, I’m hoping you’ll just appease these guys and show them a simple example of SUIT integrated to OSC. You’ve had quite some time to work on it, and no one’s going to get off that point until you post it.

    Again, to enigma1, if you have code to paste, please use a pastebin. Most of your example got cutoff or distorted.

  45. Yes, the pastoing on this wordpress install leaves much to be desired. I’ll try to find the time to fix it.

    Chris/Arnold/Faltzer; You lied to the whole oscommerce community in your very first post, yet claim to have done nothing wrong. I gave up on you when there was no apology made for that.

    Brandon, strident was the wrong word to use – I apologise – you probably already worked out that English is not my mothers tongue. What you are doing is rebutting the points made by everyone else by posting more and more info…when all you need to do to stop all the doubters is have Chris/Arnold/Faltzer produce the work that we ALL want to see (whether to use productively or debunk entirely).

  46. @brandon, Well obviously I could not use the php tags to break the lines and I think that’s something we discussed earlier on, because of the input in the blog. Something Faltzer didn’t even read from what he said.

    Faltzer said:
    “which indicates you don’t know what the fuck you’re talking about anymore”

    As a spam principle, when you spam a forum or blog you don’t want to include nasty words filtered by spiders for content, as your new creation ends up in the garbage bin before it is even known.

    “Constants as language strings are a terrible idea….”
    Well that’s how the application is setup. Not sure if you checked yet osCommerce v2.2. As I mentioned before you should clear up the confusion whether you want to create a module for osCommerce or whether you want osCommerce to be rewritten so it matches your module. Constants as language string really depends how you use them despite what you read elsewhere. MS2.2 supports multi-lingual for ages if you haven’t noticed, using definitions for strings.

    BTW all of my arguments stand, because you haven’t yet provided anything that is usable for osCommerce.

  47. @Gary, You seem to have this very sickly obsession with me, where every comment is a reference to me, and not the subject of your own blog post at hand. It was a white lie, which I provided a justification for; nobody but you cares, which shows that I haven’t done anything that was unquantifiable wrong to require an apology. It which wouldn’t be worth anything, because I don’t know nor owe you anything.

    @enigma1, We’re not spamming; you really seem to have trouble coming into terms with this, not to mention you lack any back-up for this s. I started a topic, , everyone else started spewing out drivel and otherwise uninformed opinions and arguments, and all I did was retaliate. The posted links are perfectly justified; it’s not his fault nor is it mine that you both don’t know how to read up and gather some facts before arguing a subject.

    We aren’t discussing OSCv2.2, for the second time. We are discussing OSCv3 (which by the way, does not use constants for language strings.) As I stated before, I’m not going to bother religiously hacking through source code that is heavily subjected to changes that could most likely break the changes I make thus. Thus, I await until Mark and Harald announce a plugin system that allows template systems to be pluggable to proceed with a full implementation of the library.

    No, your arguments still do not stand. That’s arguing from ignorance; you’re fallaciously arguing by claiming that your arguments are correct until proven otherwise, and it is even more so when you use a red herring. I’m not arguing my stance hypothetically, as all of my arguments are based on established facts. That is a terrible reason to fall back on to want to reject what I’m saying. I wasn’t harping on your example because a few HTML tags were parsed. I was harping on your example because it was wrong and overall non cohesive, where I explained why.

  48. “when all you need to do to stop all the doubters is have Chris/Arnold/Faltzer produce the work that we ALL want to see (whether to use productively or debunk entirely).”

    I don’t think I can stress this enough: Chris is not my slave, I can’t make him do things I want, and even if he wants to do this conversion, history says it will take him a while. I’m not going to stop negating simply false things said in this conversation just because we don’t have this.

    “BTW all of my arguments stand, because you haven’t yet provided anything that is usable for osCommerce.”

    No, they don’t, because (I can’t believe how many times I’ve said this) SUIT has several working examples (Some of which you can EDIT ONLINE), SUIT has no dependencies, and it is not bound to a specific software. As such, SUIT can be integrated into any web script, and there is no reason why it couldn’t for OSC. You can’t just deny the possibility of SUIT being used for OSC just because we don’t have a working example. That’s just nonsense. Instead, argue whether we SHOULD use it for OSC, which you have done in the last post. Unless something went horribly wrong in the paste (Obviously it did), you seemed to have hurt your cause by using possibly the worst method ever to generate your content.

    “@brandon, Well obviously I could not use the php tags to break the lines and I think that’s something we discussed earlier on, because of the input in the blog. Something Faltzer didn’t even read from what he said.”

    That’s not an excuse. We’ve told you several times to use a pastebin. A pastebin would prevent this from happening 100% of the time. My favorite is http://www.slexy.org

    “Brandon, strident was the wrong word to use – I apologise – you probably already worked out that English is not my mothers tongue.”

    No, I could not tell, but I hold no grudges. All I ask is that you shift the conversation in the right direction from here on out, not continually denying the usefulness of my labor just because Chris didn’t do something you think he has to do.

  49. Faltzer said
    “We’re not spamming;”
    Yea it must be the idea of everyone else, except yourself.
    http://forums.oscommerce.com/topic/362186-oscommerce-should-use-a-templating-system/
    “Reason for edit: commercial interest?”
    Run a word count on this page see how many times you repeated the name of your product. Make dictionary sites inferior in comparison.

    “We aren’t discussing OSCv2.2, for the second time”
    Strange, you posted in the v2.x forum about it, you challenged STS which is done specifically for 2.2 and now you are trying to avoid it?

    “As I stated before, I’m not going to bother religiously hacking through source code that is heavily subjected to changes that could most likely break the changes I make”
    So we are in agreement you don’t know osCommerce you never looked at it nor you wanted to contribute something. Instead you argued pretty much with every osCommerce member who posted on the osC thread.

    “That’s arguing from ignorance; you’re fallaciously arguing by claiming that your arguments are correct until proven otherwise”
    I think I proved enough already along with other osC members.

    You totally failed to counter any of the arguments I presented about a template system. You attacked osC forum members who have spent years developing modules and helped the community expand. It’s unbelievable to even consider that the osC team will ever going down your path just because you say so. And you admitted you have no clue about the osCommerce.

    Lots of words and misinformation and you offer nothing.

  50. @Brandon – I have no interest in SUIT until I can see it working with osCommerce – I only work with osCommerce…and those programs that are made to work with it. At that time I’ll let the whole world (well, what little of the world reads this blog) know what I think about it.

    I find it strange that you would say this;

    “Chris didn’t do something you think he has to do”

    I have said all along that IF and/or when it happens, I’ll look at it. I believe it will never happen as I believe that Chris is smart with words and lacking in action. I’d prefer that Chris does nothing! I’d really prefer for YOU to integrate it, if you had the time and inclination, I think that you are credible. Chris is the polar opposite of credible (I would have said incredible, but I don’t think that’s the right word).

  51. “I have said all along that IF and/or when it happens, I’ll look at it.”

    As I’ve stated previously, every one of my replies was a response to some criticism regarding SUIT or my rhetoric. If you guys haven’t looked at it because you haven’t seen an integration for OSC (Doesn’t make much sense to me), then how can you all criticize it so harshly?

    “I’d really prefer for YOU to integrate it, if you had the time and inclination.”

    I have neither.

  52. “I have neither.”

    Nor have I.

    I haven’t criticised SUIT at all. I’d like to see an implementation, so that I can criticise or praise it.

  53. @enigma1, your argument is ridiculous; you’re claiming that it’s SPAM simply because everyone else thinks it may be. SUIT is an open-source program. There is no underlying commercial interest; that’s all a subject of your own baseless conjecture.

    You obviously aren’t reading the thread either, at this point. Which forum it was started in matters very little when it comes to that topic, because the discussion evolved into v3 discussion even before Page 2, where the only remnants of v2 onward were people talking about STS, all to which I addressed. I wasn’t the one who brought up STS; Jan did, and I ended up challenging it because it kept being brought up by everyone else.

    “I failed to counter” your arguments? I just invalidated your entire argument a few posts back; all you did in response to my counter was complain about me throwing the f-bomb on you and you proceeded to talk about “commercial interest” for an open-source project.

    I don’t care how long you’ve been around; if you’re wrong, then suck it up. The fact that you have to flash your authority at me as a substitute to a real argument is proof that you know your logic wouldn’t hold any water by itself without a join date on your postbit. I’m not generalizing on OSC like many of you are generalizing on a templating system, so I fail to see how I’m the evil one for discussing subjects that I actually have knowledge in, in contrast to talking with a know-it-all that doesn’t know how to defend his points.

    You claim that all of my arguments are based on misinformation, but you haven’t even bothered to explain yourself. You’re doing the same thing Gary is doing.

  54. “discussion evolved into v3 discussion even before Page 2”
    Yea well the way I see it is since the 2.2 has lots of posts why not spaming the 2.2 forum? The 3.0 doesn’t have as much traffic after all and no one will respond. It’s in the 2.2 because you put it there. It has the “edit for commercial interest” note because is a fact. And everything the members said about your attitude is correct.

  55. It’s in v2.2 because I wasn’t aware of a development branch for v3 existing at the time until Jan informed me of one. It became a v3 discussion afterwards; it’s not in v3 at this point because the moderating team just doesn’t want to move the thread. What could I possibly have to gain “commercially” from recommending an open-source project that I’ve never contributed a single line towards?

    Your reference to the post editing has no logical basis. How is it a fact? Your assumption is saying that moderators are always correct, but Jan immediately admitted that his decision was rash and based more on suspicion. Unless you can read my mind on what my intentions are, then you’re grasping at straws at this point.

  56. “How is it a fact?”
    Because it is posted.

    “but Jan immediately admitted that his decision was rash and based more on suspicion.”
    Is it now? And why didn’t he corrected it? How about the rest of the members you accused of being pretty much ignorant? Why did you pull-in the STS if it wasn’t about the v2.2? And why instead of keep pumping the thread didn’t you started a new thread? Coincidence right?

    What does the relevance of your product with osCommerce. The v2.2 and v3.0 forums are for questions about core and contributions in osC not about advertising. You haven’t posted any code that has to do with osCommerce. The only thing that you keep saying is that your product must be used by osCommerce.

    The name of the thread was
    “osCommerce should use a templating system”
    But your product has nothing to do with osCommerce. Conveniently setup for a “heated” discussion isn’t it in which you had no intention of contributing anything relevant.

    These are the facts.

  57. “Because it is posted,” is not a back-up; prove your side or stop touting your misinformed opinion as a fact when it clearly isn’t. You’re old enough to know the difference between the two, and you’re also old enough to think for yourself on things. Just because a moderator assumed that it was a commercial interest doesn’t mean he is absolutely right, especially when he backed down on that later. A correction is pointless, because all he did was remove the URL tags wrapped around the actual URI, still keeping the main text intact. The link was provided as a clarification of what template system I was referring to, otherwise we’d have people asking to clarify what it is exactly. Whether a new thread should have been made has no bearing, nor does the question

    It’s not product advertisement, for the third time. Furthermore, the “General Support” forum description clearly states, “General discussions on osCommerce Online Merchant v2.x,” thus it was the best place to post the topic. I don’t see where you’re going with all of these trivial concerns; where it’s posted is not important, because you have it all wrong that the topic was made in personal promotion. The topic was posted to discuss implementing a templating system into OSC. I chose SUIT to be the preferable implementation, and a debate soon arose on the advantages of one method/system over the other, and I defended my side. The debacles in that topic were perfectly relevant to OSC, because it was debating the answers to the questions: “should OSC use a templating system?”, and, “which templating system is best for OSC?” – obviously we are going to discuss specific template systems and go deeper into the subject rather than discuss it in the non-informative and shallow way that you all did in that topic. It reached 7 pages in the course of a week; if the moderators had an issue with the thread itself, they would have closed it by now. There is a decent amount of code posted in the thread that uses OSC as a primary subject of discusion, so I fail to see where that assumption stems from. If everything you claimed was true about personal promotion, then the thread would have been closed by now.

    Again, with your STS quip. I’ve already addressed that: “the discussion evolved into v3 discussion even before Page 2, where the only remnants of v2 onward were people talking about STS, all to which I addressed. I wasn’t the one who brought up STS; Jan did, and I ended up challenging it because it kept being brought up by everyone else.” – Stop going in circles.

    During your little tangent, you also dodged my question, which was perfectly valid. You will answer it: What could I possibly have to gain “commercially” from recommending an open-source project that I’ve never contributed a single line towards?

    These are the facts. ;}

  58. “is not a back-up; prove your side or stop touting your misinformed opinion as a fact when it clearly isn’t.”
    It reads exactly as I mentioned. You are repeating again and again the same thing.

    As of the thread itself has no relation with osC. According to you, anyone should go and spam the forum claiming he maybe use osCommerce or do something with it and post links and repeat his product names 100s of times in the same thread.

    “What could I possibly have to gain “commercially” from recommending an open-source project that I’ve never contributed a single line towards?”

    In reality you haven’t gained. You lost a lot, among them credibility. Because of the way you push something whatever that is.

    The problem is how you responded to the argument about template systems. It’s not that you wanted from a different angle to approach templates and you to make a solid point by posting an interface for osC.

    And when I tried to post code with whatever I could understand out of the discussion, you guys stuck on the argument what to use to encode the strings.

    You sound like you don’t want to make an effort and prove what your module really is capable of, using the osCommrece not an abstract context.

    And if anyone else has a different opinion or experience is wrong in your eyes.

  59. Don’t blame me for repeating the same thing to you because you keep ignoring them and just choose to persist with it. You keep pushing the same arguments over and over again sans the reasoning, despite them already having been negated. I’ve already established how the thread is perfectly relevant to OSC, therefore it is not SPAM under any sense of the term. The next time you repeat something I’ve already addressed, I’ll just quote this for you until you eventually get the message. You can even make it a game to amuse yourself if you wish.

    It’s not “my module”; I just happen to use it and enjoy it; learn the difference. I don’t need to prove anything under your terms. Templating is a general issue; what type of web application it is does not factor into whether x templating system is usable, as any web application that wasn’t shoddily engineered can support it. Just because I’m not succumbing to your picky standards for what is proof in your eyes doesn’t mean it hasn’t already been shown. The official site uses it, which has the source code freely available, and my blog uses it as well (to which I will also add, I have also made the source freely available for on the footer of the page linking to a github repo.)

    Whether I’m Vint Cerf or Sarah Palin doesn’t change that I’ve given far more reasons to show that my position is the correct one and yours is incorrect. Credibility in general means very little to me; if I see you’re making incorrect assertions, I’ll call you on it. I respect differing opinions when people actually provide a justification for them. I respect that many people prefer to use MySQL over PostgreSQL because it’s just easier for them to grasp, despite it being under-powered and under-performing crap. You have done nothing of the sort, thus your opinion is as meaningful as a monotonous pile of stones.

  60. “In reality you haven’t gained. You lost a lot, among them credibility. Because of the way you push something whatever that is.”

    You’re implying he’s hurt my product. I don’t see how what he’s said makes my work worse. Not to mention everything he’s saying is factual, albeit often brash and offensive. You can find him obnoxious, but you can’t use that as a reason to dislike SUIT.

    Yes, we’ve mentioned SUIT several times. I’ve also mentioned Smarty and PHPTal several times. No one on the thread either knew any other system or had anything good to say about them. That’s not our fault.

    Neither of us pushed anything. He mentioned it, and we both responded to various comments on it. I’d love to hear some arguments for using Smarty or PHPTal. The question is, are there any?

  61. FYI, I just played around with microtime() and realized yes, SUIT does have a bit of overhead. .01 seconds when cached, a little less than .02 seconds when not. I think this is worth the abstraction. If you really cared THAT much about speed, you might as well write your application in C. That’s faster than PHP. After all, what more is PHP than another layer of meaningless abstraction?

  62. No, the thread you started in osC is irrelevant with osC because you have no application for it, just a rant for others to use it.

    For templating as I mentioned in my first post, its the principles of traditional templating which you also follow with your module making web development more difficult. There isn’t anything new I see. You have an additional structure in between the layout and the code logic. I find that useless and in the osC context you will have to restructure the osC core to deploy it. And that will make your code next to impossible for others to use.

    @brandon, not sure about your comment
    “No one on the thread either knew any other system or had anything good to say about them”
    Did I say somewhere, one of these traditional template systems simplify something? I don’t think so (its implied). I only mentioned STS because it is designed for osC and is released as a contribution for osC. Other than that technically has exactly the same problems.

    Yours however not only has the aforementioned problems but it’s also irrelevant because you don’t have a ready module for osC, neither demonstrated an implementation for osC.

    Currently, what you want others to use is a piece of code that makes development miserable. The way I see it you got templating all wrong. There are methods that can be utilized even for an open source package and even for the MS2.2 and without touching php code in principle and without altering the framework in anyway. Once you figure out how to do that you may create a template system that is useful to the community.

    But for the time being all I see is you aren’t moving towards that direction.

  63. @enigma1,

    Expected. I’ll go ahead and copy-paste for you. Let’s see how many it takes until you finally understand; you’re free to continue to prove me right:

    “The debacles in that topic were perfectly relevant to OSC, because it was debating the answers to the questions: “should OSC use a templating system?”, and, “which templating system is best for OSC?” – obviously we are going to discuss specific template systems and go deeper into the subject rather than discuss it in the non-informative and shallow way that you all did in that topic. It reached 7 pages in the course of a week; if the moderators had an issue with the thread itself, they would have closed it by now.”

    You have admitted to and have proved with your completely incorrect example that you don’t know anything about SUIT, so how you’re making the ignorant assertion that it, “makes development miserable” is beyond me. If you want to keep living in your little world of ignorance, do it on your own time; I’m not your playmate. We have already shown that the mindset you adopt for templating is sloppy, not cohesive and an overall impractical solution. Templates are for mark-up, not code. PHP is code, thus does not belong in templates and therefore should not be used in templates.

    The only file I’ve had to modify as of yet is the index.php, and that’s because I’ve had to work around its rather redundant and hacky API, not because it is at all flexible. APIs should revolve around those who use them, not the opposite. If something is particularly hard to accomplish in SUIT, it’s because there is a design flaw. Templating is obviously not a tool to hide design flaws, and I’m glad that it doesn’t encourage people to do stupid things by default. However, your argument assumes way too much about the quality of the framework’s design and level of coherence for it to even have weight.

    Again, your point on STS: “We aren’t discussing OSCv2.2, for the third time. We are discussing OSCv3” – STS was built for v2.2, and the developer of STS admitted it’s not a solution for v3. Why do you even bother mentioning it?

  64. Faltzer said
    “Why do you even bother mentioning it?”
    You make the false claim your code can adapt to every framework pretty much. Then you admit it’s not the case. An analogous situation is to create a car engine and you expect everyone to change his car frame so it works with your engine.

    Right now you “wait” for osC v3 to become a pluggable system that matches your code. That’s the reality.

    And I know enough about your code you think is so great. The principles are the same like every other traditional template system. Archaic and obsolete.

    “discuss it in the non-informative and shallow way that you all did in that topic”
    That’s what you think. I’ll mention it again. If your code cannot be adapted for v2.2 without changing the framework, then you’re surely dreaming, it will ever be adapted by others so it works. Recycle it and rewrite it. Blinded by egoism you don’t even read what the others you want to use your code, say.

    I will tell you again. You don’t need an additional scripting language neither to mod an existing web framework to have a template system. And you shouldn’t even need to touch index.php in v3. You keep ignoring that because in your world the only thing you’ve seen is traditional template systems.

  65. @Gary, github commmit.

    @enigma1,

    “You make the false claim your code can adapt to every framework pretty much. Then you admit it’s not the case. An analogous situation is to create a car engine and you expect everyone to change his car frame so it works with your engine.

    Right now you “wait” for osC v3 to become a pluggable system that matches your code. That’s the reality.”

    I never insisted SUIT doesn’t adapt to pretty much every framework in existence. Read:

    “As I stated before, I’m not going to bother religiously hacking through source code that is heavily subjected to changes that could most likely break the changes I make thus. Thus, I await until Mark and Harald announce a plugin system that allows template systems to be pluggable to proceed with a full implementation of the library.”

    Again, “We aren’t discussing OSCv2.2, for the fourth time. We are discussing OSCv3.”

    To add more to your pile of repetition, I have already countered your ridiculous argument about not editing framework files and template systems:

    “APIs should revolve around those who use them, not the opposite. If something is particularly hard to accomplish in SUIT, it’s because there is a design flaw. Templating is obviously not a tool to hide design flaws, and I’m glad that it doesn’t encourage people to do stupid things by default. However, your argument assumes way too much about the quality of the framework’s design and level of coherence for it to even have weight.”

    “We have already shown that the mindset you adopt for templating is sloppy, not cohesive and an overall impractical solution. Templates are for mark-up, not code. PHP is code, thus does not belong in templates and therefore should not be used in templates.”

    You still haven’t proved how template systems are unnecessary, so your argument means nothing. The only reason why templating engines exist is because they are a necessity, just like typewriters, computers and all of the other convenience applications you see today. By denying template engines, in favor of intermixing code with markup, you are denying productivity, efficiency and security of your application. If you deny these things to end-users, then you’re not thinking like a programmer. You’re thinking like a sleaze bag.

    You’re also acting really stupid on the subject of editing files, and arguing that point just for the sake of it, when it has no bearing on how good a template system is, despite what you may delude yourself into thinking. The parser has to be instantiated somewhere, and for that a file has to be edited. It’s not going to spawn itself in the interpreter automatically just by thinking about it. Sometimes, it’s people like you that make me lose faith in the human race.

  66. @Faltzer you prove time after time that you have nothing to offer to a framework like that

    “You still haven’t proved how template systems are unnecessary, so your argument means nothing”
    Yes I have, the traditional template systems like the one you created is useless and obsolete. You are bringing the basic argument up, all the time. That is introducing complexity and unnecessary intermediate code to a framework just like that. It’s unsubstantiated and false and absolutely no reason for anyone to use, who understands basic web programming.

    As of v2.2 keep pumping your little counter. If you cannot make something useful for one system what makes you believe you will, for another?

    “The parser has to be instantiated somewhere, and for that a file has to be edited.”

    No. you don’t need anything to go in-between the original coding. You don’t need a parser you don’t need a new scripting language. The programmer keeps working the same way as before. Then the designer can optionally use a tool specifically created for a framework that processes the layout part only.

    So the programmer has no overhead he still accesses and works with the same code, the designer has a dedicated tool he can create/modify new/existing layout only, even if it’s mixed with programming code, (that’s why we have tools that can process the layout in a static way, hide certain unwanted parts depending on options etc) and there is no complexity, there is no latency there is nothing new the programmer needs to learn. Absolutely nothing.

    Whether you like it or not that approach makes yours and every other traditional template system obsolete. And the sad part is, there is nothing new about it, it’s been there all along. I don’t need to describe it in detail I am sure you understand what I talking about.

    Your code that mimics bbcode is not necessary to exist. bbcode exists and it is used because of user input management not because of framework to template relationship. You think in a template if I need to replace the tags I have to run code on the server end dynamically? So why you need a template system the way you describing it? Do you seriously think if I want to offer an editor for the templates, I need to have code at run time to do something to the template? I don’t see your point if there is such a thing.

  67. “We aren’t discussing OSCv2.2, for the fifth time. We are discussing OSCv3.”

    You haven’t proved anything except that you don’t know what you’re talking about. The specific tool you’re talking about that handles and processes the layout part is called a templating engine, dumbass, which is apparently what you claim to be arguing against. Therefore, yes, you would require a parser, thus you agree with me. You mention complexity yet again. If you were really such a purist, you wouldn’t be using PHP; you would be using C. Classes, Namespaces, Database APIs, MVC patterns, error handlers, etc. – they all add a degree of complexity to code, but I don’t see you complaining about them. We could build our applications without them, yes, but why would you ever want to do that? The problem with simple problems is that they become complex very fast; the trade-off from simplicity to “complexity” pays out in the end because you have a more structured and efficient application to cope with. If it doesn’t, it means you need to refactor your code.

    SUIT is unobtrusive and minds its own business unless you make it a part of it. Thus, that is a misdirected argument; that’s your issue, not the templating engine’s. Furthermore, I fail to see where the overhead lies; it doesn’t directly evaluate PHP code or create another PHP parser. All it does is forward text to functions using stack-based parsing (which is by convention very fast,) to the PHP parser which takes care of everything else. The overhead it causes is negligible, and your argument is as trivial a concern as the single-quotes vs. double-quotes debate. If you want to claim it imposes a significant overhead, then you need to prove it, or your point is void.

    You keep throwing around “useless”, “obsolete”, “false” and other similar terms, but no evidence or rhetoric to back them up. You’re a terrible debater. All of your arguments are a paraphrasing of, “you’re wrong because you’re wrong.” – Why should anyone accept what you’re saying if you’re not even giving them a rapport? I may not have been around for 8 years, and I may treat you like the bottom of the barrel, but at least when I make an argument, I elaborate and give reasons for them.

    Since you haven’t addressed any of the flaws as to why PHP cannot be used as a templating system, I’ll take it you agree. As such, I don’t see why you’re arguing this given the case.

  68. Faltzer said,
    “The specific tool you’re talking about that handles and processes the layout part is called a templating engine”

    No it isn’t, what I said, editing static files is called an editor, has nothing to do with template engines. There are no new languages involved for templating.

    “Therefore, yes, you would require a parser, thus you agree with me.”

    No I disagree, an editor is an editor not a parser. You can add functionality to it, striping or highlighting or adding content via jscripts or having the server to send parts of the content based on a request type, but everything is static. And it’s something you use on demand. Nothing is attached to the framework. The programmer doesn’t even know its existence. It’s exactly the same as when editing code with different editors.

    “I fail to see where the overhead lies; it doesn’t directly evaluate PHP code or create another PHP parser.”

    It’s just messes around the framework making it foreign to others, because it adds an extra structure in-between the framework and template. Have you read a word of what posted earlier? What you are proposing modifies the framework and has all the problems I mentioned. What I posted doesn’t.

    And better double check the technical terminology before calling an editor to be a template engine.

    “If you were really such a purist, you wouldn’t be using PHP; you would be using C. Classes, Namespaces, Database APIs, MVC patterns, error handlers, etc. – they all add a degree of complexity to code, but I don’t see you complaining about them.”

    What are you talking about?

  69. You’re talking about text editors, which are for editing text; not template engines; you spoke of processing text, which is exactly what templating engines do as tools of their own trade. Either way, text editors have nothing to do with the debate of whether or not a templating system is necessary or not, as we are discussing their functionality, benefit and cohesiveness; not what we use to edit templates. All you’re doing is presenting a client-side solution to a server-side issue, which is dodging the entire issue.

    Anybody can have an opinion, but not everyone can back it up. You’re always saying talking about the “problems” template systems pose, but you never bother to explain them. There is no point in listening to what you’re saying if you’re not even going to explain yourself. All you did was take this completely out of context and go on a tangent about text editors. At this point, I’m just going to leave all my arguments at that and stop arguing with you altogether not because you’ve won, but because you’re an unworthy opponent. Good day sir.

  70. Amendment on the first sentence: “You’re talking about text editors which are for editing text; not processing it; you spoke of processing text, which is exactly what templating engines do as tools of their own trade.”

  71. @Gary, http://github.com/faltzer/suit-oscommerce

    After a day or two of hacking about with code (since I’m a pretty lazy bastard; I only started past yesterday :), here is a simple demonstration of an osC page built with SUIT. Read the README.txt file for information. I haven’t made any specific database modifications so you can use the dump at your own discretion unless you already have an osC v3 instance setup.

  72. Just so you know, as I helped Chris benchmark this, after caching, we have determined this runs slightly faster with SUIT than without. That being said, it’s a matter of milliseconds. I find it strange that in this example, SUIT makes the script slightly faster, whereas in the other one I setup, it makes it slightly slower. I’m guessing that the bigger the script is, the more SUIT reduces the overhead.

  73. Every response to something me or Faltzer has said essentially said “Fork or get out”, and now that we have displayed a fork, the conversation dies. Interesting.

  74. regarding this:

    “Every response to something me or Faltzer has said essentially said “Fork or get out” ”

    There were all kinds of responses I believe. Here is what I mentioned in an earlier response in this blog. (8/13)

    “Basically you need to create a module that attaches to the existing osc framework if you want it to be successful and it is easy for existing users to modify their stores. At least it requires less integration time than the existing osc template contributions.”

    So in case you aren’t aware of the contribution process:
    1. Create a thread in the relevant contributions support forum
    2. Goto http://addons.oscommerce.com/
    3. Upload your code in the relevant modules category and include the osC support thread.

    For v3 the thread could goto:
    http://forums.oscommerce.com/forum/68-templates-and-images/

    For v2.2 the thread could goto:
    http://forums.oscommerce.com/forum/46-templates-and-images/

    because there are dedicated forums for templates related modules. Or you could include it in the general contributions forum.

    You don’t have to include with the upload, the entire osC package. Include a readme file for the modifications required in the framework and the new files the users should add. And include the osC version/release the module was created for.

    Then in the associated support thread try to answer/resolve any issues that come up. And be polite to the questions/comments of members who will post there.

    There are also the addon development forums if you have some alpha code you need to get feedback on before releasing it. Once you publish it though, the support threads can cover it.

    I believe that should give you the exposure you seek without getting into destructive conversation arguments.

  75. @Brandon – we are business owners who are not online to play with half finished scripts! This blog is a plaything for me! Your latest comment doesn’t become you.

    @Chris – I commend you for taking the time to produce something, I will have a blast with it at some point very soon.

  76. @enigma1, I’ll consider doing that.

    @Gary, thank you. If you have any feedback on the implementation or any questions, just ask or use the Issues tab on github.

  77. @enigma1: Even if you wanted a “pluggable template engine”, you’d need to modify the core to support it. There’s no way this can simply be an add-on. Now you have an example of SUIT with OSC. The question now is whether OSC should use it, use another system, or not use any system like it. An add-on is simply not an option.

    @Gary: So you don’t have time to play with half finished scripts, but you’re going to play with Chris’s. Also, my post doesn’t become me. What?

  78. @Brandon – this is because I committed to at least testing it if Chris took the time to code something up that is usable.

    He has, so I will. Your previous comment “Every response to something me or Faltzer has said essentially said “Fork or get out”, and now that we have displayed a fork, the conversation dies. Interesting.” makes you look like a whining script-kiddie, and I thought better of you than that. Is that more clear?

  79. Well, at least this thread will serve as testament to those who might be wondering if SUIT is suitable to integrate into their applications, and whether they would be able to work with it’s “Team”.

Comments are closed.