锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产成A人亚洲精V品无码,在线看亚洲十八禁网站,国产综合激情在线亚洲第一页 http://www.tkk7.com/raimundox/category/5773.html鐭ュぉ涔嬫墍涓猴紝鐭ヤ漢涔嬫墍涓鴻咃紝鑷崇煟銆傜煡澶╀箣鎵涓鴻咃紝澶╄岀敓涔燂紱鐭ヤ漢涔嬫墍涓鴻咃紝浠ュ叾鐭ヤ箣鎵鐭ヤ互鍏誨叾鐭ヤ箣鎵涓嶇煡錛岀粓鍏跺ぉ騫磋屼笉涓亾澶咃細(xì)鏄煡涔嬬洓涔熴?/description>zh-cnMon, 20 Jul 2009 10:18:10 GMTMon, 20 Jul 2009 10:18:10 GMT60Add primitive Progression Enhancement support of Railshttp://www.tkk7.com/raimundox/archive/2009/03/18/260475.htmlRaimundoxRaimundoxWed, 18 Mar 2009 06:38:00 GMThttp://www.tkk7.com/raimundox/archive/2009/03/18/260475.htmlhttp://www.tkk7.com/raimundox/comments/260475.htmlhttp://www.tkk7.com/raimundox/archive/2009/03/18/260475.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/260475.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/260475.htmlCurrently the concept of Progressive Enhancement is getting hotter and hotter. It emphasizes accessibility, semantic markup, and the importance of separating the complex rich interaction logic into well modularized javascript files. It's really a usefully way of thinking about how to modularize and manage web presentation components. But the Rails framework doesn't have good support for PE, so we have to define our own convention and helpers to make our life easier.

Usually, I'd like to organize js files in the Rails convention, which means we'll have something like this:

app
  |
  - views
      |
      - admin
          |
          _  new.html.erb
          -  index.html.erb
public
  |
  - javascripts
       |
       - admin
           |
           - new.js
           - index.js

And new.js looks similar to:
$(document).ready(function() {
  enhanceInteractionOnElements();
  
});

function helper_methods() {
  
}


Then, add the follow method to ApplicationHelper module:

def page_javascript_include_tag
  file 
= "#{params[:controller]}/#{params[:action]}.js"
  File.exist
?("#{RAILS_ROOT}/public/javascripts/#{file}"? javascript_include_tag(file) : ""
end

this method will look for js file for a particular page. And in you layout file, add one line in the head sectin:
<%= page_javascript_include_tag %>

That's it. Whenever you request an action of a particular controller, it will find and include the PE js files automatically. Now we've very very primitive support of PE in Rails framework now.

 


 


Raimundox 2009-03-18 14:38 鍙戣〃璇勮
]]>
A very brief introduction to Aurumhttp://www.tkk7.com/raimundox/archive/2007/09/05/143029.htmlRaimundoxRaimundoxWed, 05 Sep 2007 15:21:00 GMThttp://www.tkk7.com/raimundox/archive/2007/09/05/143029.htmlhttp://www.tkk7.com/raimundox/comments/143029.htmlhttp://www.tkk7.com/raimundox/archive/2007/09/05/143029.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/143029.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/143029.html Aurum is a Ruby-based LALR(n) parser generator that you can use to develop your own domain specified languages, scripting languages and programming languages.Although it's just yet another parser generator, Aurum is slightly different from other widely used parser generators:

  1. One of major targets of Aurum is to simplify external DSL development, espectually Ruby external DSL.
  2. Aurum uses incremental LALR(n) algorithm instead of the common used LALR(1)/Full LALR(n) algorithm. That means:
    •   Allowing the user to express grammars in a more intuitive mannar.
    •   Making it easier to handle complicated grammars. For exmaple, COBOL(LALR(2 or 3)), simplified nature language(LALR(3+)) and etc.
    •   Closer to Generalized LR in language recognizing but much more faster.
    •   Smaller parsing table comparing to Full LALR/LR(n) algorithm.
  3. Aurum supports grammar reuse, and itslef'll be shipped with some pre-defined common structures. One of the pain points of external DSL is that you have to re-define lots of common structures, such as if statements, block structure and etc. With Aurum, you could simply reuse them.
  4. Aurum uses a Ruby interal DSL as meta-language, and provides a generic lexer/parser as well. You could test your grammar by the comprehensive testing libraries Ruby has(you could even develop your lexer/parser in the TDD fashion).
  5. As the name suggested, Aurum, the Latin word for Gold, is partially inspired by the GOLD Parsing System. The grammar you created with Aurum could be completely independent of any implementation language,even Ruby.(not implemented yet :) )

Ok, let's start from the 'Hello World in Compiler Construction' 鈥斺?Expression Evaluation

 1 require 'aurum'
 2 
 3 class ExpressionGrammar < Aurum::Grammar
 4   tokens do
 5     ignore string(' ').one_or_more     # <= a
 6     _number range(?0?9).one_or_more  # <= b
 7   end
 8 
 9   precedences do  # <= c
10     left '*''/'
11     left '+''-'
12   end
13 
14   productions do # <= d
15     expression expression, '+', expression {expression.value = expression1.value + expression2.value} # <= e
16     expression expression, '-', expression {expression.value = expression1.value - expression2.value}
17     expression expression, '*', expression {expression.value = expression1.value * expression2.value}
18     expression expression, '/', expression {expression.value = expression1.value / expression2.value}
19     expression '(', expression, ')'        do expression.value = expression1.value end # <= f
20     expression _number                     {expression.value = _number.value.to_i}
21     expression '+', _number                {expression.value = _number.value.to_i}
22     expression '-', _number                {expression.value = -_number.value.to_i}
23   end
24 end

If you has any experience with other compiler compiler/parser generator, you probably could understand what happens above quite easily. Instead of explaining things like token, character class, and production, I'd like to emphasise some Aurum conventions:
  1. At point a, we use 'ignore' directive to declare the ignored pattern, such as whitespaces etc.'string' is one of the helper methods(others are enum, range and concat), which is used to define lexical patterns. It will create a pattern matching the given string exactly.
  2. At point b, we declare a lexical token named '_number'. In Aurum, lexical tokens, or terminals from syntax perspective, always start with '_'. The expression '_token_name pattern' is equivalent to 'match pattern, :recognized => :_toke_name'. The 'match' directive is a common way to associate lexical action with leixcal pattern.
  3. At point c, we declare operator precedences of the Expression grammar.The eariler the operators definied, the higher precedence they will have.
  4. At point d, we declare syntax rules of Expression grammar. According to Aurum naming convention, all terminals should start with '_' while all nontermainls start with lower case alphabet character. String literals will be interpreted as reserve words, and added to lexer automatically.
  5. At point e, we define a semantic action to the Addition rule. In semantic action, you could access to the objects in value stack via the name of corresponding symbols.If there are more than one symbol with the same name, you could differentiate them by the order they appered in the production.
  6. At point f, we use do..end instead of {..}. Using Ruby internal DSL as meta-langauge is a double-side sword, you have to bear its flaws while enjoying the remaining parts. There is no perfect world, isn't it?

Now, let's find out how we could use this expression grammar. You could use the helper method as below(it will recalcuate lexical table and parsing table for every call, could be quite slow):

1 puts ExpressionGrammar.parse_expression('1+1').value

or use the lexical table and parsing table to create your own lexer & parser:
 
1   lexer = Aurum::Engine::Lexer.new(ExpressionGrammar.lexical_table, '1+1')
2   parser = Aurum::Engine::Parser.new(ExpressionGrammar.parsing_table(:expression))
3   puts parser.parse(lexer).value


At the end of this post, I'd like to give another grammar example coming from Martin Fowler's HelloParserGenerator series:

 1 require 'aurum'
 2 
 3 Item = Struct.new(:name)
 4 
 5 class Catalog < Aurum::Grammar
 6   tokens do
 7     ignore enum(" \r\n").one_or_more
 8     _item range(?a,?z).one_or_more
 9   end
10 
11   productions do
12     configuration configuration, item {configuration.value = configuration1.value.merge({item.value.name => item.value})}
13     configuration _                   {configuration.value = {}}
14     item 'item', _item                {item.value = Item.new(_item.value)}
15   end
16 end
17 
18 config = Catalog.parse_configuration(<<EndOfDSL).value
19   item camera
20   item laser
21 EndOfDSL
22 
23 puts config['camera'].name


P.S.:The post is based on the developing version of Aurum(0.2.0). You could get it from the svn repository.
P.S.P.S.: There is a more complicated example in the examples directory, a simple Smalltalk interpreter. Have fun:)


Raimundox 2007-09-05 23:21 鍙戣〃璇勮
]]>
A very brief introduction to Aurumhttp://www.tkk7.com/raimundox/archive/2007/09/05/143028.htmlRaimundoxRaimundoxWed, 05 Sep 2007 15:12:00 GMThttp://www.tkk7.com/raimundox/archive/2007/09/05/143028.htmlhttp://www.tkk7.com/raimundox/comments/143028.htmlhttp://www.tkk7.com/raimundox/archive/2007/09/05/143028.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/143028.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/143028.html
Aurum鏄竴涓敤Ruby瀹炵幇鐨凩ALR(n) parser generator錛堟槸鐨勶紝鍙堟槸涓涓猵arser generator錛夛紝涓嶈繃瀹冨拰鍏朵粬涓浜涘箍娉涘簲鐢ㄧ殑parser generator鐩告瘮鐣ユ湁涓嶅悓鐨勶細(xì)

1.Aurum鐨勪富瑕佺洰鏍囦箣涓錛屾槸綆鍖杄xternal DSL鐨勫紑鍙戯紙灝ゅ叾鏄痳uby external DSL錛夈?br /> 2.Aurum閲囩敤澧為噺LALR(n)綆楁硶錛岃屼笉鏄氬父鐨凩ALR(1)銆傝繖鎰忓懗鐫錛?br />   a.涓嶅繀鐢變簬LALR(1)鑳藉姏鐨勯檺鍒訛紝鑰屾敼鍐欒娉曪紝寰堝鍦↙ALR(1)涓啿紿佺殑璇硶鍦↙ALR(n)涓彲浠ユ瘮杈冭嚜鐒跺湴琛ㄨ揪銆?br />   b.鐢變簬璇嗗埆鑳藉姏鐨勫寮猴紝鍙互澶勭悊涓浜涙瘮杈冨鏉傜殑璇硶錛屾瘮濡侰OBOL(LALR(2)鎴朙ALR(3))錛屾瘮濡備竴浜涚畝鍖栫殑鑷劧璇█(LALR(3+))銆?br />   c.澶勭悊鑳藉姏鎺ヨ繎Generalized LR錛屽嵈蹇緢澶?br />   d.姣旇搗Full LALR/LR(n)錛屽閲忕畻娉曠敓鎴愮殑璇硶琛ㄦ洿灝忋?br /> 3.鍑轟簬綆鍖杄xternal DSL瀹炵幇鐨勮冭檻錛孉urum鏀寔璇硶閲嶇敤銆?br /> 4.Aurum閲囩敤Ruby internal DSL浣滀負(fù)璇硶澹版槑鐨勫厓璇█錛屽彲浠ュ埄鐢≧uby涓板瘜鐨勬祴璇曟鏋訛紝鏈夋晥鍦板緙栬瘧錛忚В閲婏紡鍒嗘瀽鍣ㄨ繘琛屾祴璇曘?br /> 5.姝e鍚嶅瓧鎵鏆楃ず鐨勶紝Aurum錛圙old鐨勫寲瀛﹀悕縐幫級(jí)鐨勪竴閮ㄥ垎鐏墊劅鏉ヨ嚜GOLD parsing system錛屽畠?yōu)畣鏀寔鐙珛浜庲q沖彴鍜岃璦鐨勭紪璇戝櫒寮鍙戙?br />
濂斤紝闂茶瘽灝戣錛岀湅涓涓緥瀛愶紝緙栬瘧鍘熺悊涓殑Hello World 鈥斺?琛ㄨ揪寮忔眰鍊鹼細(xì)
 1 require 'aurum'
 2 
 3 class ExpressionGrammar < Aurum::Grammar
 4   tokens do
 5     ignore string(' ').one_or_more     # <= a
 6     _number range(?0?9).one_or_more  # <= b
 7   end
 8 
 9   precedences do  # <= c
10     left '*''/'
11     left '+''-'
12   end
13 
14   productions do # <= d
15     expression expression, '+', expression {expression.value = expression1.value + expression2.value} # <= e
16     expression expression, '-', expression {expression.value = expression1.value - expression2.value}
17     expression expression, '*', expression {expression.value = expression1.value * expression2.value}
18     expression expression, '/', expression {expression.value = expression1.value / expression2.value}
19     expression '(', expression, ')'        do expression.value = expression1.value end # <= f
20     expression _number                     {expression.value = _number.value.to_i}
21     expression '+', _number                {expression.value = _number.value.to_i}
22     expression '-', _number                {expression.value = -_number.value.to_i}
23   end
24 end


濡傛灉璇鎬綅瀵逛箣鍓嶆湁鐢ㄨ繃compiler compiler鎴栬卲arser generator鐨勮瘽錛屽簲璇ヨ兘鐪嬩釜涓冧竷鍏叓鍚с傛垜澶ф瑙i噴涓涓嬶細(xì)
 a.榪欓噷瀹氫箟浜?jiǎn)鏂囨硶绌虹櫧锛屼篃灏辨槸琚玪exer蹇界暐鐨勯儴鍒嗭紝鍦ㄩ氬父鐨勮璦涓紝鏄┖鏍煎洖杞︽崲琛屼箣綾葷殑瀛楃錛泂tring鏄敤浜庡畾涔塴exical pattern鐨刪elper鏂規(guī)硶錛堝嚭浜?jiǎn)string涔嬪錛岃繕鏈塺ange, enum鍜宑oncat錛夛紱ignore鏄竴涓瀹氫箟鐨勮鏄庢寚浠わ紝琛ㄧず鑻ユ枃鏈尮閰嶇粰瀹氭ā寮忓垯璇ユ枃鏈細(xì)琚玪exer鑷姩蹇界暐錛屽叾鏍煎紡涓猴細(xì)
    ignore pattern {//lexical action}
 b.姝ゅ涓簂exical token澹版槑錛屾墍鏈塴exical token蹇呴』浠寮澶達(dá)紝鍏舵牸寮忎負(fù)錛?br />     _token_name pattern {//lexical action}
   榪欓噷鍏跺疄鏄竴涓畝鐣ュ啓娉曪紝絳変環(huán)浜?br />     match pattern, :recognize => 錛歘token_name
 c.姝ゅ涓鴻繍綆楃浼樺厛綰у0鏄庯紝鏀寔宸?鍙崇粨鍚堣繍綆楃錛堟棤緇撳悎灞炴ц繍綆楃寮鍙戜腑錛夛紱姣忎竴琛屼腑鎵鏈夎繍綆楃鍏鋒湁鐩稿悓浼樺厛綰э紱姣斿畠涓嬩竴琛岀殑榪愮畻絎﹂珮涓涓紭鍏堢駭銆傛瘮濡傚湪榪欎釜渚嬪瓙涓紝'*'鍜?/'鍏鋒湁鐩稿悓浼樺厛綰э紝浣嗘槸姣?+'鍜?-'鐨勪紭鍏堢駭鍒珮銆?br />  d.姝ゅ涓鴻娉曡鍒欏0鏄庯紝鎵浣跨敤鐨剆ymbol涓昏鏈変笁縐嶏紝nonterminal(灝忓啓瀛楁瘝寮澶?錛宼erminal(鍏跺疄灝辨槸lexical token錛屼互_寮澶?鍜宭iteral(瀛楃涓插父閲?錛屽叾涓墍鏈塴iteral閮戒細(xì)琚嚜鍔ㄥ0鏄庝負(fù)淇濈暀瀛椼?br />  e.姝ゅ瀹氫箟浜?jiǎn)涓鏉℃枃娉曡鍒欙紙鍔犳硶錛夛紝浠ュ強(qiáng)瀵瑰簲鐨剆emantic action銆傚湪semantic action涓彲浠ョ洿鎺ラ氳繃symbol鐨勫悕瀛楁潵鑾峰彇鍊兼爤涓殑瀵硅薄銆傚閬囧埌鍚屽悕symbol錛屽垯鎸夌収鍑虹幇欏哄簭榪涜緙栧彿鍗沖彲銆?br />  f.鍏跺疄榪欎釜娌″暐錛屽彧涓嶈繃鐢變簬鎴戜滑浣跨敤鐨勬槸Ruby DSL錛屾墍浠ユ湁鏃跺欎笉鑳介兘鐢▄}錛岄渶瑕乨o end錛岃繖灝辨槸涓涓緥瀛愩?br />
鏈鍚庢祴璇曚竴涓嬪疄闄呬腑濡備綍浣跨敤瀹氫箟濂界殑璇硶錛堜嬌鐢╤elper method錛屾敞鎰忕敱浜庡垎鏋愯〃娌℃湁緙撳瓨錛屾瘡嬈¢兘浼?xì)閲嵔帡璇硶琛ㄥQ屼粎浠呴傜敤浜巇ebug mode銆傦級(jí)
  puts ExpressionGrammar.parse_expression('1+1').value
鎴栬呴氳繃鍒嗘瀽琛ㄨ嚜宸辨瀯閫爈exer鍜宲arser
  lexer = Aurum::Engine::Lexer.new(ExpressionGrammar.lexical_table, '1+1')
  parser = Aurum::Engine::Parser.new(ExpressionGrammar.parsing_table(:expression))
  puts parser.parse(lexer).value

鏈鍚庢渶鍚庯紝緇欏彟澶栦竴涓緥瀛愶紝灝辨槸Martin Fowler Blog涓婄殑HelloParserGenerator緋誨垪涓墍鐢ㄧ殑璇硶錛?br />
 1 require 'aurum'
 2 
 3 Item = Struct.new(:name)
 4 
 5 class Catalog < Aurum::Grammar
 6   tokens do
 7     ignore enum(" \r\n").one_or_more
 8     _item range(?a,?z).one_or_more
 9   end
10 
11   productions do
12     configuration configuration, item {configuration.value = configuration1.value.merge({item.value.name => item.value})}
13     configuration _                   {configuration.value = {}}
14     item 'item', _item                {item.value = Item.new(_item.value)}
15   end
16 end
17 
18 config = Catalog.parse_configuration(<<EndOfDSL).value
19   item camera
20   item laser
21 EndOfDSL
22 
23 puts config['camera'].name


P.S.:鏈枃鏄牴鎹瓵urum0.2.0鍐欐垚鐨勶紝浣犲彲浠ヤ粠rubyforge鐨剆vn涓婂緱鍒板畠銆?br /> P.S.P.S.: 鍦╡xmaples鐩綍閲屾湁涓涓洿澶嶆潅涓浜涚殑渚嬪瓙錛屾槸涓涓畝鍗曠殑Smalltalk瑙i噴鍣ㄣ?br />



Raimundox 2007-09-05 23:12 鍙戣〃璇勮
]]>
Erlang Ring Benchmarkhttp://www.tkk7.com/raimundox/archive/2007/08/01/133863.htmlRaimundoxRaimundoxWed, 01 Aug 2007 12:34:00 GMThttp://www.tkk7.com/raimundox/archive/2007/08/01/133863.htmlhttp://www.tkk7.com/raimundox/comments/133863.htmlhttp://www.tkk7.com/raimundox/archive/2007/08/01/133863.html#Feedback4http://www.tkk7.com/raimundox/comments/commentRss/133863.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/133863.html
 1 -module(ring_benchmark). 
 2 -export([start/2]).
 3 
 4 start(N, M) -> 
 5   Pid = create_process(self(), N - 1, M),
 6   time(fun() -> Pid ! start, loop(Pid, M) end).
 7 
 8 time(Fun) -> 
 9   statistics(wall_clock),
