4 lines
23 KiB
JavaScript
4 lines
23 KiB
JavaScript
|
|
import{_ as a,c as t,o,ah as s}from"./chunks/framework.BfS8l2sS.js";const u=JSON.parse('{"title":"The Full Stack","description":"","frontmatter":{},"headers":[],"relativePath":"rebel_coding/step4.md","filePath":"rebel_coding/step4.md"}'),i={name:"rebel_coding/step4.md"};function r(n,e,l,h,p,d){return o(),t("div",null,[...e[0]||(e[0]=[s(`<h1 id="the-full-stack" tabindex="-1">The Full Stack <a class="header-anchor" href="#the-full-stack" aria-label="Permalink to “The Full Stack”"></a></h1><hr><p>Let’s take a moment to reflect on what the "full-stack" actually is.</p><p>How does it all connect?</p><p><strong>If the full-stack were a restaurant:</strong></p><p>The <strong>database</strong> is our walk-in’ cooler, and deep freeze; holding all the data that changes, or the food that will be used to prepare meals for our guests/visitors.</p><p>The <strong>server</strong> is the kitchen; using the contents of the cooler/freezer to fulfill our data requests, or orders, as made by the client …</p><p>And the <strong>client</strong> is more like the waitstaff; taking the orders, and fulfilling requests.</p><p>If you still have confusion, don’t hesitate to ask in the Discord server!</p><p>Though now let’s review each component further in-depth.</p><h1 id="the-database" tabindex="-1">The Database <a class="header-anchor" href="#the-database" aria-label="Permalink to “The Database”"></a></h1><hr><p>The <em>classic</em> database is the SQL database; a relational-database.</p><p>What does relational database even mean?</p><p>Tables, with columns and rows; spreadsheets of data; which are enabled to connect between multiple tables/sheets through <em>joins</em>.</p><p>Say you’ve got a list of users, and a list of their posts, their likes, their pictures, their videos and their user history!</p><p>That would be a giant table!!!</p><p>I mean, because each of those items has their own properties; what’s worse, some of the items aren’t really related, or some of them might be related to items from other users !?!</p><p>It is much easier if we can have a separate table for each one of these item-sets; and for our users, have a unique and static ID by which we can connect them to other tables.</p><p>Welcome to the wondrous magic of SQL laid out before you, a child of royalty looking out across a vast and unknown wilderness that will one-day be yours.</p><p>Though there are more than just relational databases.</p><p>Now we also have NoSQL databases, which come in four primary flavors: document, graph, key-value, and wide-column.</p><p>We won’t get into all of these nuances right now; though we will introduce you to many of these topics in adjacent materials.</p><h3 id="db-operations" tabindex="-1">DB Operations <a class="header-anchor" href="#db-operations" aria-label="Permalink to “DB Operations”"></a></h3><p>The reasons for databases are not just to contain information but to perform CRUD.</p><p><strong>Create</strong>, <strong>Retrieve</strong>, <strong>Update</strong>, & <strong>Delete</strong>.</p><p>Databases have these four primary functions to maintain data and allow for its <em>creation</em>, <em>retrieval</em>, <em>update</em> and <em>deletion</em>.</p><p>This is often shortened to be called CRUD procedures.</p><p>Within the past two decades, the commercially available database technology has grown to include products called no-SQL products.</p><p>SQL stands for “Structured Query Language” and is the language used to create and maintain relational database management systems (RDBMS).</p><p>These are our dynamically linked rows and columns.</p><p>NoSQL arose for two reasons, to diversify the storage format for databases, and reduce the number of database calls necessary to retrieve dynamic information.</p><p>It would be easy for us to get lost describing these differences and nuances, so I leave further investigation to your own interest; save the information provided below to help you get started.</p><h3 id="relational-database" tabindex="-1">Relational Database <a class="header-a
|
|||
|
|
<span class="line"><span> </span></span>
|
|||
|
|
<span class="line"><span> FROM Posts JOIN Users ON Users.id, Posts.user;</span></span></code></pre></div><p>Can you see the logic? We need to identify the column that we are going to use for matching; and then ‘join on’ that match.</p><h3 id="nosql" tabindex="-1">NoSQL <a class="header-anchor" href="#nosql" aria-label="Permalink to “NoSQL”"></a></h3><p>MongoDB, others …</p><p>key-value store</p><p>document store</p><p>column-oriented database</p><p>graph database</p><h1 id="the-server" tabindex="-1">The Server <a class="header-anchor" href="#the-server" aria-label="Permalink to “The Server”"></a></h1><hr><p>CMS Content Management System ~ A place to put digital stuff.</p><p>There are different computer languages, and thus different platforms built using these varied languages.</p><p>What does the server do?</p><p>Often times, the server serves an API (Application Programming Interface)</p><p>The basis of a CMS is the ability to create, maintain and modify digital assets; though this says very little about how they are displayed.</p><p>And it is on this point that many CMS’s vary.</p><p>For example, whereas WordPress provides a variety of themes Django provides next to nothing for initial user-facing displays; Node/ExpressJS, even less.</p><p>Though technically Node is more of a framework, as is Express; with which Client’s interact.</p><p>For the sake of education, let’s review some of the most popular CMS’s.</p><h3 id="php" tabindex="-1">PHP <a class="header-anchor" href="#php" aria-label="Permalink to “PHP”"></a></h3><h4 id="wordpress" tabindex="-1">Wordpress <a class="header-anchor" href="#wordpress" aria-label="Permalink to “Wordpress”"></a></h4><p>WordPress is built using the PHP language, and is one of the most popular Content Management Systems on the web.</p><p>There is a massive variety of free, and paid, themes available; and even more plugins one can use to extend its functionality.</p><p>With regard to our server / API-layer, there are two primary categories utilized by Wordpress, posts and pages.</p><p>So in our database there are essentially four tables, or content types, beyond the User table:</p><p>Posts, Pages, Tags and Categories.</p><p>Mind you this is a highly simplified instance of a Wordpress site.</p><p>All the basics need to begin building a basic website for blogging; which is what makes WordPress so popular: its simplicity.</p><h4 id="drupal" tabindex="-1">Drupal <a class="header-anchor" href="#drupal" aria-label="Permalink to “Drupal”"></a></h4><p>Getting a bit more complicated, yet still built in PHP, we have Drupal.</p><p>Considered an Enterprise-level CMS, Drupal provides a level of customization that Wordpress does not.</p><p>Remember how Wordpress provided only two initial content-types: Post and Page?</p><p>Drupal expands upon these options enabling users to easily manage a blog, forum, and polls, if they choose.</p><p>These modules use generic "nodes" as a basis for pieces of content which are divided into "Content types".</p><p>In turn, these new content-types can have fields such as images, videos, polls, or other custom data types attached to each one.</p><p>In this fashion a website with many different types of content can be created, making Drupal a common choice for media companies and governments that require complex displays</p><p>It should be noted that while Wordpress refers to its add-ons as <em>plug-ins</em>, Drupal refers to these components as <em>modules</em>.</p><p>If you, the developer, choose to enable the blog, forum, book and poll modules in Drupal, these additional, pre-baked, content-types are made immediately available to you.</p><p>As well, Drupal is lauded for its robust security!</p><p>Though the price paid it, is its barrier to entry, Drupal is a beast; and requires an advanced awareness to develop and maintain.</p><h3 id="python" tabindex="-1">Python <a class="header-anchor" href="#python" aria-label="Permalink to “Python”"></a></h3><p>Let’s start with why not Django - it’s a r
|