Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

osCommerce should use a templating system


uramagget

Recommended Posts

STS is a template system as it allows you to rearrange the layout of each of the page elements of osCommerce.

 

For example: The header, footer, single column, 2 or more columns, each of the infoboxes, some of the infoboxes, none of the infoboxes, where and how you want the product to be displayed, where you want the page content to be displayed, all of the "visual" elements of the page.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

  • Replies 130
  • Created
  • Last Reply

STS is a template system the same way PHP is a template system. As far as the actual transformation of the documents goes, which from I can see only consists of str_replace calls, it really does nothing special. It's obvious that your system does more than just transform the document. That's why I'm saying you should leave the transformation to a proven parser while using all the other theme functions elsewhere in the source. If you look into it, you'll have to admit SUIT does the transformation job better than STS, and like I've said previously, str_replace calls don't even guarantee sanitized content. So, I think the two projects could work side by side (As SUIT does nothing regarding themes), so long as you remove this one "feature" of STS and integrate the rest with SUIT.

 

Specifically, I'm referring to the dummy variables you generate. It's obvious that STS grabs variables from OSC depending on the current theme and replaces them into the document. The first part is completely irrelevant to SUIT; obviously OSC could benefit from such theme features. However, for the replacing of these variables, I figure it'd make sense to use SUIT as it's an actual parser and will get the correct result 100% of the time, plus has other features for handling data better. Surely you'd agree this is the better approach, unless you've left out some parsing features from your list. It's possible that you haven't worked with such engines before, but why should you have to know about a parser? An open source one is at your disposal.

 

As far as uramagget's implementation, I don't think his lack of completion disqualifies him from the discussion. I'm sure he's working on it. He still wants to know if the community is behind him. He'd be more motivated if he knew he'd be included. By the way, I'm pretty sure he's planning to use SUIT to replace some components that STS does not touch as it seems like STS only allows you to edit certain templates while keeping others in the source. If not, SUIT would certainly save you from having a template to handle every loop, which would take hundreds of documents.

Link to comment
Share on other sites

Using PHP for templating isn't a horrible approach, but it definitely isn't optimal. I figure the major advantages of using SUIT over PHP is that:

 

1. It's syntax is concise and made specifically for templating, making it as simple and avoidable for the designer as possible.

2. It is not directly evaluated, so it can be safely stored in a database.

3. Templating shouldn't be bound to a programming language.

4. It's customizable.

 

I don't think I need to argue the first point. Is it worth the overhead? What overhead? SUIT essentially breaks down the template, forwards information to PHP functions, and replaces the whole statements with the functions return value. Assuming the functions aren't inefficient (They are user-defined, by the way), the only overhead is the breakdown, but when cached, that completely eliminates it. Feel free to prove me wrong as I'm sure I have room for improvement.

 

BrandonE,

 

You have neatly explained the problem with SUIT. It will add 'overhead'. Cached files have to get cached for each website visitor, before cached files do any good for that visitor.

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Cached files have to get cached for each website visitor, before cached files do any good for that visitor.

I'm referring to server-side caching. If you give SUIT the same parameters (The syntax, the template to translate), the token location and parse tree will always be the same. Thus, if you cache these items for every template, the only overhead presented will be that of user-defined PHP functions. In summation, all of the little bit of overhead SUIT creates can be eliminated by some simple caching.

Link to comment
Share on other sites

I'm referring to server-side caching. If you give SUIT the same parameters (The syntax, the template to translate), the token location and parse tree will always be the same. Thus, if you cache these items for every template, the only overhead presented will be that of user-defined PHP functions. In summation, all of the little bit of overhead SUIT creates can be eliminated by some simple caching.

 

 

Brandon,

 

I'm still not seeing any advantage here. Your idea of "Suit for osC" appears basically just to be a preparser to php's parsing of the code? Is this correct?

 

Currently, you are presenting a hypothetical scenario vs a template system that has working code. Fresh ideas are a good thing so don't take this as me disagreeing with you.

 

What I would like you guys to do is try putting something together so that we can really see the advantages that you claim. I'm sure there are those in the community that would be willing to check it out. Burt even mentioned that he would be willing to give a hand to the effort but it appears he was passed over.

 

Again, it sounds very interesting and I hope you guys put something together. Until then, STS has a huge following and is the top download of all osCommerce contributions. I would love to have assistance with improving STS to make it better than what it already is. It is Open Source.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

SUIT translates a template into a finished document by forwarding information to PHP user defined functions. The syntax is similar to yours, except in addition to simple variable substitution, it has several statements that can handle data, such as [if] and [loop]. Simply put, without such statements, STS either forces the user to integrate PHP into their templates, or forces them to have way more templates than necessary. SUIT, or a similar project, none of which I've found that even rival it, can and should be used in any dynamic application, and is in no way bound to any specific project.

 

SUIT is not a hypothetical scenario. SUIT has long existed, and has been tested throughly over the course of the last two years. If you saw examples on the site, you'd know this.

 

The hypothetical is how STS and SUIT could be integrated, if they should be. Of the the features I'm currently aware of, only one of them has anything to do with template transformation, that is, the actual str_replace calls, which I've repeatedly criticized. Everything has to do with themes and hooks. If you figure these features are necessary, and if you have such a big following, I'd assume they were, then it makes little sense to use str_replace calls to implement them while a robust system like SUIT has been created and proven to do a better job.

 

