How do you build a basic website from scratch?
As in using as little outside services as possible?

Say i just wanted a website that was completely blank except for text and one photo, then add things over time, what are the steps i would need to do?

I don't want all the fluff about how to design it and how to market it. Just the absolute basics. And i don't really want a service that lets me build through templates. I want to do it for fun and learning purposes, not because i actually need a website. I'm thinking a service that does a lot of the work for me, isn't going to be a great way to learn myself?

What would i need to be able to host it myself? Is that sensible, if not why not? I presume you really need a dedicated server if you actually have people visiting it, but can you just use your regular pc whilst you are developing it? Or would you get a hosting service, then host it yourself later on down the line once it's a functioning website you actually want people to visit?

What security measures would i need? What software etc would i need to build the website?
< >
9 yorumdan 1 ile 9 arası gösteriliyor
Learn HTML and take some classes at your local adult college.
There are lots of tutorials online, you should start with a template and tinker with the settings
a couple video tutorials and you're good to go. no need for anything else
There are three core parts of every website:

- HTML: the markup that determines how things are structured.
- CSS: a sheet of rules that determine how things are styled.
- JavaScript: the scripting language that provides user interactivity.

İlk olarak earlysunsets2 tarafından gönderildi:
can you just use your regular pc whilst you are developing it?
Yup. Modern browsers can simply open and display HTML files locally on your system.
Try pasting this into a new text file and changing the file extension from ".txt" to ".html". Opening the file should then launch your default browser to display it:
<!DOCTYPE html> <html> <head> <title>My Cool Webpage</title> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph</p> </body> </html>

İlk olarak earlysunsets2 tarafından gönderildi:
What security measures would i need? What software etc would i need to build the website?
For a very basic website, you don't really have any security concerns.
Security becomes relevant when you do things such as submitting forms or saving user information with cookies/other methods. Don't worry about that for now, as it's a bit more advanced.

You only really need one piece of software to develop a website: a fully formatted text editor. Windows Notepad ain't gonna cut it.
I like to use Visual Studio Code[code.visualstudio.com], but other editors such as Notepad++[notepad-plus-plus.org] or Atom[atom.io] are popular tools as well.

Here are some learning resources:

MDN Docs[developer.mozilla.org] provide in-depth knowledge of various web development areas & individual features.
W3Schools[www.w3schools.com] isn't as in-depth as MDN, but it does provide simpler, easier to understand, & interactive guides for beginners.
En son Blargo tarafından düzenlendi; 15 Mar 2022 @ 6:55
Good book:
Head First HTML and CSS[www.amazon.com]
Get your feet wet with the basics, and have working knowledge at the end.

And if you want to get fancy after:
Head First JavaScript[www.amazon.com]

Actually, with the knowledge these two books give you, you'll not only be able to bang out websites, but you'll probably be able to get an entry-level web development job.
***
TLDR: Honestly? Go out and buy a primer or beginner's guide to html/website stuffs. You'll want a good, handy, reference beside you while you experiment. You can create your own feature-complete website at home before ever even connecting to the internet. It will display and function much like it would when it was "live" online. You can even set up your own "intranet" locally, with all your computers accessing your intranet website. (Not advisable if there's a route to the 'net, but you can do it for funsies.)

A standard hosting company will take care of most of the technical and registration stuff for you in a largely seamless, trouble-free manner. You'll pay for hosting costs and a recurring, small, DNS registration fee on an annual basis. That's the smart way to go for most purposes. Do that after you've read the book and have mucked around with creating your webpages locally and are now ready to go "live."

**

İlk olarak earlysunsets2 tarafından gönderildi:
As in using as little outside services as possible?

Microsoft Word or similar, "save as html." (Yes, that will make many people shiver and scream bloody murder, but... Well, you could certainly do that. :))

And, you can set it up so you can navigate to it and use it at home without it ever being hosted "online." Certainly, you can create an entire intranet "website" that never leaves your computer and doesn't use the internet at all, not even once. It'll look just like one that's truly online, too.

I don't want all the fluff about how to design it and how to market it. Just the absolute basics. And i don't really want a service that lets me build through templates. I want to do it for fun and learning purposes, not because i actually need a website. I'm thinking a service that does a lot of the work for me, isn't going to be a great way to learn myself?

The first bit is to get a hosting arrangement and register the domain name. Larger commercial hosting/registrars will often offer free webpage/site creation tools and everything in an all-in-one package. One stop. :)

