images

Core DNN APIs

WHAT'S IN THIS CHAPTER?

  • Using hydration methods
  • Caching data
  • Logging events
  • Managing exceptions
  • Scheduling tasks
  • Examining module interfaces

DNN provides significant capability straight out of the box. You just have to install and go. Sometimes, however, you may need to extend the base framework. DNN provides a variety of integration points from HTTP handlers to custom modules. To take full advantage of the framework, it is important to understand some of the base services and APIs provided.

This chapter examines some of the core services provided by DNN. You can use these services in your own code. As many of the services are built using the Provider model, you can also provide alternate implementations to swap out the base functionality for your own version. For example, if you want your events logged to a custom database or to the Windows Event Logs, just create your own Logging Provider.

THE CBO CLASS

If you are fetching data from the database, then you may be interested in what the CBO class has to offer. CBO stands for Custom Business Object, and the class is designed to serialize and de-serialize objects.

The CBO methods can be broken down into three groups.

  • Methods that are used to “create” (or hydrate) business objects from readers returned from the database
  • Methods that are used to serialize a business object into XML
  • Methods that are used to de-serialize ...

Get Professional DNN7: Open Source .NET CMS Platform 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.