10   Fun(),
11   {_,Time} = statistics(wall_clock),
12   io:format("Run : ~w s ~n", [Time/1000]).  
13 
14 create_process(Pid, 0, _) -> Pid;
15 create_process(Pid, N, M) -> create_process(spawn(fun() -> loop(Pid, M) end),  N - 1, M).
16 
17 loop(_, 0-> void;
18 loop(Next, M) -> 
19   receive
20     Message -> Next ! Message,
21     loop(Next, M - 1)
22   end.
23 
24 

鏈夋剰鎬濇槸瀹冭繕鏈変竴涓浜岄棶錛岃浣犵敤鍙﹀涓縐嶇啛鎮(zhèn)夌殑璇█瀹炵幇鍚屾牱鐨勫姛鑳斤紝鍙戦佸悓鏍峰鐨勬秷鎭紝涔熸妸鏃墮棿璁板綍涓嬫潵錛岀劧鍚庡啓涓綃嘼log鏉ublish浣犵殑緇撴灉銆傚叾瀹烇紝澶у蹇?jī)鐭ヨ倸鏄庡Q岃繖縐峫ightweight process鍟婏紝message passing concurrency鍟婇兘鏄疎rlang鐨勫己欏癸紝鑰屼笖瀹炴祴緇撴灉涔熺潃瀹為涓烘亹鎬栵紝涓鑸篃灝辨病閭i棽蹇?jī)鎷垮埆鐨勪笢瑗挎潵闄‖涓鎶婁簡(jiǎn)錛圓rmstrong鍚屽鑷繁瀹炵幇浜?jiǎn)涓涓狫ava version錛屾晥鐜囧ぇ綰﹁兘宸埌鐧懼嶅惂錛夈備笉榪囪繕鐪熸湁閭e啓涓嶄俊閭殑鑰佸ぇ錛?a >鐢╯tackless python瀹炵幇浜?jiǎn)鍚屾狅L(fēng)殑ring benchmark錛屽彂鐜版瘮erlang榪樺揩...鍚庢潵淇敼浠g爜鍘繪帀io鎿嶄綔錛孍rlang鍊掓槸姣攕tackless python蹇簺錛屼絾涔熷彧鏄竴浜涜屽凡銆?br>





Raimundox 2007-08-01 20:34 鍙戣〃璇勮
]]>
Domain Oriented Web Testing with Selenium & Ruby (Posted@InfoQ China)http://www.tkk7.com/raimundox/archive/2007/06/13/123772.htmlRaimundoxRaimundoxWed, 13 Jun 2007 01:44:00 GMThttp://www.tkk7.com/raimundox/archive/2007/06/13/123772.htmlhttp://www.tkk7.com/raimundox/comments/123772.htmlhttp://www.tkk7.com/raimundox/archive/2007/06/13/123772.html#Feedback1http://www.tkk7.com/raimundox/comments/commentRss/123772.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/123772.html
搴旂敤Selenium榪涜W(xué)eb嫻嬭瘯寰寰浼?xì)瀛樺湪鍑犱釜bad smell錛?br>1.澶ч噺浣跨敤name, id, xpath絳夐〉闈㈠厓绱犮傛棤璁烘槸鍔熻兘淇敼銆乁I閲嶆瀯榪樻槸浜や簰鎬ф敼榪涢兘浼?xì)濯?jiǎng)鍝嶅埌榪欎簺鍏冪礌錛岃繖浣垮緱Selenium嫻嬭瘯鍙樺緱闈炲父鑴嗗急銆?br>2.榪囦簬緇嗚妭鐨勯〉闈㈡搷浣滀笉瀹規(guī)槗浣撶幇鍑?guó)櫋屼负鐨勬剰鍥惧Q屼竴孌墊椂闂翠箣鍚庡氨寰堥毦鐪熸鎶婃彙嫻嬭瘯鍘熸湁鐨勭洰鐨勪簡(jiǎn)錛岃繖浣垮緱Selenium嫻嬭瘯鍙樺緱闅句簬緇存姢銆?br>3.瀵瑰叿浣撴暟鎹彇鍊肩殑瀛樺湪渚濊禆錛屽綋涓埆鏁版嵁涓嶅啀鍚堟硶鐨勬椂鍊欙紝嫻嬭瘯灝變細(xì)澶辮觸錛屼絾榪欐牱鐨勫け璐ュ茍涓嶈兘鏍囪瘑鍔熻兘鐨勭己澶憋紝榪欎嬌寰桽elenium嫻嬭瘯鍙樺緱鑴嗗急涓旈毦浠ョ淮鎶ゃ?br>
鑰岃繖鍑犵偣鐩存帴琛嶇敓鐨勭粨鏋滃氨鏄笉鏂湴娣誨姞鏂扮殑嫻嬭瘯錛岃屾瀬灝戝湴鍘婚噸鏋勩佸埄鐢ㄥ師鏈夋祴璇曘傚叾瀹炶繖鍒頒篃鏄甯革紝鍗曞厓嫻嬭瘯嫻嬭瘯鍐欏浜?jiǎn)锛屼篃鏈変細(xì)鏈墭q欐牱鐨勯棶棰樸備笉榪囨瘮杈冭鍛界殑鏄紝Selenium鐨勬墽琛岄熷害姣旇緝鎱紙鐩稿鍗曞厓嫻嬭瘯錛夛紝闅忕潃嫻嬭瘯閫愭笎鐨勫澶氾紝榪愯鏃墮棿浼?xì)閫愭笎澧炲姞鍒頒笉鍙繊鍙楃殑紼嬪害銆備竴緇勬剰鍥句笉鏄庨毦浠ョ淮鎶ょ殑Selenium嫻嬭瘯錛屽彲浠ュ緢杞繪澗鍦板湪姣忔build鐨勬椂鍊欐潃鎺?0鍒嗛挓鐢氳嚦2涓皬鏃剁殑鏃墮棿錛屽湪涓嬪氨鏈夎姳2涓皬鏃跺潗鍦ㄧ數(shù)鑴戝墠闈㈢瓑寰?50涓猄elenium嫻嬭瘯榪愯閫氳繃鐨勬?zhèn)叉儴缁忓巻銆傚洜姝ゅ悎鐞嗘湁鏁堝湴瑙勫垝Selenium嫻嬭瘯灝辨樉寰楁牸澶栫殑榪垏鍜岄噸瑕佷簡(jiǎn)銆傝岀洰鍓嶆瘮杈冭涔嬫湁鏁堢殑鍔炴硶錛屽線澶т簡(jiǎn)璇達(dá)紝鍙互鍙玠omain based web testing錛屽叿浣撴潵璁詫紝灝辨槸Page Object Pattern銆?br>
Page Object Pattern閲屾湁鍥涗釜鍩烘湰姒傚康錛欴river, Page, Navigator鍜孲hortcut銆侱river鏄祴璇曠湡姝g殑瀹炵幇鏈哄埗錛屾瘮濡係elenium錛屾瘮濡俉atir錛屾瘮濡侶ttpUnit銆傚畠浠噦寰楀浣曞幓鐪熸鎵ц涓涓獁eb琛屼負(fù)錛岄氬父鍖呭惈鍍廲lick錛宻elect錛宼ype榪欐牱鐨勮〃紺哄叿浣撹涓虹殑鏂規(guī)硶錛汸age鏄涓涓叿浣撻〉闈㈢殑灝佽錛屽畠浠簡(jiǎn)瑙i〉闈㈢殑緇撴瀯錛岀煡閬撹濡俰d錛?name錛?class錛寈path榪欑被瀹炵幇緇嗚妭錛屽茍鎻忚堪鐢ㄦ埛鍙互鍦ㄥ叾涓婅繘琛屼綍縐嶆搷浣滐紱Navigator鍒欎唬琛ㄤ簡(jiǎn)URL錛岃〃紺轟竴浜涗笉緇忛〉闈㈡搷浣滅殑鐩存帴璺寵漿錛涙渶鍚嶴hortcut灝辨槸helper鏂規(guī)硶浜?jiǎn)锛岄渶瑕佺湅鍏蜂綋鐨勯渶瑕佷簡(jiǎn)銆備笅闈㈡潵鐪嬩竴涓秴綰х畝鍗曠殑渚嬪瓙鈥斺旀祴璇曠櫥褰曢〉闈€?br>
1. Page Object

鍋囪鎴戜滑浣跨敤涓涓崟鐙殑Login Page榪涜鐧誨綍錛岄偅涔堟垜浠彲鑳戒細(xì)灝嗙櫥褰曠殑鎿嶄綔灝佽鍦ㄤ竴涓悕涓篖oginPage鐨刾age object閲岋細(xì)

 1 class LoginPage
 2   def initialize driver
 3     @driver = driver
 4   end
 5  
 6   def login_as user
 7     @driver.type 'id=', user[:name]
 8     @driver.type 'xpath=', user[:password]
 9     @driver.click 'name='
10     @driver.wait_for_page_to_load
11   end
12 end


login_as鏄竴涓叿鏈変笟鍔″惈涔夌殑欏甸潰琛屼負(fù)銆傚湪login_as鏂規(guī)硶涓紝page object璐熻矗閫氳繃渚濋潬id錛寈path錛宯ame絳変俊鎭畬鎴愮櫥褰曟搷浣溿傚湪嫻嬭瘯涓紝鎴戜滑鍙互榪欐牱鏉ヤ嬌鐢ㄨ繖涓猵age object錛?br>
1 page = LoginPage.new $selenium
2 page.login_as :name => 'xxx', :password => 'xxx'
3 

涓嶈繃鏃㈢劧鐢ㄤ簡(jiǎn)ruby錛屾昏鐢ㄤ竴浜況uby sugar鍚э紝鎴戜滑瀹氫箟涓涓猳n鏂規(guī)硶鏉ヨ〃杈鵑〉闈㈡搷浣滅殑鐜錛?br>
1 def on page_type, &block
2   page = page_type.new $selenium
3   page.instance_eval &block if block_given?
4 end

涔嬪悗鎴戜滑灝卞彲浠ヤ嬌鐢╬age object鐨勭被鍚嶅父閲忓拰block鎻忚堪鍦ㄦ煇涓壒瀹氶〉闈笂鎿嶄綔浜?jiǎn)锛?xì)

1 on LoginPage do
2   login_as :name => 'xxx', :password => 'xxx'
3 end
4 

闄や簡(jiǎn)琛屼負(fù)鏂規(guī)硶涔嬪錛屾垜浠繕闇瑕佸湪page object涓婂畾涔変竴浜涜幏鍙栭〉闈俊鎭殑鏂規(guī)硶錛屾瘮濡傝幏鍙栫櫥褰曢〉闈㈢殑嬈㈣繋璇嶇殑鏂規(guī)硶錛?br>
def welcome_message
  @driver.get_text 
'xpath='
end


榪欐牱嫻嬭瘯涔熷彲琛ㄨ揪寰楁洿鐢熷姩涓浜涳細(xì)

1 on LoginPage do
2   assert_equal 'Welcome!', welcome_message
3   login_as :name => 'xxx', :password => 'xxx'
4 end

褰撲綘鎶婃墍鏈夌殑欏甸潰閮界敤Page Object灝佽浜?jiǎn)涔嬪悗锛尀鏈夋晥鍦板垎绂讳簡(jiǎn)娴嬭瘯鍜寵宓闈⒕l撴瀯鐨勮﹀悎銆傚湪嫻嬭瘯涓紝鍙渶浣跨敤璇稿login_as, add_product_to_cart榪欐牱鐨勪笟鍔¤涓猴紝鑰屼笉蹇呬緷闈犲儚id錛宯ame榪欎簺鍏蜂綋涓旀槗鍙樼殑欏甸潰鍏冪礌浜?jiǎn)銆傚綋榪欎簺欏甸潰鍏冪礌鍙戠敓鍙樺寲鏃訛紝鍙渶淇敼鐩稿簲鐨刾age object灝卞彲浠ヤ簡(jiǎn)錛岃屽師鏈夋祴璇曞熀鏈笉闇瑕佸お澶ф垨澶鐨勬敼鍔ㄣ?br>
2. Assertation

鍙湁琛屼負(fù)榪樺涓嶆垚嫻嬭瘯錛屾垜浠繕瑕佸垽鏂涓虹粨鏋滐紝騫惰繘琛屼竴浜涙柇璦銆傜畝鍗曞洖欏句竴涓嬩笂闈㈢殑渚嬪瓙錛屼細(xì)鍙戠幇榪樻湁涓浜涘緢閲嶈鐨勯棶棰樻病鏈夎В鍐籌細(xì)鎴戞庝箞鍒ゆ柇鐧誨綍鎴愬姛浜?jiǎn)鍛㈠Q熸垜濡備綍鎵嶈兘鐭ラ亾鐪熺殑鏄鍦ㄧ櫥褰曢〉闈簡(jiǎn)鍛紵濡傛灉鎴戣皟鐢ㄤ笅闈㈢殑浠g爜浼?xì)鎬庢牱鍛紵

1 $selenium.open url_of_any_page_but_not_login
2 on LoginPage {}

鍥犳鎴戜滑榪橀渶瑕佸悜page object澧炲姞涓浜涙柇璦鎬ф柟娉曘傝嚦灝戯紝姣忎釜欏甸潰閮藉簲璇ユ湁涓涓柟娉曠敤浜庡垽鏂槸鍚︾湡姝e湴杈懼埌浜?jiǎn)杩欎釜椤甸潰锛屽鏋滀笉澶勫湪杩欎釜椤甸潰涓殑璇濆Q屽氨涓嶈兘榪涜浠諱綍鐨勪笟鍔¤涓恒備笅闈慨鏀筁oginPage浣夸箣鍖呭惈榪欐牱涓涓柟娉曪細(xì)

