<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 09:13:53 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Felix Geisendorfer's Blog: How to oraganize your CakePHP App's Javascript II]]></title>
      <guid>http://www.phpdeveloper.org/news/6764</guid>
      <link>http://www.phpdeveloper.org/news/6764</link>
      <description><![CDATA[<p>
Continuing on from <a href="http://www.phpdeveloper.org/news/6732">this previous post</a> talking about Javascript in CakePHP applications, <i>Felix Geisendorfer</i> hands out more tips in <a href="http://www.thinkingphp.org/2006/11/23/how-to-organize-your-cakephp-app%e2%80%99s-javascript-ii/">this new blog entry</a> targeted mainly at users of the <a href="http://jquery.com/">jQuery</a> Javascript library.
</p>
<blockquote>
While the old solution was nice to manage the JS of a smaller application, this one is ment to structure your JS even in bigger projects. To make this possible I decided to go with a loose (MV)C pattern.
</blockquote>
<p>
He <a href="http://www.thinkingphp.org/2006/11/23/how-to-organize-your-cakephp-app%e2%80%99s-javascript-ii/">gives an example</a> of using a SiteController in connection with a CalendarController to help populate the information for the calendar.
</p>]]></description>
      <pubDate>Fri, 24 Nov 2006 11:27:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Felix Geisendorfer's Blog: How to organize your CakePHP App's Javascript?]]></title>
      <guid>http://www.phpdeveloper.org/news/6479</guid>
      <link>http://www.phpdeveloper.org/news/6479</link>
      <description><![CDATA[<p>
In his <a href="http://www.thinkingphp.org/2006/10/10/how-to-organize-your-cakephp-apps-javascript/">newest blog post</a>, <i>Felix Geisendorfer</i> stars up a discussion on where Javascript should live in your CakePHP application.
</p>
<blockquote>
<p>
What I actually want to start a discussion about, is how one should go about organizing his custom JS code, especially when working with CakePHP. In my early JS days I used to have one or more JS files with a plain list of functions. Most of the time I ended up with ugly spagetti code, so I decided to change my approach. 
</p>
<p>
Right now I use the JS version of a globally available Singleton that always has a sub-object called Behaviors that contains a variable amount of functions to be executed when the DOM is ready. The main advantage of this approach is that you can organize your applications functionality in hierarchies, while not having to worry about scoping issues.
</p>
</blockquote>
<p>
He <a href="http://www.thinkingphp.org/2006/10/10/how-to-organize-your-cakephp-apps-javascript/">also talks</a> about one of his current favorite Javascript libraries - <a href="http://jquery.com/">JQuery</a> - and demonstrates a way he uses to integrate it in with his application (in a Singleton style).
</p>
<p>
His is just one way to do it, though, and he's asking for suggestions of other ways to do it. Have one? <a href="http://www.thinkingphp.org/2006/10/10/how-to-organize-your-cakephp-apps-javascript/">post it now</a>!
</p>]]></description>
      <pubDate>Wed, 11 Oct 2006 13:06:00 -0500</pubDate>
    </item>
  </channel>
</rss>
