Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What layer does a UserControl's base class belong in?

I have an asp.net usercontrol (ascx) that inherits from an abstract class (that inherits from a UserControl). My Project is in a 3-tier architecture (DAL -> Bll -> UI/Views). Currently there are no class files in the UI layer (other than the code-behinds). Which layer should I add this abstract class to?

Thanks so much.

like image 459
O.O Avatar asked Feb 27 '23 09:02

O.O


1 Answers

A UserControl is part of your presentation, so should be in your UI/Views layer.

Think of it this way: If I was re-implementing this as a Windows Forms application, which layers would I keep? It'd be the DAL and BLL, therefore nothing specific to asp.net should be in either of those layers and the converse is: anything specific to asp.net should be in the UI/Views layer.

like image 68
Rob Avatar answered Mar 07 '23 12:03

Rob