Re: Designing lower level classes.
Stefan Ram wrote:
> Gunter Schelfhout <no.mail@please.com.invalid> writes:
>>Ok, since I am still in the design phase, it's probably better to keep
>>things separated as much as I can.
>
> It is not even required to keep it separated right from the
> start.
>
> You also can have some »dirty« code parts in the first version
> where data processing and UI interface code is mixed and
> refactor it later to get the separation. Not everyone is so
> perfect that he can write it all separated from the start.
>
> Between sessions of coding to extend the set of features,
> there always should be sessions to improve the quality of the
> code without adding new features. Nobody can write everything
> in the best possible way the first time. But one will
> eventually not be able to maintain the code anymore if one
> never refactors it to improve separation of responsibilities.
I agree, but this is imho one of the decisions which are almost impossible
to switch back later on since a complete refacturing is then needed which
I'm trying to avoid.
So it's probably advisable to keep the the core classes as much as possible
independant of the GUI (and there libraries) and if nescessary, to provide
an extra layer to glue the core with the GUI.
I found out that between learning the technicalities and writing a program,
there is al lot more to discover. ;-)
|