I am trying to bridge a mental gap between the
OOP principle of Layered Architecture[
^] with the way that VS.NET starts a windows forms application. After designing my initial form I double click and get this code:
Public Class frmMain
Private Sub frmMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'code here'
End Sub
'other subs etc'
End Class
This does not give me a good way to set up all of my Layers since the only way to do so would mean putting "business layer" code into
frmMain_Load()
which is a User Interface Layer. In this blog:
http://oopstruggles.blogspot.com/2008/10/oop-architecture.html[
^] Tim gives an example of what I think this should look like with:
class RealLife
way down towards the bottom of his example.
I can think of a way to do this with a
modMain
module which contains a
Public Sub Main()
routine. This would be called by
frmMain_Load(...)...
in the main form when the application loads. But this all seems like I'm adding a band-aid to the way that VS.NET implements its solutions.
Am I using objects wrong if I need a facilitation sub like Tim is talking about? How should I set up my object facilitation code if that is the correct use of OOP Layers in VS.NET?