I've made all my points. To be fair, I you have commented on a system that you haven't look at in depth. This is the same thing you criticized uramagget for, and you did this before mentioning any features of STS, while I've repeatedly explained all of the advantages of using SUIT AND explaining how both of our systems could coexist in OSC. If I haven't reached you by now, I probably won't. uramagget has not asked me to work on this OSC implementation, nor did I volunteer. Everything about SUIT you can find on the website, including live, editable examples (Try doing that with PHP or STS). If somehow I left something out, I offer you to ask questions, but I'm not going to spoon-feed you our mission...multiple times.

 

Hopefully, reviewing SUIT in depth, you will come to see it's vast advantages, and we can decide where to go from there.

 

Brandon

Link to comment
Share on other sites

 

SUIT is not a hypothetical scenario. SUIT has long existed, and has been tested throughly over the course of the last two years. If you saw examples on the site, you'd know this.

No, I wasn't referring to SUIT on its own. I was referring to the concept of SUIT working with osCommerce as the hypothetical scenario as it has not been done as of yet.

 

The hypothetical is how STS and SUIT could be integrated, if they should be. Of the the features I'm currently aware of, only one of them has anything to do with template transformation, that is, the actual str_replace calls, which I've repeatedly criticized. Everything has to do with themes and hooks. If you figure these features are necessary, and if you have such a big following, I'd assume they were, then it makes little sense to use str_replace calls to implement them while a robust system like SUIT has been created and proven to do a better job.

No, I didn't go into detail on how STS brings in the dynamic data from osC as I have the code already freely available for anyone to dig into to find out for themselves. It is coded very well and works perfectly with osC.

 

I've made all my points. To be fair, I you have commented on a system that you haven't look at in depth. This is the same thing you criticized uramagget for, and you did this before mentioning any features of STS, while I've repeatedly explained all of the advantages of using SUIT AND explaining how both of our systems could coexist in OSC. If I haven't reached you by now, I probably won't. uramagget has not asked me to work on this OSC implementation, nor did I volunteer. Everything about SUIT you can find on the website, including live, editable examples (Try doing that with PHP or STS). If somehow I left something out, I offer you to ask questions, but I'm not going to spoon-feed you our mission...multiple times.

 

As I see it, I'm not the one trying to implement SUIT so why do I need to defend it or look into it. I do develop STS and it is currently WORKING with osCommerce, SUIT does not. Therefore, I see no need for me to hunt down the code from another Open Source project just because some rude individual shoots his mouth off relating it to STS. He, however, should look into STS before he begins talking about something he knows nothing about. Same goes for you.

 

AGAIN, you provide a working SUIT with osCommerce and then we can start comparing the various solutions. Currently, as for a template system, there is only one working solution in this discussion and it is STS. Suit may be a working for other projects(?) but no one has presented a solution based on SUIT for osCommerce.

 

Hopefully, reviewing SUIT in depth, you will come to see it's vast advantages, and we can decide where to go from there.

 

Brandon

 

Let me know when it is ready and I would glady take a look.

Until then,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

No, I wasn't referring to SUIT on its own. I was referring to the concept of SUIT working with osCommerce as the hypothetical scenario as it has not been done as of yet.

 

I wasn't offering to do this implementation. That was uramagget's offer. I'm sure he wouldn't claim that he would do it and not deliver. That being said, I'm hear to discuss the benefits of my project, SUIT. It's not fair to overlook all the features of SUIT just because an OSC implementation doesn't exist. After all, this thread suggests that OSC should use SUIT, and that's what the debate should be about.

 

 

No, I didn't go into detail on how STS brings in the dynamic data from osC as I have the code already freely available for anyone to dig into to find out for themselves. It is coded very well and works perfectly with osC.

 

I think this is an unrealistic expectation. Why should I read how the system works if I merely want to see what it does? I have described in detail what SUIT does regarding template transformations, and I was hoping you'd reciprocate, that is, unless the only thing you do as far as transforming is str_replace, which is what the source indicates.

 

 

 

As I see it, I'm not the one trying to implement SUIT so why do I need to defend it or look into it. I do develop STS and it is currently WORKING with osCommerce, SUIT does not. Therefore, I see no need for me to hunt down the code from another Open Source project just because some rude individual shoots his mouth off relating it to STS. He, however, should look into STS before he begins talking about something he knows nothing about. Same goes for you.

 

We've both commented on eachother's projects. I've at least skimmed your source code and topic. I find it hard to believe you even read my descriptions, let alone the home page, the Wikipedia article, or any of the documentation. Again, I'm not the person who would be collaborating with you to integrate SUIT and STS if we determined they should be, but I certainly would hope you'd give my project the same attention that I've given yours, at least if you're choosing to comment on it.

 

AGAIN, you provide a working SUIT with osCommerce and then we can start comparing the various solutions. Currently, as for a template system, there is only one working solution in this discussion and it is STS. Suit may be a working for other projects(?) but no one has presented a solution based on SUIT for osCommerce.

 

Claiming SUIT is not a working solution implies it does not work anywhere else. Yes, it works. You know this. suitframework.com runs on it, several of my sites, and apparently, several of uramagget's sites. Again, I didn't volunteer to write the implementation, but I'd hope the OSC community would be interested in using SUIT once they see it's benefits, those of which I'm happy to explain. I'm hope you'd be happy to listen to them.

 

