View versus Editor in RCP - a different opinion

In a current blog thread David Orme writes, you should use editors in RCP applications when you need life-cycle management...

I very strongly disagree with this. For me the important statement by David is
The only real difference between a view and an editor is that there is exactly 1 editor area and once visible, it is always visible even if no editors are open.
The current implementation for editors does not allow you to mix editors and views in one stack (or folder), which can be a serious problem in many applications. E.g. consider the banking application where you use a perspective to show a lot of information about a specific customer. In a few cases you want to edit parts of this information...

Would you then use an editor for this? What would you put in the editor area when you don't need to edit any customer data?

The basic problem here is - in my opinion - that the editor area is a serous waste of screen estate when editors are not needed.

You can find a presentation on this from EclipseCon '08.

1 comment:

Kevin McGuire said...

So, you're both right actually :)

In the early days of Eclipse, we were thinking more in terms of documents (e.g. Java source), so the editor area had several qualities:

1) It was where we thought you'd do the bulk of your work.
2) It was where we thought you'd have extended edit sessions against a file.
3) It therefore needed to support a modify/save life cycle.
4) It occupied the main real estate of your perspective because of (1) and (2).

It happens now though that there are all sorts of interesting usages where the main thing you are working on isn't a document, isn't backed by a single file.

Thus I think what David Orme was expressing was the intention of editors, the best practice as it were. But what you are pointing out is that in practice there are things that want to make use of in that area but aren't what we'd consider an editor.

I think this an important problem to be solved in e4. The platform UI team have discussed this issue a number of times, so its on the radar, but its a bit tricky problem so lots of help needed.