<?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>纯粹的生活</title>
	<atom:link href="http://blog.donews.com/anyiLee83/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.donews.com/anyiLee83</link>
	<description>prp--- null null null null null null null null null null null null null null null null null null null null null null null null null null null null</description>
	<lastBuildDate>Tue, 11 Dec 2007 12:00:00 +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>用JS实现图片框的动态刷新功能</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/12/11/1235958.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/12/11/1235958.aspx#comments</comments>
		<pubDate>Tue, 11 Dec 2007 12:00:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/12/11/1235958.aspx</guid>
		<description><![CDATA[<p>//CSS样式</p>
<p>#f_div {<br />&#160;BORDER-TOP: #fff 1px solid; OVERFLOW: hidden; WIDTH: 262px; HEIGHT: 197px<br />}<br />#f_img {<br />&#160;BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; FILTER: revealTrans(duration=1,transition=6); BORDER-LEFT: #000 1px solid; WIDTH: 260px; BORDER-BOTTOM: #000 1px solid; HEIGHT: 195px<br />}<br />#f_buttonDiv {<br />&#160;RIGHT: 1px; OVERFLOW: hidden; WIDTH: 100%; POSITION: relative; TOP: -15px; HEIGHT: 14px<br />}<br />#all_button {<br />&#160;]]></description>
			<content:encoded><![CDATA[<p>//CSS样式</p>
<p>#f_div {<br />&nbsp;BORDER-TOP: #fff 1px solid; OVERFLOW: hidden; WIDTH: 262px; HEIGHT: 197px<br />}<br />#f_img {<br />&nbsp;BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; FILTER: revealTrans(duration=1,transition=6); BORDER-LEFT: #000 1px solid; WIDTH: 260px; BORDER-BOTTOM: #000 1px solid; HEIGHT: 195px<br />}<br />#f_buttonDiv {<br />&nbsp;RIGHT: 1px; OVERFLOW: hidden; WIDTH: 100%; POSITION: relative; TOP: -15px; HEIGHT: 14px<br />}<br />#all_button {<br />&nbsp;BACKGROUND: #fff<br />}<br />#f_line {<br />&nbsp;FILTER: progid:DXImageTransform.Microsoft.Alpha(startX=0, startY=0, finishX=100, finishY=100,style=1,opacity=0,finishOpacity=40); FLOAT: right; WIDTH: 100px; BACKGROUND-COLOR: #000<br />}<br />#f_buttonDiv A {<br />&nbsp;PADDING-RIGHT: 0px! important; PADDING-LEFT: 0px! important; FLOAT: right; PADDING-BOTTOM: 0px! important; OVERFLOW: hidden; BORDER-LEFT: #fff 1px solid; WIDTH: 22px; COLOR: #fff; PADDING-TOP: 1px; HEIGHT: 14px<br />}<br />#f_buttonDiv A:link {<br />&nbsp;BACKGROUND: #000<br />}<br />#f_buttonDiv A:visited {<br />&nbsp;BACKGROUND: #000<br />}<br />#f_buttonDiv A:active {<br />&nbsp;BACKGROUND: #000<br />}<br />#f_buttonDiv A:hover {<br />&nbsp;BACKGROUND: #ff840c<br />}<br />#f_buttonDiv A.on:link {<br />&nbsp;BACKGROUND: #ff840c<br />}<br />#f_buttonDiv A.on:visited {<br />&nbsp;BACKGROUND: #ff840c<br />}<br />#f_buttonDiv A.on:active {<br />&nbsp;BACKGROUND: #ff840c<br />}<br />#f_buttonDiv A.on:hover {<br />&nbsp;BACKGROUND: #ff840c<br />}<br />#button_bg A {<br />&nbsp;TEXT-ALIGN: center<br />}<br />#f_text {<br />&nbsp;DISPLAY: none<br />}</p>
<p>&nbsp;</p>
<p>//JS代码块</p>
<p>&lt;SCRIPT&gt;<br />var imgUrl = new Array();<br />var imgText = new Array();<br />var imgLink = new Array();<br />var imgAlt= new Array();<br />var imgWidth=260;<br />var imgHeight=195;<br />var _timeOut_=4000; //时间值<br />var timeOut=_timeOut_;<br />var timeOut2=_timeOut_/2; //onmouseout img后需要切换的时间<br />var now=0;<br />var firstTime=true;<br />var target=&quot;_blank&quot;;&nbsp;&nbsp; //打开方式<br />var ver=2; //兼容浏览器版本 默认2 为非ie<br />imgUrl[0]=&#8217;http://localhost:1549/ASPProject/Images/IndexImage/图片框/1.jpg&#8217;;<br />imgLink[0]=&#8217;http://localhost:1549/ASPProject/index.aspx&#8217;;<br />imgAlt[0]=&#8217;图片文字介绍&#8217;;</p>
<p>imgUrl[1]=&#8217;http://localhost:1549/ASPProject/Images/IndexImage/图片框/2.jpg&#8217;;<br />imgLink[1]=&#8217;http://localhost:1549/ASPProject/index.aspx&#8217;;<br />imgAlt[1]=&#8217;图片文字介绍&#8217;;</p>
<p>imgUrl[2]=&#8217;http://localhost:1549/ASPProject/Images/IndexImage/图片框/3.jpg&#8217;;<br />imgLink[2]=&#8217;http://localhost:1549/ASPProject/index.aspx&#8217;;<br />imgAlt[2]=&#8217;图片文字介绍&#8217;;</p>
<p>imgUrl[3]=&#8217;http://localhost:1549/ASPProject/Images/IndexImage/图片框/4.jpg&#8217;;<br />imgLink[3]=&#8217;http://localhost:1549/ASPProject/index.aspx&#8217;;<br />imgAlt[3]=&#8217;图片文字介绍&#8217;;</p>
<p>imgUrl[4]=&#8217;http://localhost:1549/ASPProject/Images/IndexImage/图片框/5.jpg&#8217;;<br />imgLink[4]=&#8217;http://localhost:1549/ASPProject/index.aspx&#8217;;<br />imgAlt[4]=&#8217;QVGA手机壁纸第二十八期: 梦幻风景&#8217;;</p>
<p>var count=0;<br />for (i=0;i&lt;imgUrl.length;i++) {<br />if( (imgUrl[i]!=&quot;&quot;) &amp;&amp; (imgText[i]!=&quot;&quot;)&amp;&amp; (imgLink[i]!=&quot;&quot;)&amp;&amp; (imgAlt[i]!=&quot;&quot;)) {<br />count++;<br />} else {<br />break;<br />}<br />}<br />function change(){<br />if (ver==1){<br />with(eval(&#8216;f_img&#8217;).filters.revealTrans){<br />Transition=6;<br />apply();<br />play(); <br />}<br />}<br />if (firstTime){ firstTime=false;timeOut=_timeOut_/2;}<br />else{&nbsp; <br />f_img.src=imgUrl[now];<br />f_img.alt=imgAlt[now];<br />var f_imgLink = document.getElementById(&#8216;f_imgLink&#8217;);<br />f_imgLink.href=imgLink[now];<br />f_text.innerHTML=imgText[now];<br />for (var i=0;i&lt;count;i++) {eval(&#8216;b&#8217;+i).className=&quot;button&quot;;}<br />eval(&#8216;b&#8217;+now).className=&quot;on&quot;;&nbsp;&nbsp; <br />now=(now&gt;=imgUrl.length-1)?0:now+1;<br />timeOut=_timeOut_;&nbsp;&nbsp; <br />}<br />theTimer=setTimeout(&quot;change()&quot;, timeOut);<br />}<br />function b_change(num){<br />window.clearInterval(theTimer);<br />now=num;<br />firstTime=false;<br />change();<br />}<br />try{&nbsp; //ie版本<br />new ActiveXObject(&quot;DXImageTransform.Microsoft.revealTrans&quot;);<br />ver=1; <br />}<br />catch (e){ver=2;}<br />//表现层 start<br />with(document){<br />write(&#8216;&lt;div id=&quot;f_div&quot;&gt;&#8217;);<br />write(&#8216;&lt;div id=&quot;f_imgDiv&quot;&gt;&#8217;);<br />write(&#8216;&lt;a id=&quot;f_imgLink&quot; target=&#8217;+target+&#8217; href=&quot;&#8217;+imgLink[now]+&#8217;&quot;&gt;&#8217;);<br />write(&#8216;&lt;img id=&quot;f_img&quot; width=&#8217;+imgWidth+&#8217; height=&#8217;+imgHeight+&#8217; src=&quot;&#8217;+imgUrl[now]+&#8217;&quot; alt=&quot;&#8217;+imgAlt[now]+&#8217;&quot;&gt;&#8217;);<br />write(&#8216;&lt;/a&gt;&#8217;);<br />write(&#8216;&lt;/div&gt;&#8217;);<br />write(&#8216;&lt;div id=&quot;f_buttonDiv&quot;&gt;&#8217;);<br />write(&#8216;&lt;div id=&quot;button_bg&quot;&gt;&#8217;);&nbsp;&nbsp;<br />for (var i=count;i&gt;0;i&#8211;){&nbsp;&nbsp; <br />if(i==now+1){write(&#8216;&lt;a id=&quot;b&#8217;+(i-1)+&#8217;&quot; class=&quot;on&quot; target=&quot;_self&quot; href=&quot;javascript:b_change(&#8216;+(i-1)+&#8217;)&quot; onfocus=&quot;blur()&quot; title=&quot;&#8217;+imgAlt[(i-1)]+&#8217;&quot;&gt;&#8217;+i+&#8217;&lt;/a&gt;&#8217;);}<br />else{write(&#8216;&lt;a id=&quot;b&#8217;+(i-1)+&#8217;&quot;&nbsp; target=&quot;_self&quot; href=&quot;javascript:b_change(&#8216;+(i-1)+&#8217;)&quot; onfocus=&quot;blur()&quot;&nbsp; title=&quot;&#8217;+imgAlt[(i-1)]+&#8217;&quot;&gt;&#8217;+i+&#8217;&lt;/a&gt;&#8217;);}<br />}<br />write(&#8216;&lt;/div&gt;&#8217;);<br />if (ver==1){write(&#8216;&lt;div id=&quot;f_line&quot;&gt;&lt;/div&gt;&#8217;);}<br />write(&#8216;&lt;/div&gt;&#8217;);<br />write(&#8216;&lt;div id=&quot;f_text&quot;&gt;&#8217;);<br />write(imgText[now]);<br />write(&#8216;&lt;/div&gt;&#8217;);&nbsp;<br />write(&#8216;&lt;/div&gt;&#8217;);<br />}<br />//表现层 end <br />var f_img=document.getElementById(&#8216;f_img&#8217;);<br />f_img.onmouseover=function(){window.clearInterval(theTimer);}<br />f_img.onmouseout=function(){theTimer=setTimeout(&quot;change()&quot;, timeOut2);}<br />var theTimer = setTimeout(&quot;change()&quot;, _timeOut_/2);</p>
<p>&lt;/SCRIPT&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/12/11/1235958.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>黑暗</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/07/12/1185833.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/07/12/1185833.aspx#comments</comments>
		<pubDate>Thu, 12 Jul 2007 12:06:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[自己]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/07/12/1185833.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160; 犹如坠入深渊般的无助 恐惧 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 黑暗包围着我</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;无法冲破自己的掌控</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;i want , i want ,breaking the habit&#160;... but&#160; i&#160; can't ,it's so darkness.</p>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 犹如坠入深渊般的无助 恐惧 </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 黑暗包围着我</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;无法冲破自己的掌控</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i want , i want ,breaking the habit&nbsp;&#8230; but&nbsp; i&nbsp; can&#8217;t ,it&#8217;s so darkness.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/07/12/1185833.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>不知所云</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/06/15/1175906.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/06/15/1175906.aspx#comments</comments>
		<pubDate>Fri, 15 Jun 2007 11:22:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[自己]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/06/15/1175906.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;最近不是很好 其实我一直在努力的掌控自己 可结果往往和想的不一样</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 我太追求完美了 太敏感了 有些事 有些东西 当你越想达到完美状态 最后却事与愿违 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 我是一个很怕改变的人 怕环境的改变 怕生活的改变... 习惯了一种状态后&#160;..就不想再动了</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;i'm so tired..................</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; </p>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;最近不是很好 其实我一直在努力的掌控自己 可结果往往和想的不一样</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我太追求完美了 太敏感了 有些事 有些东西 当你越想达到完美状态 最后却事与愿违 </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 我是一个很怕改变的人 怕环境的改变 怕生活的改变&#8230; 习惯了一种状态后&nbsp;..就不想再动了</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i&#8217;m so tired&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/06/15/1175906.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>实施上传操作</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/06/05/1172440.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/06/05/1172440.aspx#comments</comments>
		<pubDate>Tue, 05 Jun 2007 12:55:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/06/05/1172440.aspx</guid>
		<description><![CDATA[<p>需要一个外部JAR包： jspSmartUploadch.jar</p>
<p>&#60;%@ page language=&#34;java&#34; contentType=&#34;text/html; charset=gb2312&#34;%&#62;<br />&#60;!DOCTYPE html PUBLIC &#34;-//W3C//DTD HTML 4.01 <br />Transitional//EN&#34; &#34;<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>&#34;&#62;<br />&#60;<a href="mailto:%@page">%@page</a> import=&#34;com.jspsmart.upload.SmartUpload&#34;%&#62;<br />&#60;<a href="mailto:%@page">%@page</a> import=&#34;com.jspsmart.up]]></description>
			<content:encoded><![CDATA[<p>需要一个外部JAR包： jspSmartUploadch.jar</p>
<p>&lt;%@ page language=&quot;java&quot; contentType=&quot;text/html; charset=gb2312&quot;%&gt;<br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 <br />Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>&quot;&gt;<br />&lt;<a href="mailto:%@page">%@page</a> import=&quot;com.jspsmart.upload.SmartUpload&quot;%&gt;<br />&lt;<a href="mailto:%@page">%@page</a> import=&quot;com.jspsmart.upload.Files&quot;%&gt;<br />&lt;<a href="mailto:%@page">%@page</a> import=&quot;com.jspsmart.upload.File&quot;%&gt;<br />&lt;html&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot;&gt;<br />&lt;title&gt;Insert title here&lt;/title&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;%<br />//事例话上传下载</p>
<p>SmartUpload su = new SmartUpload();<br />//初始化环境 pageContext为内置对象<br />su.initialize(pageContext);<br />//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-设置属性&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />//设置最大的文件大小<br />su.setMaxFileSize(1024*1024);<br />//设置总的文件大小<br />su.setTotalMaxFileSize(5*1024*1024);<br />//设置允许上传 和禁止上传 最好不要同时出现<br />su.setAllowedFilesList(&quot;jpg,png,jpeg&quot;);<br />su.setDeniedFilesList(&quot;exe,bat&quot;);<br />//上传<br />su.upload();<br />//保存<br />int i=su.save(&quot;/upload&quot;);<br />out.println(&quot;成功上传了&quot;+i+&quot;个文件&quot;);<br />//上传文件的集合<br />Files fs =su.getFiles();<br />for(int j=0;i&lt;fs.getCount();++j){<br />&nbsp;File f = fs.getFile(j);<br />&nbsp;%&gt;<br />&nbsp;来自 :&lt;%=f.getFieldName() %&gt;<br />&nbsp;文件名:&lt;%=f.getFileName() %&gt;<br />&nbsp;上传路径:&lt;%=f.getFilePathName() %&gt;<br />&nbsp;&lt;hr&gt;<br />&nbsp;&lt;% <br />&nbsp;<br />}</p>
<p>另：需要在表单属性里面设置enctype=&quot;multipart/form-data&quot; ，&lt;input type=&quot;file&quot; name=&quot;file1&quot;&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/06/05/1172440.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>通过HttpSession实现会话操作</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/05/16/1165633.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/05/16/1165633.aspx#comments</comments>
		<pubDate>Wed, 16 May 2007 10:02:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/05/16/1165633.aspx</guid>
		<description><![CDATA[<p>import java.io.IOException;<br />import javax.servlet.ServletException;<br />import javax.servlet.http.HttpServletRequest;<br />import javax.servlet.http.HttpServletResponse;<br />import javax.servlet.http.HttpSession;</p>
<p>/**<br />&#160;* Servlet implementation class for Servlet: LoginTest<br />&#160;*<br />&#160;*/<br />&#160;public class LoginTest extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {<br />&#160; <br />&#160;<br />&#160;private static final long seri]]></description>
			<content:encoded><![CDATA[<p>import java.io.IOException;<br />import javax.servlet.ServletException;<br />import javax.servlet.http.HttpServletRequest;<br />import javax.servlet.http.HttpServletResponse;<br />import javax.servlet.http.HttpSession;</p>
<p>/**<br />&nbsp;* Servlet implementation class for Servlet: LoginTest<br />&nbsp;*<br />&nbsp;*/<br />&nbsp;public class LoginTest extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {<br />&nbsp; <br />&nbsp;<br />&nbsp;private static final long serialVersionUID = -7462485251572982227L;</p>
<p>&nbsp;public LoginTest() {<br />&nbsp;&nbsp;super();<br />&nbsp;}&nbsp;&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;doPost(request, response);<br />&nbsp;}&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;request.setCharacterEncoding(&quot;gb2312&quot;);<br />&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;//得到会话<br />&nbsp;&nbsp;HttpSession session=request.getSession();<br />&nbsp;&nbsp;Object o=session.getAttribute(&quot;isLogin&quot;);<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;if(o!=null){<br />&nbsp;&nbsp;&nbsp;String str=o.toString();<br />&nbsp;&nbsp;&nbsp;if(&quot;ok&quot;.equals(str)){<br />&nbsp;&nbsp;&nbsp;&nbsp;response.sendRedirect(&quot;index1.html&quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;String acc=request.getParameter(&quot;account&quot;);<br />&nbsp;&nbsp;String pwd=request.getParameter(&quot;pass&quot;);<br />&nbsp;&nbsp;if(&quot;user&quot;.equals(acc)&amp;&amp;&quot;123456&quot;.equals(pwd)){<br />&nbsp;&nbsp;&nbsp;//<br />&nbsp;&nbsp;&nbsp;session.setAttribute(&quot;isLogin&quot;,&quot;ok&quot;);<br />&nbsp;&nbsp;&nbsp;response.sendRedirect(&quot;index1.html&quot;);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;}else{<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;response.sendRedirect(&quot;index.html&quot;);<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;}&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br />}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/05/16/1165633.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Servlet-Cookie</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/05/15/1165292.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/05/15/1165292.aspx#comments</comments>
		<pubDate>Tue, 15 May 2007 09:56:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/05/15/1165292.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160; 一个利用javaServlet操控Cookie的例子</p>
<p>package com.j2ee.cookie;</p>
<p>import java.io.IOException;<br />import java.io.PrintWriter;</p>
<p>import javax.servlet.ServletException;<br />import javax.servlet.http.Cookie;<br />import javax.servlet.http.HttpServletRequest;<br />import javax.servlet.http.HttpServletResponse;</p>
<p>/**<br />&#160;* Servlet implementation class for Servlet: CookieTest<br />&#160;*<br />&#160;*/<br />&#160;public class CookieTest ex]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 一个利用javaServlet操控Cookie的例子</p>
<p>package com.j2ee.cookie;</p>
<p>import java.io.IOException;<br />import java.io.PrintWriter;</p>
<p>import javax.servlet.ServletException;<br />import javax.servlet.http.Cookie;<br />import javax.servlet.http.HttpServletRequest;<br />import javax.servlet.http.HttpServletResponse;</p>
<p>/**<br />&nbsp;* Servlet implementation class for Servlet: CookieTest<br />&nbsp;*<br />&nbsp;*/<br />&nbsp;public class CookieTest extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {<br />&nbsp;&nbsp; <br />&nbsp;private static final long serialVersionUID = 1L;</p>
<p>&nbsp;<br />&nbsp;public CookieTest() {<br />&nbsp;&nbsp;super();<br />&nbsp;}&nbsp;&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;doPost(request, response);<br />&nbsp;}&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;boolean cookieFound=false;<br />&nbsp;&nbsp;Cookie myCookie=null;<br />&nbsp;&nbsp;Cookie[] cookieset=request.getCookies();<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;response.setContentType(&quot;text/html;charset=gb2312&quot;);<br />&nbsp;&nbsp;PrintWriter pw=response.getWriter();<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;if(cookieset!=null){<br />&nbsp;&nbsp;&nbsp;for(Cookie c:cookieset){<br />&nbsp;&nbsp;&nbsp;&nbsp;if(&quot;logincount&quot;.equals(c.getName())){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookieFound=true;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;myCookie=c;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;if(cookieFound){<br />&nbsp;&nbsp;&nbsp;&nbsp;int count=Integer.parseInt(myCookie.getValue());<br />&nbsp;&nbsp;&nbsp;&nbsp;count++;<br />&nbsp;&nbsp;&nbsp;&nbsp;if(count==5){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pw.println(&quot;You are the one! Lucky~!&quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;else{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pw.println(&quot;You are the&nbsp;&nbsp; &quot;+count);<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;myCookie.setValue(String.valueOf(count));<br />&nbsp;&nbsp;&nbsp;&nbsp;myCookie.setMaxAge(60*60*24*30);<br />&nbsp;&nbsp;&nbsp;&nbsp;response.addCookie(myCookie);<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;else{<br />&nbsp;&nbsp;&nbsp;&nbsp;myCookie = new Cookie(&quot;logincount&quot;,&quot;1&quot;);<br />&nbsp;&nbsp;&nbsp;&nbsp;myCookie.setMaxAge(60*60*24*30);<br />&nbsp;&nbsp;&nbsp;&nbsp;response.addCookie(myCookie);<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;else{<br />&nbsp;&nbsp;&nbsp;myCookie = new Cookie(&quot;logincount&quot;,&quot;1&quot;);<br />&nbsp;&nbsp;&nbsp;myCookie.setMaxAge(60*60*24*30);<br />&nbsp;&nbsp;&nbsp;response.addCookie(myCookie);<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;}&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br />}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/05/15/1165292.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>这两个月</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/05/14/1164938.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/05/14/1164938.aspx#comments</comments>
		<pubDate>Mon, 14 May 2007 12:18:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[自己]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/05/14/1164938.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160; 从3月份开始 一直身体不太好 关键是胃</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;上个星期做了个身体检查 验血 肝功能 一切正常</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 然后做了个胃镜 慢性浅表性胃炎 医生开了点药 叫我要养胃 </p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; 身体不好 看见一切都是灰色的</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 人总有怕的那一刻 请珍惜眼前的 关心周围的人 &#160;&#160;&#160;&#160;&#160;&#160; </p>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 从3月份开始 一直身体不太好 关键是胃</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;上个星期做了个身体检查 验血 肝功能 一切正常</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 然后做了个胃镜 慢性浅表性胃炎 医生开了点药 叫我要养胃 </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 身体不好 看见一切都是灰色的</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 人总有怕的那一刻 请珍惜眼前的 关心周围的人 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/05/14/1164938.aspx/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tomcat+Mysql+Servlet</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/05/11/1163406.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/05/11/1163406.aspx#comments</comments>
		<pubDate>Fri, 11 May 2007 11:40:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/05/11/1163406.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160; 写的一个B/S模式例子 典型的3层架构 后台数据库为Mysql驱动&#160; 服务器端为Apache-Tomcat+Servlet </p>
<p>&#160;&#160;&#160;&#160;&#160; 前台表示层用JSP来处理</p>
<p>&#160;&#160;&#160;&#160;&#160; 以下为服务器端代码：</p>
<p>&#160;&#160;&#160; //------------------------------------------------------------------------------------------------------------------------------</p>
<p>public class Student {<br />&#160;private String name;<br />&#160;private String pass;<br />&#160;public Student(String name, String]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 写的一个B/S模式例子 典型的3层架构 后台数据库为Mysql驱动&nbsp; 服务器端为Apache-Tomcat+Servlet </p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 前台表示层用JSP来处理</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 以下为服务器端代码：</p>
<p>&nbsp;&nbsp;&nbsp; //&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>public class Student {<br />&nbsp;private String name;<br />&nbsp;private String pass;<br />&nbsp;public Student(String name, String pass) {<br />&nbsp;&nbsp;super();<br />&nbsp;&nbsp;this.name = name;<br />&nbsp;&nbsp;this.pass = pass;<br />&nbsp;}<br />&nbsp;public String getName() {<br />&nbsp;&nbsp;return name;<br />&nbsp;}<br />&nbsp;public void setName(String name) {<br />&nbsp;&nbsp;this.name = name;<br />&nbsp;}<br />&nbsp;public String getPass() {<br />&nbsp;&nbsp;return pass;<br />&nbsp;}<br />&nbsp;public void setPass(String pass) {<br />&nbsp;&nbsp;this.pass = pass;<br />&nbsp;}<br />&nbsp;<br />&nbsp;<br />&nbsp;}</p>
<p>//</p>
<p>import java.sql.Connection;<br />import java.sql.DriverManager;<br />import java.sql.SQLException;</p>
<p>public class MysqlConnecter {<br />&nbsp;<br />&nbsp;private Connection con;<br />&nbsp;public MysqlConnecter(String driver, String url, String user, String pass) {<br />&nbsp;&nbsp;super();<br />&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;Class.forName(driver);<br />&nbsp;&nbsp;&nbsp;con = DriverManager.getConnection(url,user,pass);<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;} catch (ClassNotFoundException e) {<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />&nbsp;&nbsp;} catch (SQLException e) {<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />&nbsp;&nbsp;}<br />&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;}<br />&nbsp;public Connection getCon() {<br />&nbsp;&nbsp;return con;<br />&nbsp;}<br />&nbsp;public void setCon(Connection con) {<br />&nbsp;&nbsp;this.con = con;<br />&nbsp;}<br />&nbsp;<br />&nbsp;<br />}</p>
<p>&nbsp;</p>
<p>//</p>
<p>import java.sql.Connection;<br />import java.sql.PreparedStatement;<br />import java.sql.ResultSet;<br />import java.sql.SQLException;</p>
<p>public class OperateAll {<br />&nbsp;private Connection con;<br />&nbsp;private Student stu;<br />&nbsp;private boolean is;<br />&nbsp;public OperateAll(Student stu){<br />&nbsp;&nbsp;this.stu=stu;<br />&nbsp;&nbsp;String driver=&quot;com.mysql.jdbc.Driver&quot;;<br />&nbsp;&nbsp;String url=&quot;jdbc:mysql://127.0.0.1/studb?useUnicode=true&amp;characterEncoding=GBK&quot;;<br />&nbsp;&nbsp;String user=&quot;root&quot;;<br />&nbsp;&nbsp;String pass=&quot;521123&quot;;<br />&nbsp;&nbsp;MysqlConnecter mysql=new MysqlConnecter(driver,url,user,pass);<br />&nbsp;&nbsp;con=mysql.getCon();<br />&nbsp;&nbsp;try {<br />&nbsp;&nbsp;&nbsp;PreparedStatement ps = con.prepareStatement(&quot;select * from students where name = ? and pass=?&quot;);<br />&nbsp;&nbsp;&nbsp;ps.setString(1,stu.getName());<br />&nbsp;&nbsp;&nbsp;ps.setString(2,stu.getPass());<br />&nbsp;&nbsp;&nbsp;ResultSet rs = ps.executeQuery();<br />&nbsp;&nbsp;&nbsp;if(rs.next()){<br />&nbsp;&nbsp;&nbsp;&nbsp;is=true;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;else{<br />&nbsp;&nbsp;&nbsp;&nbsp;is=false;<br />&nbsp;&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;} catch (SQLException e) {<br />&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;e.printStackTrace();<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;}<br />&nbsp;public boolean isIs() {<br />&nbsp;&nbsp;return is;<br />&nbsp;}<br />&nbsp;public void setIs(boolean is) {<br />&nbsp;&nbsp;this.is = is;<br />&nbsp;}<br />&nbsp;<br />&nbsp;</p>
<p>}</p>
<p>//</p>
<p>import java.io.IOException;<br />import java.io.PrintWriter;</p>
<p>import javax.servlet.ServletException;<br />import javax.servlet.http.HttpServletRequest;<br />import javax.servlet.http.HttpServletResponse;</p>
<p>/**<br />&nbsp;* Servlet implementation class for Servlet: Login<br />&nbsp;*<br />&nbsp;*/<br />&nbsp;public class Login extends javax.servlet.http.HttpServlet implements javax.servlet.Servlet {<br />&nbsp;&nbsp;&nbsp; <br />&nbsp;/**<br />&nbsp; * <br />&nbsp; */<br />&nbsp;private static final long serialVersionUID = 1L;</p>
<p>&nbsp;public Login() {<br />&nbsp;&nbsp;super();<br />&nbsp;}&nbsp;&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;String name=request.getParameter(&quot;username&quot;);<br />&nbsp;&nbsp;String pass=request.getParameter(&quot;pass&quot;);<br />&nbsp;&nbsp;Student stu=new Student(name,pass);<br />&nbsp;&nbsp;OperateAll op=new OperateAll(stu);<br />&nbsp;&nbsp;response.setContentType(&quot;text/html&quot;);<br />&nbsp;&nbsp;PrintWriter pw=response.getWriter();<br />&nbsp;&nbsp;if(op.isIs()){<br />&nbsp;&nbsp;&nbsp;pw.println(&quot;login&quot;);<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;else{<br />&nbsp;&nbsp;&nbsp;pw.println(&quot;refuse&quot;);<br />&nbsp;&nbsp;}<br />&nbsp;&nbsp;<br />&nbsp;&nbsp;<br />&nbsp;}&nbsp; &nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {<br />&nbsp;&nbsp;doGet(request, response);<br />&nbsp;}&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br />}</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/05/11/1163406.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Ive Done</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157149.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157149.aspx#comments</comments>
		<pubDate>Tue, 17 Apr 2007 13:46:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[声音]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/04/17/1157149.aspx</guid>
		<description><![CDATA[<p>&#160;&#160;&#160;&#160;&#160;&#160; Mad]Q[FroG回归了 &#8220;霸王&#8221;Zacard因兵役的问题退役了</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;火箭击败太阳 终于取得主场优势</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; 美国发生校园枪击案 死亡33人 .. ................ .</p>
<p>&#160;&#160;&#160;&#160;&#160;&#160; ........</p>]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mad]Q[FroG回归了 &ldquo;霸王&rdquo;Zacard因兵役的问题退役了</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;火箭击败太阳 终于取得主场优势</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 美国发生校园枪击案 死亡33人 .. &#8230;&#8230;&#8230;&#8230;&#8230;. .</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#8230;&#8230;..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157149.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>程序员眼中的UML&#8212;转</title>
		<link>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157133.aspx</link>
		<comments>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157133.aspx#comments</comments>
		<pubDate>Tue, 17 Apr 2007 12:55:00 +0000</pubDate>
		<dc:creator>Fshx</dc:creator>
				<category><![CDATA[技术]]></category>

		<guid isPermaLink="false">http://blog.donews.com/anyiLee83/archive/2007/04/17/1157133.aspx</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
<h1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-ALIGN: center" align="center"><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自</span><span lang="EN-US">1997</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年诞生以来，受到无数厂商、组织、专家学者的追捧和拥护，短短几年时间，便有一统天下之势]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<h1 style="MARGIN: 17pt 0cm 16.5pt; TEXT-ALIGN: center" align="center"><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自</span><span lang="EN-US">1997</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年诞生以来，受到无数厂商、组织、专家学者的追捧和拥护，短短几年时间，便有一统天下之势。提起建模语言，舍</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其谁？</span></h1>
<h2 style="MARGIN: 13pt 0cm"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><font face="Arial">UML</font></span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">相关标准</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><o:p></o:p></span></h2>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span lang="EN-US">OMG</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">组织作为影响力最大的面向对象技术的机构，早早便将</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">收入囊中，力捧其为标准建模语言。</span><span lang="EN-US">OMG</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span><span lang="EN-US">CORBA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">取得成功之后，最大的着力点便是</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">架构，而</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">架构的四大标准</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</span><span lang="EN-US">MOF</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</span><span lang="EN-US">XMI</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US">CWM</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中，围绕着</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的技术便有三种：</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">本身自不必说，版本已经到了</span><span lang="EN-US">2.0</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">；</span><span lang="EN-US">MOF</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为&ldquo;建模语言的语言&rdquo;，似乎就是为</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">量身定做的，虽说</span><span lang="EN-US">MOF</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有能力创建出与</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">并驾齐驱的建模语言，但是似乎没有看到谁这么干，大家只是在努力的发展</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的&ldquo;方言&rdquo;，例如</span><span lang="EN-US">UML Profile for CORBA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span><span lang="EN-US">UML Profile for EJB</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等等；</span><span lang="EN-US">XMI</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是&ldquo;模型的标准存储交换格式&rdquo;，为了解决不同的建模工具创建的模型不能互用的问题，</span><span lang="EN-US">OMG</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创建了</span><span lang="EN-US">XMI</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为模型的存储交换标准。这样一来，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具更加可以大行其道，使用不同的建模工具创建的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">模型可以互相交流，只要它们都基于</span><span lang="EN-US">XMI</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span></p>
<h2 style="MARGIN: 13pt 0cm"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><font face="Arial">UML</font></span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">相关工具</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><o:p></o:p></span></h2>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具的多寡与优劣可以看出某个技术的受欢迎程度，在建模工具中，不说</span><span lang="EN-US">100</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％，大概也有</span><span lang="EN-US">90</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％支持了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语言。最出名的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具</span><span lang="EN-US">Rational Rose</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，被</span><span lang="EN-US">IBM</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">收购了；</span><span lang="EN-US">Eclipse</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">下面的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具</span><span lang="EN-US">EclipseUML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">让开发它的小公司</span><span lang="EN-US">Omondo</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">也出名了；国内也有一个</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具，听说效果也不错，就是楚凡科技的</span><span lang="EN-US">Trufun Plato 2005</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。至于其他国际上有点名气的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具，更是不胜枚举，几乎有点软件实力的国家，都有自己的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当然，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不仅仅出现在专用的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具中，它也频繁出现在最新的各种开发环境中。例如编程开发环境</span><span lang="EN-US">JBuilder</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，具有将代码转换为</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图的功能；</span><span lang="EN-US">Together</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">就更进一步，直接实现了代码和类图的同步转换；</span><span lang="EN-US">Eclipse</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为最优秀的开放式开发平台，拥有众多的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">相关插件，除了前面提到的</span><span lang="EN-US">EclipseUML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，比较有名的还有</span><span lang="EN-US">EMF</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><span lang="EN-US">UML2</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">出现之后，在</span><span lang="EN-US">OMG</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的概念中，成为了</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的一个子集（虽然</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的名气远远大于</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">）。因此众多的</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具中，几乎都少不了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">功能。我认为很多</span><span lang="EN-US">MDA</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具就是从</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具直接改过来的。</span></p>
<h2 style="MARGIN: 13pt 0cm"><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><font face="Arial">UML</font></span><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">使用现状</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><o:p></o:p></span></h2>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">照理说来，如火如荼的标准和工具应该催生出如火如荼的应用才对，可是</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的使用状况实在不尽如人意。无论是身边的还是网络上的朋友，在项目中使用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的都是凤毛麟角，即便使用了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，也是在很小的范围内，完全没有发挥出</span><span lang="EN-US">1</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％的功效。现在总结一下目前我所知道的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">使用现状：</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; tab-stops: list 42.0pt; mso-list: l0 level1 lfo1"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore">l<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">读代码时，用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具进行逆向工程，可以清晰的观察代码结构，方便理解代码。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; tab-stops: list 42.0pt; mso-list: l0 level1 lfo1"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore">l<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">写代码时，由于开发平台可以自动生成</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图，因此有时观察</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图得到比较清晰的代码结构。例如</span><span lang="EN-US">Together</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">或者</span><span lang="EN-US">JBuilder</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">等工具。当然，如果没有自动生成的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图，大部分人也不会寻找其他工具去生成</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图的。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; tab-stops: list 42.0pt; mso-list: l0 level1 lfo1"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore">l<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">撰写科技论文时，使用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">来表达系统架构或者系统流程等。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42pt; TEXT-INDENT: -21pt; tab-stops: list 42.0pt; mso-list: l0 level1 lfo1"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore">l<span style="FONT: 7pt 'Times New Roman'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">部分对</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">非常熟悉的程序员，在开始写代码时，先画</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图，然后利用工具生成代码，最后对代码进行扩展。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-para-margin-left: 2.0gd"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">从上面的使用现状可以看出，很多人把</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">当成一种可有可无的技术。即使使用了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，也只是围绕着</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的类图，其他的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">图都抛到一边去了。造成这种状况的原因，一方面固然是因为国内的正规大型软件项目比较少，软件工程技术起步很晚；另一方面是由于国内不管是架构师、系统分析员、软件工程师、程序员、测试人员等等实质上都是程序员而已，很多人是赶着鸭子上架成了架构师或者系统分析员的。这种状况下，软件工程的概念难以深入人心，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">更加成了一个国内项目的鸡肋。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0; mso-para-margin-left: 2.0gd"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">看看国外的架构师、</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">专家们，往往都是满脸大胡子，在计算机领域中浸淫了</span><span lang="EN-US">3</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span><span lang="EN-US">40</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">年；而中国最古老的程序员，也只有十几年经验，除去在黑暗中摸索的几年，有十年以上开发经验的程序员少之又少。不经历几个大型项目，要使用软件工程技术是不可能的，也是不能起到什么效果的。因此，有人堂而皇之的撰文&ldquo;</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的三大硬伤&rdquo;，将</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">驳斥得一无是处。高喊口号打倒某东西是很容易的，关键是打倒了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">何以取而代之？</span></p>
<h2 style="MARGIN: 13pt 0cm"><span style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%; FONT-FAMILY: 黑体; mso-ascii-font-family: Arial">程序员眼中的</span><span lang="EN-US" style="FONT-SIZE: 12pt; LINE-HEIGHT: 173%"><font face="Arial">UML<o:p></o:p></font></span></h2>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">既然国内</span><span lang="EN-US">90</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％以上的软件开发人员都是程序员，那么程序员眼中的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到底应该是什么样子的呢？我很期望有一本好书能够让程序员们快速的掌握自己所需的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">知识，遗憾的是目前还没有看到这样的一本书。无论是&ldquo;三友&rdquo;的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">经典教材还是国内的一些&ldquo;</span><span lang="EN-US">xx</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">天精通</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&rdquo;都不符合这样的要求。没有一本是&ldquo;有中国特色的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">教材――一本写给程序员的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">入门书&rdquo;。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">作为一个程序员，我很了解其他同僚的心理，如果拿到一本书，翻了一个小时还没有找到可以</span><span lang="EN-US">run</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</span><span lang="EN-US">HelloWorld</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span><span lang="EN-US">90</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">％的人会大叫一声&ldquo;去</span><span lang="EN-US">nmd</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&rdquo;，然后把书扔进废纸堆。不能怪我们急功近利，在这个技术术语满天飞，连底层平台都动荡不安的年代，谁还有时间和兴趣看一些与自己无关的东西呢？</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">我很能想象一个程序员，好不容易空出时间来看看最近很热的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">技术，当他拿到一本</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">入门以后，开始寻找对自己有用的东西。在开始的一个小时，满篇都是需求分析，</span><span lang="EN-US">use case</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，甚至书的作者还在饶有兴趣的介绍</span><span lang="EN-US">use case</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有六种译法：用例、用况、用案</span><span lang="EN-US">&hellip;&hellip;</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对不起，老子一百年都没做过需求分析了，也不想知道这个狗屁的</span><span lang="EN-US">use case</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到底叫什么。于是开始后悔在</span><span lang="EN-US">china-pub</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上又白花了这么多银子。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">还有些书上信誓旦旦的说&ldquo;学好</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，走遍天下都不怕&rdquo;，如果你做需求分析，你可以用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和客户交流；如果你做系统分析员，你可以用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计系统；如果你做程序员，你可以用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">生成程序；如果你做测试员，你可以基于</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">设计测试用例。而实际情况是什么呢？国内的客户有几个懂</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">？懂</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的人差不多自己都可以把软件写出来了，还需要请你做需求分析么？别说客户了，上次听同学说和北京某大科研所的工程师们交流，无意中说起了</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，在场的竟然只有一个稍微了解，而且坚持认为那是一种画图工具（那位仁兄其实也没错，</span><span lang="EN-US">Visio</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不就是一个画图工具么）。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">虽然状况如此不堪，但是</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">确实是一个很优秀的&ldquo;交流语言&rdquo;、&ldquo;代码生成工具&rdquo;和&ldquo;系统设计工具&rdquo;。让我们擦干身上的献血，掩埋战友的尸体，睁大迷蒙的双眼来看清</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对程序员的作用。</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">有九种图，作用各自不同，基本上涵盖了软件工程的各个方面，很多人就是不堪于忍受知识不足的困惑与&ldquo;侮辱&rdquo;（很多程序员认为一种技术自己看不懂就是对自己的侮辱），从而放弃了整片</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">森林。他们怕的不是在</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">这棵树上吊死，而是怕在</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">森林里面迷路。但是我想说，知识学习的过程就是去芜存精，找出对自己有用的东西，然后掌握之。对于程序员来说，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的价值就体现在三个方面：</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">一、</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是最好的交流语言，无论是与其他程序员交流，还是与领域专家、测试员或者用户交流。原因只有一点，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是标准的，就像英语一样，无论多么该死，大家还是忙着把自己的论文改成英文的。当然，在小的领域可能有更好的交流方言，但是在大而长远的交流中，使用标准的交流语言是稳妥的。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">二、</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是很好的代码生成工具，其实代码生成功能并不是由</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">语言和规范提供的，而是由</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具提供的，而且不同的</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">工具提供的代码生成功能还不尽相同。例如</span><span lang="EN-US">Rose</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">提供简单的代码框架生成，而</span><span lang="EN-US">Eclipse</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">插件</span><span lang="EN-US">EMF</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可以生成功能丰富，提供了各种设计模式的代码包。无论如何，如果程序员可以从</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">入手来写程序，比直接敲代码要高级那么一点点。从文档、版本控制、维护、测试等各方面来说，画</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">类图比直接写代码都要高那么一点点。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三、</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是很好的系统设计工具。对于程序员来说，很少用到&ldquo;设计&rdquo;这个词，大部分时候我们都是在&ldquo;编写&rdquo;或者&ldquo;实现&rdquo;。但是勿庸置疑，程序员的许多工作中还是需要&ldquo;设计&rdquo;的。包和组件之间的依赖关系、复杂操作的流程、对象之间的关联和状态、程序的部署等等，都经常是程序员的工作。那么上面的四种情况可以用</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的组件图、序列图、对象图和部署图来设计。虽然，不同的程序员有不同的设计方法或者设计图例，不过，</span><span lang="EN-US">UML</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是标准的。不要忽视标准的力量，标准的东西意味着在全世界范围内都有可能会被看懂，不标准的东西可能出了你的办公室就没人能够清晰、准确的理解了。</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></p>
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.donews.com/anyiLee83/archive/2007/04/17/1157133.aspx/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

