0

I am wondering what design patterns people use to construct complex UI or UI like application?

Let's consider a UI made up of thousands of small widgets, once one widget changes its state, it broadcasts an event to partners(maybe one hundred) to update their state correspondingly. When widget state changing, its view changes as well. However, there must be some place putting business logic, from GoF design patterns it should be Mediator. however I have no idea how people do it in real world.

I understand GoF patterns, MVC patterns, event/message system, two way data binding. I am not writing any UI application, but the problem UI(for example, Java intellij IDE) applications solve is very interesting. It manages lots of small piece(widgets) and change its behavior in line with widgets' states change. How to code such a system in a maintainable way is what I am searching. To me imperative way in such system is not working, there must be some declarative patterns for this.

Much appreciates if some one can point out some good reads. Thanks.

zx_wing
  • 1,918
  • 3
  • 26
  • 39
  • 1
    `How to code such a system in a maintainable way` - You're basically looking for [MVVM](http://en.wikipedia.org/wiki/Model_View_ViewModel). fortunately for me, that is supported in [WPF](http://www.istartedsomething.com/20091124/razorfone-conceptual-windows7-wpf-multi-touch-retail/) (which is part of .Net). I don't know of any java stuff that will have the level of support for MVVM provided by WPF. – Federico Berasategui Sep 17 '13 at 21:41
  • Yepp MVVM makes more sense than MVC. – inf3rno Sep 17 '13 at 21:47

2 Answers2

2

I would recommend you Design Patterns: Elements of Reusable Object-Oriented Software. The different chapters tackles the Creational, Structural and Behavioral patterns. Patterns usage examples consists of an advanced Text Editor (including ui) development.

yechabbi
  • 1,881
  • 17
  • 14
  • 1
    Just wanted to recommend it by myself. All patterns there are explained on GUI app. – nikita Sep 18 '13 at 12:22
  • The OP already mentioned the GoF, and even the mediator pattern. – wildplasser Sep 18 '13 at 12:30
  • The "added" value of the reference is simply having an example of the patterns usage in the development of modular/clean/reusable/maintainable GUI project. – yechabbi Sep 18 '13 at 12:46
  • Yes. I have read GoF long time ago. It's awesome, absolutely. Now I am looking some books explaining complex system – zx_wing Sep 18 '13 at 18:38
  • You're left with another interesting solution : Read the code ! Netbeans & Eclipse are open source projects, I'm almost sure (If you read well the book) that you'll encounter many of the patterns exposed in Gof' book. (This question can be out of your need but is indeed is interesting http://stackoverflow.com/questions/1673841/examples-of-gof-design-patterns) – yechabbi Sep 18 '13 at 19:34
  • @yechabbi yes, I think the only way is looking into code though it takes a longer time to grasp the global picture. BTW, what do you mean by "The "added" value of the reference is simply having an example of the patterns usage in the development of modular/clean/reusable/maintainable GUI project" ? – zx_wing Sep 18 '13 at 21:19
  • @wildplasser commented that you already know about Gof patterns, so i answered that if i suggested the book it's because it illustrates the usage of each pattern in the same project that is a (relatively complex) GUI application. Now, a complex application is a relative concept. What you probably meant by a complex application is something equivalent to an IDE, and imho you won't find a book discussing (step by step) how to build such application. – yechabbi Sep 19 '13 at 07:10
0

For Enterprise Applications you have to check Martin Fowler. On his site you can find a lot of books, paradigmen and design patterns.

Mamuz
  • 1,730
  • 12
  • 14
  • Yes. I have read some book of Martin and practiced in my project. However, the book "patterns of Enterprise Applications" seems not as valuable as I expected, maybe lots of patterns have been introduced by many articles – zx_wing Sep 18 '13 at 18:39