Could someone possibly explain the structure and what files are for in a CRUD module? I have created by module by following a guide online, and its working great and printing out my database fields on the page, but i'm a bit confused as to what some of the files do?
Here are my files so far and what i've gathered they do
I have no idea what the interface file does, some guides have it and some do not and I can't seem to make sense of it.
The block file that connects directly to my template files for rendering data in the templates and layout.
The index file that renders the template for the requested page?
The xml file that specifies the routes for the url.
The module declaration xml file.
I think this file is the one that connects to the database?
I have no idea what the resource model does.
Our actual model file.
The file that installs the database tables.
The index layout file.
The template file that we connect to our block to load data.
I'm fairly new to magento 2, and I haven't used magento 1 before. I think I have a basic understanding of what all the files do, but if someone could briefly explain exactly what each of the files are for, i'd be very grateful!
Thanks in advance