My immediate issue is that currently I have a 3 tier solution (Presentation.aspx.vb calls BusinessLayer.vb which calls DataAccessLayer.vb). However, I want to make BusinessLayer and DataAccessLayer.vb abstract classes because several Webforms will use have the same functionality.
So I currently am doing this (no abstract classes):
'Presentation Layer (pseudocode)
public sub checkUser(byval userName as string, byval dept as string)
dim isGood as boolean = BL.checkUserAccess(userName, dept)
'some more code
'change properties of webcontrols, etc
end sub
'Business Layer (pseudocode)
public function checkUserAccess(byval name as string, byval group as string) as boolean
dim accessObject as dataObject = DAL.checkPermissions(name, group)
if accessObject.isHighAccess then
'some code
else
'some other code
end if
end function
'Data Access Layer (pseudocode)
public function checkPermissions(byval userid as string, byval section as string) as dataObject
'some code
end function
However can I still have this structure if I add abstract classes?
For instance:
'Presentation Layer (pseudocode)
public sub checkUser(byval userName as string, byval dept as string)
dim isGood as boolean = instOne_BL.checkUserAccess(userName, dept)
'some more code
'change properties of webcontrols, etc
end sub
'Business Layer (pseudocode)
public class instOne_BL inhertis BL
public function checkUserAccess(byval name as string, byval group as string) as boolean
base.checkUserAccess(name, group)
instOne_DAL.checkPermissions(name, group)
end function
end class
'Data Access Layer (pseudocode)
public class instOne_DAL inherits DAL
public function checkPermissions(byval userid as string, byval section as string) as dataObject
base.checkPermissions(userid, section)
end function
end class