I totally agree with Adam here. Using inheritance for versioning purposes is a really bad idea!
PaulOp 21 jan. 2016, om 10:28 heeft Adam Cameron <@Adam_Cameron> het volgende geschreven:
I think your versioning strategy is wrong here. You don’t change the name of the file, you just release a new version of it with the same name. Depending on the situation you might release a replacement Person.cfc, or you might release a new version of the app. You shold read http://semver.org/ http://semver.org/ (and perhaps even https://en.wikipedia.org/wiki/Software_versioning https://en.wikipedia.org/wiki/Software_versioning). The version of the software is not reflected in the names of the classes in the application, “generally”.
If your application needs PersonV1 and PersonV2 to co-exist… you need to rethink your application architecture.
Component inheritance isn’t a tool for versioning, it’s a technique for defining inherited behaviour.
So, in short… don’t try to do what you’re doing; adopt a more established pattern for handling the versioning of your code.
On Thursday, 21 January 2016 06:07:51 UTC, ML wrote:
I have a component, say Person.cfc. From time to time, I make updates to this component so I create PersonV1.cfc, PersonV2.cfc, … And for consistency, I just make Person.cfc be an empty component that extends the relevant version.
This way, if I need to change the version, I just change where Person.cfc points to.
My question: is there a way to make the extension dynamic? I can’t do as it gives me the error that the attributes of need to be literal string. I would like to be able to do this so that when I deploy this component in multiple applications, I can easily specify the version for each application without having different versions of Person.cfc. Is this possible?
You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com mailto:firstname.lastname@example.org.
To post to this group, send email to email@example.com mailto:firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/8516a7c7-3468-4f30-af19-cc6962b0e451%40googlegroups.com https://groups.google.com/d/msgid/lucee/8516a7c7-3468-4f30-af19-cc6962b0e451%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.