Then again, you don't have to. This is Open Source, after all. If so, please leave the discussion to those interested in checking out the solution and giving their feedback and / or discussing alternatives. I don't think STS is an alternative to a real template engine. That doesn't make it useless, that just makes its name inaccurate. Based on your description, it sounds like it should be called "Simple Theme System".

 

I don't think a finished product is necessary to continue this discussion, especially when I'm sure uramagget wants to find volunteers here. Again, I have nothing to do with this implementation.

Link to comment
Share on other sites

As I see it, I'm not the one trying to implement SUIT so why do I need to defend it or look into it. I do develop STS and it is currently WORKING with osCommerce, SUIT does not. Therefore, I see no need for me to hunt down the code from another Open Source project just because some rude individual shoots his mouth off relating it to STS. He, however, should look into STS before he begins talking about something he knows nothing about. Same goes for you.

 

I opened this topic to debate the benefits of using SUIT over other solutions for OSC. Just because no implementation is available doesn't make this entire discussion void. If that's your entire reason for bringing down my topic, then leave this topic.

 

What you are saying boils down to, "I don't need to look into the subjects I talk about, because I know it all," which I find ruder than what you have given me credit for. You then say, "look at the source for STS if I want to learn more of it before speaking about." - Hello? I'm not implementing STS either; why should anyone have to read your source code before talking about your script if you are reluctant to do the same thing? What suddenly gave you the right to scream such air of arrogance and self-importance? You accuse me of not having looked into STS; what makes you think I haven't? Show me an instance where I have shown an obvious lack of knowledge of STS that needs to be addressed. I believe Brandon and I have addressed your misconceptions of the program, considering you admitted never actually looking into it based on the nature of your statement.

Link to comment
Share on other sites

Sum it up....

 

 

STS currently works with osCommerce. I wasn't the one comparing STS vs SUIT.

 

STS was brought up earlier in this discussion and was referred to in a negative sense by a pro-SUIT user. Claims were made that SUIT would do a better job than what is already in place (STS). Those comments were the only reason why I piped into this discussion as I feel someone who has never used STS was explaining it in a way that was not entirely true. I'm not here to push STS over anyother template system. I simply entered this discussion to shut someone up who doesn't know the full details of STS, but felt strong enough about it.

 

OK. My only thought (sorry for repeating sooooo many times) is..."OK. Show us SUIT working with osCommerce."

 

I agree that SUIT works but I do not agree/disagree that it would work with osCommerce as I do not have anything (SUIT & osC integrated) to show that. I could care less what your documentation says if it does not relate to osCommerce. Yes, you claim it works for other projects but even the other pro-SUIT user made the comment on how long it took him just to come up with a one page sample. It is going to take work and no one here is hindering you guys from putting something together. We will even provide assistance along the way if we see it approaching something useful.

 

Out of curriousity, I did go to your site the other day and look at the project. I seen a lot of similiarities to STS. Enough so that I really lost interest as I already have a working solution (that does more than merely replace as you described). But, with that said, if the other user or yourself come up with something useful for osCommerce, I sure will not be the stick in the mud and try to prevent it from happening. No, I would think that I would give it a serious look and if it looked good, I would try to support it.

 

thumbsup.gif Good luck Brandon (and the other guy) in coming up with something working with either the current stable osC RC2a version or the osCv3 development version.

 

 

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I opened this topic to debate the benefits of using SUIT over other solutions for OSC. Just because no implementation is available doesn't make this entire discussion void. If that's your entire reason for bringing down my topic, then leave this topic.

 

What you are saying boils down to, "I don't need to look into the subjects I talk about, because I know it all," which I find ruder than what you have given me credit for. You then say, "look at the source for STS if I want to learn more of it before speaking about." - Hello? I'm not implementing STS either; why should anyone have to read your source code before talking about your script if you are reluctant to do the same thing? What suddenly gave you the right to scream such air of arrogance and self-importance? You accuse me of not having looked into STS; what makes you think I haven't? Show me an instance where I have shown an obvious lack of knowledge of STS that needs to be addressed. I believe Brandon and I have addressed your misconceptions of the program, considering you admitted never actually looking into it based on the nature of your statement.

 

I feel you are nothing more than a troll. Sorry, but that is how you appear.

 

YOU ARE THE ONE WHO BROUGHT UP STS did you not?? You have proven throughout this thread to bring certain things up and then try to pin it on anyone else as if they were the one who brought it up. You brought up an existing working solution (STS) and ran your mouth off as if it was not worthy to exist. So, I say right back at you, "What suddenly gave you the right to scream such air of arrogance and self-importance?"

 

You didn't even know that STS was not being implemented in osCv3 but you came off that it was. I guess that is a pretty good indicator that obviously you didn't do your homework.

 

You know what, NO, I WILL NOT BE ASSISTING YOU GUYS IN YOUR SUIT EFFORTS. I don't see you as really wanting to help osCommerce but merely wanting to tout the SUIT flag to let everyone know that "We do osCommerce". Well, You don't. Not until you come up with something with osCommerce anyway.

 

It was mentioned that Zen Cart made a mess of Smarty Templates but who is to say you won't do the same thing concerning osCommerce and SUIT? We won't know until you actually do it.

 

Bottome line: STS was designed for osCommerce and it works with osCommerce. That is more than you can say for SUIT.

 

