Quantcast
Channel: Joomla! Forum - community, help and support
Viewing all articles
Browse latest Browse all 2033

Joomla! 4.x Coding • How to split a component model into multiple classes

$
0
0
I've been working on some components which are getting quite large and complex. Its at the point where some of my component models look like procedural code that just happens to be sitting within a class. I'd like to refactor my component models into multiple classes so that I'm able to use OOP principles such as separation of concerns, composition, low coupling and high cohesion.

If I were to split a model up in this way, where would I place my classes? Would a good location just be in the component's model directory?

Are there any examples in the core of models being split in this way?

Statistics: Posted by domcdom — Mon Jun 17, 2024 3:01 pm



Viewing all articles
Browse latest Browse all 2033

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>