Hi all,
I was wondering how most developers handle the initial startup of their
Windows Forms applications?
When you make an application in Visual Studio, the IDE places Main in the
form that VS makes for you. When I make my applications I sometimes feel
uneasy about leaving the startup logic in the Form - it sort of seems the
wrong place for it. I'm by no means an expert on such things (which is why
I'm writing this post), but it seems that a Form, as part of the UI Layer,
is the wrong place to start an application.
I have tended to try and make a 'main' class that contains the Main() method
and controls the startup of application wide services from there. Thats
causing me some problems though because I don't fully understand what is
best practice when it comes to architecting medium sized application.
So, my question is - where should startup logic go? Am I right to be
suspicious of putting this sort of global logic in the UI layer, or am I way
off the mark and shouldnt be worrying about it?
Your advice as always, would be greatfully received
Many thanks everyone
Simon