<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ExtPHP: An ExtJS Converter/Wrapper for PHP Developers</title>
	<atom:link href="http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/feed/" rel="self" type="application/rss+xml" />
	<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/</link>
	<description>Variously Interesting Projects</description>
	<lastBuildDate>Thu, 18 Feb 2010 15:12:08 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jefferson GirÃƒÂ£o &#187; Blog Archive &#187; PHP-Ext 0.8.3 lanÃƒÂ§ado</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17225</link>
		<dc:creator>Jefferson GirÃƒÂ£o &#187; Blog Archive &#187; PHP-Ext 0.8.3 lanÃƒÂ§ado</dc:creator>
		<pubDate>Wed, 13 Aug 2008 13:41:51 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17225</guid>
		<description>[...] VocÃƒÂ© ÃƒÂ© um desenvolvedor PHP pensando em utilizar a ExtJS mas nÃƒÂ£o estÃƒÂ¡ afim de escrever toneladas de javascript? DÃƒÂª uma olhada no PHP-Ext, ele ÃƒÂ© um wrapper que permite que vocÃƒÂª codifique seus widgets com PHP mesmo. Pra quem utiliza o Zend Framework ele se torna bem interessante frente ÃƒÂ  alternativas como a ExtPHP pois jÃƒÂ¡ segue a nomenclatura de classes utilizada no ZF. Em breve pretendo postar um tutorial sobre PHP-Ext + Zend Framework, aguardem e confiem ;^D. [...]</description>
		<content:encoded><![CDATA[<p>[...] VocÃƒÂ© ÃƒÂ© um desenvolvedor PHP pensando em utilizar a ExtJS mas nÃƒÂ£o estÃƒÂ¡ afim de escrever toneladas de javascript? DÃƒÂª uma olhada no PHP-Ext, ele ÃƒÂ© um wrapper que permite que vocÃƒÂª codifique seus widgets com PHP mesmo. Pra quem utiliza o Zend Framework ele se torna bem interessante frente ÃƒÂ  alternativas como a ExtPHP pois jÃƒÂ¡ segue a nomenclatura de classes utilizada no ZF. Em breve pretendo postar um tutorial sobre PHP-Ext + Zend Framework, aguardem e confiem ;^D. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MusicLover</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17211</link>
		<dc:creator>MusicLover</dc:creator>
		<pubDate>Thu, 24 Jul 2008 12:43:54 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17211</guid>
		<description>I think the next thing you need to look at including is Javascript functions passed as part of a specification array, one example being renderer in the column definitions for ExtGrid.  

when inputting the array using the php

&#039;renderer&#039; =&gt; &quot;Ext.util.Format.dateRenderer(&#039;d.m.y&#039;)&quot;

this comes out Json-ed as 

&quot;renderer&quot;:&quot;Ext.util.Format.dateRenderer(&#039;d.m.y&#039;)&quot; 

so obviously the Ext ignores this renderer adn just uses the default one

the easiest hack for this is to do a str_replace on the json array string however I&#039;m not sure on how accurate that would end-up

Still, rather good project though, although I&#039;d point out in the example with the new ExtJS documentation I had to add:
		$name = str_replace(&#039;.Data.&#039;, &#039;.data.&#039;, $name);

I started work on one specifically for grid before I though surely someone must have written one of these before, but your code seems to be having the same problem as mine does.</description>
		<content:encoded><![CDATA[<p>I think the next thing you need to look at including is Javascript functions passed as part of a specification array, one example being renderer in the column definitions for ExtGrid.  </p>
<p>when inputting the array using the php</p>
<p>&#8216;renderer&#8217; => &#8220;Ext.util.Format.dateRenderer(&#8217;d.m.y&#8217;)&#8221;</p>
<p>this comes out Json-ed as </p>
<p>&#8220;renderer&#8221;:&#8221;Ext.util.Format.dateRenderer(&#8217;d.m.y&#8217;)&#8221; </p>
<p>so obviously the Ext ignores this renderer adn just uses the default one</p>
<p>the easiest hack for this is to do a str_replace on the json array string however I&#8217;m not sure on how accurate that would end-up</p>
<p>Still, rather good project though, although I&#8217;d point out in the example with the new ExtJS documentation I had to add:<br />
		$name = str_replace(&#8217;.Data.&#8217;, &#8216;.data.&#8217;, $name);</p>
<p>I started work on one specifically for grid before I though surely someone must have written one of these before, but your code seems to be having the same problem as mine does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Accilies</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17201</link>
		<dc:creator>Accilies</dc:creator>
		<pubDate>Tue, 01 Jul 2008 11:06:55 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17201</guid>
		<description>Hi, 

I have been working on this wrapper and I found that Public Events dont get registered in the wrapper from the documentation. Can you please update if you have worked on that bit !! 

Also, i would like to know if you have any idea of the document generator used for the EXTJS documentation... is it JSDocs ?

Awaiting response!

Regards, 
Accilies</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>I have been working on this wrapper and I found that Public Events dont get registered in the wrapper from the documentation. Can you please update if you have worked on that bit !! </p>
<p>Also, i would like to know if you have any idea of the document generator used for the EXTJS documentation&#8230; is it JSDocs ?</p>
<p>Awaiting response!</p>
<p>Regards,<br />
Accilies</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17068</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 07 May 2008 07:46:13 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17068</guid>
		<description>Guys, sorry for not replying earlier. A lot of your comments were in the &#039;Possible spam, must validate manually&#039; basket. Not sure why.

@Seiti, I really appreciate your contribution. I wonder why the code you mention in comment #31 was created this way. I&#039;ll check.

@pempem I believe that I am going to have to start adding some special cases to the converter, to handle these &quot;special places&quot; where Jack used his own magic tricks. In the meantime, your FormPanel configuration class could extend BasicForm&#039;s config class but this sounds dirty. I have to check the code...

Some of you may be wondering &quot;When are you going to release a more polished version?&quot; and you are right to wonder.
I guess I am doing what a lot of other people have been doing lately...waiting to see what happens with ExtJS&#039; license.
What do you guys think? Are you using the library professionally? In an open-source project? Do you fear the license changes?</description>
		<content:encoded><![CDATA[<p>Guys, sorry for not replying earlier. A lot of your comments were in the &#8216;Possible spam, must validate manually&#8217; basket. Not sure why.</p>
<p>@Seiti, I really appreciate your contribution. I wonder why the code you mention in comment #31 was created this way. I&#8217;ll check.</p>
<p>@pempem I believe that I am going to have to start adding some special cases to the converter, to handle these &#8220;special places&#8221; where Jack used his own magic tricks. In the meantime, your FormPanel configuration class could extend BasicForm&#8217;s config class but this sounds dirty. I have to check the code&#8230;</p>
<p>Some of you may be wondering &#8220;When are you going to release a more polished version?&#8221; and you are right to wonder.<br />
I guess I am doing what a lot of other people have been doing lately&#8230;waiting to see what happens with ExtJS&#8217; license.<br />
What do you guys think? Are you using the library professionally? In an open-source project? Do you fear the license changes?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pempem</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17047</link>
		<dc:creator>pempem</dc:creator>
		<pubDate>Tue, 15 Apr 2008 11:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17047</guid>
		<description>Great job !
I use it often now and I like it.
Just a problem now: The FormPanel doesn&#039;t contain the config options of the basicForm class. In ext, formpanel extend panel BUT include the configuration option of the basicForm class (see the bold explaination in Ext formPanel doc). How could I fix that problem (or is there a better solution ?) ?</description>
		<content:encoded><![CDATA[<p>Great job !<br />
I use it often now and I like it.<br />
Just a problem now: The FormPanel doesn&#8217;t contain the config options of the basicForm class. In ext, formpanel extend panel BUT include the configuration option of the basicForm class (see the bold explaination in Ext formPanel doc). How could I fix that problem (or is there a better solution ?) ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seiti</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17027</link>
		<dc:creator>Seiti</dc:creator>
		<pubDate>Wed, 02 Apr 2008 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17027</guid>
		<description>Me again! 

Found a bug on Ext.data.Record.php:

----
static function create($o= null)
	{
		if(gettype($o)==&#039;array&#039;)
			$o = JsWriter::JSON($o);
		$o=JsWriter::JSON($o);
		$out =</description>
		<content:encoded><![CDATA[<p>Me again! </p>
<p>Found a bug on Ext.data.Record.php:</p>
<p>&#8212;-<br />
static function create($o= null)<br />
	{<br />
		if(gettype($o)==&#8217;array&#8217;)<br />
			$o = JsWriter::JSON($o);<br />
		$o=JsWriter::JSON($o);<br />
		$out =</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seiti</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17026</link>
		<dc:creator>Seiti</dc:creator>
		<pubDate>Wed, 02 Apr 2008 18:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17026</guid>
		<description>Hi! Just in case someone find it useful.

That did the trick about the js variables. The $this-&gt;datastore[&#039;name&#039;] points to a object of the Ext.data.Store class:

----
		//creating js variables
		JsWriter::write(&#039;var &#039;. $this-&gt;datastore[&#039;name&#039;] . &#039; = &#039;);
		$this-&gt;datastore[&#039;object&#039;]-&gt;jsrender();
		JsWriter::write(&quot;;&quot;);

		JsWriter::write(&#039;var &#039;. $this-&gt;panel[&#039;name&#039;] . &#039; = &#039;);
		$this-&gt;panel[&#039;object&#039;]-&gt;jsrender();
		JsWriter::write(&quot;;&quot;);

		//getting the javascript code
		$js = new JsReady(JsWriter::get(), false);
		$out = $js-&gt;getScript();
----

Then, to set a callback, I just instantiated a  JsFunction():

----
&#039;handler&#039; =&gt; new JsFunction(null, &quot;{$this-&gt;datastore[&#039;name&#039;]}.reload()&quot; )
----

Great wrapper!</description>
		<content:encoded><![CDATA[<p>Hi! Just in case someone find it useful.</p>
<p>That did the trick about the js variables. The $this->datastore['name'] points to a object of the Ext.data.Store class:</p>
<p>&#8212;-<br />
		//creating js variables<br />
		JsWriter::write(&#8217;var &#8216;. $this->datastore['name'] . &#8216; = &#8216;);<br />
		$this->datastore['object']->jsrender();<br />
		JsWriter::write(&#8221;;&#8221;);</p>
<p>		JsWriter::write(&#8217;var &#8216;. $this->panel['name'] . &#8216; = &#8216;);<br />
		$this->panel['object']->jsrender();<br />
		JsWriter::write(&#8221;;&#8221;);</p>
<p>		//getting the javascript code<br />
		$js = new JsReady(JsWriter::get(), false);<br />
		$out = $js->getScript();<br />
&#8212;-</p>
<p>Then, to set a callback, I just instantiated a  JsFunction():</p>
<p>&#8212;-<br />
&#8216;handler&#8217; => new JsFunction(null, &#8220;{$this->datastore['name']}.reload()&#8221; )<br />
&#8212;-</p>
<p>Great wrapper!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seiti</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17023</link>
		<dc:creator>Seiti</dc:creator>
		<pubDate>Wed, 02 Apr 2008 14:33:28 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17023</guid>
		<description>Is it possible to set a callback handler using ExtPHP?  

I set a  Ext_grid_EditorGridPanel_Config and added a &#039;tbar&#039; attribute:
gridpanelconfigobject-&gt;tbar(array(&#039;-&gt;&#039;, array(&#039;text&#039;=&gt;&#039;Refresh&#039;, &#039;tooltip&#039; =&gt; &#039;Refresh the grid&#039;, &#039;iconCls&#039;=&gt;&#039;refresh&#039;, &#039;handler&#039;=&gt;&#039;updateGrid&#039;) )

And the addRecord is rendered as a string. I could use a JsFunction() instead, but I noticed that the Javascript code does not create any variable to assign the instantiated classes. How can I call the reload() method of the datastore object?</description>
		<content:encoded><![CDATA[<p>Is it possible to set a callback handler using ExtPHP?  </p>
<p>I set a  Ext_grid_EditorGridPanel_Config and added a &#8216;tbar&#8217; attribute:<br />
gridpanelconfigobject->tbar(array(&#8217;->&#8217;, array(&#8217;text&#8217;=>&#8217;Refresh&#8217;, &#8216;tooltip&#8217; => &#8216;Refresh the grid&#8217;, &#8216;iconCls&#8217;=>&#8217;refresh&#8217;, &#8216;handler&#8217;=>&#8217;updateGrid&#8217;) )</p>
<p>And the addRecord is rendered as a string. I could use a JsFunction() instead, but I noticed that the Javascript code does not create any variable to assign the instantiated classes. How can I call the reload() method of the datastore object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seiti</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17018</link>
		<dc:creator>Seiti</dc:creator>
		<pubDate>Tue, 01 Apr 2008 19:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17018</guid>
		<description>In time: the docs are great, but what we (or maybe just me) really need are more examples =)</description>
		<content:encoded><![CDATA[<p>In time: the docs are great, but what we (or maybe just me) really need are more examples =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seiti</title>
		<link>http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/comment-page-1/#comment-17017</link>
		<dc:creator>Seiti</dc:creator>
		<pubDate>Tue, 01 Apr 2008 19:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://nexus.zteo.com/2008/03/04/extphp-an-extjs-converterwrapper-for-php-developers/#comment-17017</guid>
		<description>Hello Admin!

Besides the autoload() I slightly changed the JSReady class, allowing the developer to use a template engine, like smarty, passing the javascript code around as a variable.

main.php:

class JsReady
{
	private $script;

	/**
	 * Constructor.
	 *
	 * @param string $body
	 * @param boolean $print
	 * @return string
	 */
	function __construct($body, $print = true)
	{
		$prefix = &quot;Ext.onReady(function()\n{\n&quot;;
		$suffix = &quot;\n});\n&quot;;
		$this-&gt;script = $prefix . $body . $suffix;
		if ($print)
			print $this-&gt;script;
	}

	/**
	 * Returns the script
	 *
	 * @return string
	 */
	function getScript() {
		return $this-&gt;script;
	}
}


I successfully implemented a grid php class using the wrapper, now I&#039;m struggling to implement insert/update/delete via Ajax callbacks. =)</description>
		<content:encoded><![CDATA[<p>Hello Admin!</p>
<p>Besides the autoload() I slightly changed the JSReady class, allowing the developer to use a template engine, like smarty, passing the javascript code around as a variable.</p>
<p>main.php:</p>
<p>class JsReady<br />
{<br />
	private $script;</p>
<p>	/**<br />
	 * Constructor.<br />
	 *<br />
	 * @param string $body<br />
	 * @param boolean $print<br />
	 * @return string<br />
	 */<br />
	function __construct($body, $print = true)<br />
	{<br />
		$prefix = &#8220;Ext.onReady(function()\n{\n&#8221;;<br />
		$suffix = &#8220;\n});\n&#8221;;<br />
		$this->script = $prefix . $body . $suffix;<br />
		if ($print)<br />
			print $this->script;<br />
	}</p>
<p>	/**<br />
	 * Returns the script<br />
	 *<br />
	 * @return string<br />
	 */<br />
	function getScript() {<br />
		return $this->script;<br />
	}<br />
}</p>
<p>I successfully implemented a grid php class using the wrapper, now I&#8217;m struggling to implement insert/update/delete via Ajax callbacks. =)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