I only ask that you keep STS out of your discussions of future SUIT/osCommerce integration. STS has nothing to do with it so don't bring it up. You know SUIT so stick with coming up with a solution of it and osCommerce together.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

STS currently works with osCommerce. I wasn't the one comparing STS vs SUIT.

 

Yes, but you came in here telling me I was wrong, and your rhetoric never went farther than elementary school retorts.

 

STS was brought up earlier in this discussion and was referred to in a negative sense by a pro-SUIT user. Claims were made that SUIT would do a better job than what is already in place (STS). Those comments were the only reason why I piped into this discussion as I feel someone who has never used STS was explaining it in a way that was not entirely true. I'm not here to push STS over anyother template system. I simply entered this discussion to shut someone up who doesn't know the full details of STS, but felt strong enough about it.

 

I agree that SUIT works but I do not agree/disagree that it would work with osCommerce as I do not have anything (SUIT & osC integrated) to show that. I could care less what your documentation says if it does not relate to osCommerce. Yes, you claim it works for other projects but even the other pro-SUIT user made the comment on how long it took him just to come up with a one page sample. It is going to take work and no one here is hindering you guys from putting something together. We will even provide assistance along the way if we see it approaching something useful.

 

Out of curriousity, I did go to your site the other day and look at the project. I seen a lot of similiarities to STS. Enough so that I really lost interest as I already have a working solution (that does more than merely replace as you described).

 

What does it do then? I'm looking through your source and can't discern what it does other than replace strings and allow unsafe code to run. You speak of all these convenient management features, but they are meaningless when the subject is parsers. Template systems are not Theme systems.

 

But, with that said, if the other user or yourself come up with something useful for osCommerce, I sure will not be the stick in the mud and try to prevent it from happening. No, I would think that I would give it a serious look and if it looked good, I would try to support it.

thumbsup.gif Good luck Brandon (and the other guy) in coming up with something working with either the current stable osC RC2a version or the osCv3 development version.

 

Why do you have to resort to lying? I doubt you would look at the OSC implementation if you didn't even take the time to look into SUIT itself.

 

 

YOU ARE THE ONE WHO BROUGHT UP STS did you not?? You have proven throughout this thread to bring certain things up and then try to pin it on anyone else as if they were the one who brought it up. You brought up an existing working solution (STS) and ran your mouth off as if it was not worthy to exist. So, I say right back at you, "What suddenly gave you the right to scream such air of arrogance and self-importance?"

 

Unlike you however, I have actually looked at it, so the statements I'm making are pretty accurate unless you can demonstrate otherwise, which I'm very pessimistic of. Calling me a "troll" is pretty low; I told you why I disagree, and I addressed everything you had to say. You equally disrespected me by casting that all aside and forcing your own point of view on me as if everyone has to agree with you regardless of the reasons you give.

 

You didn't even know that STS was not being implemented in osCv3 but you came off that it was. I guess that is a pretty good indicator that obviously you didn't do your homework.

 

That does not say anything direct about my present knowledge of STS; it only suggests I didn't look into OSCv3 enough. Excuse me for confusing "templating system" and direct PHP code evaluation; they just look so alike that it's just so hard to tell whether or not STS is being used over regular PHP. It's really that superfluous and sloppy.

 

You know what, NO, I WILL NOT BE ASSISTING YOU GUYS IN YOUR SUIT EFFORTS. I don't see you as really wanting to help osCommerce but merely wanting to tout the SUIT flag to let everyone know that "We do osCommerce". Well, You don't. Not until you come up with something with osCommerce anyway.

 

If that's your opinion of me, then alright. By the way, I love how you grouped him and I together as if we were somehow affiliated when your anger is towards me. I never expected you to contribute anything from the beginning, considering you get so defensive when people speak out against your wares instead of discussing them as a reasonable adult.

 

It was mentioned that Zen Cart made a mess of Smarty Templates but who is to say you won't do the same thing concerning osCommerce and SUIT? We won't know until you actually do it.

 

I'm beginning to think you're just grasping at straws here, and in that process gone against your own position. Have you looked at ZenCart before agreeing with the assumption that it was made a mess of? I already know what my opinion is on ZenCart, but I doubt you "know" anything more than what has been said. Comparing SUIT and Smarty is silly, as the latter also directly executes code contrary to what the developers tell you, unlike SUIT; a moot point really.

 

 

Bottome line: STS was designed for osCommerce and it works with osCommerce. That is more than you can say for SUIT.

 

I'm speaking on general levels here, and you're going on irrelevant tangents mentioning how one is implemented and the other is not. Whether or not STS was designed specifically for OSC means nothing to its credits. PHP was designed for web development, but that doesn't make it the best language for web development out there, which is what you're implying by making these statements. That doesn't make what I'm saying unreliable or false, nor make you correct.

 

I only ask that you keep STS out of your discussions of future SUIT/osCommerce integration. STS has nothing to do with it so don't bring it up. You know SUIT so stick with coming up with a solution of it and osCommerce together.

 

I need a product to compare against suggesting how not do certain things, considering STS really does nothing that a real template system would do, so I guess I must apologize in advance. :)

Link to comment
Share on other sites

By the way, excuse the quote mix-up, I forgot to group quotes correctly:

 