1 LoginPage.class_eval do
2   include Test::Unit::Asseration
3   def visible?
4     @driver.is_text_present(&& @driver.get_location == 
5   end
6 end


鍦╲isible?鏂規(guī)硶涓紝鎴戜滑閫氳繃瀵逛竴浜涚壒瀹氱殑欏甸潰鍏冪礌錛堟瘮濡俇RL鍦板潃錛岀壒瀹氱殑UI緇撴瀯鎴栧厓绱狅級(jí)榪涜鍒ゆ柇錛屼粠鑰屽彲浠ュ緱涔嬫槸鍚︾湡姝e湴澶勫湪鏌愪釜欏甸潰涓娿傝屾垜浠洰鍓嶈〃杈炬祴璇曠殑鍩烘湰緇撴瀯鏄敱on鏂規(guī)硶鏉ュ畬鎴愶紝鎴戜滑涔熷氨欏虹悊鎴愮珷鍦板湪on鏂規(guī)硶涓鍔犱竴涓柇璦錛屾潵鍒ゆ柇鏄惁鐪熺殑澶勫湪鏌愪釜欏甸潰涓婏紝濡傛灉涓嶅鍦ㄨ繖涓〉闈㈠垯涓嶈繘琛屼換浣曠殑涓氬姟鎿嶄綔錛?br>
1 def on page_type, &block
2   page = page_type.new $selenium
3   assert page.visible?"not on #{page_type}"
4   page.instance_eval &block if block_given?
5   page
6 end
7 

榪欎釜鏂規(guī)硶紲炵鍦拌繑鍥炰簡(jiǎn)page瀵硅薄錛岃繖閲屾槸涓涓瘮杈僼ricky鐨勬妧宸с傚疄闄呬笂錛屾垜浠彧鎯沖埄鐢╬age != nil榪欎釜浜嬪疄鏉ユ柇璦欏甸潰鐨勬祦杞紝姣斿錛屼笅闈㈢殑浠g爜鎻忚堪鐧誨綍鎴愬姛鐨勯〉闈㈡祦杞繃紼嬶細(xì)

on LoginPage do
  assert_equal 
'Welcome!', welcome_message
  login_as :name 
=> 'xxx', :password => 'xxx'
end
assert on WelcomeRegisteredUserPage

闄や簡(jiǎn)榪欎釜鍩烘湰鏂█涔嬪錛屾垜浠繕鍙互瀹氫箟涓浜涗笟鍔$浉鍏崇殑鏂█錛屾瘮濡傚湪璐墿杞﹂〉闈㈤噷錛屾垜浠彲浠ュ畾涔変竴涓垽鏂喘鐗╄濺鏄惁涓虹┖鐨勬柇璦錛?br>
1 def cart_empty?
2   @driver.get_text('xpath='== 'Shopping Cart(0)'
3 end

闇瑕佹敞鎰忕殑鏄紝铏界劧鎴戜滑鍦╬age object閲屽紩鍏ヤ簡(jiǎn)Test::Unit::Asseration妯″潡錛屼絾鏄茍娌℃湁鍦ㄦ柇璦鏂規(guī)硶閲屼嬌鐢ㄤ換浣昦ssert*鏂規(guī)硶銆傝繖鏄洜涓猴紝姒傚康涓婃潵璁瞤age object騫朵笉鏄祴璇曘備嬌涔嬪寘鍚竴浜涚湡姝g殑鏂█錛屼竴鍒欐蹇墊販涔憋紝浜屽垯瀹規(guī)槗浣縫age object鍙樻垚閽堝鏌愪簺鍦烘櫙鐨則est helper錛屼笉鍒╀簬浠ュ悗嫻嬭瘯鐨勭淮鎶わ紝鍥犳鎴戜滑寰寰鍊懼悜浜庡皢鏂█鏂規(guī)硶瀹炵幇涓轟竴涓櫘閫氱殑榪斿洖鍊間負(fù)boolean鐨勬柟娉曘?br>
3. Test Data

嫻嬭瘯鎰忓浘鐨勪綋鐜頒笉浠呬粎鏄湪琛屼負(fù)鐨勬弿榪頒笂錛屽悓鏍瘋繕鏈夋祴璇曟暟鎹紝姣斿濡備笅涓ゆ浠g爜錛?br>
 1 on LoginPage do
 2   login_as :name => 'userA', :password => 'password'
 3 end
 4 assert on WelcomeRegisteredUserPage
 5 
 6 registered_user = {:name => 'userA', :password => 'password'}
 7 on LoginPage do
 8   login_as registered_user
 9 end
10 assert on WelcomeRegisteredUserPage


嫻嬭瘯鐨勬槸鍚屼竴涓笢瑗匡紝浣嗘槸鏄劇劧絎簩涓祴璇曟洿濂界殑浣撶幇浜?jiǎn)娴嬭瘯鎰忓浘锛?xì)浣跨敤涓涓凡娉ㄥ唽鐨勭敤鎴風(fēng)櫥褰曪紝搴旇榪涘叆嬈㈣繋欏甸潰銆傛垜浠湅榪欎釜嫻嬭瘯鐨勬椂鍊欙紝寰寰涓嶄細(xì)鍏沖績(jī)鐢ㄦ埛鍚嶅晩瀵嗙爜鍟婂叿浣撴槸浠涔堬紝鎴戜滑鍏沖績(jī)瀹冧滑琛ㄨ揪浜?jiǎn)鎬庢牱鐨勬祴璇曟渚嬨傛垜浠彲浠ラ氳繃DataFixture鏉ュ疄鐜拌繖涓鐐癸細(xì)

 1 module DataFixture
 2   USER_A = {:name => 'userA', :password => 'password'}
 3   USER_B = {:name => 'userB', :password => 'password'}
 4 
 5   def get_user identifier
 6     case identifier
 7     when :registered then return USER_A
 8     when :not_registered then return USER_B
 9     end
10   end
11 end


鍦ㄨ繖閲岋紝鎴戜滑灝嗘祴璇曟渚嬪拰鍏蜂綋鏁版嵁鍋氫簡(jiǎn)涓涓搴旓細(xì)userA鏄敞鍐岃繃鐨勭敤鎴鳳紝鑰寀serB鏄病娉ㄥ唽鐨勭敤鎴楓傚綋鏈変竴澶╋紝鎴戜滑闇瑕佸皢鐧誨綍鐢ㄦ埛鍚嶆敼涓洪偖綆辯殑鏃跺欙紝鍙渶瑕佷慨鏀笵ataFixture妯″潡灝卞彲浠ヤ簡(jiǎn)錛岃屼笉蹇呬慨鏀圭浉搴旂殑嫻嬭瘯錛?br>
1 include DataFixtureDat
2 
3 user = get_user :registered
4 on LoginPage do
5   login_as user
6 end
7 assert on WelcomeRegisteredUserPage

褰撶劧錛屽湪鏇村鏉傜殑嫻嬭瘯涓紝DataFixture鍚屾牱鍙互浣跨敤鐪熷疄鐨勬暟鎹簱鎴栨槸Rails Fixture鏉ュ畬鎴愯繖鏍風(fēng)殑瀵瑰簲錛屼絾鏄諱綋鐨勭洰鐨勫氨鏄嬌嫻嬭瘯鍜屾祴璇曟暟鎹湁鏁堟х殑鑰﹀悎鍒嗙錛?br>
1 def get_user identifier
2   case identifier
3   when :registered then return User.find '.' 
4   end
5 end


4.Navigator

涓庣晫闈㈠厓绱犵被浼鹼紝URL涔熸槸涓綾繪槗鍙樹笖闅句互琛ㄨ揪鎰忓浘鐨勫厓绱狅紝鍥犳鎴戜滑鍙互浣跨敤Navigator浣夸箣涓庢祴璇曡В鑰︺傚叿浣撳仛娉曞拰Test Data鐩鎬技錛岃繖閲屽氨涓嶈禈榪頒簡(jiǎn)錛屼笅闈㈡槸涓涓緥瀛愶細(xì)

1 navigate_to detail_page_for @product
2 on ProductDetailPage do
3   .
4 end

5. Shortcut

鍓嶉潰鎴戜滑宸茬粡鏈変簡(jiǎn)涓涓緢濂界殑鍩虹錛屽皢Selenium嫻嬭瘯涓庡悇縐嶈剢寮變笖鎰忓浘涓嶆槑鐨勫厓绱犲垎紱誨紑浜?jiǎn)锛岄偅涔堟渶鍚巗hortcut涓嶈繃鏄湪铔嬬硶涓婇潰鏈婕備寒鐨勫ザ娌圭艦浜?jiǎn)鈥斺斿畾涔夊叿鏈夋紓浜娉曠殑helper錛?br>
1 def should_login_successfully user
2   on LoginPage do
3     assert_equal 'Welcome!', welcome_message
4     login_as user
5   end
6   assert on WelcomeRegisteredUserPage
7 end

鐒跺悗鏄彟澶栦竴涓猰agic鏂規(guī)硶錛?br>
1 def given identifer
2   words = identifier.to_s.split '_'
3   eval "get_#{words.last} :#{words[0..-2].join '_'}"
4 end

涔嬪墠鐨勬祴璇曞氨鍙互琚敼鍐欎負(fù)錛?br>
def test_should_xxxx
  should_login_successfully given :registered_user
end


榪欐槸涓縐嶇粨璁烘х殑shortcut鎻忚堪錛屾垜浠繕鍙互鏈夋洿behaviour鐨勫啓娉曪細(xì)

 1 def login_on page_type
 2   on page_type do
 3     assert_equal 'Welcome!', welcome_message
 4     login_as @user
 5   end
 6 end
 7 
 8 def login_successfully
 9   on WelcomeRegisteredUserPage
10 end
11 
12 def given identifer
13   words = identifier.to_s.split '_'
14   eval "@#{words.last} = get_#{words.last} :#{words[0..-2].join '_'}"
15 end


鏈鍚庯紝嫻嬭瘯灝變細(xì)鍙樻垚綾諱技楠屾敹鏉′歡鐨勬牱瀛愶細(xì)

1 def test_should_xxx
2   given :registered_user
3   login_on LoginPage
4   assert login_successfully
5 end

鎬諱箣shortcut鏄竴涓棤鍏沖ソ鍧忥紝鍙叧涔庢兂璞″姏鐨勪笢瑗匡紝灝芥儏鎸ユ磼Ruby DSL鍚?D

緇撹

Selenium鏄竴涓浜哄張鐖卞張鎭ㄧ殑涓滆タ錛岄敊璇湴浣跨敤Selenium浼?xì)缁欐暣涓晱鎹峰洟闃熺殑寮鍙戣妭濂忓甫鏉ョ伨闅炬х殑褰卞搷銆備笉榪囧煎緱搴?jiǎn)骞哥殑鏄纭滎C嬌鐢⊿elenium鐨勫師鍒欎篃鏄浉褰撶殑綆鍗曪細(xì)

1.閫氳繃灝嗚剢寮辨槗鍙樼殑欏甸潰鍏冪礌鍜屾祴璇曞垎紱誨紑錛屼嬌寰楅〉闈㈢殑鍙樺寲涓嶄細(xì)瀵規(guī)祴璇曚駭鐢熷お澶х殑褰卞搷銆?br>2.鏄庣‘鎸囧畾嫻嬭瘯鏁版嵁鐨勬剰鍥撅紝涓嶅湪嫻嬭瘯鐢ㄤ嬌鐢ㄤ換浣曞叿浣撶殑鏁版嵁銆?br>3.灝戒竴鍒囧彲鑳斤紝鏄庣‘鍦拌〃杈懼嚭嫻嬭瘯鐨勬剰鍥撅紝浣挎祴璇曟槗浜庣悊瑙c?br>
褰撶劧錛岄櫎浜?jiǎn)閬靛惊杩欏嚑涓熀鏈師鍒欎箣澶栧Q屼嬌鐢╬age object鎴栧叾浠杁omain based web testing鎶鏈槸涓笉閿欑殑閫夋嫨銆傚畠浠皢浼?xì)甯姪浣犳洿瀹规槗鍦版帶鍒禨elenium嫻嬭瘯鐨勮妯★紝鏇村ソ鍦板鉤琛¤鐩栫巼鍜屾墽琛屾晥鐜囷紝浠庤屾洿鍔犳湁鏁堝湴浜や粯楂樿川閲忕殑Web欏圭洰銆?br>
楦h阿

姝ゆ枃涓秹鍙?qiáng)鐨勯兘鏄垜鏈榪戜笁鍛ㄤ互鏉ュSelenium嫻嬭瘯榪涜閲嶆瀯鏃舵墍閲囩敤鐨勭湡瀹炴妧鏈傛劅璋ick Drew甯姪鎴戞竻鏅板湴鍒掑垎浜?jiǎn)Driver, Page, Nagivator鍜孲hortcut鐨勫眰嬈″叧緋伙紝瀹冧滑鏋勬垚鎴戞暣涓疄璺電殑鍩虹煶錛涙劅璋hris Leishman錛屽湪鍜屼粬pairing programming鐨勮繃紼嬩腑錛屼粬甯姪鎴戦敜鐐間簡(jiǎn)Ruby DSL錛涜繕鏈塎ark Ryall鍜孉bhi錛屾槸浠栦滑絎竴嬈″湪欏圭洰涓紩鍏ヤ簡(jiǎn)Test Data Fixture錛屼嬌寰楁墍鏈変漢鐨勫伐浣滈兘鍙樺緱綆鍗曡搗鏉ャ?br>


Raimundox 2007-06-13 09:44 鍙戣〃璇勮
]]>
I'm Smalltalk, Which Programming Language are You?http://www.tkk7.com/raimundox/archive/2007/05/02/115053.htmlRaimundoxRaimundoxWed, 02 May 2007 09:48:00 GMThttp://www.tkk7.com/raimundox/archive/2007/05/02/115053.htmlhttp://www.tkk7.com/raimundox/comments/115053.htmlhttp://www.tkk7.com/raimundox/archive/2007/05/02/115053.html#Feedback3http://www.tkk7.com/raimundox/comments/commentRss/115053.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/115053.html
Which Programming Language are You?

p.s. 榪欎釜鍙兘涓嶅噯...鍥犱負(fù)鏉庨粯鍚屽绔熺劧鏄疞isp...鎬庝箞鍙兘...


Raimundox 2007-05-02 17:48 鍙戣〃璇勮
]]>
X-Fileshttp://www.tkk7.com/raimundox/archive/2007/03/30/107563.htmlRaimundoxRaimundoxFri, 30 Mar 2007 14:52:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/30/107563.htmlhttp://www.tkk7.com/raimundox/comments/107563.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/30/107563.html#Feedback3http://www.tkk7.com/raimundox/comments/commentRss/107563.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/107563.html
1. IEC61970 Metadata: Electricity Power Trading System

褰撴椂鍒氫笂鐝紝team閲屾湁涓涓狣oamin鐭ヨ瘑寰堝帀瀹崇殑娓呭崕鐨勫崥澹紝姣曚笟鐨勮鏂囧氨鏄數(shù)鍔涘競(jìng)鍦猴紝鑰屾竻鍗庡張鏄浗瀹跺紩鍏EC61970鐨勪簲瀹朵箣涓銆傛墍浠ヤ粬寰堣秴鍓嶇殑鎶婅繖涓や釜涓滆タ緇撳悎鍦ㄤ竴璧鳳紝鍋氭垚浜?jiǎn)涓涓郴緇熴傝瀹炶瘽錛屽垰浜?jiǎn)瑙EC61970鐨勬椂鍊欙紝鎴戞槸鐩稿綋鐨勯渿鎾肩殑錛屾湁璧朵笂閭f椂鍊橫DA椋庢皵鍒氳搗錛孖EC61970鍙堟槸鍚屾椂MOF(Meta Object Facility)鍜孯DF based錛屽崕涓藉緱涓嶈銆備竴涓嬪瓙鎴戝氨鍙樻垚浜?jiǎn)涓涓狹DA guy錛屼竴涓猰etadata guy...浠ヨ嚦浜庯紝鍦˙JUG鏈鍒濈殑2騫撮噷錛孧DA/MOF/Metadata鎴愪負(fù)浜?jiǎn)涓绘棆寰?..

2. IEC61970 & CWM(Common Warehouse Metamodel) & Office Plugin : Data Warehouse Integration System

榪欐槸榪勪粖涓烘錛屾垜鏈涓嶆効鎰忓洖蹇嗙殑涓涓」鐩?..鍥犱負(fù)Office Plugin...鍔ㄨ緞钃濆睆鐨勯伃閬囪鎴戝績(jī)鏈変綑鎮(zhèn)?..榪欐槸涓涓猙ackend鏄疛2EE錛宖rontend鏄?Net鐨刼ffice鎻掍歡緋葷粺錛屼富瑕佹槸鎶ヨ〃...涓よ竟閮戒嬌鐢–WM浣滀負(fù)鏁版嵁緇熶竴鐨勫艦寮?..鍩烘湰涓婂仛鍒頒竴鍗婃垜鐨勬剰蹇楀氨宕╂簝浜?..

3. DB Migration/Refactoring : Jyxpearl

榪欎釜欏圭洰...鏄潕榛樺悓瀛︾殑縐佹埧鏈鐖憋紝浠庡ぇ瀛︿竴鐩村仛浜?jiǎn)寰堜箙锛屾敼鐗堟棤鏁皨?..褰撴椂娌℃湁榪欎箞嫻佽鐨勫ソ璇嶏紝浠涔圖B Migration鍟婏紝DB Refactoring鍟婏紝閭f椂鍊欐垜浠粺縐板鏁版嵁...鎴戝浜?jiǎn)濂藉浼?xì)...鍩烘湰涓婄嚎涓鍥炲涓鍥?..鏃惰嚦浠婃棩...鏉庨粯鍚屽鎬繪槸涓嶆棤寰楁剰鐨勮錛氫綘鐪嬶紝浣燚B Migration鐨勮兘鍔涘氨鏄垜鍩瑰吇鐨?..

