<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<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>WordPress Ideas &#187; Tag: foundation - Recent Posts</title>
		<link>http://wordpress.org/extend/ideas/tags/foundation</link>
		<description>WordPress Ideas &#187; Tag: foundation - Recent Posts</description>
		<language>en-US</language>
		<pubDate>Sun, 19 May 2013 23:55:37 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://wordpress.org/extend/ideas/rss/tags/foundation" rel="self" type="application/rss+xml" />

		<item>
			<title>lamhud on "Add object-oriented foundations and design patterns"</title>
			<link>http://wordpress.org/extend/ideas/topic/add-object-oriented-foundations-and-design-patterns#post-24445</link>
			<pubDate>Sat, 16 Mar 2013 23:00:00 +0000</pubDate>
			<dc:creator>lamhud</dc:creator>
			<guid isPermaLink="false">24445@http://wordpress.org/extend/ideas/</guid>
			<description><![CDATA[<p>I think adapting available object oriented frameworks to WP is the way to go. Take Zend Framework for example. It's open source. It supports inheritance, polymorphic associations and<br />
polymorphic queries. It supports design patterns. It has APIs.<br />
A plugin adding Zend to WP is already available
</p>]]></description>
					</item>
		<item>
			<title>npetetin on "Add object-oriented foundations and design patterns"</title>
			<link>http://wordpress.org/extend/ideas/topic/add-object-oriented-foundations-and-design-patterns#post-23873</link>
			<pubDate>Sun, 16 Dec 2012 00:48:46 +0000</pubDate>
			<dc:creator>npetetin</dc:creator>
			<guid isPermaLink="false">23873@http://wordpress.org/extend/ideas/</guid>
			<description><![CDATA[<p>Since the last releases, more and more classes have been introduced as part of core WordPress, which makes it de facto more and more object-oriented. However, more advanced object-oriented paradigms are still missing. Among those paradigms: polymorphism (open/closed principle) and design patterns.</p>
<p>Introducing an object factory instead of the use of "new" statements would allow extending core and plugin classes by simple polymorphism and then creating tons of new extension opportunities that go far beyond the current action/filter model (which would remain great and useful) by facilitating the process of writing object-oriented plugins.</p>
<p>In order to stick to the WordPress way, the design patterns to be implemented should be:<br />
* Generic Factory: the class name and the construction arguments would be passed as arguments<br />
* Static Proxy: even if the factory itself would be an object, it would be accessed through a normal and classical function</p>
<p>The Singleton design pattern would also be a natural and useful addition.</p>
<p>I filed a <a href="http://core.trac.wordpress.org/ticket/22958">feature request in the Trac bug tracker</a> with a <a href="http://core.trac.wordpress.org/attachment/ticket/22958/wp-object-oriented-foundations.diff">proposed implementation for this new API</a>. To make it short and sweet, the basic services offered would be:<br />
* Register a class: set the class name and the class file, as well as the class it’s optionally a substitute of by extension<br />
* Register an object: set the unique name and polymorphic class of a singleton that may be called later<br />
* Get a registered object: provide with the named singleton created from the right registered class<br />
* Create an object: provide with a new object created from the right registered class</p>
<p>Such an object-oriented foundation might also be the first stone of a fully object-oriented WordPress in the future, who knows...
</p>]]></description>
					</item>

	</channel>
</rss>
