Model View Presenter, Passive View & DI

Posted on November 7th, 2008 in Eclipse by Stefan

After three days of interesting conversations I’m off to my November holidays. This is a very calm and silent time which leaves a lot time for interesting thoughts.

Denmark

Denmark

I heard a talk about testing RCP Applications on Wednesday shortly before I left Munich which was pretty interesting. Ralf Ebert outlined a way of designing GUIs to ease testing by applying the Model View Presenter pattern in combination with the Passiv View pattern. Basicly it introduces a presenter which mediates between the ‘Model’ and the ‘View’. The model includes all data and logic, e.g. adding two numbers. The view simply displays everything. The presenter connects input and widgets and delegates calls from the UI to the model’s logic. This allows mocking the view’s behaviour and simply test the logic within the model.

The testing aspect sounds interesting, but something else comes a long with that design. In distributed systems, the view usually calls some logic from serverside services. That means, the view has to somehow access a service instance by using some context holding component. Now, what about making the view part of this service structure and provide the service via DI. Usually (in Spring terms ;) ) this means hooking the view into the service container, which is pretty bad (if even possible) as they are controlled by the platform. But using a so called view model (at least I tend to call it like that) solves that. The model (and even the presenter) may be hooked easily to the container, which makes interaction quite easy.

Nice idea, what do you think?

Greetings from the W-JAX

Posted on November 4th, 2008 in Eclipse by Stefan

I had my Eclipse RCP Workshop here in Munich yesterday together with Benjamin and Matthias. It was quite a nice little event with about 20 participants. As usual, we had a little introduction held by Matthias, which outlines the RCP / OSGi basics. Then we went on with the hands-on part of the Workshop. Ben introduced Views and JFace Viewers and I concluded by showing Extension and Extension Points. I hope everyone had fun, at least we three had.

Eclipse RCP Workshop

Eclipse RCP Workshop

I you did not attend the W-JAX this year, do it next year. It is a great location and a lot of interesting talks.  So, see you next year :) !

AM Grand PokerSeason 2008 - 8th Session

Posted on July 26th, 2008 in Personal by Stefan

On friday, the 8th session of our Grand Poker Season took place. Again, we played at Andreas’ place, thanks again for hosting us on your birthday! Unfortunatly his winning streak ended, he came in 4th. Here are the results:

  1. Stefan
  2. Stephan
  3. Torsten
  4. Andreas
  5. Michael

The Executiove board took the lead and is now head of the table. Again we are all looking forward to the next session again at Andreas place.

See you at the tables!

PS: I missed out posting the results of the 7th session:

  1. Andreas
  2. Stefan
  3. Stephan
  4. Michael

Sorry for that!

Eclipse RCP & Logging

Posted on June 28th, 2008 in Eclipse by Stefan

Logging within an Eclipse RCP application is pretty easy, every Activator provides an ILog using it’s getLog() method. Though it’s a little annoying wrapping the log statements with an IStatus, using some convenience methods solves that. But what about using another logging framework, e.g. Log4J?

Nearly everybody who tried to use Log4J accross Eclipse bundles faced the context classloader problem. Usually, the Log4J binaries should be placed within a library bundle. The configuration, the log4j.properties file, though is supposed to be somewhere else within a project specific bundle. Creating a Logger instance then runs into a problem: the configuration is not visible from the library bundle. So what to do now?

A pretty elegant solution is to use a fragment containing the configuration tied to the library bundle. So the project specific configuration is seperated from the framework and can be managed individually.

Eclipse DemoCamps 2008 - Ganymede Edition/Hamburg

Posted on June 17th, 2008 in Eclipse by Stefan

Yesterday, the Eclipse DemoCamp 2008 Ganymede_Edition/Hamburg was on schedule in Hamburg’s Former Coffee Exchange. Round about 40 Eclipse enthusiasts took part which is a pretty nice crowd of people. Thanks to Peter and Martin Hamburg now provides two regular events for the Eclipse community around here which is really nice (assuming and hoping that the DemoCamp and the Stammtisch will now occur regularly :). We had very interesting talks about Eclipse, especially Reginald’s talk about automated GUI Testing was pretty wicked. Unfortunatly I missed out taking photos, but trust me, if you didn’t attend, do it next time!

Remote offline checkin? Create a patch!

Posted on June 13th, 2008 in Personal by Stefan

Today a collegue of mine asked me to check in some change to our SVN repository. This was a little tricky as I had a home office day today and no access to our repository. Fortunatly there is this handy ‘create patch’ function in my Eclipse contextmenu. So I simply created a patch as a text file and sent it to him by Google Talk. A remote offline checkin - wicked eyh?

AM Grand PokerSeason 2008 - 6th Session

Posted on June 3rd, 2008 in Personal by Stefan

On friday, the 6th session of our Grand Poker Season took place. Dirk “The Shaker”, our host came in 3rd, Andreas winning again is about to follow Hani as this years ‘Altmeister’. Here are the results:

  1. Andreas
  2. Stefan
  3. Dirk
  4. Lars
  5. Heike
  6. Stephan
  7. Matthias

Dirk is still head of the table followed by myself and Stephan. Again we are all looking forward to the next session again at Andreas place.

See you at the tables!

Why Java Web Development basicly sucks

Posted on May 17th, 2008 in Software Architecture by Stefan

Developing Java web application really is a pain in the butt. Simple things like autocompletion, an editable table or client and server side validation seam to be so damn tricky. Sure, you get all these JSF frameworks from Sun or Apache, Rich Faces, Ajax 4 JSF and so on. All these promise to make things SOOOO easy. But tying these together busts the whole thing as they do not work together properly. You really have to bend everything to the max to get it at least running. Why is everybody so fancy about Web Applications anyway? Actually, the Web initially was made for a specific reason which is to display content. Abusing it to develop applications that more or less look and behave like a ‘real’ application brings me to the question, why we do that anyway. Is distribution that important that we need use a hammer to get in the screw?

It’s raining man…

Posted on May 13th, 2008 in Personal by Stefan

… at least I hope so. It’s has been beautiful weather around here for about 2 weeks now. I really enjoyed it, believe me. But spending about 2000 liters of water each evening to keep my green alive is pretty bad, besides it costs me about 1 hour to get that done. So let it rain!

AM Grand PokerSeason 2008 - 5th Session

Posted on May 11th, 2008 in Personal by Stefan

On friday, the 5th session of our Grand Poker Season took place. Andreas was our host due to his win of the 3rd session. It was great fun again though the head of the table, Dirk “The Shaker” was kicked out first. Here are the results:

  1. Andreas
  2. Stefan
  3. Stephan
  4. Hani
  5. Heike
  6. Lars
  7. Dirk

Dirk is still head of the table but only one point ahead. We are all looking forward to the next session at “The Shaker”’s place.

See you at the tables!

Next Page »