4. JMI(Java Metadata Interface) & Eclipse RCP : Multi/Rich Client ERP Product

榪欎釜team鍏跺疄鎸哄崕涓界殑錛岃佹牼鐨勪駭鍝佺粡鐞嗭紝鏉庨粯鏄紑鍙戠粡鐞嗭紝瓚呯駭璧勬繁琛屼笟涓撳(浜哄瀹為檯鍋氳繃鐢熶駭縐戦暱錛孧RPII錛孍RP閮芥槸浜哄鐜╁墿涓嬬殑)鑰侀綈鍋氶渶姹傦紝淇烘槸Architect錛岃繕鏈夊姩鐗╁洯閲岀殑鐚猄enior Dev錛屾垜璁よ瘑浜轟腑緹庡伐鑳藉姏絎竴浜や簰璁捐鑳藉姏絎竴鐨勭背綾沖鍋歎I鍜屼氦浜掋傜敱浜庡綋鏃剁湅浜?jiǎn)netbeans鍜宻un鐨勫畼鏂笿MI瀹炵幇寰楀お鐜╁叿銆傛垜浠喅瀹氫粠鑷繁鐨凧MI瀹炵幇寮濮嬶紝緋葷粺緇撴瀯瑕佹眰澶氬鎴風(fēng)錛寃eb錛宺cp閮借...鎵浠ユ槸瓚呰交http鍗忚鐨刡/s錛宑/s銆傜粨鏋勮繕鏄笉閿欑殑錛岃繃紼嬫潕榛樺拰鎴戝綋鐒舵槸鏁忔嵎浜?jiǎn)銆備技涔庝竴璧烽兘瓚呯駭瀹岀編鐨勬椂鍊欙紝灝辨槸瑕佸潖鑿滅殑鏃跺?..浼佷笟浜嬩笟閮ㄨВ鏁d簡(jiǎn)...

5. Java Communication & Eclipse RCP : IC Card Reader

涓婇潰閭d釜欏圭洰瑙f暎涔嬪悗錛屾垜璺熸潕榛樿祴闂插湪瀹訛紝鏈変笉蹇嶅績(jī)鎵撴壈鏀垮簻錛岃嚜璋嬬敓璺壘鐨勯」鐩?..榪欎釜欏圭洰瑕佺敤IC鍗¤鍗″櫒錛屼負(fù)浜?jiǎn)閿荤偧鎴戜滑鐨凟clipse RCP鑳藉姏錛屾垜浠喅瀹氱敤eclipse rcp鏉ュ仛銆備簬鏄棶棰樺氨鍑烘潵浜?..IC鍗℃庝箞鍔烇紵google涓鎶婂彂鐜板ぉ鏃犵粷浜轟箣璺?..Java鏈変竴涓狢ommunication鍖咃紝鍙互榪炴帴serial port...涓嶈繃褰撴椂tricky鐨勬槸...鎴戠殑鏈瓙娌℃湁涓插彛錛屾垜浠拱浜?jiǎn)涓涓覆鍙e埌usb鐨勮漿鎹㈠櫒...鍙戠幇鏍規(guī)湰涓嶈兘鐢?..浜庢槸鍙ソ璺戝埌鏉庨粯瀹剁敤浠栧崕涓界殑鍙板紡鏈猴紙榪欏幃褰撳勾瑾撹█鏃︽棪鐨勮錛宭aptop澶參錛屼竴瀹氳鐢ㄥ彴寮忔満錛屼笢鍊熻タ鍊熸悶浜?jiǎn)涓?G RAM SATA錛繪敞鎰忥紝榪欐槸浼忕瑪錛界殑鏈哄櫒錛夈傛垜褰撴椂灝辮寰楋紝Java鐨勮繖涓笢瑗垮熀鏈氨鏄厖鏁扮殑錛岃矊浼煎畬鍏ㄦ病鏈変漢鐢ㄨ繃錛屾枃妗e暐鐨勯兘鐗瑰皯...鍙兘鑷繁鎽哥儲(chǔ)銆傚湪緇忓巻浜?jiǎn)鏃犳暟娆″まp觸涔嬪悗錛岀粓浜庢垚鍔熶簡(jiǎn)銆傚湪showcase閭eぉ鐨勪笂鍗堬紝鎴戞渶鍚庡疄楠屼簡(jiǎn)璇誨崱浠涔堢殑錛岄兘娌¢棶棰樸傚叴楂橀噰鐑堢殑鎶妀ar鎷峰埌浼樼洏涓婏紝鍒氭彃鍒皍sb鍙d笂...鍙涓閬撻棯鐢?..鏈哄櫒榛戜簡(jiǎn)...鎹潕榛樺悗鏉ュ垎鏋愭槸涓繪澘鐑т簡(jiǎn)...鎴戣娌′簨錛屾嬁涓婄‖鐩橈紝鍦熶竴鐐逛篃涓嶅獎(jiǎng)鍝峴howcase銆傛潕榛樿...榪欎釜...SATA鑰?..榪樹笉嫻佽鍛?..鎴戠豢...姝ゅ悗寰堥暱鏃墮棿錛屾垜閮芥鐤戞槸鎴戣窡鏉庨粯鍚屽鑼冨啿錛岃秴綰ч」鐩潃鎵?..

6. RDF, Semantic Web, SparQL : Ontology-Relationship DB Mapping

榪欐槸鍦ㄤ竴瀹跺叕鍙稿仛浜у搧錛屽綋鏃舵垜鍏冩暟鎹?MDA棰嗗煙棰囨湁縐瘡...璺熻繖瀹跺叕鍙稿仛寰楃被浼鹼紝灝辮繃鏉ヨ礋璐g爺鍙戞湰浣撳埌鍏崇郴鏁版嵁搴撶殑鏄犲皠...鍏煎甫鍦―2RQ鐨勫熀紜涓婂疄鐜頒竴涓猄parQL鏌ヨ璇█銆傛庝箞鏍?..鍚笂鍘誨緢鍗庝附鍚?..鍒扮幇鍦ㄦ垜閮借涓猴紝榪欎釜欏圭洰鏄垜鏈鏈夋綔鍔涚殑鐗涚毊錛屼笉瀹氶偅澶﹚eb x.0浜?jiǎn)锛屾垜涔熻佷簡(jiǎn)錛屾垜灝卞彲浠ユ媺鐫灝忔湅鍙嬬殑鎵嬪幓鍚圭墰b浜?05騫存垜灝卞仛semantic web,O/R mapping鐭ラ亾涓嶏紵Ontology鍟婏紝浣犱滑鍟婏紝sometime too simple"...涓嶈繃浼拌榪欎竴澶╄繕鏃╁緱寰堝憿

7. Agile Domain Specified Language : Goodhope

榪欎釜涔熸槸鏉庨粯鍚屽鏈変喚鐨勯」鐩?..璇濋噷鐨勬晱鎹稤SL瀹炶返...涓嶈繃璇村疄璇濓紝涔熸湁鐐筙...

Raimundox 2007-03-30 22:52 鍙戣〃璇勮
]]>
Agile 101: CoC & Why Agile is Hardhttp://www.tkk7.com/raimundox/archive/2007/03/30/107375.htmlRaimundoxRaimundoxThu, 29 Mar 2007 22:53:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/30/107375.htmlhttp://www.tkk7.com/raimundox/comments/107375.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/30/107375.html#Feedback4http://www.tkk7.com/raimundox/comments/commentRss/107375.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/107375.html瑕佹垜璇達(dá)紝榪欎簺浜鴻涔堟槸涓嶇湡鐨勪簡(jiǎn)瑙f晱鎹峰紑鍙戯紝娌℃湁璁よ瘑鍒版晱鎹峰紑鍙戠殑闈╁懡鎬э紝鍙槸鐢ㄥ鍦ㄧ殑褰㈠紡鏉ユ妸瀹冨拰鍏朵粬鏂規(guī)硶榪涜浜?jiǎn)姣旇緝銆傛湁鍙堟垨鑰呮槸瀹炴柦鏁忔嵎鏂規(guī)硶鐨勬椂鍊欎笉褰誨簳錛屾墍浠ュ洓澶勭澹佷互鑷充簬鎼炶搗浜?jiǎn)淇涓讳箟銆傛渶鍙曠殑灝辨槸鏌愪簺澶у叕鍙革紝鐪嬫晱鎹風(fēng)伀浜?jiǎn)锛屾繪湁鍖呰涓涓嬶紝鍒板簳榪樻槸瑕佸崠浜у搧銆傛晱鎹瘋蔣浠跺紑鍙戝氨鏄竴涓潻鍛芥х殑鏂規(guī)硶錛屽彧涓嶈繃瀹冭棰犺鐨勪笉浠呬粎鏄綆璐ㄩ噺鐨勮蔣浠跺紑鍙戞柟寮忥紝鏇撮噸瑕佺殑鏄紝瀹冭棰犺杞歡鐢熶駭浼佷笟鍜岃蔣浠剁殑浣跨敤浼佷笟涔嬮棿鐨勭敓浜у叧緋伙紒!榪欎竴鐐瑰湪鏁忔嵎瀹h█閲屽啓寰楀啀鏄庣櫧涓嶈繃浜?br />
Customer collaboration over Contract negotiation

鏁忔嵎杞歡寮鍙戯紝灝辨槸瑕佷互涓縐嶆洿鍚堢悊鐨勫叡璧㈢殑鍚堜綔鍏崇郴錛屼唬鏇夸互鍓嶇暩褰㈢殑閲囪喘寮忕殑鍚堢害鍏崇郴銆備負(fù)浠涔堝悎綰﹀叧緋誨氨鏄暩褰㈢殑錛熸垜浠潵鐪嬬湅鍚堢害鍙屾柟鐨勫澧冦?br />
棣栧厛杞歡鍥㈤槦鏂歸潰鎵挎媴浜?jiǎn)杩囧鐨勯闄╁Q氫笟鍔″彉鍖栵紝鏀逛唬鐮侊紒錛佸晢涓氭妷鎷╄漿鎹紝鏀逛唬鐮侊紒錛佸嚟鍟ヤ綘鐢叉柟鐨勭紭鏁呴潪瑕佹垜鎵挎媴棰濆鐨勬垚鏈紵浣犺鎴戝啢涓嶅啢錛熷啢錛佷絾鏄漢瀹剁敳鏂逛篃鍐わ紒錛佷漢瀹惰姳浜?jiǎn)澶ф妸鐨勯摱瀛愬Q屾嬁鍒頒竴鍫嗕笉鑳界敤鐨勮蔣浠訛紙浣犺鏄‖浠朵漢瀹惰繕鑳借漿鎵嬪崠鐐歸挶錛夛紝灝卞儚浣犺鐮嶆爲(wèi)鍒漢緇欎綘鎶婇摬瀛愶紝浣犺縐嶆爲(wèi)浜哄緇欎簡(jiǎn)浣犳妸閿傛悂浣狅紝浣犱篃涓嶆効鎰忋備笖涓嶈鍗氬紙錛屽氨綆楀弻鏂歸兘鏈夊績(jī)鎶婁簨鎯呭仛濂斤紝鎸夊悎鍚屾潵錛岀敳鏂逛笉騫詫紱涓嶆寜鍚堝悓鏉ワ紝涔欐柟涓嶅共錛屾渶鍚庡彉鎴愨滄湁蹇?jī)鏉璐兼棤鍔涘洖澶┾濓紝澶у涓璧鋒壇鎵毊絳変簩鏈熺畻浜?jiǎn)銆俵ose-lose錛屾病鏈夎耽瀹躲?br />
閭d箞鍚堜綔鐨勫叧緋繪槸浠涔堝憿錛熷悎浣滅殑鍏崇郴灝卞ソ姣斾綘鍘籹ubway涔頒笁鏄庢不錛岄潰鍖呬綘鑷繁閫夛紝瑕佷粈涔堣倝浣犳潵鎸戯紝钄彍錛宑heese錛岄叡姹佷綘涔熻嚜宸辯湅鐫鍔炪傛妧鏈垜鏉ワ紝鍙e懗浣犻夈傛妧鏈け璐ユ垜璐熻矗錛屽彛鍛充笉鍚堥備綘璐熻矗銆備綘鍋氫綘鐨勫己欏規(guī)垜鏉ユ垜鐨勫己欏癸紝鏈緇堝ぇ瀹墮珮楂樺叴鍏村樆鍢誨搱鍝堜笉鍚典笉闂癸紝浣滃嚭涓欏垮彲鍙e崍槨愩傝繖鏄椂鍊欙紝鐢熶駭鍏崇郴鍙樹簡(jiǎn)錛屾垜涓嶆槸浣犵殑鍐峰啺鍐扮殑渚涘簲鍟嗭紝浣犱篃涓嶆槸鎴戦偑鎭剁殑瀹㈡埛錛屾垜浠槸鎷村湪涓鏍圭懷瀛愪笂鐨勮殏铓便傛垚鍔熸槸鎴戜滑鐨勶紝澶辮觸涔熸槸鎴戜滑鐨勩傝崳杈變笌鍏憋紝鎼烘墜騫惰偐銆傚惉鐫鏈夌偣鑰崇啛錛熸病閿欙紝SaaS銆傛晱鎹峰璦鏃╁氨璇翠簡(jiǎn)錛孋oC鍟娿備粠渚涘簲鍟嗗彉鎴愭湇鍔″晢錛屼粠鏈嶅姟鍟嗗彉鎴愭垬鐣ュ悎浣滀紮浼達(dá)紝榪欐槸鍦ㄧ粰杞歡浼佷笟鎸囧嚭璺紝鏂扮殑鐢熶駭鍏崇郴宸茬粡灝藉湪鍏朵腑浜?jiǎn)銆?br />
濡傛灉鐪嬩笉娓呮晱鎹風(fēng)殑榪欎釜鏍規(guī)湰闈╁懡鐐癸紝浠ヤ負(fù)榪樻槸寮鍙戞柟娉曠殑灝忔墦灝忛椆錛岄偅涔堟晱鎹鋒牴鏈疄鏂戒笉鎴愩傝繖璇濅竴鑸垜涓嶆暍璇寸殑錛岀▼搴忓憳鑷彂瀹炴柦鏁忔嵎錛屽彧鍦ㄤ竴縐嶆儏鍐典笅鍙兘鎴愬姛錛氬ぇ浼佷笟鐨処T閮ㄩ棬銆傚啀璧朵笂涓己鍔涚殑IT棰嗗錛岃嚜瀹朵漢鍢涳紝鏈変粈涔堜笉濂借皥鐨勩備竴鏉ヤ簩鍘伙紝灝辨垚鍔熶簡(jiǎn)錛堢湅鐪婥3錛岃鐧戒簡(jiǎn)涓嶅氨鏄疘T閮ㄩ棬鍜屼笟鍔¢儴闂紵錛変絾鏄紝濡傛灉鏄仛欏圭洰鐨勫叕鍙革紝浣犺惀閿鎵嬫涓嶆敼鍙橈紝鏁忔嵎灝變笉鍙兘鎴愬姛銆備綘鐨勫鎴瘋窡浣犱笉鏄悎浣滃叧緋伙紝浣犻氳繃鏁忔嵎澧炲姞璐ㄩ噺錛堢鍚堟ц川閲忥級(jí)鐨勫伐浣滃氨涓嶄細(xì)琚漢鍙紝閭d箞灝變笉鑳芥垚涓烘姇璧勶紝鍙兘鏄垚鏈傚綋鎴愭湰澧炲姞鍒頒笉鍙壙鎷呯殑鏃跺欙紝鏁忔嵎灝變笉浜?jiǎn)浜?jiǎn)涔嬩簡(jiǎn)銆備負(fù)浠涔堝ソ澶氫漢璇磋佹澘娌℃湁鍝嶅簲錛熸棫鐨勭敓浜у叧緋諱笅鏁忔嵎鏍規(guī)湰灝辨槸璐熸媴銆?br />
璇撮亾榪欓噷錛岃涓涓嬩互鏁忔嵎闂誨悕鐨凾houghtWorks銆傚叾瀹炲緢澶氫漢閮戒互涓篢hougtWorks鍙湁鏂規(guī)硶璁哄挩璇紝娌¢敊鎴戜滑鏄湁鏂規(guī)硶璁哄挩璇紝浣嗘槸涔熸湁涓氬姟妯″紡鍜ㄨ錛屽鎴蜂笟鍔℃ā寮忎笉鏀瑰彉錛屼粬鎬庝箞鑳藉交搴曟晱鎹鳳紵榪欑偣澶у涓嶅彲涓嶆煡鍟娿?img src ="http://www.tkk7.com/raimundox/aggbug/107375.html" width = "1" height = "1" />

