Chapter 14. Developing Modules: The Business Logic Layer

The previous chapter covered how to create a physical database provider for your module, and how all the methods contained in the provider directly correlate to stored procedures within the database. After the provider was completed, you created an abstraction class that defines the methods contained in the provider that will be used by the Business Logic Layer (BLL).

In this chapter, you transform the DataReader returned from the database by the data provider into a collection of business objects provided by the Business Logic Layer within your module. This chapter continues with concepts that were introduced in Chapter 7, "DotNetNuke Architecture," because module architecture mirrors the architecture provided by DNN.

The idea is to separate totally the physical database from the module or application logic that you create. Separating the two enables plug-and-play extensibility when you or the user of your module wants to change the database provider. Because the provider is abstracted from the actual business logic, you can use the same code, but a different data store. Because they're separate assemblies, there is no need to rebuild the application to change the database provider.

You will now extend this provider architecture to the business logic of the application. Here you create a collection of objects with specific properties that will be exposed to your presentation layer, which is covered in Chapter 15, "Developing ...

Get Professional DotNetNuke®5: Open Source Web Application Framework for ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.