Highlighted

ColdFusion 2018 update 10 does not interpret private functions

New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

I've found one more problem while creating a POO service.

 

I've created a component with some PRIVATE getter and setter functions, then a PUBLIC transactional function IN SAME component to access these getter and setter functions. After instancing the referenced object then using the transaction function, an error appears explaining the getter and setter functions could not be found. To avoid this error, I needed to change the getter and setter functions' visibility to PACKAGE. So, did anyone find a similar issue while creating a POO architecture using ColdFusion 2018?

Views

20

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

ColdFusion 2018 update 10 does not interpret private functions

New Here ,
Oct 07, 2020

Copy link to clipboard

Copied

I've found one more problem while creating a POO service.

 

I've created a component with some PRIVATE getter and setter functions, then a PUBLIC transactional function IN SAME component to access these getter and setter functions. After instancing the referenced object then using the transaction function, an error appears explaining the getter and setter functions could not be found. To avoid this error, I needed to change the getter and setter functions' visibility to PACKAGE. So, did anyone find a similar issue while creating a POO architecture using ColdFusion 2018?

Views

21

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 07, 2020 0
BKBK LATEST
Adobe Community Professional ,
Oct 09, 2020

Copy link to clipboard

Copied

The behaviour you describe makes sense to me. The CFC is the service. The one who instantiates the CFC is the client, presumed to be anywhere in the universe outside of the CFC. As such the client should know nothing about the private properties of the CFC. This is encapsulation or information-hiding, aspects of software design that transcend Pattern Object-Oriented architecture.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 09, 2020 0