And, getting results matters first. If you don't have the site up and working, you can't really learn much, right? You can certainly create local html files and load them up in a browser or even most standard document creators (word, open office, etc) if you wished. That will serve much the same purposes as a live learning experience, too.

An "HTML for Dummies" book, or any basic primer, will help you learn what you need to know for all the most basic functions.

Anything you put up for your website can be changed by you whenever you wish. Get something up, muck around with it at your leisure locally, ftp it up when you've got it the way you want it after logging into your host account, then navigate to your actual website on the internet and realize your borked it all up... go back to your local source files, fix those, put it back up on the net, check again.

What would i need to be able to host it myself? Is that sensible, if not why not?

You can host it yourself, but you need a "static" IP address rather than the usual, these days, dynamic IP address to register the domain name. The registered IP address of your site is propagated throughout the Domain Name Services that tell browsers querying them where "www.yoursite.blahblah.meep" is. If your IP changes, browsers will be navigating to the wrong IP. (Dynamic IP assignment is standard ISP practice, since it gives them better ability to balance traffic, but one's dynamic IP addy may not change very often.)

To host it yourself, once you have a static IP address assigned to you by your ISP, you'd just need to register the domain name with a registrar service and then set up the hardware to accept certain connection types so the files/site on your computer can be read/interacted with.

It is, however, an ungood idea to host public sites on your own server at home... It is not sensible for a large number of other reasons, too. What if you trip over the extension cord?

(Btw, most ISPs don't like it if they've assigned you a static IP and you haven't made special arrangements with them to host a website on it. You'd have to check their policies, first. They hate torrents, right? And, it's much the same issue for them for users hosting websites.)

I presume you really need a dedicated server if you actually have people visiting it, but can you just use your regular pc whilst you are developing it? Or would you get a hosting service, then host it yourself later on down the line once it's a functioning website you actually want people to visit?

You can develop your website entirely on your own local PC. In fact, that's the best way to learn. You can even "run it" locally on your own PC and navigate through it. You could even set up your own local "intranet" website(s) and access them on your own local network without even connecting to the internet.

A "dedicated server" is sometimes a misunderstood phrase. For instance, when you have a website being hosted, it wouldn't be usual that a whole, physical, server (Basically, a blade server on a rack of them.) is dedicated just to your website. (For most private uses) You'd be using space on a server that is running many websites, most likely. There are situations where a provider will lease a true dedicated server or even allow one, in the case of something like a small local mom&pop service, one to install one's own server at their location. (It is possible to enter into leasing agreements for a truly dedicated server located at the hosting businesses server farm, though. That's not likely to be necessary.)

Largely, though, one enters into a hosting agreement for the use of services/servers/space/bandwidth with a hosting company and they will manage all the details of the resources used. Sometimes, the actual hardware your website files are on changes as they balance their servers, move stuffs around, add stuff, etc...

In short - Your concerns about hardware and all the fiddly bits of it end at the hosting agreement and what you've contracted for with that agency. Once the traffic gets to their internal system (Basically, the last sets of numbers at the end of an IP addy), they handle the loads to direct it to the appropriate hardware and you don't need to worry about it. (If you notice your website's performance being below agreed upon terms, that's when you worry about it.)

(Note: The confusion between DNS registration and Hosting, if any: Registration of your domain name and the IP address it is assigned is different than a hosting agreement where your actual website files are located and what visitors connect to.

You'll register your domain name and you will tell the registrar service what the IP address is. They will then update all the Domain Name Servers in the world with that information. (This is called "propagating" that registration/domain name info. It generally takes much less than 24hrs, but 24hrs is the "standard.") You will get that IP address you give to the registrar from your host that you signed on with to host your webisite files. Since you may switch hosts from time to time, you can go back to the registrar you registered your domain with and make changes to that IP address and they'll propagate it on demand. (You'll have an account with login credentials/etc with them. The entity, "you," registering that domain is recorded, just in case there's a registrar issue. This can be obfuscated, btw, using certain registrars/options.)

Most of the common commercial hosting/registration services take care of all of this in one step, since they want that hosting business. So, you'd sign on with GoMamma™ and make an account, agree to all their stuffs, come up with your domain name (Registrars verify that you're not duping one) and contract with them to host it, all in one spot. That's "standard" these days.

What security measures would i need? What software etc would i need to build the website?

Security - Honestly, that's why it's best to not consider doing it all "yourself" with all the trouble of setting up a static IP, configuring hardware, connections, etc... Put it this way - The microsecond you expose your brand new computer box and all its stuffs to public access on "teh Interwebz" you'll get fifty-eleven logs of unauthorized access attempts... Right now, this very second, if you took a look at your own modem's logs you'll see a slew of attempts to connect to it and the resources its connected to, all blocked by your firmware and some software of course. (bots are out there looking for common weaknesses, open ports to exploit, etc.)

Your website may only be one photo and some "Hi Mom" text. Then, next thing you know, the whole box is a zombie, part of some botnet, listening to some IRC somewhere and being slaved out to the black market... :) Who you gonna call?