STS was brought up earlier in this discussion and was referred to in a negative sense by a pro-SUIT user. Claims were made that SUIT would do a better job than what is already in place (STS). Those comments were the only reason why I piped into this discussion as I feel someone who has never used STS was explaining it in a way that was not entirely true. I'm not here to push STS over anyother template system. I simply entered this discussion to shut someone up who doesn't know the full details of STS, but felt strong enough about it.

 

I agree that SUIT works but I do not agree/disagree that it would work with osCommerce as I do not have anything (SUIT & osC integrated) to show that. I could care less what your documentation says if it does not relate to osCommerce. Yes, you claim it works for other projects but even the other pro-SUIT user made the comment on how long it took him just to come up with a one page sample.

 

So you don't care about being completely wrong as a result of making misrepresented and misinformed opinions about the templating system, so long as you get your say in. That's a fine example of being open-source but closed-minded. Since you don't want to discuss it, that makes two of us.

 

There is no reason why SUIT shouldn't work with OSC, because it has no dependencies in itself. In addition, the one page example I posted before took long to convert because that's how damn messy the current implementation is; that has nothing to do with SUIT's effectiveness. It was also made on the spot, not indicative of actual progress, which is not a con; it's easy to conceptualize how a template would look in SUIT, a pro exclusive to it because the formatting is bound to a consistent syntax and not every ASCII character ever made.

Link to comment
Share on other sites

Please, stop making conversation with me. I am done with this thread and all of it's misrepresentations.

 

Then stop infesting my topic with your drivel already; I don't particularly care about what you have to say now considering you reduced yourself to a little child in less than a post.

Link to comment
Share on other sites

It's apparent that bkellum has no interest in discussing this further. Moving forward...

 

How IS your implementation going, urmagget, if you don't mind me asking?

 

I'll link to a repository once I begin hacking something together, but since the current v3 repository has no installer present, my only real choice is to test it on 2.2RC2.

Link to comment
Share on other sites

I believe you mentioned that earlier in the topic. You might want to start a new topic for that, because I'm pretty sure the support team is going to assume all of the new posts here will be debate and not support requets.

Link to comment
Share on other sites

Then stop infesting my topic with your drivel already; I don't particularly care about what you have to say now considering you reduced yourself to a little child in less than a post.

 

Give me a break!

 

You brought up STS in a negative, unlearned manner so that gave me the right to defend my contribution to osCommerce, your topic or not.

 

  • "Forgive me, although I'm not sure if I understand why a STS would be necessary if there are other systems that accomplish this but in a more proven true and elegant way. It seems like all of the work put into STS would have been better directed towards generally cleaning OSC's source code and addressing other important issues."

If you want to be treated with respect, treat others with respect first. You showed me disrespect right from the beginning with your comments above. You bashed STS without knowing much to little of what STS is. Who are you to say that STS is not a proven true and elegant contribution? Yes, you were the first to be, how did you put it, "air of arrogance and self-importance?" You should not talk about other people's work in that manner, especially when it is free to the community.

  • "Granted, STS does not seem to fulfill much; a quick look through the actual templates files:
    [color="#666600"]<?[/color]php DEFINE [color="#666600"]([/color][color="#008800"]'STS_END_CHAR'[/color][color="#666600"],[/color] [color="#008800"]'$'[/color][color="#666600"]);[/color] [color="#666600"]?>[/color]
    
    [color="#666600"]<?[/color]php DEFINE [color="#666600"]([/color][color="#008800"]'STS_CONTENT_END_CHAR'[/color][color="#666600"],[/color] [color="#008800"]'$'[/color][color="#666600"]);[/color] [color="#666600"]?>[/color]


     

    This should not be there. I do not think it would be a bad idea at all to invest time in having SUIT support built-in to OSC. If it is dependent on a contribution, I have no issue in modifying the core files to make use of the framework."

Again, you are bashing STS. You claim, "STS does not fulfill much" and yet you know so little about it. You ARE NOT FACTUAL as Brandon states.

I answered your bash and told you the code you displayed above did not have to be in the template. I also told you that it was an option for the designer to insert PHP if he wanted to. This does not make STS a bad system.

 

 

 

  • " I have seen STS implemented in v3 through the latest revision, and I find the actual STS system unsuitable for what the needs of an e-commerce application are. Hence, I volunteered to fork it and implement a more SUITable alternative, to which a veteran responded may be included if they like the changes. Thus, I would not be complaining; I would be solving. Seen in this light, your conclusion of my intentions is based on a misunderstanding."

You flat out lied here and yet you called me a lyer? You never seen STS implemented in osCv3 because it isn't there. You didn't take the time to "research" your claim but yet you bash me to not digging into SUIT? I mention this again because it is one of the key reasons I entered "your topic".

 

You are entiltled to your opinions but that doesn't mean you need to be rude by bashing other people's work. I have never bashed your work and yet you bash STS as being "unsuitable for what the needs of an e-commerce application are". Who is being the Jerk here? You drew first blood here my friend and now you accuse me of being childish? You owe this community and myself particularly an apology.

 

  • " If you want to add functionality to your templates in SUIT, you can either make a rule for it, which is explained in the documentation, or you can use the [call /] and [transform /] rules for the templating module to call a function."