Raimundox 2007-03-30 06:53 鍙戣〃璇勮
]]>
Scripts Amuse Myself: Poor Man's Lava for CruiseControl.rbhttp://www.tkk7.com/raimundox/archive/2007/03/29/107118.htmlRaimundoxRaimundoxThu, 29 Mar 2007 00:53:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/29/107118.htmlhttp://www.tkk7.com/raimundox/comments/107118.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/29/107118.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/107118.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/107118.html
#!/usr/local/bin/ruby
require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'
require 'rubygems'
require 'blinkenlights'

SUCCESS = 'success'

def read_rss source='http://cruisecontrolrb.thoughtworks.com/projects/CruiseControl.rss'
聽 content = ''
聽 open(source) do |s| content = s.read end
聽 rss = RSS::Parser.parse content, false
聽 rss.items[0].title.include?(SUCCESS) ? all_ok : alarm
end

def all_ok times = 50
聽 BlinkenLights.open { |lights| times.times {lights.random} }
end

def alarm times = 50, invertal = 0.0
聽 BlinkenLights.open { |lights| times.times {lights.flash invertal} }
end

while true
聽 read_rss
聽 sleep 5聽
end

make sure to have sufficient permissions to access the device, or you could simple run it as super user.



Raimundox 2007-03-29 08:53 鍙戣〃璇勮
]]>
Agile 101: User Story & Prioritizationhttp://www.tkk7.com/raimundox/archive/2007/03/28/106863.htmlRaimundoxRaimundoxWed, 28 Mar 2007 01:59:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/28/106863.htmlhttp://www.tkk7.com/raimundox/comments/106863.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/28/106863.html#Feedback2http://www.tkk7.com/raimundox/comments/commentRss/106863.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/106863.html
I - Independent
N - Negotiable
V - Valuable
E - Estimable
S - Small
T - Testable

鎴戜釜浜鴻寰楋紝榪欎釜鎬葷粨铏藉ソ錛屼絾涓嶅厤鍒嗘暎娉ㄦ剰銆傝鎴戣錛屾兂鎶婃彙濂経ser Story錛屽彧鐢ㄦ妸鎻′袱涓氨澶熶簡(jiǎn)Negotiable鍜孷aluable銆傞偅涔堥鍏堣紜畾浠涔堟槸Negotiable鐨勩俇ser Story鏈変竴涓祦浼犲箍娉涚殑涔﹀啓褰㈠紡錛?br />
As <role>, I'd like to <action>, so that <benifit/value/goal>.

涓轟簡(jiǎn)鏇村ソ鐨勮幏鍙杝tory榪樻湁寰堝鏈浣?jīng)_疄璺碉紝姣斿personas, 姣斿business process modeling錛屽叾瀹炶繖浜涘叏鏄硸琛g偖寮癸紝As, I'd like to閮芥槸鍣卞ご錛屽氨鏄負(fù)浜?jiǎn)鎶婄敤鎴峰拷鎮(zhèn)犳檿浜?jiǎn)錛岀劧鍚庡浘絀峰寱鐜扮洿鍙栧晢涓氫環(huán)鍊煎拰鐩爣銆備竴鏃﹀晢涓氫環(huán)鍊肩‘瀹氫笅鏉ワ紝role, action閮芥槸鍙互negotiable銆傛瘮濡傛潕榛樹箣鍓嶅湪鏂囩珷閲屼婦鐨勭敤鎴風(fēng)櫥褰曠殑渚嬪瓙錛岃緭涓嶈緭鐢ㄦ埛鏄庡瘑鐮侊紵鍙互鍟嗛噺鍢涳紒鏄笉鏄彧鏈夋敞鍐岀敤鎴峰彲浠ヤ韓鍙椾釜鎬ф湇鍔★紵鍙互鍟嗛噺鍢涳紒鍏抽敭鏄敤鎴鋒兂瑕佷粈涔堬紝鑷充簬鎬庝箞瀹炵幇榪欎簺鍒板ご鏉ラ兘鏄彲浠ュ晢閲忕殑錛岄兘鏄疦egotiable銆傚彧鏈夊鎴風(fēng)殑鍟嗕笟浠峰兼槸涓嶈兘鍟嗛噺鐨勶紝涔熸病鐨勫晢閲忋備環(huán)鍊兼病鏈変簡(jiǎn)錛岀洰鏍囦笉瀛樺湪浜?jiǎn)锛寴q欎釜User Story涔熷氨娌$敤浜?jiǎn)锛屽晢閲忓暐锛熼噸鍐欎竴寮犲氨濂戒簡(jiǎn)銆?br />
鍥犳user story鍙堟湁鍙﹀涓涓悕縐幫紝鍙玶equirement placeholder銆傚氨鏄鎴蜂環(huán)鍊肩殑"绔嬫瀛樼収"銆傝嚦浜庡叿浣撻渶姹傦紝閭d箞灝卞埌iteration plan meeting涓婃槸鍟嗛噺鍚э紝鐪嬬湅褰撴椂浠涔堟牱鐨勫艦寮忥紙鍔熻兘錛夋墠鏄渶絎﹀悎鐢ㄦ埛闇瑕併傚埌姝わ紝鍏跺疄澶у鍙互鐪嬪嚭鏉ヤ簡(jiǎn)錛寀ser story閲嶇偣灝變笉鍐岺ow涓婏紝鑰屾槸鍦╓hy涓婄殑銆傛湁浜?jiǎn)why錛屼笖鍙疦egotiable錛屾妸鎻′簡(jiǎn)綺劇錛屼綘灝辨槸鎸夌敤渚嬫潵鍐欓渶姹傚張鏈変綍濡ㄦ秴錛?br />
鏈変簡(jiǎn)valuable鍜宯egotiable鐨勬兂娉曞灚搴曪紝鍦ㄧ湅鐪嬪熀浜巙ser story鐨勫垵姝ヨ鍒掑埗瀹氣斺斾篃灝辨槸鏈夊悕鐨刾rioritization鈥斺斿氨瀹規(guī)槗鐞嗚В澶氫簡(jiǎn)銆傜敤鎴鋒牴鎹瘡寮犲崱鐨勪環(huán)鍊鹼紝鑷姣旇緝浣滃嚭鍐沖畾錛屽ぇ浣撳満鏅氨璺熷悜紲炰粰璁告効涓鏍楓?br />
紲炰粰錛氭垜鍙互婊¤凍浣犱竴涓効鏈涖?br />鎴戯細(xì)鎴戣鑽e崕瀵岃吹錛侊紒錛?br />紲炰粰錛氬摝錛岃崳鍗庡瘜璐碉紝閭d箞瑕佷笉瑕佺埍鎯呮秴錛?br />鎴戯細(xì)鎭╋紝榪欎釜...閭f垜瑕佸繝璐炵殑鐖辨儏濂戒簡(jiǎn)錛侊紒
紲炰粰錛氬摝錛屽繝璐炵殑鐖辨儏錛岄偅涔堣涓嶈鍋ュ悍騫沖畨鍛紵
鎴戯細(xì)鍛?...
repeat 鏃犳暟嬈★紝鏈緇堟垜瑕佷簡(jiǎn)涓浠惰繃鍐殑鐨尨...

Raimundox 2007-03-28 09:59 鍙戣〃璇勮
]]>
InfoQ涓枃绔欐潵浜?/title><link>http://www.tkk7.com/raimundox/archive/2007/03/28/106830.html</link><dc:creator>Raimundox</dc:creator><author>Raimundox</author><pubDate>Wed, 28 Mar 2007 00:29:00 GMT</pubDate><guid>http://www.tkk7.com/raimundox/archive/2007/03/28/106830.html</guid><wfw:comment>http://www.tkk7.com/raimundox/comments/106830.html</wfw:comment><comments>http://www.tkk7.com/raimundox/archive/2007/03/28/106830.html#Feedback</comments><slash:comments>2</slash:comments><wfw:commentRss>http://www.tkk7.com/raimundox/comments/commentRss/106830.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/raimundox/services/trackbacks/106830.html</trackback:ping><description><![CDATA[鑷粠鍒頒簡(jiǎn)ThouhgtWorks錛屾垜璁㈤槄鐨剅ss瓚婃潵瓚婂皯錛屽緢澶氱▼搴︿笂鏉ヨ錛屾湁浜?jiǎn)鑷鐨凱lanet TW錛屽緢澶氱浉鐪嬬殑blog鍙互涓嬈℃х湅鍏ㄤ簡(jiǎn)錛屾病鍟ュお澶х殑蹇呰鍘葷湅鍏朵粬鐨勪簡(jiǎn)銆傝繖涓嶏紝鍦ㄨ闃呬簡(jiǎn)Planet TW鍚庣殑涓ゅ勾涓紝鎴戝彧澧炶浜?jiǎn)涓瀹訛細(xì)InfoQ銆傚懙鍛碉紝鎯充笉鍒板浠婁腑鏂囩珯涔熸潵浜?a target="_blank">http://www.infoq.com/cn/</a>銆備笉閿欎笉閿欍?br /><img src ="http://www.tkk7.com/raimundox/aggbug/106830.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/raimundox/" target="_blank">Raimundox</a> 2007-03-28 08:29 <a href="http://www.tkk7.com/raimundox/archive/2007/03/28/106830.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Agile 101: Pair Programming & Simple Designhttp://www.tkk7.com/raimundox/archive/2007/03/27/106669.htmlRaimundoxRaimundoxTue, 27 Mar 2007 06:52:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/27/106669.htmlhttp://www.tkk7.com/raimundox/comments/106669.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/27/106669.html#Feedback4http://www.tkk7.com/raimundox/comments/commentRss/106669.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/106669.html瑕佷簡(jiǎn)瑙air涓轟粈涔堥噸瑕侊紝灝辮浜?jiǎn)瑙air鐨勭洰鐨勫湪浣曘傚綋鐒朵簡(jiǎn)錛屽ぇ澶氭暟浜洪兘鐭ラ亾pair鐨勯噸鐐瑰湪浜庣煡璇嗕紶閫掞紝鐭ヨ瘑鍏變韓錛屾寔緇蛋鏌ワ紝闄嶄綆浠g爜緙洪櫡絳夌瓑絳夌瓑銆傝繖浜涢兘鏄痯air鐨勪紭鐐癸紝涓嶈繃鏈閲嶈鐨勪竴鐐瑰嵈甯稿父琚拷鐣モ斺攑air programing鐨勬渶鐩存帴鑰屽張鏈鏍規(guī)湰鐨勭洰鐨勪箣涓鍦ㄤ簬simple design銆?br />


涓婂浘鏄憲鍚嶇殑Ron Jefferies Model錛屽彲浠ョ湅鍒癤P鏈浣?jīng)_疄璺佃鍒掑垎鎴愪簡(jiǎn)涓涓竴涓殑鍦嗗湀錛岃宲air, TDD, refactor鍜宻imple design浣嶄簬涓績(jī)銆傝繖騫朵笉鏄榪欏洓涓疄璺靛氨鏄痻p鐨勬牳蹇?jī)銆俲efferies model姣忎竴鍦堜唬琛ㄤ簡(jiǎn)xp瀹炶返榪囩▼涓殑涓嶅悓鍏蟲敞鐐癸紝鏈涓績(jī)鐨勬槸dev瑙嗚錛屽叾嬈℃槸team瑙嗚錛屾渶澶栧眰鏄氦浠橈紡綆$悊瑙嗚銆傛瘡鍦堜笂鐨勬渶浣蟲椂闂村灝戦兘鏈変簺绱ц﹀悎錛屾斁寮鍏朵粬鐨勪笉璁詫紝鎴戜滑涓撻棬璇磋dev鍦堬紝pair programing, tdd, refactor鍜宻imple design銆?br />
榪欏洓涓疄璺甸噷鍙湁simple design鏈铏氫篃鏈閲嶈銆傛湁涓涓棶棰樺凡緇忚闂繃鏃犳暟嬈′簡(jiǎn)錛屸滃埌搴曞simple鐨刣esign鎵嶅彨simple鈥濄傛垜瀵規(guī)涔熸湁涓涓繎涔庡埢鏉跨殑鍥炵瓟錛歵eam閲屾墍鏈変漢鍛橀兘鑳藉鐞嗚В鐨刣esign灝辨槸simple鐨勩備竴鏃︾珛浜?jiǎn)鏍囧噯锛寴q欏洓涓疄璺電殑涓諱粠鍏崇郴灝變竴涓嬪瓙娓呮櫚璧鋒潵鈥斺攕imple design鏄繖鍥涗釜瀹炶返鐨勬牳蹇?jī)锛屽叾浠栦笁涓疄璺甸兘鏄畠鏈嶅姟鐨勩?br />
棣栧厛鍋氬嚭涓涓璁★紝鏈綆鍗曠殑鍒ゆ柇鏍囧噯灝辨槸鏄惁鍙祴錛屼竴涓笉鍙祴鐨勮璁″熀鏈笂鍙互璁や負(fù)鏃犳硶瀹炵幇錛屼簬鏄疶DD鍗蟲槸simple design鐨勮川閲忎繚璇佸張鏄痵imple design鐨勭洿瑙夐獙璇併?br />
refactor鏄負(fù)浜?jiǎn)寰楀埌濂界殑浠g爜锛岄偅涔堜粈涔堟槸濂界殑浠g爜錛焥imple design!!!榪欓噷鏈変漢涓嶅悓鎰忎簡(jiǎn)錛屾湁浜鴻鍙槸瑕佹槗浜庝慨鏀瑰拰鎵╁睍錛屽彲鏄墿灞曞拰淇敼涔熻鍒漢鐪嬪緱鎳傛墠琛屽晩...simple design鏄搗鐮佺殑瑕佹眰鍢涖傚疄闄呬笂錛孹P涓殑refactor灝辨槸鏈濈潃simple design鐨勬柟鍚戦噸鏋勮繃鍘葷殑錛屼篃灝辨槸鏈濈潃鎵鏈変漢閮借兘鐞嗚В鐨勪唬鐮乺efactor榪囧幓鐨勩傛彃涓鍙ラ澶栬瘽錛屼負(fù)鍟ヨ濂界殑鏋舵瀯鐨勪笉鏄璁″嚭鏉ョ殑鍛紵鍥犱負(fù)濂界殑鏋舵瀯鑷沖皯搴旇鏄痵imple design鐨勶紝鑰宻imple鐨勬蹇墊湁鍜屼漢鍛樼浉鍏?..鎵浠ュ綋浣犳瀬灝借兘浜媠how off浣犵殑pattern鐭ヨ瘑涔嬪悗錛屽緱鍒板鏉傝璁℃牴鏈氨涓嶅彲鑳芥槸濂界殑鏋舵瀯銆傛椂鍒葷揣璁幫紝鏋舵瀯鏄Ε鍗忓晩...

鏈鍚庯紝pair programming鏄痵imple design鐨勫疄闄呮楠岋紒錛侊紒鍥犱負(fù)鍗充究鏄渶澶嶆潅鐨勮璁★紝鍙鏄綘鑷繁鎯沖嚭鏉ョ殑錛屼綘閮借寰楀畠綆鍗曟棤姣旓紝閲岄潰鍏呮弧浜?jiǎn)鐩寸櫧涓旀樉鑰屾槗瑙佺殑鐞嗙敱銆傚彲鎯滀笉騫哥殑鏄紝鎴戜滑瑕佺殑綆鍗曪紝鏄team閲屾墍鏈変漢鐨勭畝鍗曘傚鏋滀綘鐨刾air涓嶈兘鐞嗚В浣犵殑璁捐錛岄偅涔堣鏄庝綘鐨勮璁″鏉備簡(jiǎn);濡傛灉浣犱滑涓や釜浜烘噦錛屼絾鏄痵with pair鐨勬椂鍊欙紝鎹㈣繃鏉ョ殑浜轟笉鎳傦紝璇存槑浣犵殑璁捐澶嶆潅浜?jiǎn)銆俻air programming(浠ュ強(qiáng)浠栭偅瀹規(guī)槗璁╀漢蹇界暐鐨勫瓙瀹炶返switching pair)灝辨槸媯(gè)楠宻imple design鐨勮繃紼嬨俻air programing + refactor灝辨槸鏃跺埢淇濊瘉simple design闃叉榪囨浮璁捐鍙嶆敾鍊掔畻鐨勮繃紼嬨俻air programming + refactor + tdd灝辨槸鍥㈢粨鍦ㄤ互Deming鍚屽built quality in鐨勮川閲忓ぇ鏃椾笅錛屽潥瀹氬湴涓庤繃娓¤璁″仛鏂椾簤鐨勮繃紼嬨傛嵁鎴戣瀵燂紝鑷蟲病鏈変嬌鐢╬air programming鐨勫洟闃熶腑錛屽皯涓鍗妔imple design鎴愪簡(jiǎn)鍙e彿錛岃岃繖涓鍗婁腑錛岃嚦灝戝張鏈変竴鍗婃渶緇堟斁寮冧簡(jiǎn)xp鏀懼純浜?jiǎn)鏁忔嶘P紙淇轟互鍓嶅甫榪囩殑鍥㈤槦灝辨湁榪欐牱鐨?..榛樺搥涓涓嬶級(jí)銆傛繁鍒葷殑鏁欒鍟婏紝鎴戜滑鏉ラ珮鍛間竴涓嬶細(xì)"pair programming鏄楠宻imple design鐨勫敮涓鏍囧噯錛?銆?br />
鏈鍚庤涓涓媝air programming緇忔祹瀛︼紝榪囧鐨勫亣璁炬垜灝變笉璁蹭簡(jiǎn)銆傚崟璇翠竴鐐癸紝鏈夊摢涓浣嶄笂鐝殑8灝忔椂浠庢潵涓嶄笂msn/yahoo/qq絳塱m?鏈夊摢涓浣嶄笂鐝粠鏉ヤ笉涓婅鍧?涓嶅洖璐?涓嶅彂閭歡?浠ユ垜pair鐨勭粡楠屾潵鐪嬶紝pair programming鐨勮繃紼嬩腑錛屼袱涓漢鍑犱箮涓嶄細(xì)鐢╥m錛屽嚑涔庝笉浼?xì)閫涜鍧涖備綘涓嶅ソ鎰忔濆憖錛屾瘯绔熶笉鏄綘涓涓漢鐨勬満鍣紝姣曠珶鏄袱涓漢鐨勬椂闂達(dá)紝姣曠珶浣犱篃涓嶆効鎰忕粰鍚屼簨涓縐嶆噿鏁g殑鍗拌薄鍚э紵鏀跺洖鐨勮繖涔堟氮璐圭殑鏃墮棿錛岃嚦灝戦《寰楄繃鍙﹀涓涓漢鐨勫伐浣滄椂闂翠簡(jiǎn)鍚э紵