Don't mess with a complete "Do it yourself" approach. Use a reputable third-party host. Most of the widely publicized ones are pretty good for general users.


Note: Determine what you want people to be able to do on your website, btw. Things like credit card processing, shopping cart services, public file hosting, etc.. These will generally be mentioned somewhere in your hosting agreement. You probably won't need to go beyond a standard agreement for anything you're likely planning on doing, though.


But, all of this is not as hard as it sounds like it is.

This isn't as complex as it all sounds. Really. Nearly everything will be easy to set up if you use a common, standard, website hosting service. The reason there are so very many websites out there is because they're extremely easy to create and the process to get them up on the web is so very streamlined these days.

Hosting services often offer good website creation tools. Not all of them are limited to "template" designs like some stripped down version of Microsoft Frontpage. However, you can use whatever you want. From notepad, notepad++, to some big giant suite of complex stuffs.

The key is to enter into this thing knowing basically what you'd like to do with your website. Get a hosting agreement with a good third-party host and they'll likely bundle the DNS registration services all in one package. You don't have to have anything ready as far as your website is concerned. There will be some generic webpage pushed to it by them that says "Here's a site, site admin hasn't set it up yet, blah, blah, blah. IOW - usually, some announcement page will get autogenerated and put up there by your host.

Once that domain is propagated, the internet will see it and send people there when they type it in. Search engines will snapshot it whenever they get around to it or it gets mentioned somewhere else. Meanwhile, while all this is going on, you can fiddle around with it as much as you want using local files and then upload them to the host and check your handiwork. (Local html/etc editors and creation tools are generally WYSIWYG. So, there won't be a lot of weird surprises when it's live.)
Well from "scratch* would be an index.html file where you just write your html, JS and CSS within that and maybe a handful of other files.

Nobody really does that anymore for anything practical though, it's more just a learning stepping stone to learn the fundamentals. Everyone these days uses frontend frameworks such as Vue, React or Angular. The trade off is significantly more complicated setup and tooling, but in the long run you have a much easier environment to work with.

Hosting? If you're just doing a frontend site, something like Netlify will can host it for free.

For backend I use Digital Ocean but AWS is another very popular choice.

Tools?. VS code is pretty much the industry standard at this point for an editor.

Ontop of VS code I use prettier for formatting and eslint for lining (highlights errors in code)

Your dependencies ontop of that highly depend on what tech you use.

The engine most commonly used nowadays is NodeJS, meaning Javascript servers. I use Vue for the frontend framework, Quasar for a UI library. For the backend I use express, Postgres DB, sequelize ORM (basically how you communicate with your database from within your program)

This is a very surface level overview but that's the general idea. You CAN built a project out of purely HTML css and Javascript if you really want, but there is a massive amount of legwork that using a framework relieves. For example without running thorough node you won't be able to use babel meaning you can't write code using modern practices because it won't be backwards compatible (babel handles making all your code works with older browser versions)
En son Reggaejunkiedrew tarafından düzenlendi; 15 Mar 2022 @ 10:23
I will just add, that you should also learn some PHP and JavaScript, try Bootstrap to make your website more appealing and usable on mobile devices.

SublimeText and Brackets are pretty good code editors with a lot of features.

And when it comes to security, if you are doing it in your PC i think there's nothing to worry about unless you have your ports open and the site it's reachable from the outside.
Text and one image is easy.

<HTML> Here is the text. <img src="filename.jpg"/> </HTML>

In fact, I'm pretty sure a modern browser doesn't even need the HTML tag.
En son Devsman tarafından düzenlendi; 15 Mar 2022 @ 10:43
< >
9 yorumdan 1 ile 9 arası gösteriliyor
Sayfa başına: 1530 50

Gönderilme Tarihi: 15 Mar 2022 @ 5:42
İleti: 9