STS does the same thing in the form of modules, which is a very typical method for osCommerce, simialar to payment and shipping modules. If you would have taken the time to review STS thoroughly, you would have seen this. Again, you ignored my first response to this in where I told you that it was an "option" for the designer to insert PHP into the template. STS separates the design from the function very similar to how SUIT has been described in this topic. STS uses the "start capture" routine for making variables outside of the template, similar to how SUIT uses the "rulebox" as described within this topic.

 

  • "Oh, silly me; you are correct; OSCv3 does not use STS. Upon further lookup, it uses nothing particularly close to templating, which makes it all the more of a justification for SUIT to replace the current homebrew solution. I have seen the source for STS and have seen examples of it in action; it's not a templating system in the strictest sense of the term. Templating is not about simply replacing some tokens with variables."

Thanks for correcting yourself after I pointed this out to you. But, then you totally remove your sincere apology by being rude again. I don't really care at this point what you think of STS and really wish you would just shut your trap about it. You know nothing about it. Your rude comments and disrespect caused me to stop "proving" STS to you as it was appearent that you were not going to give it a fair review anyway.

I will stop there but I could continue to take you crap point by point and continue to show that it was you that brought this on, not me.

 

 

  • "It's apparent that bkellum has no interest in discussing this further. Moving forward...
     
    How IS your implementation going, urmagget, if you don't mind me asking?"

Now, stop polluting the osCommerce forums with your fork idea. Create your own forum and discuss it there. We do not discuss forks in this forum. Read the forum rules. Oh wait a minute, that would be similar to valid research...

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I'll conclude ( I think ) on a general note ( as opposed to pure osCommerce ) by returning to my original thoughts on templating.

 

PHP began as a template engine gluing various C functions together to make HTML pages, obviously it has now evolved over time into a far less simple general purpose and versatile scripting language. It still however excels as a template language.

 

The important factor to my mind is separating display ( layout ) and application logic. The only downside in using the same language is that extra care has to be taken in maintaining this separation.

 

Security has been mentioned but PHP like any other language can be misused, security is only an issue when poor coding introduces such an issue. ( eval() etc. in a template would be folly ).

 

Also worth mentioning is that logic can and should be used in templates, as long as it is display and not application logic. PHP assists here with an alternative syntax for ( e.g. if, while, for, foreach, switch ) which again makes template logic and the embedding of PHP into HTML extremely easy.

 

For web designers PHP and its syntax is also a very good choice as its syntax is now so widely used, you'd be hard pressed to find a web designer that doesn't understand basic PHP syntax.

 

Template systems are occasionally used to encourage separation of application and display logic but for my part I shall stick to PHP unless I come across a compelling reason to change.

Link to comment
Share on other sites

If you want to be treated with respect, treat others with respect first. You showed me disrespect right from the beginning with your comments above. You bashed STS without knowing much to little of what STS is. Who are you to say that STS is not a proven true and elegant contribution? Yes, you were the first to be, how did you put it, "air of arrogance and self-importance?" You should not talk about other people's work in that manner, especially when it is free to the community.

 

I don't care if it's "free to the community." That doesn't dispute the value of my claims in any way. SUIT is Open-Source, but just because some people have a beef with it doesn't mean we'll throw that line about every time a complaint is made. You need to learn that open-source means much more than, "here is the source. I don't give a shit about what you think because it's open-source so anything you say about it that proves that what I distributed may be problematic is your problem and not a problem with me."

 

You brought up STS in a negative, unlearned manner so that gave me the right to defend my contribution to osCommerce, your topic or not.

Again, you are bashing STS. You claim, "STS does not fulfill much" and yet you know so little about it. You ARE NOT FACTUAL as Brandon states.

 

I answered your bash and told you the code you displayed above did not have to be in the template. I also told you that it was an option for the designer to insert PHP if he wanted to. This does not make STS a bad system.

 

STS does the same thing in the form of modules, which is a very typical method for osCommerce, simialar to payment and shipping modules. If you would have taken the time to review STS thoroughly, you would have seen this. Again, you ignored my first response to this in where I told you that it was an "option" for the designer to insert PHP into the template. STS separates the design from the function very similar to how SUIT has been described in this topic. STS uses the "start capture" routine for making variables outside of the template, similar to how SUIT uses the "rulebox" as described within this topic.

 

You flat out lied here and yet you called me a lyer? You never seen STS implemented in osCv3 because it isn't there. You didn't take the time to "research" your claim but yet you bash me to not digging into SUIT? I mention this again because it is one of the key reasons I entered "your topic".

 

You are entiltled to your opinions but that doesn't mean you need to be rude by bashing other people's work. I have never bashed your work and yet you bash STS as being "unsuitable for what the needs of an e-commerce application are". Who is being the Jerk here? You drew first blood here my friend and now you accuse me of being childish? You owe this community and myself particularly an apology.

 

Thanks for correcting yourself after I pointed this out to you. But, then you totally remove your sincere apology by being rude again. I don't really care at this point what you think of STS and really wish you would just shut your trap about it. You know nothing about it. Your rude comments and disrespect caused me to stop "proving" STS to you as it was appearent that you were not going to give it a fair review anyway.

I will stop there but I could continue to take you crap point by point and continue to show that it was you that brought this on, not me.

 

I'm grouping all of this together, because it is the same point again and again, only paraphrased. You responded to my query about direct code evaluation only once, but when I brought this out in response:

 

Those variables should be defined outside of the template' date=' not inside. If you allow code to be executed in your template, then that is a security risk, because if an attacker gains access to your templates somehow, it would all be a matter of inserting some arbitrary code in the end that compromises you. SUIT doesn't allow direct code execution in templates of course, making it much more secure in this respect. If you want to add functionality to your templates in SUIT, you can either make a rule for it, which is explained in the documentation, or you can use the [call /'] and [transform /] rules for the templating module to call a function.

 

