I think BLL is about Data. It should not include a method called SendEmail. BLL is a place for caching data, manipulating it, doing calculations related to business. Sending email is a business process but the code which actually send the email should be outside of BLL namespace.
Is BLL only about data ?
BLL is not about data, It is all about what needs to be done with the data.
User will only interact with the front-end presentation-forms of any application, which is popularly known as presentation layer.
Data will be displayed or exchanged as input/output to this layer from various sources of data. These sources are databases or web-services. The piece of code that actually fetches or sends these data to respective sources of data is what we call as DAL - data access layer.
In between the application does special operations which we call application-requirements or user-needs. This strategic part of the application is called BLL that actually addresses needs of the client for which you are developing the application.
If data needs to be stored in the database, BLL will have DAL as an underlying layer.
BLL is not aware of the sources of data and how data is fetched or sent to data-sources. You have DAL for that. BLL only knows about data, that to in forms of business-objects more often and operations on the data business-objects.
BLL also does not know whether user is using website or a desktop application. You have presentation layer for that.
BLL stands for your business logic layer. It should handle anything related to your business logic layer. SendEmail may be better in some sort of utility class?
Also if you tell your BLL about an emailing mechanism you are giving it too much information (tightly coupled, follow the law of demeter for functions, wiki / google it). Your BLL doesn't care about email nor should it.
When you mentioned Data, you are probably after the DAL (Data Access Layer). This is the layer that deals with data inserts / updates etc back to some resource such as a database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With