<?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>Some reminiscences, some memories &#187; ninny Project</title>
	<atom:link href="http://www.mikespook.com/index.php/category/php/ninny-project/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikespook.com</link>
	<description>Just another boring day</description>
	<lastBuildDate>Wed, 08 Feb 2012 09:28:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ninny project 单元测试框架使用说明</title>
		<link>http://www.mikespook.com/2007/12/ninny-project-%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e6%a1%86%e6%9e%b6%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e/</link>
		<comments>http://www.mikespook.com/2007/12/ninny-project-%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e6%a1%86%e6%9e%b6%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e/#comments</comments>
		<pubDate>Wed, 12 Dec 2007 04:18:16 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[ninny Project]]></category>

		<guid isPermaLink="false">http://www.mikespook.com/index.php/archives/69</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
系统运行要求





<span class="readmore"><a href="http://www.mikespook.com/2007/12/ninny-project-%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e6%a1%86%e6%9e%b6%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e/" title="ninny project 单元测试框架使用说明">阅读全文——共1165字</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<div class="wikipage">
<div id="searchable">
<h2 id="系统运行要求">系统运行要求<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#%E7%B3%BB%E7%BB%9F%E8%BF%90%E8%A1%8C%E8%A6%81%E6%B1%82" class="anchor" title="Link to this section"><br />
</a></h2>
<ul>
<li>PHPUnit 3.1.x</li>
</ul>
<h2 id="PHPUnit的安装">PHPUnit 的安装<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#PHPUnit%E7%9A%84%E5%AE%89%E8%A3%85" class="anchor" title="Link to this section"><br />
</a></h2>
<p>参考：<a href="http://www.phpunit.de/pocket_guide/3.1/en/installation.html" class="ext-link">http://www.phpunit.de/pocket_guide/3.1/en/installation.html</a></p>
<blockquote>
<p><strong>建议使用 Pear 方式安装。</strong> Pear 包的安装请参考<a href="http://pear.php.net/manual/en/installation.php" class="ext-link">http://pear.php.net/manual/en/installation.php</a></p>
</blockquote>
<h2 id="测试用例的编写">测试用例的编写<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B%E7%9A%84%E7%BC%96%E5%86%99" class="anchor" title="Link to this section"><br />
</a></h2>
<p>参考：<a href="http://www.phpunit.de/pocket_guide/3.1/en/writing-tests-for-phpunit.html" class="ext-link">http://www.phpunit.de/pocket_guide/3.1/en/writing-tests-for-phpunit.html</a></p>
<blockquote>
<p><strong>应注意，在本框架使用中实际无需在测试用例加载任何文件。</strong></p>
</blockquote>
<h2 id="配置文件的设置">配置文件的设置<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6%E7%9A%84%E8%AE%BE%E7%BD%AE" class="anchor" title="Link to this section"><br />
</a></h2>
<p>&lt;?xml version=&#8217;1.0&#8242; encoding=&#8217;UTF-8&#8242; ?&gt;<br /> &lt;AllTests&gt;<br />     &lt;TestSuite&gt;<br />         &lt;name&gt;FoobarTest&lt;/name&gt;<br />         &lt;require&gt;AnotherFoobar.php&lt;/require&gt;<br />     &lt;/TestSuite&gt;<br />     &lt;Test&gt;<br />         &lt;class&gt;Foo_Bar_AllTest&lt;/class&gt;<br />         &lt;method&gt;suite&lt;/method&gt;<br />         &lt;require&gt;/home/foo/bar/AnotherLib.php&lt;/require&gt;<br />     &lt;/Test&gt;<br /> &lt;/AllTests&gt;</p>
<ul>
<li><span class="missing wiki">TestSuite?</span> 标签指定需要加载的单元测试用例。name 标签指定测试用例名（类名）。</li>
<li>Test 为一组单元测试用例。class 标签指定测试用例组类名，method 标签指定该类返回 PHPUnit_Framework_TestSuite 实例的类方法。</li>
<li>类名的命名应遵从 Zend Framework 的命名规则，即下划线分隔文件路径作为类名。如：类文件存放于 Foo/Bar/AllTest.php，则类对应为 class Foo_Bar_AllTest {&#8230;}。</li>
<li>测试用例和测试用例组都将自动加载。保存于 include path 下，符合 Zend Framework 类命名规范的类也都将自动加载（使用 Zend_Loader::registerAutoload() 方法）。若还需加载其他文件，应指定 require 标签，require 标签内容为待加载文件的完整路径或相对于测试目录（tests）的相对路径。</li>
</ul>
<p>&nbsp;</p>
<h2 id="执行测试">执行测试<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#%E6%89%A7%E8%A1%8C%E6%B5%8B%E8%AF%95" class="anchor" title="Link to this section"><br />
</a></h2>
<ol>
<li>php 的 cli 程序应在系统 PATH 中。</li>
<li>PHPUnit 的执行程序应在系统 PATH 中（Windows 下为 PHPUnit.bat，Linux 下为 PHPUnit.sh）。</li>
</ol>
<h3 id="AllTests">All Tests<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#AllTests" class="anchor" title="Link to this section"><br />
</a></h3>
<blockquote>
<p>进入测试框架所在目录，执行 php <span class="missing wiki">AllTests?</span>.php。</p>
</blockquote>
<h3 id="OneTest">One Test<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#OneTest" class="anchor" title="Link to this section"><br />
</a></h3>
<blockquote>
<p>进入测试框架所在目录，执行 php <span class="missing wiki">OneTest?</span>.php Test_Name。</p>
</blockquote>
<h2 id="改进方向">改进方向<a href="http://adam.nethop.com.hk/ectrac/wiki/testFramework#%E6%94%B9%E8%BF%9B%E6%96%B9%E5%90%91" class="anchor" title="Link to this section"><br />
</a></h2>
<ul>
<li>迭代测试用例，子集测试用例可作为独立的测试执行，亦可通过配置文件加载入上级测试执行。</li>
<li>通过配置文件自动生成测试用例框架，编写测试时只需要填写相应测试断言。</li>
</ul>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2007/12/ninny-project-%e5%8d%95%e5%85%83%e6%b5%8b%e8%af%95%e6%a1%86%e6%9e%b6%e4%bd%bf%e7%94%a8%e8%af%b4%e6%98%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ninny Project 的数据库完成向 mysql 5.0 的迁移</title>
		<link>http://www.mikespook.com/2007/07/ninny-project-%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%8c%e6%88%90%e5%90%91-mysql-50-%e7%9a%84%e8%bf%81%e7%a7%bb/</link>
		<comments>http://www.mikespook.com/2007/07/ninny-project-%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%8c%e6%88%90%e5%90%91-mysql-50-%e7%9a%84%e8%bf%81%e7%a7%bb/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 15:04:02 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[ninny Project]]></category>

		<guid isPermaLink="false">http://blog.xxiyy.com/?p=29</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
升级为 PowerDesigner 12 来维护逻辑表果然方便多了，可以随意生成 Oracle 10g 和 mysql 5.0 的物理表。在修改了配置文件之后，我惊喜的发现原来一行代码也不需要修改，就完成了迁移工作。Zend Framework 的数据库部分的设计果然可圈可点。

由于服务器自身的限制，以 Oracle 作为数据库的版本无法提供演示和下载。所以迫不得已只好再维护一个 mysql 5.0 的数据库版本。PowerDesigner 真的是利器，逻辑表不需要任何修改就可以生成 mysql 版本的物理表。如果大家有类似的迁移需求，推荐大家也用一用这个。等有钱了，一定买一套正版回来用。

<span class="readmore"><a href="http://www.mikespook.com/2007/07/ninny-project-%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%8c%e6%88%90%e5%90%91-mysql-50-%e7%9a%84%e8%bf%81%e7%a7%bb/" title="ninny Project 的数据库完成向 mysql 5.0 的迁移">阅读全文——共467字</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<p>升级为 PowerDesigner 12 来维护逻辑表果然方便多了，可以随意生成 Oracle 10g 和 mysql 5.0 的物理表。在修改了配置文件之后，我惊喜的发现原来一行代码也不需要修改，就完成了迁移工作。Zend Framework 的数据库部分的设计果然可圈可点。</p>
<p>由于服务器自身的限制，以 Oracle 作为数据库的版本无法提供演示和下载。所以迫不得已只好再维护一个 mysql 5.0 的数据库版本。PowerDesigner 真的是利器，逻辑表不需要任何修改就可以生成 mysql 版本的物理表。如果大家有类似的迁移需求，推荐大家也用一用这个。等有钱了，一定买一套正版回来用。</p>
<p>修改了资源权值和角色权值为添加时间戳，这样可以省掉维护两个触发器。PowerDesigner 12 好像还不能编写 mysql 5.0 的触发器。或许我需要手工添加一些规则才可以再 PowerDesigner 中直接编写 mysql 的触发器。不过不管怎么样，现在不需要触发器也可以按正常的权值构造 ACL 对象了。</p>
<p>下一步的计划就是构造一个后台管理，将资源、角色、权限、用户等的管理都放到后台中进行。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2007/07/ninny-project-%e7%9a%84%e6%95%b0%e6%8d%ae%e5%ba%93%e5%ae%8c%e6%88%90%e5%90%91-mysql-50-%e7%9a%84%e8%bf%81%e7%a7%bb/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>为提升便利性，为 ninny Project 添加两个脚本工具</title>
		<link>http://www.mikespook.com/2007/07/%e4%b8%ba%e6%8f%90%e5%8d%87%e4%be%bf%e5%88%a9%e6%80%a7%ef%bc%8c%e4%b8%ba-ninny-project-%e6%b7%bb%e5%8a%a0%e4%b8%a4%e4%b8%aa%e8%84%9a%e6%9c%ac%e5%b7%a5%e5%85%b7/</link>
		<comments>http://www.mikespook.com/2007/07/%e4%b8%ba%e6%8f%90%e5%8d%87%e4%be%bf%e5%88%a9%e6%80%a7%ef%bc%8c%e4%b8%ba-ninny-project-%e6%b7%bb%e5%8a%a0%e4%b8%a4%e4%b8%aa%e8%84%9a%e6%9c%ac%e5%b7%a5%e5%85%b7/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 05:27:49 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[ninny Project]]></category>

		<guid isPermaLink="false">http://blog.xxiyy.com/?p=22</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
工具存放地址：svn://www.i-fang.com/IfangSites/trunk/app/bin

说明：这些工具是为快速开发编写的，请不要尝试在部署的时候使用。因为，多数服务器无法使用 CLI 方式执行 PHP 脚本。而这些工具只能执行于 CLI 模式下。



<span class="readmore"><a href="http://www.mikespook.com/2007/07/%e4%b8%ba%e6%8f%90%e5%8d%87%e4%be%bf%e5%88%a9%e6%80%a7%ef%bc%8c%e4%b8%ba-ninny-project-%e6%b7%bb%e5%8a%a0%e4%b8%a4%e4%b8%aa%e8%84%9a%e6%9c%ac%e5%b7%a5%e5%85%b7/" title="为提升便利性，为 ninny Project 添加两个脚本工具">阅读全文——共468字</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<p>工具存放地址：<strong><a href="svn://www.i-fang.com/IfangSites/trunk/app/bin">svn://www.i-fang.com/IfangSites/trunk/app/bin</a></strong></p>
<p>说明：这些工具是为快速开发编写的，请不要尝试在部署的时候使用。因为，多数服务器无法使用 CLI 方式执行 PHP 脚本。而这些工具只能执行于 CLI 模式下。</p>
<ol>
<li><strong>collectResouces.php &mdash;&mdash; 资源收集工具<br />
    </strong><br />
    我一直为 ACL 中资源的管理而烦恼，所以编写了这个工具。对于通用性资源（module、controller、action）进行采集，并按照顺序插入数据库中的资源表。<br />
    使用方法：php collectResouces.php</li>
<li><strong>createModule.php &mdash;&mdash; 模块、控制器、动作自动创建工具<br />
    </strong><br />
    其实编写 Controller Action 和 View Script 的第一步工作都是一样的。创建目录，创建文件，添加固定的内容&hellip;&hellip;对于我来说，很烦。所以编写了这个脚本可以通过简单的 Yes/No 方式自动创建必要的目录、文件、代码框架。<br />
    使用方法：php createModule.php</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2007/07/%e4%b8%ba%e6%8f%90%e5%8d%87%e4%be%bf%e5%88%a9%e6%80%a7%ef%bc%8c%e4%b8%ba-ninny-project-%e6%b7%bb%e5%8a%a0%e4%b8%a4%e4%b8%aa%e8%84%9a%e6%9c%ac%e5%b7%a5%e5%85%b7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>基于 Zend Framework 的整合快速开发结构</title>
		<link>http://www.mikespook.com/2007/07/%e5%9f%ba%e4%ba%8e-zend-framework-%e7%9a%84%e6%95%b4%e5%90%88%e5%bf%ab%e9%80%9f%e5%bc%80%e5%8f%91%e7%bb%93%e6%9e%84/</link>
		<comments>http://www.mikespook.com/2007/07/%e5%9f%ba%e4%ba%8e-zend-framework-%e7%9a%84%e6%95%b4%e5%90%88%e5%bf%ab%e9%80%9f%e5%bc%80%e5%8f%91%e7%bb%93%e6%9e%84/#comments</comments>
		<pubDate>Tue, 10 Jul 2007 10:16:34 +0000</pubDate>
		<dc:creator>mikespook</dc:creator>
				<category><![CDATA[ninny Project]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://blog.xxiyy.com/?p=20</guid>
		<description><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
在思考现有项目代码重构的过程中的附带产品。主要是基于 Zend Framework 并对其中一些内容进行扩展、整合。放弃部分灵活性，同时提高耦合度为代价，换取开发速度的提升。

我准备将这个项目的代号命名为&#8220;ninny&#8221;。

项目SVN ： svn://www.i-fang.com/IfangSites

<span class="readmore"><a href="http://www.mikespook.com/2007/07/%e5%9f%ba%e4%ba%8e-zend-framework-%e7%9a%84%e6%95%b4%e5%90%88%e5%bf%ab%e9%80%9f%e5%bc%80%e5%8f%91%e7%bb%93%e6%9e%84/" title="基于 Zend Framework 的整合快速开发结构">阅读全文——共211字</a></span>]]></description>
			<content:encoded><![CDATA[<style type="text/css">
#leftcontainerBox {
	float:left;
	position: fixed;
	top: 60%;
	left: 70px;
}
#leftcontainerBox .buttons {
	float:left;
	clear:both;
	margin:4px 4px 4px 4px;
	padding-bottom:2px;
}
#bottomcontainerBox {
	width: 50%;
	padding-top: 1px;
}
#bottomcontainerBox .buttons {
	float: left;
	margin: 4px 4px 4px 4px;
}
</style>
<p>在思考现有项目代码重构的过程中的附带产品。主要是基于 Zend Framework 并对其中一些内容进行扩展、整合。放弃部分灵活性，同时提高耦合度为代价，换取开发速度的提升。</p>
<p>我准备将这个项目的代号命名为&ldquo;ninny&rdquo;。</p>
<p>项目SVN ： <a href="svn://www.i-fang.com/IfangSites">svn://www.i-fang.com/IfangSites</a></p>
<p>项目页面：<a href="http://blog.xxiyy.com/?page_id=21">http://blog.xxiyy.com/?page_id=21</a></p>
<p>欢迎拍砖。<img src="http://blog.xxiyy.com/wp-content/plugins/fckeditor_for_wordpress/smiles/msn/teeth_smile.gif" alt="" /></p>
<p>现有 E-R 图，权限控制部分</p>
<div class="alignleft" id="upload-file-view"><a target="_blank" title="Direct link to file" href="http://blog.xxiyy.com/wp-content/uploads/2007/07/ifangsites-er.gif"><img width="171" height="97" alt="E-R 图" src="http://blog.xxiyy.com/wp-content/uploads/2007/07/ifangsites-er.thumbnail.gif" /></a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mikespook.com/2007/07/%e5%9f%ba%e4%ba%8e-zend-framework-%e7%9a%84%e6%95%b4%e5%90%88%e5%bf%ab%e9%80%9f%e5%bc%80%e5%8f%91%e7%bb%93%e6%9e%84/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

