O'Reilly logo

Professional DotNetNuke®5: Open Source Web Application Framework for ASP.NET by Ryan Morgan, Stan Schultes, Darrell Hardy, Brian Scarbeau, Shaun Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required