What is the prefered method for sharing code and SQL queries in joomla 3.9+?

by nimble   Last Updated April 25, 2018 04:10 AM

I'm developing a component that is targeting Joomla 3.9+. The code is not using the legacy classes and is instead using the new namespaces. The component will duplicate much of the functionality from the admin side so I'd prefer to share code and Sql queries where applicable. What is the best way to do this moving forward? Should I use the admin model on the site? Should I create a library or namespace? What is the preferred way to do this with the approaching 4.0 release? Also, is there a good way to share ui elements and forms between the two?

Related Questions

passing an array from view to controller to model

Updated March 11, 2018 17:10 PM

Joomla query for monthly result in a graph

Updated February 27, 2017 14:10 PM

SQL Error when updating custom component in Joomla 3.9

Updated November 14, 2018 19:10 PM