<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Symfony Templates and Ruby&#8217;s ERb</title>
	<atom:link href="http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/</link>
	<description></description>
	<pubDate>Fri, 25 Jul 2008 14:32:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Sinon</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-53234</link>
		<dc:creator>Sinon</dc:creator>
		<pubDate>Thu, 11 Oct 2007 12:45:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-53234</guid>
		<description>mate, good points.. very interesting.</description>
		<content:encoded><![CDATA[<p>mate, good points.. very interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anirudh</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-22979</link>
		<dc:creator>anirudh</dc:creator>
		<pubDate>Fri, 02 Mar 2007 11:27:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-22979</guid>
		<description>i wan to know the clear syntax of erb tags</description>
		<content:encoded><![CDATA[<p>i wan to know the clear syntax of erb tags</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: troelskn</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-407</link>
		<dc:creator>troelskn</dc:creator>
		<pubDate>Tue, 09 May 2006 13:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-407</guid>
		<description>&lt;blockquote&gt;
Templates should never be doing operations that need to be silenced anyway.
&lt;/blockquote&gt;
I don't fully agree with that. I always run with full error-reporting, which can lead to some unwieldy syntax, if you aren't sure if a variable is set. Using @ in front of the variable, makes it equal null. I use that quite often in templates.
Maybe the I'm the one who's doing it wrong though - could be I should just lower the error-level inside templates, to ignore warnings. Are you guys doing that ?</description>
		<content:encoded><![CDATA[<blockquote><p>
Templates should never be doing operations that need to be silenced anyway.
</p></blockquote>
<p>I don&#8217;t fully agree with that. I always run with full error-reporting, which can lead to some unwieldy syntax, if you aren&#8217;t sure if a variable is set. Using @ in front of the variable, makes it equal null. I use that quite often in templates.<br />
Maybe the I&#8217;m the one who&#8217;s doing it wrong though - could be I should just lower the error-level inside templates, to ignore warnings. Are you guys doing that ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Naberezny</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-310</link>
		<dc:creator>Mike Naberezny</dc:creator>
		<pubDate>Wed, 22 Feb 2006 05:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-310</guid>
		<description>That's one way to think about it.  You could also build a plugin mechanism for template helpers to do things like escaping, as Paul has done in Savant.  Also, the example template class is very crude in that it does nothing to sanitize data going into it.  Another way to approach this problem would be to use __set() to filter all data put into the template with a default filtration strategy, and then have a separate assign() method to allow for filtering by different strategies.</description>
		<content:encoded><![CDATA[<p>That&#8217;s one way to think about it.  You could also build a plugin mechanism for template helpers to do things like escaping, as Paul has done in Savant.  Also, the example template class is very crude in that it does nothing to sanitize data going into it.  Another way to approach this problem would be to use __set() to filter all data put into the template with a default filtration strategy, and then have a separate assign() method to allow for filtering by different strategies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-309</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Wed, 22 Feb 2006 05:08:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-309</guid>
		<description>What about replacing all echos and prints:

echo @$XXX
 
becomes:

echo htmlentities(XXX, ENT_QUOTES)

Maybe change the @ to ! for printing raw data:

!$body_text

Hmm... Actually, just replace "echo" with "echo htmlentities(XXX, ENT_QUOTES)" and create a new function for printing raw:

echor @$product_details

???

-m</description>
		<content:encoded><![CDATA[<p>What about replacing all echos and prints:</p>
<p>echo @$XXX</p>
<p>becomes:</p>
<p>echo htmlentities(XXX, ENT_QUOTES)</p>
<p>Maybe change the @ to ! for printing raw data:</p>
<p>!$body_text</p>
<p>Hmm&#8230; Actually, just replace &#8220;echo&#8221; with &#8220;echo htmlentities(XXX, ENT_QUOTES)&#8221; and create a new function for printing raw:</p>
<p>echor @$product_details</p>
<p>???</p>
<p>-m</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Naberezny</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-308</link>
		<dc:creator>Mike Naberezny</dc:creator>
		<pubDate>Tue, 21 Feb 2006 04:59:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-308</guid>
		<description>It's unwise and generally regarded as a beginner's mistake to rely on short_open_tag because it is one of the most frequently disabled php.ini settings, especially on shared hosts.  short_open_tag is enabled in php.ini-dist but disabled in php.ini-recommended.</description>
		<content:encoded><![CDATA[<p>It&#8217;s unwise and generally regarded as a beginner&#8217;s mistake to rely on short_open_tag because it is one of the most frequently disabled php.ini settings, especially on shared hosts.  short_open_tag is enabled in php.ini-dist but disabled in php.ini-recommended.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rod</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-307</link>
		<dc:creator>Rod</dc:creator>
		<pubDate>Tue, 21 Feb 2006 04:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-307</guid>
		<description>
[If] short_open_tag is disabled, the resulting PHP syntax can be a bit unwieldy:

var_name ?&#62;

Compare this to the succinct but equally powerful ERb:




But when exactly is short_open_tag not enabled?  it is by default, and therefore you can use:



which is just as concise.</description>
		<content:encoded><![CDATA[<p>[If] short_open_tag is disabled, the resulting PHP syntax can be a bit unwieldy:</p>
<p>var_name ?&gt;</p>
<p>Compare this to the succinct but equally powerful ERb:</p>
<p>But when exactly is short_open_tag not enabled?  it is by default, and therefore you can use:</p>
<p>which is just as concise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jake Grimley</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-306</link>
		<dc:creator>Jake Grimley</dc:creator>
		<pubDate>Mon, 20 Feb 2006 15:23:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-306</guid>
		<description>Yeah point taken. If I could have made a better suggestion guess I would have in my original post. 

I suppose it's a matter of context too, I mean in the short-tag style using = in the context of  has a different meaning to using it as the assignment operator and AFAIK this symbol was chosen purely because it already had that meaning in ASP and JSP. So perhaps using @ within short tags in the interests of associating with ERB is OK.

See -- I've talked myself round... Now if somebody could just find some way to allow us to pass arrays to methods without using the clumsy array() syntax perhaps I'll stop coveting RoR!</description>
		<content:encoded><![CDATA[<p>Yeah point taken. If I could have made a better suggestion guess I would have in my original post. </p>
<p>I suppose it&#8217;s a matter of context too, I mean in the short-tag style using = in the context of  has a different meaning to using it as the assignment operator and AFAIK this symbol was chosen purely because it already had that meaning in ASP and JSP. So perhaps using @ within short tags in the interests of associating with ERB is OK.</p>
<p>See &#8212; I&#8217;ve talked myself round&#8230; Now if somebody could just find some way to allow us to pass arrays to methods without using the clumsy array() syntax perhaps I&#8217;ll stop coveting RoR!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul M. Jones</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-305</link>
		<dc:creator>Paul M. Jones</dc:creator>
		<pubDate>Mon, 20 Feb 2006 13:57:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-305</guid>
		<description>Oh, and Mike -- really neat idea man.  :-)</description>
		<content:encoded><![CDATA[<p>Oh, and Mike &#8212; really neat idea man.  :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul M. Jones</title>
		<link>http://mikenaberezny.com/2006/02/19/symphony-templates-ruby-erb/#comment-304</link>
		<dc:creator>Paul M. Jones</dc:creator>
		<pubDate>Mon, 20 Feb 2006 13:56:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikenaberezny.com/archives/40#comment-304</guid>
		<description>Hi Jake -- I don't think there are many unused symbols.  Here are the non-word characters on my keyboard:

~ ` ! @ # $ % ^ &#38; * ( ) - = + { } [ ] \ &#124; : " ; ' , . /  ?

I think they *all* have some special meaning to PHP.  The question then is to pick the "least-worst" symbol, because there's isn't a "good" one.  I think the @ sign, of them, is a good choice.</description>
		<content:encoded><![CDATA[<p>Hi Jake &#8212; I don&#8217;t think there are many unused symbols.  Here are the non-word characters on my keyboard:</p>
<p>~ ` ! @ # $ % ^ &amp; * ( ) - = + { } [ ] \ | : &#8221; ; &#8216; , . /  ?</p>
<p>I think they *all* have some special meaning to PHP.  The question then is to pick the &#8220;least-worst&#8221; symbol, because there&#8217;s isn&#8217;t a &#8220;good&#8221; one.  I think the @ sign, of them, is a good choice.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.529 seconds -->
<!-- Cached page served by WP-Cache -->
