<?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>Sat, 25 May 2013 00:19:08 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Matthew Weir O'Phinney's Blog: Start Writing Embeddable Applications]]></title>
      <guid>http://www.phpdeveloper.org/news/7793</guid>
      <link>http://www.phpdeveloper.org/news/7793</link>
      <description><![CDATA[<p>
<i>Matthew Weir O'Phinney</i> has a <a href="http://weierophinney.net/matthew/archives/138-Start-Writing-Embeddable-Applications.html">great new blog post</a> today on the topic so many developers don't even think about when working up their applications - making apps that aren't "loners" and are embeddable.
</p>
<blockquote>
<p>
"Why embed?" you ask. Simple: if I'm creating a site that has one or two of these applications, but also my (or my company's) own custom functionality, I may want to ensure that certain elements are present on all pages, or that I can control some of the content in all pages: a unified header and footer, ability to inject statistic tracking javascript, etc.
</p>
<p>
The predominant attitudes are either, "Don't embed our app, embed your app in ours," or "Just modify the templates." Neither of these solutions is acceptable. 
</p>
</blockquote>
<p>
He <a href="http://weierophinney.net/matthew/archives/138-Start-Writing-Embeddable-Applications.html">proposes</a> a few helpful hints to those developing applications right now to have them be that much more "embeddable" like:
<ul>
<li>When using configuration files, use a configuration component that doesn't require use of the global namespace
<li>Have your bootstrap script call on class methods or functions to do their work
<li>Better yet, use an MVC pattern in your apps
<li>Make sure your templates are easily modified to allow developers to strip out header, footer, and menu elements
<li>Create an API to allow retrieving necessary javascript and CSS
<li>Don't use $_GLOBALS ever.
</ul>
</p>]]></description>
      <pubDate>Mon, 07 May 2007 16:39:00 -0500</pubDate>
    </item>
  </channel>
</rss>
