JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Software Engineering  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to topicthreaded modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 請問您認為 MDA 到底實不實際 [精華]
ymshin





發文: 277
積分: 4
於 2003-09-14 18:10 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
看到最近 Martin Fowler blog 的一篇文章, "PlatformIndependentMalapropism" 討論 MDA 裡 platform 的定義, http://martinfowler.com/bliki/PlatformIndependentMalapropism.html

突然升起的疑惑. MDA (Model Driven Architecture)是近來常見的名詞, 是一個想將 PIM 與 PSM 分開, 寫成一個 unfied model 再利用 transition 工具將 model 具體化為 java based application or .NET 等等特定環境. 可是, 每種語言 & 環境在處理同樣的問題時有不同的做法寫程式方式, pattern 適用情況有異, 怎麼可能做到同一個 model 可以 deploy 到不同環境呢? 想不透~Stupid

所以想請教諸位, 您覺得 MDA 是否只是一個空泛的概念呢? 還是有可行之處?


reply to postreply to post
作者 Re:請問您認為 MDA 到底實不實際 [Re:ymshin]
ymshin





發文: 277
積分: 4
於 2003-09-16 15:41 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
555~~~可能被嫌棄過於懶惰沒先找齊資料看, 沒人理我...Disapproved

幸好可愛的 TSS 新聞標題出現相關 threads 的討論...原來已經有現成的可以觀摩了...

http://www.theserverside.com/home/thread.jsp?thread_id=21448
http://www.theserverside.com/home/thread.jsp?thread_id=20314

看完覺得~~~如果 MDA 只 stick 在 implement 一個語言的實體化, MDA 和 CASE 是雙胞胎, 如果涉及眾家環境統合, 那是柏拉圖的理想國...


reply to postreply to post
作者 Re:請問您認為 MDA 到底實不實際 [Re:ymshin]
tempo



版主

發文: 645
積分: 7
於 2003-09-17 11:31 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
ymshin wrote:
555~~~可能被嫌棄過於懶惰沒先找齊資料看, 沒人理我...Disapproved

幸好可愛的 TSS 新聞標題出現相關 threads 的討論...原來已經有現成的可以觀摩了...

http://www.theserverside.com/home/thread.jsp?thread_id=21448
http://www.theserverside.com/home/thread.jsp?thread_id=20314

看完覺得~~~如果 MDA 只 stick 在 implement 一個語言的實體化, MDA 和 CASE 是雙胞胎, 如果涉及眾家環境統合, 那是柏拉圖的理想國...


不過, 只實作在一個程式環境上就不是 MDA 了..Smile
MDA 就是要直接從 Model 來看軟體, 有要考慮環境特性就不再是從 Model 來看了..我們停在 UML 即可..

看完 TSS 我想大家心中對 MDA 的理解可以分為兩類:

A. MDA 讓程式可以直接由 model 自動轉換成實作出來..

這個大家都不以為然吧..
Martin 的 blog 講的也沒錯, 能這樣那乾脆做個 VM 出來就好了呀..
另外還有就是 Martin 說的 Model 定義涵蓋的範圍, 如果還不完全現在討論實不實用還太早..

B. meta data -> code, 把 model 看成是 meta data 然後用 template tool 來轉換..

這個跟 A 基本精神是一樣的, 不過就是比較寬鬆一點..
model 轉換會有不對的地方, 這時候就改 template..
MDA 在這裡就比較像是輔助工具..

有一篇標題就是 "AndroMDA and XDoclet not so different"..
裡面提到 AndroMDA 有一個 GUI 方便做修改的動作..
"Not too unlike XDoclet. Some people just prefer pictures, it seems."

不過, 如果我們再進一步想, 如果 MDA 只是這樣子的輔助工具..
那跟 Java + XDoclet + 現成的函式庫的差別在哪呢?

MDA: 做好 model + 別人做好的 model -> transformation (template) -> template 調整 -> Java impl -> exec
Java: 寫 Java + XDoclet(解決瑣碎的重複性工作) + Java 函式庫 + 為銜接函式庫所需做的調整 -> exec

假設 "Java 函式庫 = 別人作好的 model", 只是語言的不同..
"Java 做的調整 = template 調整", 當然工作量會不同, 不過先不管..

那, 差別就是在圖形化的 UML 跟 Java 語言(或是其他文字型語言)的表達性哪個比較好了??


reply to postreply to post
作者 那圖形化的 UML 會比文字型的一般語言來的好嗎? [Re:ymshin]
tempo



版主

發文: 645
積分: 7
於 2003-09-17 11:55 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
這是相關的討論:

http://www.theserverside.com/home/thread.jsp?thread_id=21448#95598

I like diagrams no matter what. A picture can capture so many lines of code for me while trying to understand or communicate it. So I welcome pictures as long as they are effective and clear and also known to my piers. It is a language which many books are ready to shed light on because I am tired of explaining the same concepts to new co-workers all over again. That part of the MDA is good for me. I also appreciate writing less repetitive code. That part of programming that I've already done so many times and lost its creative nature. It's captured in many API's isn't it. So here's again another part of the MDA that I welcome. If XDoclet users reject MDA they use code generators all the time.


http://www.theserverside.com/home/thread.jsp?thread_id=21448#95651

