Components

Joomla has an MVC library build in from which you can extend your Model, View and Controller classes to build a component.

Official documentation on building an MVC Component: https://docs.joomla.org/J3.x:Developing_an_MVC_Component

The official documentation is lengthy but also required reading for anyone starting out building components. But of course no one would hand craft a Joomla MVC Component in the way that the documentation walks you through it. The practical options are as follows.