M
moondaddy
I'm building a winforms app using vb.net 1.1 and have 3 basic tiers on the
client side. the UI, BLL and DAL. Currently everything is in one project
and at some point I'll parse it out to a separate project for each Tier.
Currently the startup object is Sub Main in the form called frmMain.
frmMain is open through the life of the application session. What happens
is from Sub Main it runs this code to get things started correctly:
Shared Sub Main()
Try
System.Windows.Forms.Application.EnableVisualStyles()
System.Windows.Forms.Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)
Catch ex As Exception
ErrLog(ex)
End Try
End Sub
Then the Load event opens the login form before frmMain has a chance to be
visible. If the login succeeds, then frmMain continues to open. If the
login is canceled, then frmMain exits and the application quits.
============================
What I want to do is parse the login form into a new project and make that
the startup project. Then as the user logs in it can check for updates and
more easily replace any of the other DLLs (UI, BLL or DAL) with out having
to replace its self (if I left the login form as part of the UI exe then I
think it would be more difficult to upgrade the UI exe as it would have to
replace itself.).
I know there are new things coming available like no touch deployment, but
I'm thinking that this design will still make things easier down the road
when I use a better technology for automatic updates.
So my question is:
Can anyone give some advise on this strategy and; if frmMain is in the UI
dll rather than being in the startup project, how can I make the login form
go away and have frmMain persist as the main form through out the
application session?
Thanks.
client side. the UI, BLL and DAL. Currently everything is in one project
and at some point I'll parse it out to a separate project for each Tier.
Currently the startup object is Sub Main in the form called frmMain.
frmMain is open through the life of the application session. What happens
is from Sub Main it runs this code to get things started correctly:
Shared Sub Main()
Try
System.Windows.Forms.Application.EnableVisualStyles()
System.Windows.Forms.Application.DoEvents()
System.Windows.Forms.Application.Run(New frmMain)
Catch ex As Exception
ErrLog(ex)
End Try
End Sub
Then the Load event opens the login form before frmMain has a chance to be
visible. If the login succeeds, then frmMain continues to open. If the
login is canceled, then frmMain exits and the application quits.
============================
What I want to do is parse the login form into a new project and make that
the startup project. Then as the user logs in it can check for updates and
more easily replace any of the other DLLs (UI, BLL or DAL) with out having
to replace its self (if I left the login form as part of the UI exe then I
think it would be more difficult to upgrade the UI exe as it would have to
replace itself.).
I know there are new things coming available like no touch deployment, but
I'm thinking that this design will still make things easier down the road
when I use a better technology for automatic updates.
So my question is:
Can anyone give some advise on this strategy and; if frmMain is in the UI
dll rather than being in the startup project, how can I make the login form
go away and have frmMain persist as the main form through out the
application session?
Thanks.