IMHO the real flaw of MDA is not its idea. It is its language. MDA is
basically tied to UML by the OMG. Much has been set about UML of course. In my opinion, it is good at modelling static relationships to some extent. It is - like all graphic tools - a total desaster for modelling more complex (in fact quite simple) dynamic relationships.

It just is not manageable. A very nice way to check this is to dive into a couple of "EAI" projects that use graphical modelling as well. This almost always leads to hard to read systems made up of literally thousands of diagrams for even the most simple purpose (like add a and b). This blind following of graphical modelling is a problem. Even more so, because in fact these diagrams are only understandable for computer programmers - I have never seen a business person who could understand an UML diagram - albeit the most simple ones. Some tools show a better "MDA-like" way. They employ languages that are in turn transformed to the different platform dependent models (for example using velocity models). The upside of this is that actual logic can be done on this layer rather easily. Because such approaches are most of time termed "code generation" and because they do not provide "nice pictures" they are nevertheless the real core of MDA and the one most likely to have an impact on real world software development in the long run.


http://www.theserverside.com/home/thread.jsp?thread_id=21448#95593

I've always claimed that one of the reasons we in the CASE industry couldn't deliver on our promises was that our diagramatic notations lacked the necessary semantic precision to create executable models. With the exception of the StateChart component of UML I think that's still the case (no pun intended). Even if it were otherwise it's never been clear to me that creating and/or decyphering a diagram is *that* much simpler than reading well written code. Yes, there's no end of poorly written code in the world but don't think for a minute that the same won't be true of diagrams/models.


http://www.theserverside.com/home/thread.jsp?thread_id=21448#95680

\Alexander Jerusalem\
a. Are picture languages more expressive and easy to understand than textual languages?
\Alexander Jerusalem\

Ah, this is trivial to answer. The answer is: side effects.

What are the side effects of constructing a Person class?

What are the side effects of calling Person.ageOneYear()?

Visual paradigms have completely failed at capturing the side effects of operations. They can model certain static relationships, and some dynamic relationships as well. But they suck at modelling propogation of state and state changes (summed as "side effects"). Visual modelling to date captures class structures and class items such as member variables adequately. What they don't capture is code like this:

public Person ()
{
PeopleTracker tracker = (PeopleTracker)Services.retrieveService ("PeopleTracker");
tracker.trackThisGuy (this);
}

Please don't argue the specifics of the above example - the point is that alot happens in the guts of method calls that are not reflected in the class or object relationships.


reply to postreply to post
作者 Re:請問您認為 MDA 到底實不實際 [Re:ymshin]
ymshin





發文: 277
積分: 4
於 2003-09-17 13:39 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
555~~~好難過,剛剛打的一堆字消失掉...Disapproved *誰偷點我汽油?!Angry*

我要先去哭一哭哀悼一下再回來請益~~~Cry


reply to postreply to post
作者 Re:請問您認為 MDA 到底實不實際 [Re:ymshin]
ymshin





發文: 277
積分: 4
於 2003-09-17 16:58 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
*哭完繼續; 這次先 ctrl+c, 就不相信 submit 之後 po 消失還會沒得救*

謝謝 tempo 的解釋.

可能我過於侷限在 coding 部分. 舉例來說, C++ 和 Java 的 concept 有些差異, pattern 的應用也略有不同, 適合 C++ 的 pattern 並不一定適合 Java 環境運用, 不論 model 的 scope 定義最後是落在哪, 光是畫著一個 unified model deploy 在不同 tech 上就很難, 而且得先精通各種語言才行; 利用輔助工具將單一 PSM 中的 model 和實體分離很容易理解, MDA 的話...嗯...

假設 MDA 只鎖定在 web service 的框框裡, 即使是當輔助工具生出一個 template 修改, 修改也得 trace source code 吧? 分散式環境本來就比較複雜, 如果依賴 MDA 的 transition tool 生 template 之後也要作適當修改, 我不確定花費的時間精力會比自己整合一個個的 component 要少, 何況還有 performance tuning 的問題...

如果想法哪裡錯了麻煩請多多指正. Shy


ymshin edited on 2003-09-17 17:01
reply to postreply to post
作者 Re:請問您認為 MDA 到底實不實際 [Re:ymshin]
ymshin





發文: 277
積分: 4
於 2003-09-17 18:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
想再追問一個問題; 有人試用過現在檯面上的 MDA tool 嗎? 既然 model 的 scope 都還沒有明確的定義, 那些 tools 到底是 CASE 還是正宗 OMG 出品的 MDA standard? Stupid

剛剛跑去找資料, 看到有人的 blog comment 有 AndroMDA tool 的 fonder 跑去參加討論(最後一個)
http://www.racchvs.com/andrej/mt/mt-comments.cgi?entry_id=45

裡頭提到 AndroMDA 中的 class 和 java 的 class 不同, 沒解釋的前提下我覺得怪怪的, java 的 class 觀念也就是 oo object 的概念不是? 提到的東西有些心動, 但總覺得他是在說 "新一代" 的 CASE tool...如果有人能分享使用經驗的話會很感激. m(_ _)m


reply to postreply to post
» JWorld@TW »  Software Engineering

reply to topicthreaded modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8