> LyXFunc::Dispatch() is a monster if I ever saw one :-)
...
> Yes - I see know why Dialogs is necessary though. But somehow I cant stop the
> feeling that something is wrong with this design.
What we have chosen to do is to split LyXFunc::Dispatch into separate
dispatchers. We'll have one in BufferView, and one in LyXView, IIRC.
I think this approach was originally proposed by Andr� (please
correct me if I'm wrong), and this is a good way to proceed.
You are right that lyxfunc::dispatch is too big for it's own good, and
you are also right that it would be too much to take it apart completely
and replace it might something else.
This is why Andr�'s proposal is so good: It's a partial, but much needed,
clean-up. And most importantly, it's feasiable.
Over time, the program will be better. Each time a function is moved to
it's correct place, the program will be more modular and more object
oriented.
It's old hat by now, but let me reiterate it again just to be a pain:
We have to take small steps.
In this way, we will achieve the goal of having the program we all want
that is easy to extend and maintain. We won't get that from scrapping
everything and starting over in one giant swoop.
We can see the success of the small-step approach now: LyX development has
speeden up quite a bit compared to earlier, even if some of the old core
developers don't contribute much.
This increase in external contributions is not a direct consequence of
the small improvements in program structure themselves.
Instead, it's a direct consequence of the fact that the program is almost
100% functional even if it is being restructured substantially. It is
possible to hit a moving target, but only if it is moving slow enough to
still be functional.
And now, I think I'm ready for the main point: We should not fall into
the trap of speeding up development because we have some success now!
That will not help. We have to realize that this pace is the best pace
to move in, even if it seems counter-intuitive that you have to move
slow to be most efficient.
Remember that we still have the LyX developers meetings to give the
program the huge bursts that any open source project needs from time
to time. At those meetings we suddenly have the resources to make huge
steps and succeed with them. But let us save the big ammo to those
meetings.
Greets,
Asger