Your entire argument fell apart, where you never addressed it again. Thus, you conceded my point. What you are doing is pretty bad, as I have countlessly discussed, and as you have countlessly ignored. If you can prove otherwise, then do so; otherwise, put your money in your mouth. I don't need to apologize to you; you are being a snob and you only further-proved it by posting like an elementary student in an attempt to mock me. I don't owe anything to you; I shouldn't have to give my rapport to you just because you don't like me criticizing your theme system. You're so delved in your own denial that you're distorting the truth by saying that me realistically criticizing your theme system is "bashing." - I was harsh about it, but that doesn't make it bashing. Bashing is insulting one's work without providing any objective reasoning whatsoever, and I have done quite the opposite of that. If you don't like criticism, then don't publish your wares. If you don't want to listen and be counter-productive, you can do that too, and the best place is outside my topic.

 

Your theme system doesn't use stack-based parsing, so it's definitely not a template system. You're just doing what OSC does right now with the addition of a few str_replace() calls. By this definition, STS really isn't doing anything as far as truly separating controller logic and view logic because of what I have described above. Separating the two means that I should only be able to use controller logic in controllers, and template logic in templates. Directly evaluating code is not templating; you might as well just stick everything back into the controller. There is a direct difference between the two types of logic, and I have shown in the above quote that what you're doing is insecure and not setting a proper level of abstraction. To properly pull off templating, there must be proper levels of abstraction in the view. In STS, this is not the case, therefore STS is a theme system, and nothing more.

 

I brought it up yes, but the fact that I did bring up STS is barely relevant to what you and I are discussing. SUIT is out of STS' league, and the fact that you can tout them as one of the same is ridiculous. They are nothing alike. I will repeat again that I have looked at STS already, so all of the statements I am making are very well informed. Like I said, you haven't contradicted any of them.

 

Now, stop polluting the osCommerce forums with your fork idea. Create your own forum and discuss it there. We do not discuss forks in this forum. Read the forum rules. Oh wait a minute, that would be similar to valid research...

 

I don't particularly care about the rules, but when you blatantly lie about their contents in an attempt to faze me:

 

http://www.oscommerce.com/forums/index.php?app=forums&module=extras&section=boardrules

 

There is no rule against discussing forks here, especially when this sort of core is just a modification to some core functionality, not newer software in itself. In addition, everyone here, including you, has suggested to fork the software, so in effect if this was against the rules, you would be breaking them. Sounds like you're just insecure that SUIT would be a lot better than STS would be, which is understandable. Now if you are done making a fool of yourself, you can leave my topic.

 

PHP began as a template engine gluing various C functions together to make HTML pages, obviously it has now evolved over time into a far less simple general purpose and versatile scripting language. It still however excels as a template language.

 

I see this argument all of the time. Just because it started off as a templating engine doesn't make it particularly good as one. PHP is a horrible templating language; I've emphasized that with proper reasoning in my previous responses.

 

The important factor to my mind is separating display ( layout ) and application logic. The only downside in using the same language is that extra care has to be taken in maintaining this separation.

 

Security has been mentioned but PHP like any other language can be misused, security is only an issue when poor coding introduces such an issue. ( eval() etc. in a template would be folly ).

 

Also worth mentioning is that logic can and should be used in templates, as long as it is display and not application logic. PHP assists here with an alternative syntax for ( e.g. if, while, for, foreach, switch ) which again makes template logic and the embedding of PHP into HTML extremely easy.

 

All this "extra care" should be done by the templating system, not the designer. I should never have to escape my output manually unless I say otherwise, nor should I ever be given be the option to run code that can change server state in what appears to be application logic. Template logic and application logic are different, but PHP is application logic by definition, which makes it even more dangerous and inapplicable for it to serve as template logic.

 

Your quip on conditionals and other logic is easily addressed:

 

[if condition="users"]
   [loop value="row" iterable="users"]
       [var]row.username[/var]
   [/loop]
[/if]

 

Your point on security is rather naive. If something can go wrong, then it will. It doesn't take an eval() to destroy everything in a "PHP template"; it just takes me getting into your "template" and inserting some arbitrary code such as a SQL query that deletes every single table in your database; or better yet, one that steals credit card information from every single customer. People misuse programming languages and write insecure applications because the language doesn't have any strictness. In the same way, if templating is not strict enough, it becomes just another part of programming, when it is obviously only to be seen as another part of design. That is why creations such as Smarty and STS need to be abolished.

 

For web designers PHP and its syntax is also a very good choice as its syntax is now so widely used, you'd be hard pressed to find a web designer that doesn't understand basic PHP syntax.

 

Template systems are occasionally used to encourage separation of application and display logic but for my part I shall stick to PHP unless I come across a compelling reason to change.

 

"Compelling reason" like what? What reasons do you have for not using one? Web apps should be structured, not just because it's cleaner, but because maintenance is a lot easier. I hold that PHP is quite a terrible language, but that's not what we're debating here. Designers shouldn't have to learn a programming language just because you didn't want to use a templating system. It's much easier to learn how to use a template system than it is to learn how to program in PHP because templating is minimalistic mark-up by definition, and it solves the issue of giving too much for the developer to work with. People wouldn't be building templating engines today if that wasn't already an issue, so I think you're missing the big picture here.

