模式和更多干凈簡單的gui代碼 - Patterns and more for clean and easy gui code -开发者知识库

模式和更多干凈簡單的gui代碼 - Patterns and more for clean and easy gui code -开发者知识库,第1张

every time i code a gui (in my case with GWT, never touched gui programming before), i notice that my code becomes a big mess, when the applications becomes more complex.

每次我編寫一個gui(在我的情況下使用GWT,之前從未接觸過gui編程),我注意到當應用程序變得更復雜時,我的代碼變得很亂。

It's really frustrating to look over my code and get a headache of all these setters in object constructors and this messy throwing together of these.

查看我的代碼並讓對象構造函數中的所有這些setter頭疼,並將這些混亂拋在一起,這真是令人沮喪。

I am using the MVC Pattern and it really helps to get a lot clearer. Unfortunately my whole view component isn't clear at any point. ;-) I tried to use a lot of interfaces to abstract from the building process and to have just a few implemented interfaces which will be added together, (I thought i could switch between different libraries, like Gwt-Ext and Gxt, easily) but still i am not really happy.

我正在使用MVC模式,它確實有助於更清楚。不幸的是,我的整個視圖組件在任何時候都不清楚。 ;-)我試圖使用大量的接口從構建過程中抽象出來,並且只有幾個實現的接口將被添加到一起,(我想我可以輕松地在不同的庫之間切換,如Gwt-Ext和Gxt)但我仍然不是很開心。

I am sure you had this problems too, and i want to ask you what practice do you follow to get cleaner code? Are there design patterns for gui coding except MVC? What are your tricks for highly readable and beautiful user interface code?

我相信你也有這個問題,我想問你為了獲得更清晰的代碼你遵循什么樣的做法?除了MVC之外,gui編碼是否有設計模式?您的高可讀性和漂亮的用戶界面代碼的技巧是什么?

3 个解决方案

#1


Martin Fowler wrote interesting article on this topic: GUI Architectures

Martin Fowler寫了一篇關於這個主題的有趣文章:GUI架構

最佳答案:

本文经用户投稿或网站收集转载,如有侵权请联系本站。

发表评论

0条回复