Raimundox 2007-03-27 14:52 鍙戣〃璇勮
]]>
Agile Development 錛?a Quality Management Perspectivehttp://www.tkk7.com/raimundox/archive/2007/03/26/106507.htmlRaimundoxRaimundoxMon, 26 Mar 2007 12:08:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/26/106507.htmlhttp://www.tkk7.com/raimundox/comments/106507.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/26/106507.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/106507.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/106507.html
絎﹀悎鎬ц川閲?br />20涓栫邯40騫翠唬錛岀鍚堟ц川閲忔蹇典互絎﹀悎鐜拌鏍囧噯鐨勭▼搴︿綔涓鴻 閲忎緷鎹紝鈥滅鍚堟爣鍑嗏濆氨鏄悎鏍肩殑浜у搧璐ㄩ噺錛岀鍚堢殑紼嬪害鍙嶆槧浜?jiǎn)漶斿搧璐ㄩ噺鐨勬按邈^銆傛瘮濡傝鎴戝仛涓涓澂瀛愶紝娌′粈涔堢壒鍒殑瑕佹眰錛屼篃涓嶆槸鎴戠緇忚川鐨勮壓鏈綔鍝侊紝灝辨槸鏅櫘閫氶氱殑涓涓澂瀛愶紝閭d箞闇瑕侀珮鐭暱鐭紝澶у皬鑳栫槮錛岀瓑絳変竴騫茶川閲忓睘鎬э紝鎴戝仛濂戒簡(jiǎn)鍙互鎷跨潃璐ㄩ噺鏍囧噯鏉ュ姣旓紝涓鐪煎氨鍙互鐪嬪嚭閭i噷鍑轟簡(jiǎn)浠涔堥棶棰樸傞氳繃鏄惁絎﹀悎榪欎簺鏍囧噯鍒ゆ柇浜у搧鍏鋒湁鐩稿簲鐨勮川閲忋?br />閭d箞杞歡鐨勮川閲忕悊鏄笉鏄鍚堟ц川閲忓憿錛熸垜涓漢瑙夊緱涓嶅睘浜庛傝櫧鐒舵垜浠竴鏍峰彲浠ユ嬁鍑哄悇縐嶅悇鏍風(fēng)殑鏍囧噯錛屾瘮濡傛晠闅滅巼錛屾瘮濡俠ug鏁扮瓑絳夈備絾鏄繖浜涙爣娉ㄩ兘婊¤凍紜笉涓瀹氭槸濂界殑杞歡錛屾瘮濡傛垜鍐欎竴涓猦elloworld錛岃櫧鐒朵粬鍙互娌℃湁bug銆備絾鏄嵈鍙戞尌涓嶄簡(jiǎn)浠諱綍鐨勪綔鐢ㄣ傝繖鏍風(fēng)殑杞歡灝卞睘浜庘滈珮璐ㄩ噺鈥濈殑搴熷搧銆傛濡傝檔杈涙璇勪環(huán)鏂歸縛娓愶紝鈥滀綘涓嶈鍘岋紝浣嗘槸姣棤鐢ㄥ銆傗濓紝鏄劇劧姣棤鐢ㄥ鐨勮蔣浠朵笉浼?xì)鏄湡姝i珮璐ㄩ噺鐨勮蒋錃g銆?br />
閫傜敤鎬ц川閲?br />20涓栫邯60騫翠唬錛岄傜敤鎬ц川閲忔蹇典互閫傚悎欏懼闇瑕佺殑紼嬪害浣滀負(fù)琛¢噺鐨勪緷鎹紝浠庝嬌鐢ㄧ殑瑙掑害瀹氫箟浜у搧璐ㄩ噺錛岃涓鴻川閲忓氨鏄駭鍝佺殑鈥滈傜敤鎬р濄傛槸鈥滀駭鍝佸湪浣跨敤鏃惰兘澶熸垚鍔熸弧瓚崇敤鎴烽渶瑕佺殑紼嬪害鈥濄傝川閲忔秹鍙?qiáng)璁捐寮鍙戙佸埗閫犮侀攢鍞佹湇鍔$瓑榪囩▼錛屽艦鎴愪簡(jiǎn)騫夸箟鐨勮川閲忔蹇點(diǎn)傞傜敤鎬ц川閲忕殑渚嬪瓙涔熷緢澶氾紝姣斿鎴戜拱浜?jiǎn)涓浠禛ivenchy瑗挎湇錛堟垜榪樼湡涔頒簡(jiǎn)涓浠訛級(jí)錛屼絾鏄竴鏃跺張娌℃湁鐗瑰埆姝f槸鐨勫満鍚堬紙鐩墠榪樼湡娌℃湁浠涔堟寮忕殑鍦哄悎錛夛紝浜庢槸鎴戜竴澶╁洓欏跨墰鎺掞紙鍏跺疄鍙湁涓欏匡級(jí)錛屼簬鏄氨鍚冭儢浜?jiǎn)锛寴q欎歡鍗庝附鐨凣ivenchy灝辯┛涓嶄笂浜?jiǎn)銆傞偅涔堣繖浠惰。鏈嶄粠絎﹀悎鎬ц川閲忔潵璇達(dá)紝鏄紭璐ㄥ搧錛屼絾鏄粠閫傜敤鎬ц川閲忔潵璇達(dá)紝鍗翠笉鏄竴涓珮璐ㄩ噺鐨勪駭鍝佲斺斿洜涓烘垜絀夸笉涓娿傝繕鏈変竴鍙ヨ瘽錛屽彨鐢蹭箣鐔婃帉涔欎箣鐮掗湝銆備篃鏄傜敤鎬ц川閲忕殑鏍囧噯浣撶幇銆?br />閭d箞杞歡鐨勮川閲忔槸涓嶆槸閫傜敤鎬ц川閲忓憿錛熸垜涓漢瑙夊緱錛岃蔣浠剁殑璐ㄩ噺鑷沖皯鏄傜敤鎬ц川閲忋傝蔣浠訛紝灝ゅ叾鏄畾鍒惰蔣浠訛紡浼佷笟杞歡錛屽氨鏄噺浣撹琛c傝蔣浠剁殑鍩烘湰璐ㄩ噺灝辨槸瑕佸湪鐢ㄦ埛浣跨敤鐨勮繃紼嬩腑鍙戞尌浠峰鹼紝鏀拺瀹㈡埛鐨勪笟鍔″彂灞曘?br />涔︿笂璇達(dá)紝浠庘滅鍚堟р濆埌鈥滈傜敤鎬р濓紝鍙嶆槧浜?jiǎn)錆h浠湪瀵硅川閲忕殑璁よ瘑榪囩▼涓紝宸茬粡寮濮嬫妸欏懼闇姹傛斁鍦ㄩ瑕佷綅緗備絾鏄畠娌¤鎬庝箞鎵嶈兘鍋氬埌鎶婂鎴烽渶姹傛斁鍒伴瑕佷綅緗傛垜鐪嬪厜闈犳枃妗f槸鍫嗕笉鍑烘潵鐨勶紝鍏夎冭璇翠篃鏄笉琛岀殑銆傝繖涓悗闈㈣錛屾埓鏄庡悓瀛︽瘮鎴戣寰楀ソ銆?br />
婊℃剰鎬ц川閲?br />20涓栫邯80騫翠唬錛岃川閲忕鐞嗚繘鍏ュ埌TQM闃舵錛屽皢璐ㄩ噺瀹氫箟涓衡滀竴緇勫浐鏈夌壒鎬ф弧瓚寵姹傜殑紼嬪害鈥濄傚畠涓嶄粎鍖呮嫭絎﹀悎鏍囧噯鐨勮姹傦紝鑰屼笖浠ラ【瀹㈠強(qiáng)鍏朵粬鐩稿叧鏂規(guī)弧鎰忎負(fù)琛¢噺渚濇嵁錛屼綋鐜扳滀互欏懼涓哄叧娉ㄧ劍鐐光濈殑鍘熷垯銆傝繖涓殑鏈鍏稿瀷鐨勪緥瀛愭槸楹﹀綋鍔籌紝浠栨墍鏈夌殑搴楅摵浠庨鏍煎埌椋熺墿閮戒繚鎸佸湪鍚屼竴姘村鉤錛屼嬌浣犳棤璁哄湪閭i噷錛岄兘鍙互寰楀埌涓瀹氱殑璐墿浣撻獙銆備篃灝辨瀯鎴愪簡(jiǎn)瀵歸害褰撳姵鐨勬弧鎰忔ц川閲忕殑楠岃瘉銆傝繖涓蔣浠朵笂涔熸槸鏈変緥瀛愮殑錛屽唴涓句笉蹇呬翰錛孴houghtWorks澶у鏁伴」鐩兘鍙互杈懼埌鈥滄弧鎰忔ц川閲忊濓紝鍛靛懙璋佽淇轟滑鏄痗onsultant娑呫?br />鎴戦殣綰﹁寰楁弧鎰忔ц川閲忓簲璇ユ槸涓涓繃紼嬬殑璐ㄩ噺錛岃屼笉浠呬粎鏄蔣浠剁殑璐ㄩ噺錛屼絾鏄洰鍓嶆病鏈夊ソ鐨勬兂娉曪紝鏆備笖鎸変笅涓嶈〃銆?br />
鍗撹秺璐ㄩ噺
......涓嬬暐100瀛椼備釜浜鴻寰楀ぇ澶氭暟杞歡榪樻病鏈夎揪鍒伴傜敤鎬ц川閲忥紝澶у鏄繃紼嬩篃閮芥病鏈夎揪鍒版弧鎰忔ц川閲忥紝鍗撹秺璐ㄩ噺灝卞厛涓嶈浜?jiǎn)鍚с?br />
鎬諱箣錛屾垜浠ぇ浣撶殑璁や負(fù)杞歡璐ㄩ噺涓昏鏄傜敤鎬ц川閲忚搗鐮佹槸涓嶄細(xì)閿欑殑銆傞偅涔堟庝箞鎵嶈兘杈懼埌榪欎釜璐ㄩ噺鏍囧噯娑咃紵淇烘槸鍋氳蔣浠剁殑錛岃川閲忕鐞嗚繕鏄湅鐪婦eming鍚屽鎬庝箞璇村惂錛屼笉榪囦粬鑰佷漢瀹剁殑14鐐規(guī)繪槸鍙戠敓鍙樺寲銆傛垜涔熷彧濂芥柇绔犲彇涔夛紝璇磋涓涓晱鎹峰紑鍙戜漢鍛樼溂涓殑14鍘熷垯錛?br />
1. 鎸佷箣浠ユ亽鍦版敼榪涗駭鍝佸拰鏈嶅姟 Create constancy of purpose for improvement of product and service

榪欎釜寰堟槑鏄懼槢錛宻mall release錛屽揩閫熷彂甯冿紝姣忔鍙戝竷閮芥槸瀵逛駭鍝佺殑鎸佺畫鏀硅繘銆?br />
2.閲囩敤鏂扮殑瑙傚康 Adopt the new philosophy

鏁忔嵎鍟?..

3.鍋滄渚濋潬澶ц妯℃鏌ュ幓鑾峰緱璐ㄩ噺 Cease dependence on mass inspection

榪欎釜榪樻湁鍙︿竴涓娉曪紝build quality in銆俆DD錛孮A/BA鍏ㄧ▼鍙備笌錛岄兘鏄痓uild quality in鐨勫ソ鏂規(guī)硶銆?br />
4.緇撴潫鍙互浠鋒牸涓哄熀紜鐨勯噰璐範(fàn)鎯?End the practice of awarding business on the basis of price tag alone

榪欎釜...璨屼技鏄璇峰挩璇㈠惂...

5.鎸佷箣浠ユ亽鍦版敼榪涚敓浜у拰鏈嶅姟緋葷粺 Improve constantly and forever the system of production and service

榪欎釜鏄晱鎹瘋繃紼嬬殑鎸佺畫鏀硅繘錛屽搴旂殑瀹炶返澶у鍙兘姣旇緝闄岀敓鈥斺擱estrospective!!!

6.瀹炶宀椾綅鑱岃兘鍩硅 Institute training on the job

Pair Programming錛孡earning Lunch鏁忔嵎浠庢潵閮戒笉緙轟箯瀛︿範(fàn)鐨勬満浼?xì)锛尀q湅浣犳湁娌℃湁瀛︿範(fàn)鐨勫姩鍔涗簡(jiǎn)銆?br />
7. 寤虹珛棰嗗鍔涗紒涓氱鐞?Institute leadership

鏁忔嵎鍥㈤槦鐨勭粓鏋佺洰鏍囷紝鑷粍緇囧洟闃燂紝鐨勭鐞嗘槸涔熴?br />
8. 鎺掗櫎鎭愭儳 Drive out fear

XP絎竴鍘熷垯錛屽媷姘旓紝涓嶈鎭愭儳銆?br />
9. 鎵撶牬閮ㄩ棬涔嬮棿鐨勯殰紕?Break down barriers between staff areas

鍙湁寮鍙戝洟闃熺殑鏁忔嵎涓嶆槸鐪熸鐨勬晱鎹鳳紝鏁忔嵎璇村埌搴曪紝鏄皢杞歡鐨勪緵姹傚叧緋諱粠鍚堢害鍨嬭漿涓哄悎浣滃瀷錛屾湰鏉ュ氨瑕佹槸澶х牬闅滅銆傝屼笖闅滅涓嶆墦鐮達(dá)紝灝卞緢闅懼皢鏁忔嵎瀹炴柦鍒板簳銆傝繖涔熸槸寰堝鍚屽灝濊瘯鏁忔嵎澶辮觸鐨勫師鍥狅紝浠呬粎浠ヤ負(fù)鏁忔嵎鏄妧鏈眰闈笂鐨勪簨鎯咃紝鍏跺疄涓嶆槸銆備粠榪欎釜瑙掑害鏉ユ墍錛屾晱鎹鋒柟娉曠殑紜槸娣卞埢鑰岄渿鎾煎績(jī)鐏電殑鍙橀潻錛屾湁浜涗漢...鍛?..鏁忔嵎鍦ㄥ崄鏈?..

10. 鍙栨秷瀵瑰憳宸ョ殑鏍囪璁瘝鍜屽憡璇?Eliminate slogans, exhortations, and targets for the work force

鎭╋紝浠涔堟縺鎯?00澶?..灝侀棴寮鍙?..瑙侀鍘誨惂...涓嶈繃restrospective鐨勭粨鏋滄槸瑕佸啓鍦ㄧ櫧鏉夸笂鐨勶紝鍑嗗鏃跺埢鏀硅繘銆傝嚜鎴戣〃鎵拰鑷垜鎵硅瘎錛岀畻涓嶄笂璁瘝鍚с?br />
11.鍙栨秷瀹氶綆$悊鍜岀洰鏍囩鐞?Eliminate numerical quotas for the work force. Eliminate management by objectives

寰堝浜洪兘闂繃鎴戯紝pair programming浜?jiǎn)涔嬪悗锛屾妧鏍℃庝箞鍔烇紵鍢垮樋錛孌eming鍚屽宸茬粡璇翠簡(jiǎn)錛岃繖鏍風(fēng)殑鑰冩牳涓嶈涔熺艦銆?br />
12 娑堥櫎鎵撳嚮鍛樺伐宸ヤ綔鎯呮劅鐨勮冭瘎 Remove barriers that rob the hourly worker of his right to pride of workmanship. Remove barriers that rod people in management and in engineering of their right to pride of workmanship

