In a coldfusion application, there is always need for a user to interact with the code base to access the data. In this application, to create the facade pattern is very necessary. The word “facade” is generally taken from the french language which means - “frontage”. So the word facade means - to show a large body of code by using a simple interface.
The facade pattern can be made by using the following things -
- make a library package or group of functions in a readable format
- reduce dependencies of outsider code on the inner library
- collect the code by using the single well designed API
To create a facade pattern is also known as service layer. The biggest benefit of creating a service layer is the most benefiting, because it creates a pool of the larger packages, library functions and classes by which a large part of data can be accessed by using a simple interface. By using this pattern, the objects can also be made interrelated.
To create a service layer or facade pattern does not mean that a user has the need to call all the methods and functions data to retrieve the information. Only the selected methods and properties are needed to be called upon. To access the information beans, data objects and the gateways are declared.
The creation motive of the facade pattern is to reduce the overall application development time so that only the important variables and functions can be accessed by the user just by interacting with the service layer. By using this concept the business critical logics and SQL statements are remained safe.
Hope you have liked this post ! Thanks for reading it !
reference links -
https://alokjasmatiya99.dudaone.com/how-to-create-a-service-layer-will-be-helpful-to-you-in-coldfusion-framework |
No comments:
Post a Comment