A common computer paradigm is called Client Server. This is essentially what websites are. Your browser is the client and it talks to the server. The server then in turn talks to a database.
##Warning
long winded response ahead
In short, it speeds up development time by not having to reinvent the wheel for every little thing on your site. Why do you need to make a header, when thousands of people before you have already made it? Just use the one from bootstrap. Why should you work on building a Dialog Box from scratch? Why build a responsive grid system?
You get all of these things already in Bootstrap or Foundation or Semantic UI or any other frontend framework you use. Some are large monolithic beasts like the one above, others are barebone like PureCSS or Skeleton. The big disadvantage to using them is it adds a lot of extra bulk to your site. But you can configure most frameworks to include only what you’re using. They can also lead to everything looking the same, but you should be spending time customizing your site to be your site anyway. Customizing takes far less time than building it from scratch.
It’s not about being lazy, it’s about not having the time because time is limited and expensive. I’m a full stack guy, I have a million other tiny little things to worry about, rather than getting my stupid header to work responsively.
Many reasons.
For one, data can be large. I mean… LARGE. Think about coming to Sitepoint and having to download every-single-post ever made and every single user’s statistics. Every single little piece of information ever on the site. Then after you do that, you have to download every single new thing posted and every single new user statistic. This would take a very long time and if you had to do this for every site, you’d probably fill up your hard drive after visiting a small handful. So the servers takes it and stores it in a database for retrieval when it’s needed.
Added to that, even if you could store the data on your machine, you would also need to store all the programs that do the backend searching and categorizing and optimization and all the millions of other little things. Your computer can’t handle this, but the server is good at it and handles it for everyone.
The server handles all this and only gives you the information you request. Like this post I’m making right now. Your computer asked for it, the server gave it to you. After I made it, it was stored in a logical place, categorized, and processed in a number of different ways added timestamps and all that. Which leads me to my next point…
You can’t trust client information. Anything the client has is fully able to be manipulated and corrupted. Take the timestamp of this post. If this came from my computer, I could modify the JavaScript or the form variable or where ever it was sent from and change it to whatever I wanted. I could send it from 1984 if I wanted if the server trusted what I gave it. This needs to be done by the server and any information sent from the client needs to be sanitized by the server. Like say I wanted to embed a little piece of JavaScript that randomly changed the color of every element on your screen every 100ms into my post? Not only would that give a non-epileptic a seizure, but it would lag down even the best computers. Well if the server trusted me, then I could do that. Thankfully it doesn’t.
There are also hidden forums here that are only accessible to certain members. I’m a “Mentor” so I have access to the Mentor forum that you’re unable to see. There are probably many others that I am unable to see that only Admins and Team members can see. Then take into account all the power they have of modifying posts, removing posts (spam), banning members, etc. You can’t give this to the client.
That said, you can use JavaScript on the server just like you can use Ruby, Python, Java, Scala, or PHP. This is something that’s fairly new, but it’s being adopted fast since it’s the only programming language on the client-side application.
Bootstrap is just a bunch of prebuilt pieces you can use on your site. You still need an editor for that. Editors fall into 2 major categories. Advanced Text Editors and IDEs (Integrated Development Environments).
Advanced Text Editors are things like Notepad++ or SublimeText or Atom.io. They are generally pretty light weight. If you need to run other things like Git or your command line tools, this is usually another program.
IDE’s on the other hand are designed to run everything. Everything you’re doing when working on a site is done inside the IDE. This includes all your Command Line interaction, your code, your server, everything. (though usually not your database) There’s usually no need to use any other tools when using an IDE. Sometimes you need to because the other tools can be better than what you get in an IDE, but that’s the idea anyway. The advantage of this is being able to have everything right there and run inside, which allows the IDE to tear apart your application and the code you’re writing to allow the developer to better debug and optimize their applications. As well as many other advantages.
Most of the time, I don’t have a need for an IDE and when I’m working on something at home I may work on something for 5minutes or 10hrs. If I have nothing planned for the day, I might not even know which one it is. For this reason I usually use SublimeText 3. But at work, where I’m at my desk for 5-6hrs a day coding for 5-6hrs a day working on the same project the whole time, I boot up my IDE because I won’t ever bring it down and I can use all the tools it provides because I have everything configured and setup the way I want it because I do it every day.
##sass/LESS
Sass and LESS are called CSS processors. CSS and HTML are not really programming languages. They are mostly dumb, in the sense they only do what they are told and nothing more. HTML is like the framework and the walls and the rooms of a bank, CSS is the decorations and the paint, JavaScript and the server is all the computers, electronics, wiring, plumbing, and everything else that turns it from a decorated shell of a building with a big steel room, into a bank.
SASS and LESS add a big of programming to CSS. You write something in SASS or LESS and run it through a program that “compiles” it to regular CSS. This is great because it keeps your from reusable pieces of CSS over and over, makes it easier to manage large bodies of CSS code, and it adds variables which are great for things like colors:
$primary: #FF0000;
and then .something { color: $primary }
, as well as a number of other features such as being able to manipulate colors without explicitly defining a new one. Such as .something { color: darken($primary, 15%) }
instead of .something. { color: #b30000; }
which is red but 15% darker. Now instead of 2 colors to manage, you have 1 named $primary
.
Of course, they do other things. But this is the first and best step. Many frontend frameworks like Boostrap, Foundation, etc. are written in this because it makes customization MUCH easier by only having a few hundred things to change, instead of thousands.
If this were true, then why are you right? lol