Link to comment
Share on other sites

Now, stop polluting the osCommerce forums with your fork idea. Create your own forum and discuss it there. We do not discuss forks in this forum. Read the forum rules. Oh wait a minute, that would be similar to valid research...

 

I don't get it. When I give you a "respectful as well as helpful" post and don't mention anything about STS because I don't know much about it, everything is fine. But, when ask you to defend it, which you wanted to do, and give some constructive criticism based on the limited material you gave me to look at, I'm polluting the forums with a fork idea. You said you were looking forward to a fork until this began, and everyone else agreed that uramagget at least deserved the chance to prove himself and solicit support from the community. I didn't like the method he was making in discussing this either, and that's why I posted trying to get the discussion on a rational track, much to your agreement, and now you retort with this. Most of his posts were admittedly rash, but at least they contained content and a certain level of truth to them, which apparently, you interpreted as "bashing" because he didn't like your system simply because you didn't bother to explain any of its core features to us. Again, I just don't get it.

 

It remains that you have yet to explain what your software does regarding transforming templates past str_replace, which was only found by digging through the source code. I figured, as such, STS was a different kind of script, so I figured both could coexist. If you don't want them to, nor want STS to be discussed in this topic, that's your decision, but I don't see how posts like "blah blah blah" are helpful in any way. No one else has complained about the subject of this topic, and everyone else is making rational points.

 

I'll conclude ( I think ) on a general note ( as opposed to pure osCommerce ) by returning to my original thoughts on templating.

 

PHP began as a template engine gluing various C functions together to make HTML pages, obviously it has now evolved over time into a far less simple general purpose and versatile scripting language. It still however excels as a template language.

 

The important factor to my mind is separating display ( layout ) and application logic. The only downside in using the same language is that extra care has to be taken in maintaining this separation.

 

Security has been mentioned but PHP like any other language can be misused, security is only an issue when poor coding introduces such an issue. ( eval() etc. in a template would be folly ).

 

Also worth mentioning is that logic can and should be used in templates, as long as it is display and not application logic. PHP assists here with an alternative syntax for ( e.g. if, while, for, foreach, switch ) which again makes template logic and the embedding of PHP into HTML extremely easy.

 

For web designers PHP and its syntax is also a very good choice as its syntax is now so widely used, you'd be hard pressed to find a web designer that doesn't understand basic PHP syntax.

 

Template systems are occasionally used to encourage separation of application and display logic but for my part I shall stick to PHP unless I come across a compelling reason to change.

 

I never thought that PHP doesn't do the job, I just figured it doesn't do the job well enough, and I've given my reasons both here and on the website. More importantly than that, I've never seen an application of PHP templates that seemed to strictly display using logic, while SUIT's logical statements are specifically used for formatting data and nothing else. That might not be a sufficient enough reason to use SUIT for you, and that's your opinion. However, I sure hope that you don't want to "conclude" your part of this discussion simply because of a negative episode of posts. I'm sure that if you looked at more of the material on SUIT, you'd have several interesting points to contribute, and I'm open to criticism as SUIT was essentially built off of it.

Link to comment
Share on other sites

I see this argument all of the time. Just because it started off as a templating engine doesn't make it particularly good as one.

PHP is a horrible templating language; I've emphasized that with proper reasoning in my previous responses.

 

Simply your opinion and one I happen to totally disagree with. I think Zend would be likely to disagree also.

 

All this "extra care" should be done by the templating system, not the designer.

I should never have to escape my output manually unless I say otherwise, nor should I ever be given be the option to run code that can change server state in what appears to be application logic. Template logic and application logic are different, but PHP is application logic by definition, which makes it even more dangerous and inapplicable for it to serve as template logic.

 

No it shouldn't! template systems should stick to what they are .. display and layout .. what is fed into them and security is the job of the application.

 

You don't need a template system to auto escape or otherwise sanitise user data.

 

Your quip on conditionals and other logic is easily addressed:

 

Anything is easily addressed but .. as in your case .. addressing does not mean answering.

 

Whatever minor logic control your system has it is not within a million miles of the power of PHP. Display logic can be very complex in these times of complex web sites why would I use a system with such restricted power when I have PHP?

 

Your point on security is rather naive. If something can go wrong, then it will.

 

Nothing naive about me matey! powerful languages with powerful functions need to be used with the propper care.

It is ridiculous however to suggest that one stops using powerful languages and return to the dark ages simply because some developers write insecure code.

 

It doesn't take an eval() to destroy everything in a "PHP template"; it just takes me getting into your "template" and inserting some arbitrary code such as a SQL query that deletes every single table in your database; or better yet, one that steals credit card information from every single customer. People misuse programming languages and write insecure applications because the language doesn't have any strictness.

 

And your chosen subject on Mastermind will be the screaming bl@@dy obvious!

 

So what!! what do we do? return to non dynamic HTML? Of course we don't. It doesn't matter a jot how secure you believe your template files are .. the rest of the application files will still be PHP ( or any number of others ).

 

"Compelling reason" like what? What reasons do you have for not using one?

 

Loads ( as I mentioned previously ) PHP is enormously powerful and getting richer all the time, it is an excellent and versatile language

which can lend itself extremely well to a variety of different templating methodologies with little in the way of restriction.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...