[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [jfw] Re: Versioning namespaces



Another way for the CMS to start using the Framework is for the CMS to define the interfaces it requires, then have the existing code transformed to meet those interfaces. This will allow the CMS start using the Framework to rebuild its underlying structure while remaining compatible with existing code. 

We tried something like this when we changed JController to be an interface, but it caused problems because we used an existing name instead of a new interface name which the existing class name then implemented. It could have been a much simpler transition if we would have changed it to be:

class JController implements JControllerInterface {}

The downside to this approach is we become "stuck" with current method naming and signatures for class functionality (display, save, save2new etc), but we gain BC and flexibility. But it's not really a downside, because a big part of retaining BC is retaining public method names and signatures - meaning it's something we should be doing anyway.

With that complete (when/if ever that happens), it becomes much more straightforward to upgrade the lower level structure without affecting higher level components. Or, if you prefer the words of Martin Fowler: "altering its internal structure without changing its external behavior". (http://refactoring.com)



On Tue, May 19, 2015 at 9:31 AM, Nils Rückmann <mail AT nueckman.de> wrote:
I admit, it's not ideal. But it has benefits with minimum effort. Personally i don't know any other solution to solve the issue with multiple version. Well, there would be the possibility to bind  a package and its dependencies like Snappy (and others) does, but that's no solution for php.

--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.

--
Framework source code: https://github.com/joomla-framework
Visit http://developer.joomla.org for more information about developing with Joomla!
---
You received this message because you are subscribed to the Google Groups "Joomla! Framework Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-framework+unsubscribe AT googlegroups.com.
Visit this group at http://groups.google.com/group/joomla-dev-framework.