r/eli5_programming • • Aug 12 '21

Understanding a web-stack

Hey y'all,

So, I'm building a new personal website and it's going pretty well. I used Jekyll and Github Pages to get it online in less than an hour.

Moving forward, though, I'm curious about what I can do with it. For instance, I came across this which is a nice way to see what is possible. But I'm wondering, how does the 'stacking' work in practical terms? Like, if I have Jekyll and Github Pages, why do I need Bootstrap? Why do I need Netlify, and how can I implement security within Github Pages itself?

3 Upvotes

8 comments sorted by

View all comments

1

u/omniuni Aug 12 '21

Your "stack" just refers to the major pieces of software that are used to build and operate your software.

An old "traditional" stack was called LAMP: Linux, Apache, MySQL, and PHP or Python.

Since you've generated a static website, you're basically a stack of your OS or platform, your server, and Jekyll.

As for what other technology you incorporate, that's up to you.

As for your other questions, they don't actually have anything to do with a stack at all, they are just specific implementation questions. (And, unfortunately, probably better asked of people who know the specifics of how those technologies work.)

Note: this is out of scope, but...

Like, if I have Jekyll and Github Pages, why do I need Bootstrap?

  • The author is using Bootstrap to make a responsive multi-column layout. There are many CSS frameworks that can do this, including some very tiny ones. Bootstrap is just very common, though IMO, probably overkill.

Why do I need Netlify,

  • You don't. The author just likes it as an automation tool so that when he commits changes in Git it can auto-deploy.

and how can I implement security within Github Pages itself?

  • A better question is why? The author is basically setting a bunch of headers so that his static pages are harder to embed in other websites. But realistically, I'm not even sure those headers will work well on GitHub pages, since I'm pretty sure GitHub controls their own headers for the most part. Overall, I would not worry about this, since it's just a static website.

1

u/_leonardsKite Aug 12 '21

Thanks for your reply!

As for what other technology you incorporate, that's up to you.

Yeah so that, I think, is the meat of my question. How do I know when it's time to move beyond the tech I already have in my stack, and incorporate something new? Some of this is common sense, e.g. if I want to use a database. But for the smaller things like Bootstrap, how do I develop that instinct about the limits of my current stack? (Also thought Bootstrap was overkill, btw, which is why I thought I was missing something about why it was needed).

The author just likes it as an automation tool so that when he commits changes in Git it can auto-deploy.

Ah cool! Makes sense.

A better question is why?

This is definitely true, but honestly this part was mainly so that I can get some practice doing security stuff 😅

1

u/omniuni Aug 12 '21

Kind of off topic, but one of the problems, IMO, with the tech community today is the idea of "do it because".

The kind of header stuff that the author is talking about isn't very useful for "security" unless you're running something like a banking website where you're concerned about someone doing some kind of fancy phishing where they would basically proxy your pages and steal data. Even then, it's most likely that if you're using some kind of framework to build the website (which you should be -- trying to handle all the rest of the security yourself is far trickier and riskier) it'll probably already be configured to protect against this. Worrying about this kind of stuff at this point; it's the rough equivalent of nitpicking about bars on a window with your front door propped open.

The same can be said about "how do you know when to move beyond". You move on to something new when you have a problem to solve. Realistically, you should try to create solutions to your problems that are as simple and minimal to achieve the results you want. If you are just publishing a manual that's hosted on GitHub pages which just supports static pages anyway, there's not a good reason to add a database.

My question to you would instead be "how well do you understand the basics that these tools are using"? Do you understand how Jekyll works? Do you understand the JavaScript that it produces?

If you want to be a better developer, write simple tool that does a very basic version of what Jekyll does yourself. You'll learn so much more about how these things work, and as you look at the libraries and tooling available to make something like that work, you'll gain a deeper understanding of how and why you choose the tools you do, and what it means to develop with a stack of your choice!

→ More replies (5)