鏁忔嵎鍥㈤槦鐨勮嚜鎴戣瘎浠峰緢綆鍗曪紝360搴︼紝鐢變簬浣犲嚑涔庤窡鎵鏈変漢閮絧air榪囷紝濡傛灉鎵鏈変漢閮戒笉璇翠綘濂?..榪欏凡緇忔槸rp闂浜?jiǎn)锛尀兏嶆槸鎵撳嚮杩欎箞绠鍗曚簡(jiǎn)...

13 榧撳姳瀛︿範(fàn)鍜岃嚜鎴戞彁楂樎?Encourage education and self-improvement for everyone

鍚屽墠錛孭air Programming錛孡earning Lunch鏁忔嵎浠庢潵閮戒笉緙轟箯瀛︿範(fàn)鐨勬満浼?xì)锛尀q湅浣犳湁娌℃湁瀛︿範(fàn)鐨勫姩鍔涗簡(jiǎn)銆?br />
14 閲囧彇琛屽姩瀹炵幇杞彉 Take action to accomplish the transformation

姣忔restrospective涔嬪悗蹇呴』瀹氬嚭鏂規(guī)錛屼互瀹炶返鏀硅繘銆傝岃浣嶅鏋滄兂瀹炴柦鏁忔嵎鍙堣寰楅毦浜庤鏈嶉甯︼紝涓嶅Θ鎷緿eming鍚屽璇磋浜嬶紝榪欎綅澶ц佺殑鏉浼ゅ姏榪樻槸鏇煎ぇ鐨勶紝灝ゅ叾浣犺佸ぇ鏄疢BA鐨勮瘽

Raimundox 2007-03-26 20:08 鍙戣〃璇勮
]]>
Why Rails so effective? Delphi Insidehttp://www.tkk7.com/raimundox/archive/2007/03/23/105794.htmlRaimundoxRaimundoxFri, 23 Mar 2007 04:10:00 GMThttp://www.tkk7.com/raimundox/archive/2007/03/23/105794.htmlhttp://www.tkk7.com/raimundox/comments/105794.htmlhttp://www.tkk7.com/raimundox/archive/2007/03/23/105794.html#Feedback1http://www.tkk7.com/raimundox/comments/commentRss/105794.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/105794.html
1.聽 data centric object model Active Record
delphi涔嬫墍浠ユ垚鍔燂紝鍦ㄤ簬瀹冪湅鍑嗕簡(jiǎn)澶ч儴鍒嗗晢鐢ㄨ蔣浠墮兘鏄暟鎹簱鏍稿績(jī)鐨勶紝騫朵負(fù)涔嬭璁′竴濂楃浉搴旂殑妗嗘灦, delphi鐨勬牳蹇?jī)灏辨槸鍥淳l曟暟鎹簱榪涜寮鍙?鏉庣淮鍚屽鐨刡orland浼犲閲屽啓閬擄紝褰撴椂涔嬫墍浠ヨ搗鍚嶅瓧鍙獶elphi錛屽氨鏄洜涓鴻taking to Oracle)銆傝宺ails涔熷緢濂界殑鍦ㄦ柊鏃朵唬(Web鏃朵唬)鎶婃彙浜?jiǎn)鐩镐技鐨勬牳蹇?jī)鐐光斺攃ontent鏄痺eb鐨勬牳蹇?jī)锛屼互鍙?qiáng)鏁版嵁搴撴暟鎹埌content鐨勬槧灝勬槸鍔ㄦ亀eb鐨勬牳蹇?jī)銆傚洜姝ゅ畠娌℃湁閲囩敤鎵璋撶殑鏇村姞涓ヨ們鐨凮RM鎶鏈傝屾槸渚濈劧浣跨敤浜?jiǎn)delphi鏃朵唬鐨刟ctive record錛堜絾鏄繘琛屼簡(jiǎn)object灝佽錛夈傚涓嬩唬鐮佺ず鑼冧簡(jiǎn)ruby鍜宒elphi鍦╝ctive record瀹炵幇涓婄殑鐩鎬技

Ruby
class聽Person聽<聽ActiveRecord::Base
end

x8x聽
=聽Person.new聽:name聽=>'x8x'
x8x.age聽
=15

Delphi

people聽:聽TADOTable;

begin聽聽聽
聽聽聽people.Table聽
='people';
聽聽聽people.InsertRecord(
'x8x');

聽聽聽people.First;
聽聽聽people.FieldByName(
'age')聽:=15;
end


鍙互鐪嬪嚭錛孌elphi鐨勬暟鎹簱鍛抽亾鏇存祿涓浜涳紝鑰宺uby鍒欐洿澶氫嬌鐢ㄤ簡(jiǎn)瀵硅薄鐨勮瑙掞紙鎴戣寰楀湪98騫村墠鍚庯紙鎴戝彉鎴恛o鐙傜儹鍒嗗瓙涔嬪悗錛夛紝鍦ㄥ啓delphi鐨勬椂鍊欐垜鍩烘湰涓婁笉浼?xì)鐩存帴鋴社敤Table瀵硅薄浜?jiǎn)锛岃屾槸鍋氫竴浜涚畝鍗曠殑灝佽錛岀敤business object浠f浛鐩存帴鐨勬暟鎹簱瀵硅薄銆備絾鏄渶鍚庣敱浜庡拰delphi鐨剈i緇勪歡緇撳悎鐨勪笉濂借屾斁寮冿級(jí)銆備絾鏄痑ctive record鐨刾attern鏄竴鑷寸殑銆?br />
2. DB(resource)-aware UI component 鈥斺?Action View

Delphi鍙︿竴涓負(fù)浜虹О閬撶殑鍦版柟鏄疍B錛岮ware鐨刄I緇勪歡錛屽儚TDBLabel, TDBMemo榪樻湁鑷充粖浠嶄綅浜虹О閬撶殑TDBGrid錛屾瀬澶х殑綆鍖栦簡(jiǎn)UI鐨勫紑鍙戙備笉榪囪鍒板簳錛屼粛鐒舵槸Delphi鏁版嵁搴撴牳蹇?jī)绛栫暐鐨勫欢绠嬨傚悓鏍鳳紝rails鐨剉iew helper涔熸槸db鏍稿績(jī)鐨勩倀ext_field涔嬬被鐨勫彲浠ヨ嚜鍔ㄦ劅鐭ctive record鐨勫唴瀹瑰拰閿欒銆?br />
<label>Name:</label><%=聽text_field聽'person',聽'name'%>

鍜?br />
nameLabel聽:聽TDBLabel;

nameLabel.DataSource聽
=聽peopleTable;
nameLabel.Field聽
='name';
nameLabel.Label聽
='Name';

鎶涘紑Desktop鍜寃eb鐨勫樊寮傦紝涔熷彲浠ョ畻鏄ぇ鑷寸浉褰撳惂銆?br />
3. Simple Component Model 鈥斺?Plan Object as Component

Delphi鏄熀浜庣粍浠跺紑鍙戯紝騫朵笖鏄潪甯告垚鍔熺殑涓涓粍浠舵ā鍨嬨傚熀鏈笂鏈夌粡楠岀殑delphi紼嬪簭鍛橈紝閮戒細(xì)鍦ㄥ紑鍙戣繃紼嬩腑鎶借薄鍑犱釜VCL component鍑烘潵綆鍖栬嚜宸辯殑寮鍙戙備竴鏂歸潰鏄疍RY綺劇錛屽彟涓鏂歸潰Delphi綆鍗曠殑緇勪歡妯″瀷浣垮緱榪欐牱鍋氱殑浠d環(huán)闈炲父鐨勫皬銆侱elphi鐨勭粍浠跺熀鏈笂灝辨槸涓涓璞★紝閲嶆瀯鐨勮繃紼嬩腑淇慨鏀規(guī)敼灝辨垚緇勪歡浜?jiǎn)銆俽ails鍏跺疄鏈夌被浼肩殑鏈哄埗錛岃屼笖鏇寸畝鍗曠洿鎺ワ紝鏇寸鍚坵eb鏃朵唬鐨勮儍鍙o紝涓涓璞″鍔犱竴涓猦elper灝卞彲浠ユ垚涓轟竴涓猆I緇勪歡銆備笌姝ゅ悓鏃秗ails榪樻湁鍙﹀涓涓ぉ鐒剁殑鍚岀洘鈥斺擱uby DSL銆傛妸浠ュ墠Delphi闇瑕佺敤UI璁捐鍣ㄧ殑鍦版柟閮界敤Ruby DSL浠f浛浜?jiǎn)銆傝繖涓鐐規(guī)槸鎴戞渶榪戝湪鐢╮ails鍋氭浌鑰佸笀鍗庝附鐨凴edSaga鐨勬椂鍊欐帹琛孌SL geek涓諱箟鏃跺彂鐜扮殑銆傛瘮濡傜幇鍦ㄦ垜鏈夎繖鏍蜂竴涓猼iny DSL鐢ㄤ互瀹氫箟portlet錛?br />
in controller

@portlet聽=聽Portlet.newdo
聽聽聽聽聽聽聽聽聽聽聽聽name聽
'administration'
聽聽聽聽聽聽聽聽聽聽聽聽title聽
'Administration'
聽聽聽聽聽聽聽聽聽聽聽聽tabs聽
do
聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽Projects聽:controller聽
=>'projects',聽:action聽=>'list'
聽聽聽聽聽聽聽聽聽聽聽聽end
聽聽聽聽聽聽聽聽end

in view
<%=聽render_portlet聽@portlet聽%>

榪欑鎻忚堪/configuration block椋庢牸鐨刣sl涓巇elphi緇勪歡鐨勫垵濮嬪寲闈炲父鐩鎬技錛屾垨鑰呭彲浠ヨ錛屽彧鏈夎娉曚笂鐨勫樊寮傝屾棤鎬濊礬涓婄殑宸紓錛堝綋鐒禿elphi鍙互鍊熷姪IDE鑰屼笉鏄璦鏉ユ寚瀹氳繖浜涳紝浣嗘槸榪欎釜鍋氭硶鏄病鏈夌敓浜у姏鐨勶級(jí)銆?br />
with聽Portlet聽do
聽聽聽Label聽
=
聽聽聽Name聽
=.
聽聽聽Tabs[
0].Controller聽=
聽聽聽Tabs[
1].Action聽=
end

rails鍜宒elphi榪欑杞婚噺鐨勭粍浠舵ā鍨嬶紝浣垮緱鏋勫緩緇勪歡錛忓鐢ㄧ粍浠剁駭鐨勪唬浠鋒瀬灝忋傚洜姝ゅ彲浠ユ瀬澶х殑鎻愰珮寮鍙戞晥鐜?鎴戣嚦浠婁粛璁板緱錛?1騫村墠鍚庢帴浜?jiǎn)涓涓狣elphi縐佹椿錛屽鎴瘋姹侽ffice XP鑿滃崟椋庢牸錛屾垜鎵句簡(jiǎn)涓涓猉PMenu鐨勬帶浠訛紝鐩存帴浠嶄笂鍘伙紝鑷繁鐨勪唬鐮佷竴琛屾病鏀癸紝鑿滃崟灝監(jiān)ffice XP浜?..)銆?br />
鎬諱箣錛孌elphi鐨勬晥鐜囪绱燫ails澶ч儴鍒嗛兘瀛﹁蛋浜?jiǎn)锛屾渶鍚庣畝鍗曟葷粨涓涓媟ails鍦╠elphi鍩虹涓婄殑鍙戞壃錛?br />
1. 鐢╮uby鑰屼笉鏄痮bject pascal銆傝娉曚笂鏇寸伒媧葷畝鍗?br />2. Object Model on top of ActiveRecord錛屾瘮璧稤elphi鍙互璺熷ソ鐨勪嬌鐢∣O寮鍙戙?br />3. 緇勪歡妯″瀷鏇寸畝鍗?br />4. CoC錛岃繖涓氨涓嶈浜?br />5. expressive Ruby DSL

鏈鍚庢渶鍚庯紝璇翠竴涓婦elphi for PHP錛屽仛寰楀緢鍗庝附銆備絾鏄疷I閮ㄥ垎鎴戜笉鏄緢鍠滄銆?br />





Raimundox 2007-03-23 12:10 鍙戣〃璇勮
]]>
The Starting Line of Enter...tainment Rubyhttp://www.tkk7.com/raimundox/archive/2007/01/25/96051.htmlRaimundoxRaimundoxThu, 25 Jan 2007 14:08:00 GMThttp://www.tkk7.com/raimundox/archive/2007/01/25/96051.htmlhttp://www.tkk7.com/raimundox/comments/96051.htmlhttp://www.tkk7.com/raimundox/archive/2007/01/25/96051.html#Feedback3http://www.tkk7.com/raimundox/comments/commentRss/96051.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/96051.html
Cross compiling, reading psp documents, reading ruby source code, hacking ruby source code, cross compiling... after 3 days hard working, finally, I managed to make the following ruby script(which is listed in the book <Programming Ruby>) running on my PSP:

def say_goodnight(name)
    "Good night, #{name}"
end

puts say_goodnight("PSP")

Bingo~~~! Ruby goes entertainment!!!!

btw : my ruby-psp patch could be found here:
https://rubyforge.org/tracker/index.php?func=detail&aid=8134&group_id=426&atid=1700

make sure you have psp-gcc and toolchain installed on you PC, and 3.03-OE/1.5 fireware on your PSP.

Raimundox 2007-01-25 22:08 鍙戣〃璇勮
]]>
An Issue of Chinese Characters Support in Ruby Watirhttp://www.tkk7.com/raimundox/archive/2006/01/12/27676.htmlRaimundoxRaimundoxThu, 12 Jan 2006 02:26:00 GMThttp://www.tkk7.com/raimundox/archive/2006/01/12/27676.htmlhttp://www.tkk7.com/raimundox/comments/27676.htmlhttp://www.tkk7.com/raimundox/archive/2006/01/12/27676.html#Feedback2http://www.tkk7.com/raimundox/comments/commentRss/27676.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/27676.html
ie.text_field(:name, 'some text field).set('鏌愭煇')

It will highlight the text field but put nothing in it. I read the Watir source codes, and found an interesting code segment:

1 for i in 0 .. value.length-1   
2    sleep @ieController.typingspeed   # typing speed
3    c = value[i,1]
4    #@ieController.log  " adding c.chr " + c  #.chr.to_s
5    @o.value = @o.value.to_s + c   #c.chr
6    fire_key_events
7 end

The above codes show how Watir simulates typing.If it doesn't work well with chinese characters, There must be something wrong with Ruby string. The first order of business is to figure out how Ruby string works for Chinese string.

1 chineseString = '鏌愭煇'
2 puts chineseString.length
3 for i in 0..chineseString.length-1
4  puts chineseString[i, 1]
5 end

result will be:

4





Does Ruby, which is now capturing all java programmers' love, use 8bit char instead of unicode? Holy fuck!

I made a simple patch for the issue after I woke up from a short coma.

 1 require 'Watir'
 2 
 3 module Watir
 4   module Cn
 5     class IE <Watir::IE
 6       def text_field(how , what=nil)
 7         return TextField.new(self, how, what)
 8       end
 9     end
10 
11     class TextField < Watir::TextField
12       def doKeyPress( value )
13         begin
14           maxLength = @o.maxLength
15           if value.length > maxLength
16              value = suppliedValue[0 .. maxLength ]
17              @ieController.log " Supplied string is #{suppliedValue.length} chars, which exceeds the max length (#{maxLength}) of the field. Using value: #{value}"
18           end
19         rescue
20           # probably a text area - so it doesnt have a max Length
21           maxLength = -1
22         end
23                         
24         Cn.characters_in(value) {|c| 
25            sleep @ieController.typingspeed
26            @o.value = @o.value.to_s + c
27            fire_key_events}
28        end
29      end
30  
31      def Cn.characters_in(value) 
32        index = 0
33        while index < value.length 
34          len = value[index] > 128 ? 2 : 1
35          yield value[index, len]
36          index += len
37        end 
38      end
39    end
40 end

I submitted this patch to Watir tracing systsem,and zipped codes could be found here:
http://rubyforge.org/tracker/index.php?func=detail&aid=3232&group_id=104&atid=489


Raimundox 2006-01-12 10:26 鍙戣〃璇勮
]]>
A Pragmatic Way to Make "Squeak 3D Browser"http://www.tkk7.com/raimundox/archive/2005/12/27/25601.htmlRaimundoxRaimundoxTue, 27 Dec 2005 08:54:00 GMThttp://www.tkk7.com/raimundox/archive/2005/12/27/25601.htmlhttp://www.tkk7.com/raimundox/comments/25601.htmlhttp://www.tkk7.com/raimundox/archive/2005/12/27/25601.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/25601.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/25601.htmlhow to make a "Squeak 3D Browser".And the nice guy who wrote the article also put a flash demo.It's an amazing demo to show how interesting programming in Squeak could be.But I don't like the too-many-GUI-way which the guy used. I thought there might be a more pragmatic way to do the same thing so I spent an hour on making a script, and finally I got it ;-)

