Post by Qphoria » Thu Mar 31, 2011 11:33 pm

I guess the question is .. why?

So you have

Smarty:

Code: Select all

{$address.address_id}
PHP:

Code: Select all

<? $address['address_id'] ?>

Smarty:

Code: Select all

{foreach from=$addresses item=address)}
    ....
{/foreach}
PHP:

Code: Select all

<? foreach ($addresses as $address) { ?>
   ....
<? } ?>
To me it looks like just a different syntax with no real value.
Maybe there is more but it just looks more or less the same in all examples I've seen.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by SapporoGuy » Sat Apr 02, 2011 3:40 pm

::) Still sitting on the fence regarding this.

But it really does seem that having the "ability" would be a good move. That way those who do and those who don't will be happy.

930sc ... because it is fun!


User avatar
Active Member

Posts

Joined
Mon Nov 01, 2010 7:29 pm

Post by JNeuhoff » Sat Apr 02, 2011 4:14 pm

I guess the advantages of Smarty are:

1) being language agnostic
2) familiarity by many programmers

Of course, 1) is not so much relevant here, because OpenCart is only available in PHP. But 2) might be a good reason for some template designers to embrace OpenCart. So yes, it will help OpenCart to become even more widely adopted.

Override Engine * Integrated VQMod * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Rich Snippets * Google Tag Manager * Export/Import Tool * SpamBot Buster * Survey Plus


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Xsecrets » Sun Apr 03, 2011 12:30 am

JNeuhoff wrote:I guess the advantages of Smarty are:

1) being language agnostic
2) familiarity by many programmers

Of course, 1) is not so much relevant here, because OpenCart is only available in PHP. But 2) might be a good reason for some template designers to embrace OpenCart. So yes, it will help OpenCart to become even more widely adopted.
of course it could drive people away too, I know there are several developers here who chose opencart over presta mostly because presta used smarty.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Sun Apr 03, 2011 12:56 am

JNs reasoning is the first good reason I've heard on this topic

But I agree with xsecrets and sapparo that it would only be good as an additional optional method. But then we will start having mixed templates but thats the compromise

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webcomm » Wed Apr 13, 2011 6:31 am

Have to say I like using specialized template languages more than using PHP in templates. I have never understood the argument that says "PHP is already a templating language". Even if we grant that PHP is a templating language, it's not a very good templating language because it is too verbose. The best template language I've used is Django's.

Newbie

Posts

Joined
Wed Apr 13, 2011 6:19 am

Post by Xsecrets » Wed Apr 13, 2011 6:33 am

webcomm wrote:Have to say I like using specialized template languages more than using PHP in templates. I have never understood the argument that says "PHP is already a templating language". Even if we grant that PHP is a templating language, it's not a very good templating language because it is too verbose. The best template language I've used is Django's.
I've never understood the argument that php is too verbose. have you actually looked at smarty the one everyone wants to use? To me it's much more verbose and confusing than php itself.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Wed Apr 13, 2011 8:11 am

Consoles vs PC, xbox vs ps, iOS vs Android, smarty vs php... If you want it, create the integration for it and use it. If we want it it, we'll add it. At the moment, we don't want it.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by webcomm » Wed Apr 13, 2011 9:49 pm

ave you actually looked at smarty the one everyone wants to use?
I've never used smarty specifically. Just saying the idea of a (non-PHP) templating language is not a bad one, in my experience.

Newbie

Posts

Joined
Wed Apr 13, 2011 6:19 am

Post by marc_cole » Thu Apr 14, 2011 1:19 am

webcomm wrote:The best template language I've used is Django's.
webcomm wrote:I've never used smarty specifically. Just saying the idea of a (non-PHP) templating language is not a bad one, in my experience.
Unfortunately, you don't say why.

From what I've read so far, I seriously hope we don't adopt Smarty. I'm already learning PHP, so why should I learn another language simply because "everyone else is doing it"? Unless Smarty was to give us a real good reason to switch to it, my vote is 'no'.

Earlier in this thread I mention PHPTAL. It looks like only one other person agrees with me — sort of. PHPTAL is the only one I've run across that would actually benefit OC developers; allowing them to develop visually in Dreamweaver. Apart from that, I personally don't see any reason to change what we have.

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by webcomm » Fri Apr 15, 2011 12:29 am

Unfortunately, you don't say why.
I've spent many 100s of hours working with systems that use PHP as the templating language and many 100s of hours working with systems that use a different templating language. I feel like I'm a bit more productive with the latter, since a specialized templating language tends to make templates more readable, in my experience.

It's just a matter of personal preference. It's not the kind of thing that would strongly influence whether I use a particular framework or not. It's not among the most important considerations.

Newbie

Posts

Joined
Wed Apr 13, 2011 6:19 am
Who is online

Users browsing this forum: No registered users and 8 guests