<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Pixelinx Framework &#187; General</title>
	<atom:link href="http://framework.pixelinx.co.uk/category/general/feed/" rel="self" type="application/rss+xml" />
	<link>http://framework.pixelinx.co.uk</link>
	<description>Open Source PHP Framework</description>
	<lastBuildDate>Mon, 07 Dec 2009 21:50:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Configuration, URLs/Slugs/Routing and Solr</title>
		<link>http://framework.pixelinx.co.uk/2009/12/configuration-urls-and-solr/</link>
		<comments>http://framework.pixelinx.co.uk/2009/12/configuration-urls-and-solr/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 22:45:30 +0000</pubDate>
		<dc:creator>apancutt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://framework.pixelinx.co.uk/?p=77</guid>
		<description><![CDATA[Once again I'm going to use this blog to brain-dump some thoughts I've had over the past week or so. Firstly, configuration. I mentioned before that I need to identify a policy for what configuration gets stored in the database, and what gets stored in the form of text files. I've since realised that I [...]]]></description>
			<content:encoded><![CDATA[<p>Once again I'm going to use this blog to brain-dump some thoughts I've had over the past week or so.</p>
<p>Firstly, configuration. I mentioned <a href="http://framework.pixelinx.co.uk/2009/11/problems-yet-to-solve/">before</a> that I need to identify a policy for what configuration gets stored in the database, and what gets stored in the form of text files. I've since realised that I don't need to do anything fancy just yet. The main problems I want to solve are:</p>
<ul>
<li>Create a simple configuration format, even more basic than <a href="http://www.yaml.org/" target="_blank">YAML</a>, but retain the ability to cascade and reference previous nodes (where YAML uses the <code>&amp;</code> and <code>*</code> syntax). This would radically increase parse-time while maintaining minimal file sizes.</li>
<li>Using the CMS, have the ability to: configure meta data for SEO; choose how to display content (e.g. limit per-page, CSS classes, etc.); and manipulate widget positions.</li>
</ul>
<p>Being able to change too much on the fly on a busy production environment is far from sensible. <a href="http://wordpress.org/" target="_blank">WordPress</a> (and many others!) goes for this approach but I'm sure this isn't a problem for 99% of their target market (personal blogs and small-medium business sites). How I personally prefer to work is to make such changes in a safe and private environment, thoroughly test and then explicitly deploy those changes to production. Therefore, for the first version at least, the framework will not provide access to the application configuration via the CMS.</p>
<p>Secondly, I've decided that my URL generation problem is now solved. In addition, all URLs will be 'routed' via a configuration file, including node-based content. That might not make so much sense right now but hopefully it will once things progress.</p>
<p>Finally, and probably the biggest issue I'm still faced with: node storage and retrieval. Tackling the EAV model and maintaining high performance is something that <a href="http://stackoverflow.com/questions/224065/is-there-a-entity-attribute-value-eav-framework-out-there-for-php-mysql" target="_blank">nobody has truely acheived yet</a> - at least I've not come across anything impressive. Doing some (a lot) of research, I've found that <a href="http://www.magentocommerce.com/" target="_blank">Magento</a> is supposidly the most successful attempt at one - yet that's a <a href="http://inchoo.net/ecommerce/magento/escape-from-eav-the-magento-way/" target="_blank">mess</a>.</p>
<p>The use of the <a href="http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_coalesce" target="_blank">coalesce</a> function in MySQL sounded great. Store all attribute values in a single table and let MySQL pull the right value from the correct data-type column. However, how would you perform searches on multiple attributes in a single query (e.g. <code>SELECT ... FROM ... WHERE age = 50 AND name LIKE 'Fred%'</code>). Don't even suggest multiple select/joins. Unless of course you have a <a href="http://www.nas.nasa.gov/News/Images/Images/AC04-0208-9.jpg" target="_blank">few of these rooms</a> at your disposal.</p>
<p>So I did some more hunting around.</p>
<p>I initially thought <a href="http://lucene.apache.org/solr/" target="_blank">Solr</a> would be the ideal candidate. However, I'm still not entirely sure yet how well it can cope with large indexes. Perhaps I can optimise the index by only indexing <em>some</em> content and do full hydration of nodes using MySQL based on the Solr result set (a Solr/MySQL hybrid). Additionally, I don't really like the idea of having dependancies on non-standard services (Solr is a Java application requiring Tomcat, or similar). That's when I found out that Zend had the same opinion. They went and built there own Lucene port, entirely in PHP. <a href="http://framework.zend.com/manual/en/zend.search.lucene.html" target="_blank">Zend_Search_Lucene</a> isn't as good as Solr - it doesn't provide the amount of <a href="http://lucene.apache.org/solr/features.html" target="_blank">features</a> I'd like and it's <a href="http://www.builtfromsource.com/2008/11/07/zend_search_lucene-not-enterprise-ready/" target="_blank">not scalable</a>.</p>
<p>Interestingly enough, I've just found <a href="http://ishouldbecoding.com/2008/07/19/eav-modeling---square-peg-in-a-round-hole" target="_blank">a blog post from July 2008</a> where the author has suggested a similar system to the one I'm proposing here.</p>
<p>So, next step is to get Solr installed again and start doing some performance testing.</p>
]]></content:encoded>
			<wfw:commentRss>http://framework.pixelinx.co.uk/2009/12/configuration-urls-and-solr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems Yet to Solve</title>
		<link>http://framework.pixelinx.co.uk/2009/11/problems-yet-to-solve/</link>
		<comments>http://framework.pixelinx.co.uk/2009/11/problems-yet-to-solve/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 20:21:20 +0000</pubDate>
		<dc:creator>apancutt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://framework.pixelinx.co.uk/?p=70</guid>
		<description><![CDATA[Perhaps you're wondering what stage I'm at, and why there is not much information in terms of documentation, tutorials, etc. Well, truth is, there is still a lot I haven't architected yet let alone written. I'll summarise some of the biggest issues left to tackle here... Node Storage and Retrieval The framework will be built [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps you're wondering what stage I'm at, and why there is not much information in terms of documentation, tutorials, etc. Well, truth is, there is still a lot I haven't architected yet let alone written.</p>
<p>I'll summarise some of the biggest issues left to tackle here...</p>
<p><strong>Node Storage and Retrieval</strong><br />
The framework will be built to support the <a href="http://en.wikipedia.org/wiki/Entity-attribute-value_model" target="_blank">EAV model</a>. It'll need to be able to store nodes, attributes and a value for each node-attribute relationship.</p>
<p>The biggest problem here is that I don't want to set all attribute value columns to a <em>text</em> or <em>varchar</em> data type (as some frameworks do as a cop-out). I need to identify a schema that allows values to be stored in a column with the correct data type (integer, float, string or binary).</p>
<p>So, how would the framework retrieve all this information without generating multiple queries per node? There are a couple of options weighing up in my head at the moment:</p>
<ol>
<li>Query <a href="http://lucene.apache.org/solr/" target="_blank">Solr</a> and rely on that to do all the complicated internal stuff and return me the hydrated node. Can Solr handle this much responsibility? How good is it at storing data for potentionally &gt;500,000 nodes? Could it be relied on by a high traffic web site?</li>
<li>Make use of the MySQL <a href="http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_coalesce" target="_blank">coalesce</a> function (thanks to <a href="http://inspirelabs.co.uk/team/" target="_blank">John Wright</a>). The schema would be very straight forward, as would the queries. What's the performance like though? I'd still need to think about how to avoid a huge node_attribute_value table. Perhaps split it up by content type, similar to the CCK module in Drupal?</li>
</ol>
<p>Right now I'm favouring option two.</p>
<p><strong>URL Generation</strong><br />
The framework will have a category structure which will in turn provide a dynamic menu structure. This allows content publishers to freely create new channels, microsites, etc. and for a link to be placed automatically into the navigation of the site. Easy enough.</p>
<p>However, each node can be assigned to many menu placements (e.g. Featured and News &gt; Sports). One assignment must be made the primary. Each node would have it's own URL slug, the the full URL to the node would be prepended by the category(ies) slug(s), e.g. /featured/my-node.html and /news/sports/my-node.html. This system would allow the same node to appear within several sections of the site, with different URLs. Bad for SEO? Yes. So we'd need to map and use <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html" target="_blank">canonical links</a> to point to the primary URL. In addition, we'd need to keep track of previous node URLs to generate <a href="http://en.wikipedia.org/wiki/HTTP_301" target="_blank">301</a>'s if/when a slug changes.</p>
<p>So, how do we store all the URLs for a node? We could simply put all URLs into a table with a relation to which node it belongs to. Would those URLs contain the category slug, or just the node slug? If they contain the category slug, how would we update... I'll stop there. I've just answered my own question: yes, store the category slug as well as the node slug and insert a new row if a slug changes, and set the existing row to 301 to the new row. Sorry if that's not clear, it's there for my own benefit so I don't forget!</p>
<p>Looks like that question <em>may</em> now be answered.</p>
<p><strong>Configuration</strong><br />
There are many types of configuration that the framework will require. From database connection settings to routing and how many nodes to show on a listing page. Only some of this would be wise to make configurable using the database. I need to do some thinking and define a policy here.</p>
<p>There are lots more things to think about too, including exactly how the template system would work. Although on my mind, and considered when thinking about any of the above issues, these are relatively lower priority right now. I'll keep you updated with progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://framework.pixelinx.co.uk/2009/11/problems-yet-to-solve/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Poll: Preferred Frameworks</title>
		<link>http://framework.pixelinx.co.uk/2009/11/poll-preferred-frameworks/</link>
		<comments>http://framework.pixelinx.co.uk/2009/11/poll-preferred-frameworks/#comments</comments>
		<pubDate>Thu, 19 Nov 2009 12:10:20 +0000</pubDate>
		<dc:creator>apancutt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://framework.pixelinx.co.uk/?p=57</guid>
		<description><![CDATA[I've just created a poll (see right) asking for your opinions on what framework you prefer to work with. Obviously, it's not always a straight forward this or that. Also, having Other as an option is leaving the result set a little tainted. Therefore, please add your comments to this post to expand a little [...]]]></description>
			<content:encoded><![CDATA[<p>I've just created a poll (see right) asking for your opinions on what framework you prefer to work with. Obviously, it's not always a straight forward <em>this</em> or <em>that</em>. Also, having <em>Other</em> as an option is leaving the result set a little tainted.</p>
<p>Therefore, please add your comments to this post to expand a little on why you chose what framework. This will help me understand peoples needs a little more and may even highlight something that I haven't thought of.</p>
<p>So, go vote.</p>
]]></content:encoded>
			<wfw:commentRss>http://framework.pixelinx.co.uk/2009/11/poll-preferred-frameworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Downloadable, Not Usable</title>
		<link>http://framework.pixelinx.co.uk/2009/11/downloadable-not-usable/</link>
		<comments>http://framework.pixelinx.co.uk/2009/11/downloadable-not-usable/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 20:38:06 +0000</pubDate>
		<dc:creator>apancutt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://framework.pixelinx.co.uk/?p=51</guid>
		<description><![CDATA[Before I get complaints from people downloading the framework and not knowing how to use it, it's probably worth mentioning that there is absolutely nothing you can do with it. What I have made available in the Download area is the framework core. That is, without any of the required file structure, applications, etc. It's [...]]]></description>
			<content:encoded><![CDATA[<p>Before I get complaints from people downloading the framework and not knowing how to use it, it's probably worth mentioning that there is absolutely nothing you can do with it.</p>
<p>What I have made available in the <a href="http://framework.pixelinx.co.uk/download/">Download</a> area is the framework <em>core</em>. That is, without any of the required file structure, applications, etc. It's too early to make all that available.</p>
<p>Although it works, for you to create a project I would need to produce some tutorials. At this early stage, building tutorials would be a waste of time as even the core could drastically change from day to day.</p>
<p>For now, you're getting just a taster of what's to come. Over the coming days/weeks, I'll have something more substantial to offer.</p>
]]></content:encoded>
			<wfw:commentRss>http://framework.pixelinx.co.uk/2009/11/downloadable-not-usable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>So, Here We Go</title>
		<link>http://framework.pixelinx.co.uk/2009/11/introduction/</link>
		<comments>http://framework.pixelinx.co.uk/2009/11/introduction/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 12:51:22 +0000</pubDate>
		<dc:creator>apancutt</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://framework.pixelinx.co.uk/?p=1</guid>
		<description><![CDATA[So I've decided to share something with you Internet types. This site is here to provide you good peoples with information about my project-in-development: a PHP MVC Framework. Yes, there are already lots out there, but this is one that I intend to be better suited for my work-related and personal needs than what's currently [...]]]></description>
			<content:encoded><![CDATA[<p>So I've decided to share something with you Internet types.</p>
<p>This site is here to provide you good peoples with information about my project-in-development: a PHP MVC Framework. Yes, there are already lots out there, but this is one that I intend to be better suited for my <a href="http://framework.pixelinx.co.uk/who-am-i/">work-related and personal needs</a> than what's currently available.</p>
<p>I'll leave you to hunt around the site to find out more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://framework.pixelinx.co.uk/2009/11/introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
