<< Lucene 基础指南 | 首页 | JAVA下的GZIP应用 >>

Brico:一个构建swing应用的框架

aalmiray 发布了一篇Blog,说到了2006年Java 桌面应用出现的一些进步和新的发展,介绍了一些桌面应用框架。并自己动手开发了一个Swing应用框架Brico

下面是摘自jroller.com的aalmiray 的blog内容:

Ever since I got back to developing desktop applications I wished there was a framework for swing apps that offered a quick learning curve but also had a rich set of features where a seasoned desktop developer would feel "at home", like Struts did to web applications, that was almost 2 years ago. With the ever present pressure of meeting project deadlines I forgot about it for a while. Then came 2006, which was an incredible year for desktop applications because:

  • Aerith made everyone at JavaOne drop their jaw.
  • Eitan Suez opened jMatter.
  • The Spring Rich Client Project made it into its second release (0.2.0).
  • The team at Swinglabs made interesting advancements with components and painters.
  • Scott Violet submitted JSR 295 a.k.a. BeansBinding as promised at JavaOne.
  • Chet Hasse released an improved version of the Timing Framework.
  • The debate between RIA and "fat clients" raged on, Chet was even "dragged" to an Ajax talk at JavaOne :-)
  • Richard Bair announced a "swingified" version of the XHR.
  • The Eclipse RCP platform gained terrain and rcp-enabled apps started to flourish like mushrooms.
  • Lastly, JDK6 included many improvements targeted at Swing development.
But the framework I was looking for had not surfaced yet so I decided to start one of my own.

With the Struts-like approach in mind I started the first phase and ended with Construct, a command processing framework that may work in any environment (web, desktop & server), but it had one "flaw", it was strongly tied to Spring (for some this is a great inconvenient ??). So it was back to the drawing board, with a couple of new ideas like Groovy support and a more modular design. After a couple days of hacking, the first module of Brico, Brico::Command, is almost ready (javadocs are missing for half of the classes). The new design allows you to create a Controller and Commands without the need of Spring (but there is also a Spring version of those), in that regards I think that it is strongly influenced by Spring's own design, in terms that it is open to choices and generates synergy with other projects. The project is available at Sourceforge, the site is yet to come, with an updated tutorial from Construct. Its important to remark that the 4th version of this framework has been used in production environments since August 2005 (Brico::Command is the 6th version).

With the controller part of the MVC formula solved the second phase will focus on the Model, this is where ideas like BeansBinding will have a great influence in the design, a working solution has also been tested in production environments since May 2006, but it still has some rough edges (properties of visual components can be mapped to beans and vice versa but there is not a complete roundtrip and the wiring is not fully "automatic"). Other ideas include state change triggers and easy component lookup, which will help testing (with a DSL perhaps?).

Finally the third phase will focus on the View, where custom components may or may not appear (Swinglabs is huge, go check it out), support for custom layouts (like JGoodies Forms, thanks Karsten for such a great library), the NakedObjects approach will also be taken into consideration and some other web-related approaches on styling and rendering.
标签 :



发表评论 发送引用通报