Preferences enable: #systemWindowEmbedOK.

myBrowserWindow :
= Browser new openEditString:#Hello. 
myBrowserWindow setLabel:
'System Browser'; bounds: (Rectangle left:20 right:600 top:20 bottom:400).

my3DIDE :
= Wonderland new.
my3DIDE getDefaultCamera getMorph bounds: (Rectangle left:
20 right:800 top: 20 bottom: 600).

my3DBrowser :
= my3DIDE makePlaneNamed: 'System Browser'.
my3DBrowser setY:
50; turn:#right turns:0.38;
                setProperty: #adjustToTexture toValue: 
true;
                setTexturePointer: myBrowserWindow;
                setProperty: #activeTexture toValue: 
true.

Try it and have fun!

Raimundox 2005-12-27 16:54 鍙戣〃璇勮
]]>
I'm a RSSerhttp://www.tkk7.com/raimundox/archive/2005/12/20/24873.htmlRaimundoxRaimundoxTue, 20 Dec 2005 13:48:00 GMThttp://www.tkk7.com/raimundox/archive/2005/12/20/24873.htmlhttp://www.tkk7.com/raimundox/comments/24873.htmlhttp://www.tkk7.com/raimundox/archive/2005/12/20/24873.html#Feedback0http://www.tkk7.com/raimundox/comments/commentRss/24873.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/24873.html

Raimundox 2005-12-20 21:48 鍙戣〃璇勮
]]>
A Walk On JSR220 Persistent API...More Ugly More Coolhttp://www.tkk7.com/raimundox/archive/2005/12/13/23721.htmlRaimundoxRaimundoxTue, 13 Dec 2005 11:25:00 GMThttp://www.tkk7.com/raimundox/archive/2005/12/13/23721.htmlhttp://www.tkk7.com/raimundox/comments/23721.htmlhttp://www.tkk7.com/raimundox/archive/2005/12/13/23721.html#Feedback1http://www.tkk7.com/raimundox/comments/commentRss/23721.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/23721.htmlFrank and I collected some Hibernate tips, and we named them with some sexy names ;-) This afternoon I tried to replace hibernate by JSR220 persistent API in a typical web application, and I found some new tips in JSR220 Persisntent API (Frank, I'm here waiting your names).

btw: I'm a believer in Peter Coad's Color Modeling approach, all the following tips are modeled in the approach. I recommend you the greate book 'Java Modeling in Color with UML' if you'd no idea about the Color UML.

1. Annotating Description with @Embeddable, and the Thing it describe with @Entity

Take Product and ProductDescription for example.

 1@Embeddable
 2class ProductDescription {
 3 private String name;
 4 private String description;
 5  . and getters and setters
 6}

 7
 8@Entity(access = AccessType.FIELD)
 9class Product {
10
11 private ProdcutDescription description;
12
13}

14

In hiberante, we could make the ProductDescription as an embedded persistent object of Product via the component tag.If the ProductDescription should be embedded in another object, we've to declare it once more.
Things become more convenient in JSR 220, because non-transite fields, whose class is annoated with @Embeddable, are treated as embedded persistent objects automatically, we'd have fine-grained persistent objects without long-winded config file.

2.Avoiding Database Field in Domain Model Using @AttributeOverride

It's claimed that Annotaton could simplify development, but considering the cost of hard-coding mapping information in source codes I prefer some other complicated ways.It's too ugly to write code like following.

1@Entity(access = AccessType.FIELD)
2@Table(name="TAB_PRODUCT")
3class Product {
4
5   @Basic
6   @Column(name="NAME", nullable=false, length=512)
7   private String name;
8}

It's sucks but could be avoided.

 1@EmbeddableSuperclass
 2class Product {
 3
 4  @Basic
 5  private String name;
 6}

 7
 8@Entity
 9@AttributeOverride(name="name", column=@Column(name="Name"))
10@Table(name="TAB_PRODUCT")
11class PersistentProduct extends Product {
12}

We could separate the domain model and the persistent model by inheritance.Although we could do the same thing in hiberante too, we have to provide lots of configuration files.Once more we'd have hierachical persistent objects without long-winded config file.

3.Avoiding Database Primary Key in Domain Model

In most O/R mapping framework, we are always asked to give a primary key or identifier to our domain model, and we are suggested using meanless identifier instead of domain-specified identifer.It's kinda of Domain Pollution.Although we couldmake the domain model more clearer via inheritance, it's pointless for common usages.
Fortunately, we HAVE TO separate domain model and persistent model(as above mentioned), so that we can throw this bad habit away conviniently :D

1@EmbeddableSuperclass
2class Product {
3}

4
5@Entity
6class PersistentProduct extends Product{
7
8   @Id private long primaryKey;
9}

Conclusion

After two hours walking around JSR220 persistent API, I figured out that JSR220 mixed ugly into convenience... and it's quite easy to write ugly codes in jsr220...so that we've to insist on using OO and the convenience jsr220 provided to make our domain model as clear as possible.
Although JSR220 is more ugly than hibernate, we could get clearer domain model in jsr220 rather than hibernate, because we could not stand the unly in jsr220...weird way to make us keeping more OO...cool isn't it...



Raimundox 2005-12-13 19:25 鍙戣〃璇勮
]]>
Why Inconsistent Concepts Considered Harmfulhttp://www.tkk7.com/raimundox/archive/2005/12/11/23298.htmlRaimundoxRaimundoxSat, 10 Dec 2005 17:59:00 GMThttp://www.tkk7.com/raimundox/archive/2005/12/11/23298.htmlhttp://www.tkk7.com/raimundox/comments/23298.htmlhttp://www.tkk7.com/raimundox/archive/2005/12/11/23298.html#Feedback1http://www.tkk7.com/raimundox/comments/commentRss/23298.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/23298.htmlTao Wen , a friend of mine and a new ThoughtWorker, put a comment on my last article.

so, you think the consistent thing means a lot? But how do you think the gracious or elegant feeling mean to the real expressiveness of business requirements? We can see lisp is very successful in researching area because of the simplicity nature inside which is also true to Smalltalk. But why they aren't successful in biz world? I think that is the problem you should further study, "how can the consistent feeling mean something to our everyday programming life?".

First of all, I should admit that I'd never thought about this question before, becasuse I think hankering after consistent concepts is some nature of us. The question enlightens me to thinking deep. Here are my points.

1.Complexity

Inconsistent concepts bring complexity.I'll give two examples.

First one is something in Lisp. Lisp has a very simple computing model called 位 Calculation. There are three elements in this computing model: Function, 位 Operator and 路 Operator. 位 Operator picks up free variable from the function, and 路 Operator applies the variable with a concrete value. The whole evaluation-application thing is what we called symbolic algebra in math.For example, if we've a function whose expression is x + y.

((位x (位y . x + y)路3)路4)
=((位x. x+3)路4)
=4 + 3
=7

Since Lisp is kinda implementation of 位 Calculation in computer, we could do the same thing in Lisp (and its dialects).

(define f (lambda x (lambda y (+ x y))))
(apply (apply f 
34)

or we could use some syntax sugar

(define (f x y) (+ x y))
((f 
3) 4)

Most of things in Lisp are focus on evaluation, and the evaluation should be done in a simple consistent way: evaluating, applying value and then returning the value without any change to enviroment. It is the very same way that we do something in math.
But variable assignment was introduced to Lisp, so some functions  which change enviroment instead of simple evaluating came to Lisp.For example:

(define (bad-f x y) 
  (begin 
     (set
! z 5)
     (
+ x y)))

That bad function changes value of symbol 'z' while evaluating x + y. It is the variable assignment which breaks the consistent concepts. The consistent concepts suggests that function should do and only do evaluation. We must find a more complicated computing model to replace the simple elegant mathematical one.Here inconsistent brings complexities in computing model.

The other example comes from Java. Java is considered to be an object-oriented programming language with single root type system. Conceptually speaking, everything should be an object.But for some perfermance reason, Java has some primitive types (such as int, double, float etc.) too.Those primitive types introduced a algebraic world which paralleled to the object world, and broke the consistent concepts.Althought Java has some wrapper classes for those primtive types, they are not enough for filling the gulf between object and algebra.
We could use new Integer(3) to represent 3 in object world, but we could not simply translate

3 + 4 * 5

to

new Integer(3+ new Integer(4* new Integer(5)

Algebraic calculation and  object message sending are totally different. Although we could do that in Java 5, it also has lots of differences.Auto-boxing treats object as primitive instead of operator overloading in C++ which treats operator as object message sending.So in my opinion, auto-boxing in java5 is awful. Assginments and storage of primitive type and object have lots inconsistent semantics too. This inconsistent would bring complexity when we use Collection API(Remember Primitive Collection in Commons Collection Project? )

2. Side-Effect

The mainly cause of side-effect is  putting some inconsistent concepts together. I'll also give two examples.

First example is the well-known side-effect in functional programming, which is caused by mixing Von-Nouma-style-things into 位 Calculation. There are lots of discussion about this topic in functional programming community.It's meanless to repeat that again.

Second example comes from half-blooded object-oriented languages, for we'll find both object-oriented things and procedure-oriented things in these languages, and it'll be much more easier to write code in procedural way instead of object-oriented way.For example, we'd write code like this:

1if (order.getState() == Order.CANCEL)
2   do something for cancel;
3else if(order.getState() == Order.PAID)
4   do something for paid;
5else if(order.getState() == Order.DELIVERY)
6   do something for delivery

instead of :

 1public abstract OrderState {
 2
 3   protected Order _order;
 4   
 5   protected OrderState(Order order){
 6      _order = order;
 7   }

 8    
 9   public abstract void handler();
10}

11
12class CancelState extends OrderState {
13
14   public void handler() {
15      do something for cancel;
16   }

17}

18
19order.getState().handle();

For the keywords, it's convenient to write procedural codes as first segment, but for easy maintenance, it's better to write object-oriented codes as the second one.There are two inconsistent way to write code, and the side-effect is depend on how object-oriented the language is. It's more easy to write code like first one in C++ , and more easy to write code like second one in Ruby and Smalltalk. Actually, it's very hard for me to write code like first one in Smalltalk.

3. Constructing Software in a Recursive Way

There is a more large topic, maybe I'd better talk about this latter.

4. Elegance

Some aesthetic feelings comes from consistent concepts.I'll have the feeling of elegance if I could understand some complicated things via some consistent concepts.Take Newtonian System and Maxwell formula for example, they both are the elegant way to resolve problem via few consistent concepts.

Raimundox 2005-12-11 01:59 鍙戣〃璇勮
]]>
Say sorry to Object-Oriented Methodologyhttp://www.tkk7.com/raimundox/archive/2005/12/08/23028.htmlRaimundoxRaimundoxThu, 08 Dec 2005 12:39:00 GMThttp://www.tkk7.com/raimundox/archive/2005/12/08/23028.htmlhttp://www.tkk7.com/raimundox/comments/23028.htmlhttp://www.tkk7.com/raimundox/archive/2005/12/08/23028.html#Feedback4http://www.tkk7.com/raimundox/comments/commentRss/23028.htmlhttp://www.tkk7.com/raimundox/services/trackbacks/23028.htmlRecently I came to know and started to learn Smalltalk, an age-old pure Object-Oriented programming language. I fell in love with it quickly. Smalltalk is a very small language with some consistent concepts and abundant class libraries. I was puzzled at the very begining,  as Smalltalk has very few keywords(maybe 5 I think), and those keywords don't include any control structure(a.k.a if, while, for), how could we write programs? Althougth I know we could implement iterative sturucture via recursion, how about conditional execution? Finally I figured out that Smalltalk provides control strucutre in its class library only using some basic OO concepts. Followings are the codes from Smalltalk class library.


 1Boolean>>ifTrue: alternativeBlock 
 2  self subclassResponsibility
 3
 4Boolean>>ifFalse: alternativeBlock
 5  self subclassResponsibility
 6
 7"and True and False are subclasses of Boolean."
 8
 9True>>ifTrue: alternativeBlock 
10  ^alternativeBlock value
11
12True>>ifFalse: alternativeBlock
13  ^nil
14
15False>>ifTrue: alternativeBlock 
16  ^nil
17
18False>>ifFalse: alternativeBlock
19  ^alternativeBlock value

and then in some codes, we could do the conditional execution as follows

14 > 3 ifTrue: [Transcript show: 'Hello']


In Smalltalk, everything is Object, so that the code above means sending a message named '>' to an Integer object, whose value is 4, with an Integer object parameter. And '>' would return a Boolean object, and then we sent a message  named 'ifTrue' to it. This is a typical usage of State Pattern. Here are the equivalent Java codes.


 1public class abstract Boolean {
 2   public static final TRUE = new True();
 3   public static final FALSE = new False();
 4
 5   public abstract Object ifTrue(Block aBlock);
 6   public abstract Object ifFalse(Block aBlock);
 7}

 8
 9class True extends Boolean {
10
11   public Object ifTrue(Block aBlock) {
12       return aBlock.execute();
13   }

14
15   public Object ifFalse(Block aBlock) {
16       return null;
17   }

18}

19
20class False extends Boolean {
21
22   public Object ifTrue(Block aBlock) {
23       return null;
24   }

25
26   public Object ifFalse(Block aBlock) {
27       return aBlock.execute();       
28   }

29}

30
31public class Integer{
32  
33   public Boolean greaterThan(Integer anInteger) {
34      
35   }

36}

37

So that we could get the following code

 

14 銆?/SPAN>3 ifTrue: [Transcript show: 'Hello']

 

which could be translated in Java like this:

  

new Integer(4).isGreaterThan(new Integer(3)).ifTrue(new BlockClosure() {

   
public Object value() {
      System.out.println(
"Hello");
      
return null;
   }


}
);

 

That's quite simple(some dynamic languages on JVM ,e.g. Groovy, do the same thing), but it indeed brings some profound changes to my thought.


First, considering that 'if'錛?/SPAN>'for' and 'while' are no longer pre-defined keywords, we could define our own control structures. For example, we could define Order has its own way to do something.

 

1anOrder ifExpired: [ do reactive order]
2        ifCanceled: [do something else]

 

Taking no account of performance and semantic speaking, there is no difference between the code above and undermentioned:

 

1   4 >3 ifTrue: [do something]
2        ifFalse: [do somthing]

 

More fancy, we could define a new test structure like this:

 

1anOrderTest should: [some assert] when: [do some initalize].

 

So we could have programmable control structure in Smalltalk ( something like we do in Lisp via continuation:) ), and define our own DSL easily.That's the amazing lightweight syntax feature in Smalltalk!

 

Second, we could get full capability of Von Nouma Style Programming Language via pure OO concepts.We could construct software in consistent OO concepts.

 

I began my adventure in Object technology by using C++ in 1995, and then I chose Java as my main working language. All my experiences about OO come from half-blooded OO language.So that for a long time, I thought Object-Oriented Programming is a big patch to imperative languages. The imperative languages are desgined  to record the sequence of instruments which are used to manipulate the computer, so they are lack in semantic, and poor in abstraction. Though the Object technology introduces a successful type system and provides some abstraction mechanism, I still feel sucks to program in inconsistent concepts, because I should be careful about keeping programming more in OO-style rather than in procedural-style(something like Domina Model or not, sucks!).

Once I accused Object-Oriented Methodology of all the fault, I blamed imperfection on Object-Oriented Methodology.But now, I found out it's only because that I have little talent and learning in OO, it turned out to be my fault, I should say sorry to Object-Oriented Methodology.



Raimundox 2005-12-08 20:39 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 青草草在线视频永久免费| 无套内射无矿码免费看黄| 亚洲香蕉免费有线视频| 亚洲国产精品无码中文字| 国产亚洲精品影视在线产品 | 看免费毛片天天看| 亚洲va中文字幕| 国产AV无码专区亚洲AV麻豆丫| 亚洲国产欧美日韩精品一区二区三区 | 久久99热精品免费观看牛牛| 日韩免费高清播放器| 成人免费无码H在线观看不卡| 热久久这里是精品6免费观看| 中文字幕无码日韩专区免费| 免费国产午夜高清在线视频| 少妇无码一区二区三区免费| 3344免费播放观看视频| 日本免费网站视频www区| 91成年人免费视频| 成人免费看片又大又黄| 国产精品免费综合一区视频| 亚洲Aⅴ无码一区二区二三区软件| MM131亚洲国产美女久久| 国产精品亚洲A∨天堂不卡| 亚洲精品福利视频| 亚洲人成人77777网站不卡| 亚洲欧美黑人猛交群| 黄色免费在线观看网址| 久青草视频在线观看免费| 日本视频免费高清一本18| 免费能直接在线观看黄的视频 | 国产免费牲交视频免费播放| 在线观看肉片AV网站免费| 亚洲成人免费在线观看| 永久黄网站色视频免费观看| 亚洲午夜精品一级在线播放放| 亚洲an天堂an在线观看| 亚洲久悠悠色悠在线播放| 免费的黄色的网站| 91人成网站色www免费下载| 毛片在线免费视频|