<?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>Juozas devBlog &#187; permissions</title>
	<atom:link href="http://dev.juokaz.com/tag/permissions/feed" rel="self" type="application/rss+xml" />
	<link>http://dev.juokaz.com</link>
	<description>Random ideas, scripts and facts</description>
	<lastBuildDate>Mon, 22 Mar 2010 10:48:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Service Layer in Web applications</title>
		<link>http://dev.juokaz.com/programming/service-layer-in-web-applications</link>
		<comments>http://dev.juokaz.com/programming/service-layer-in-web-applications#comments</comments>
		<pubDate>Thu, 26 Nov 2009 16:53:47 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[dao]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[matthew]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[patterns]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[saas]]></category>
		<category><![CDATA[users]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[zf]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=888</guid>
		<description><![CDATA[In my professional live I mostly work with enterprise web applications which are quite demanding for big layer of business logic (that&#8217;s another article I guess) and decoupling of application layers. During this year I invested quite a lot for a search of a good ways to architecture a big application and make it simply [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://dev.juokaz.com/wp-content/uploads/2009/11/ServiceLayerSketch.gif"><img class="alignnone size-full wp-image-889" title="Service layer sketch" src="http://dev.juokaz.com/wp-content/uploads/2009/11/ServiceLayerSketch.gif" alt="Service Layer Sketch" width="199" height="229" style="float: right;" /></a>In my professional live I mostly work with enterprise web applications which are quite demanding for big layer of business logic (that&#8217;s another article I guess) and decoupling of application layers. During this year I invested quite a lot for a search of a good ways to architecture a big application and make it simply good. Quite a while ago <a href="http://weierophinney.net/matthew/">Matthew Weier O&#8217;Phinney</a> introduced service layer in one of his great talks about models, since then service layer become one of the key architectural component one my applications. Here I&#8217;m going to show a few examples and use cases where it&#8217;s very useful. </p>
<h5>&#8220;Old-style&#8221; interaction with data</h5>
<p>I&#8217;ve used it for different projects, but one of the best examples of how great this concept is <a href="http://en.wikipedia.org/wiki/Software_as_a_service">SaaS</a> or any other users-based application. Some years ago I used to have code which worked like this (let&#8217;s say this is controller action):</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> userInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$userDao</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Users<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$userDao</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_SESSION</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And then in my database access class <em>Users</em> I just execute sql query with a given user id. However, after some thinking I looked at it again and though &#8211; why does controller need to know the userId? I mean, of course it&#8217;s a job of controller to process requests and control application flow, but logically &#8211; if an action is named <em>userInfo</em> and we got to the point where we need the user info (hence the user is authenticated and validated) why do we need to pass user id? It&#8217;s clear that some part of code already knows it.</p>
<p>One more case: if a site is a e-commerce it&#8217;s clear that user has only access to his orders, addresses information etc. but in a <a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller">basic MVC</a> you either fetch by <em>Id</em> and then check if it&#8217;s in fact user&#8217;s order or create a method like in a first example. Again, not very clear and not easy to maintain. There are more problems too: by passing user id and id of a record you assume that controller knows that this is a key to get the information. But it&#8217;s wrong &#8211; business layer knows that user has orders; controller only knows that there is such a thing like orders and it can be retrieved by id. <a href="http://www.mikebernat.com/blog/MVC_-_Fat_Models_and_Skinny_Controllers_">That&#8217;s it</a>.</p>
<h5>Service layer</h5>
<p>For such things I use service layer: it has user info injected from bootstrap (or directly to a constructor) and operates with data only accessible to the user. So previous method becomes to:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> userInfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$service</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> UsersService<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>of course you would have a separate method to fetch other users data, but for sake of simplicity let&#8217;s just say that this method returns some private info (like address for example). Here my action is completely unaware of what user id actually is &#8211; it expects a user object, it gets it. Very simple, very clean and very easy to maintain. </p>
<p>Getting back to the e-commerce example, action for a view order would look like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> viewOrder<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
     <span style="color: #000088;">$service</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> OrdersService<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
     <span style="color: #000088;">$order</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$service</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getOrder</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Again &#8211; this controller action doesn&#8217;t care what user id is in current session, it just gets an order by its id. If this action returns false (or throws exception with error type) then it means order cannot be retrieved, or in other words &#8211; service cannot return id by given id. It can be permissions problem, it can be something else &#8211; but controller is completely freed from checking all this unnecessary things.</p>
<h5>Practical usage</h5>
<p>As you might have noticed, service layer is intermediate layer between models and controllers &#8211; in the same way as you would use Flickr or <a href="http://code.google.com/apis/youtube/overview.html">Youtube API</a> to work with remote data, you use service layer API to work with application resources. All the business logic resides in service layer, where also using other service layer, models are retrieved, changed, saved, returned etc. Controller has zero lines which contain a word <em>Doctrine</em> (or any other database layer class). None.</p>
<p><img src="http://dev.juokaz.com/wp-content/uploads/2009/11/soa-additional-service-layer.jpg" alt="Service layer " title="Service layer " width="450" height="322" class="alignnone size-full wp-image-905" /></p>
<p>Another advantage of using a service layer &#8211; it&#8217;s a good place to merge information sources. I think it&#8217;s more like a style of mine, but I tend to have models very clean &#8211; only with logic on that model. This is mainly because I usually use <a href="http://dev.juokaz.com/tag/doctrine">Doctrine</a> models and I don&#8217;t want to put anything in them. For example just yesterday Adam from <em>jazzslider.org</em> posted a very good article about <a href="http://www.phpquebec.org/modules/news/article.php?storyid=103">using Acl with models</a> by creating custom listeners. With all respect, even though it works really great, I don&#8217;t think it&#8217;s a clean approach &#8211; I see models and permissions control as separate layers.</p>
<p>Furthermore, having this layer makes replacing database layer (or even models layer) a little bit easier &#8211; because all the other code communicates with data using given <a href="http://en.wikipedia.org/wiki/Application_programming_interface">API</a> (from service layer) so as long as results returned are the same, they don&#8217;t care how they are actually retrieved (for example they can come from cache, text file or created on-the-fly). But if you would have <a href="http://framework.zend.com/manual/en/zend.db.select.html">Zend_Db_Select</a> calls all other the place, migrating to Doctrine&#8217;s <a href="http://www.doctrine-project.org/documentation/manual/1_0/en/dql-doctrine-query-language">DQL</a> can be a pain. From my personal experience, I successfully migrated my own ORM code with about 50 models to Doctrine in about 4 days without changing a line in controllers (also because of tests I had).</p>
<p>To be honest, I&#8217;ve only tried various service layer implementations with <a href="http://framework.zend.com/">Zend Framework</a>. Even a default autoloader has a resource namespace <em>Service_</em> with <em>services</em> folder inside application, so I didn&#8217;t need to do any hacking to get it working. Nevertheless, this pattern doesn&#8217;t require any specific framework futures, but if a framework has good dependency injector (like <a href="http://components.symfony-project.org/dependency-injection/">this</a> one from Symfony) it can make things even cleaner. </p>
<h5>Conclusion</h5>
<p>I don&#8217;t know if I have convinced you to look at this pattern, but I definitely recommend looking at it. Especially when your application gets quite big and you need some sort of functionality to work with all these models (on average, I used service layer with applications having roughly 80 models). Nevertheless, there are tons of different ways to do this, so I definitely recommend reading a book by M. Fowler called <a href="http://martinfowler.com/eaaCatalog/">&#8220;Patterns of Enterprise Application Architecture (P of EAA)&#8221;</a>. One of the best sources for enterprise applications I&#8217;ve read so far.</p>
<p><em><sup>*</sup> Image copyright: <a href="http://martinfowler.com/eaaCatalog/serviceLayer.html">http://martinfowler.com/eaaCatalog/serviceLayer.html</a> and <a href="http://www.tutorialspoint.com/images/soa-additional-service-layer.jpg">http://www.tutorialspoint.com/images/soa-additional-service-layer.jpg</a></em></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/programming/service-layer-in-web-applications/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Zend Framework and Microsoft IIS</title>
		<link>http://dev.juokaz.com/winphp-2009/zend-framework-and-microsoft-iis</link>
		<comments>http://dev.juokaz.com/winphp-2009/zend-framework-and-microsoft-iis#comments</comments>
		<pubDate>Tue, 05 May 2009 01:52:52 +0000</pubDate>
		<dc:creator>Juozas</dc:creator>
				<category><![CDATA[WinPhp 2009]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[iis]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[mssql]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[rob allen]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[windows 7]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://dev.juokaz.com/?p=617</guid>
		<description><![CDATA[My task today was to make Rob Allen&#8217;s Zend framework tutorial project run on Windows. Some years ago such task could have been a problem, but as you will see, now it&#8217;s nothing special.
To start with, Windows sometimes really annoys. For example, by default I can&#8217;t add files to C:\inetpub\wwwroot. It doesn&#8217;t ask for &#8220;Allow/Cancel?&#8220;, [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-460" title="Zend framework" src="http://dev.juokaz.com/wp-content/uploads/2009/04/logo-zend-framework.jpg" alt="Zend framework" width="115" height="77" />My task today was to make Rob Allen&#8217;s <a href="http://akrabat.com/zend-framework-tutorial/">Zend framework tutorial</a> project run on Windows. Some years ago such task could have been a problem, but as you will see, now it&#8217;s nothing special.</p>
<p><a href="http://dev.juokaz.com/wp-content/uploads/2009/05/iis-2.png"><img class="alignnone size-thumbnail wp-image-622" style="margin-left: 5px; float: right;" title="Access is denied" src="http://dev.juokaz.com/wp-content/uploads/2009/05/iis-2-150x150.png" alt="Access is denied" width="100" height="100" /></a>To start with, Windows sometimes really annoys. For example, by default I can&#8217;t add files to C:\inetpub\wwwroot. It doesn&#8217;t ask for &#8220;<a href="http://www.youtube.com/watch?v=FxOIebkmrqs">Allow/Cancel?</a>&#8220;, is doesn&#8217;t show permissions error &#8211; you just can&#8217;t do anything. I decided not to waste my time trying to find a way how to do it and ended up with virtual directory pointed to my project folder. I&#8217;m using Windows 7, so one can run programs as administrator, but having two Explorers is not a very good idea, especially when you can&#8217;t tell a difference between admin and non-admin mode (can you?).</p>
<p><a href="http://dev.juokaz.com/wp-content/uploads/2009/05/iis-3.png"></a><a href="http://dev.juokaz.com/wp-content/uploads/2009/05/iis-3.png"><img class="alignnone size-thumbnail wp-image-618" style="float: right; margin-left: 5px;" title="Import .htaccess" src="http://dev.juokaz.com/wp-content/uploads/2009/05/iis-3-150x150.png" alt="Import .htaccess" width="100" height="100" /></a>First problem was <a href="http://framework.zend.com/manual/en/zend.controller.router.html">routes</a> &#8211; almost all frameworks nowadays uses something like &#8220;/controller/action/id&#8221; which is achieved by <a href="http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html">mod_rewrite</a> and <a href="http://httpd.apache.org/docs/1.3/howto/htaccess.html">.htaccess</a>. However, IIS is not Apache, hence .htaccess doesn&#8217;t exist. Although IIS has a routing module which pretty much works the same and also has nice a GUI for all who doesn&#8217;t know how to use <a href="http://en.wikipedia.org/wiki/Regular_expression">regexp</a>&#8217;s. Furthermore, it also has import function which surprisingly imports from .htaccess &#8211; select file, click Import, remove or fix not recognized rules and click Apply. I haven&#8217;t tried any complex rules, but since most of frameworks only require to redirect everything (&#8220;^.*$&#8221;) it should work.</p>
<p><a href="http://dev.juokaz.com/wp-content/uploads/2009/05/mssql-1.png"><img class="alignnone size-thumbnail wp-image-632" style="float: right; margin-left: 5px;" title="Microsoft SQL" src="http://dev.juokaz.com/wp-content/uploads/2009/05/mssql-1-150x150.png" alt="Microsoft SQL" width="100" height="100" /></a>Next &#8220;problem&#8221; is the database. MySQL works fine in Windows, but I wanted to use <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server">MSSQL</a>. Not only because I haven&#8217;t tried MSSQL before, but also because MSSQL is much more integrated into Windows. However, MSSQL driver in PHP has some <a href="http://blog.stuartherbert.com/php/2007/10/16/microsofts-first-php-extension-sql-server-2005-support/">limitations</a>. Nevertheless, Microsoft has released a <a href="http://msdn.microsoft.com/en-us/data/aa937733.aspx">native driver</a>, which seems to have fixed all previous problems. You only need to download actual driver from <a href="http://download.microsoft.com/download/2/7/c/27c60d49-6dbe-423e-9a9e-1c873f269484/sqlncli.msi">here</a> and PHP extensions from <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=61BF87E0-D031-466B-B09A-6597C21A2E2A&amp;displaylang=en">here</a>. Extension can be used like <a href="http://akrabat.com/2009/05/04/mssql-and-php/">this</a> (it provides <a href="http://msdn.microsoft.com/en-us/library/cc296152(SQL.90).aspx">sqlsrv_*</a> functions), however I really prefer using <a href="http://uk3.php.net/manual/en/intro.pdo.php">PDO</a> or other object oriented database layer. That&#8217;s why I use it like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">try <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$hostname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;localhost\SQLEXPRESS&quot;</span><span style="color: #339933;">;</span>            <span style="color: #666666; font-style: italic;">//host</span>
    <span style="color: #000088;">$dbname</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;zf-tutorial&quot;</span><span style="color: #339933;">;</span>            <span style="color: #666666; font-style: italic;">//db name</span>
    <span style="color: #000088;">$username</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;sa&quot;</span><span style="color: #339933;">;</span>            <span style="color: #666666; font-style: italic;">// username like 'sa'</span>
    <span style="color: #000088;">$pw</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;juozas&quot;</span><span style="color: #339933;">;</span>                <span style="color: #666666; font-style: italic;">// password for the user</span>
&nbsp;
    <span style="color: #000088;">$dsn</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Driver={SQL Server Native Client 10.0};
            Server=<span style="color: #006699; font-weight: bold;">{$hostname}</span>;
            Database=<span style="color: #006699; font-weight: bold;">{$dbname}</span>;
            Uid=<span style="color: #006699; font-weight: bold;">{$username}</span>;
            Pwd=<span style="color: #006699; font-weight: bold;">{$pw}</span>;&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$dbh</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> PDO <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;odbc:&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$dsn</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>PDOException <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Failed to get DB handle: &quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> PHP_EOL<span style="color: #339933;">;</span>
    <span style="color: #990000;">exit</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000088;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dbh</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">prepare</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SELECT * FROM albums&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">execute</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$sth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetchAll</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I should add, that I haven&#8217;t tested it much, but at least demo project from the tutorial works. Later this week I will probably choose which method to use (sqlsrv_* or PDO), because Zend framework currently doesn&#8217;t support <a href="http://msdn.microsoft.com/en-us/data/aa937733.aspx">MSSQL Native client</a> and I will implement adapter myself (Zend_Db_Adapters are around 500 lines). <a href="http://akrabat.com/">Rob Allen</a> is also working on a driver implementation for Zend so one of us should come with a solution pretty soon. Currently I&#8217;m using Zend_Db_Adapter_Pdo_Odbc from <a href="http://framework.zend.com/issues/browse/ZF-905">here</a>, however it still works only as a hack.</p>
<p>That&#8217;s all &#8211; your Zend Framework project should work (you may also need to set correct <a href="http://drupal.org/node/202491">file permissions</a>).</p>
<p><em>If I wouldn&#8217;t have started <a href="http://wiki.phpconference.nl/2009_WinPHP_Challenge">Winphp</a> competition, I may have never realized how Microsoft is struggling to support PHP. Starting from <a href="http://blogs.msdn.com/sqlphp/">blogs</a> and ending with special <a href="http://www.codeplex.com/SQL2K5PHP">drivers</a>, <a href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=c8498c9b-a85a-4afa-90c0-593d0e4850cb">tutorials</a> and even <a href="http://www.phponwindows.ca/ftw/">competitions</a>. Is Microsoft trying to &#8220;repair&#8221; its public profile?</em></p>
]]></content:encoded>
			<wfw:commentRss>http://dev.juokaz.com/winphp-2009/zend-framework-and-microsoft-iis/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
