O'Reilly logo

Object-Oriented Programming in ColdFusion by Matt Gifford

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

Creating a service

A major benefit to creating a service layer is the fact that it creates a simpler, easier interface to interact with and access the data through the larger collection of packages and Class libraries within your code base.

The service layer can also manage the instantiation of related objects.

To highlight the effectiveness of using a Service layer (or Facade Pattern) in your larger applications, the code used in this chapter has grown. We now have not only a component package dealing with User interactions (the Bean, DAO, and Gateway), we also have a package dealing with the user's address, which is available in the complete code download for this chapter.

Let's take a look at the onApplicatonStart() method as it currently stands ...

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