2

I am quite new in Joomla. I have now understood the components, modules, templates thing and can also build modules and simple components.

But the one thing that has always confused me in Joomla is the placement of methods in components. I studied a system and saw the save function being overridden sometimes in model and sometimes in controllers. The online solutions to queries also vary, some suggest to place methods in model whereas some say in controller. What I think is model should not be having such methods where some extra logic should be performed and it's the controllers job.

Or what pattern am I missing here in this regard, please enlighten me.

  • 1
    I think you will continue to encounter malformations in the MVC design pattern because Joomla developers come from all walks of life with vastly different understandings of coding practices. When you see something "in the wild" that doesn't look right, please speak up to the author. Good developers will always welcome tactfully delivered suggested refinements -- I know that I would appreciate such feedback. I'm not sure if your question is narrow enough to be succinctly answered on this site. Do you have a sample save() snippet to offer in your question so that an answer can be provided? – mickmackusa Jan 9 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.