You Still Need to Know the Server Side Object Model
https://www.instagram.com/p/Bdusj6nHvs8/
You can’t program against it Online, and you definitely shouldn’t on-premise, but for a SharePoint developer, knowledge of the SSOM is still vital.
So, here are the highlights:
The top-level object is SPFarm, and SPFarm.Local lets you access the current farm only.
Under this is a collection of SPService objects.
Each SPService relates to an actual installed service in your SharePoint farm.
SPServiceInstance refers to a service running on a particular server.
SPFarm also has a collection of SPServiceApplications, mainly for admin use.
There’s also a collection of SPWebApplications, each of which has a collection of SPContentDatabase objects.
SPWebApplications also have a strongly-typed collection of SPSites – Site Collections – called SPSiteCollection.
Each SPSite has a collection of SPWeb objects.
SPSite also has a RootWeb property that points to the top-level SPWeb object.
So, which class refers to a SharePoint Site Collection?
SPSite.
Which class refers to a SharePoint Site or Subsite?
SPWeb.
Simples :)