r/AskComputerScience • • Jun 15 '20

What is the process of coding a website from scratch?

I am a rising senior in computer science and I am trying to build a website to help my parents and build my resume. They use trip advisor to rent out one of their properties, and wanted to stop paying so much every year to keep it on there. Can someone please explain what the process is and give me a summary of what steps I need to take from writing the html code to actually launching the website. I do not have much experience with creating websites, so any information helps. Thanks!

32 Upvotes

19 comments sorted by

20

u/The_Amp_Walrus Jun 15 '20

It depends if it's a static website that is HTML that never changes, or a "dynamic" website with user input and data that changes over time

For a static website

  • write html code on computer

  • put html on a server somewhere, with a program (eg. NGINX) that serves the html to requesting users who ask for the HTML via HTTP request on port 80 (HTTP) or 443 (HTTPS)

  • set up DNS so that your server name is www.mycoolwebsite.com instead of 11.232.12.3 (more here)

You could use something like Netlify to host your website, or AWS S3 if it's just a static site. Honestly though unless it's a learning project for you just use Squarespace or Webflow.

For a dynamic website you need an application that knows which HTML to serve dynamically and how to update the database. I build mine in Python using Django. A PHP example would be with Laravel or even WordPress. This web app is typically backed by a database like Postgres, MySQL or SQLite. You need a server machine to run the application. It's a little more complicated to create and deploy one of these. If you're interested I can link you to some Django-related materials.

3

u/zhubiii Jun 16 '20

if OP dosent ask, I would like to see those django references please!

8

u/The_Amp_Walrus Jun 16 '20

OP asked over DM, this is what I linked:

  • There's the Django tutorial (100% do this first) here

  • People seem to love Corey Schafer's videos here

  • I wrote a guide on deploying Django which might be helpful later here

1

u/zhubiii Jun 16 '20

thanks much!

1

u/TheMonsterDownUnder Jun 16 '20

My main man, .net is always left behind :(

14

u/lgastako Jun 15 '20

I'm reminded of the Carl Sagan quote, "If you wish to make an apple pie from scratch, you must first invent the universe."

"From scratch" has quite a wide range of possible interpretations. But in this particular case I don't think you should be thinking about "from scratch" but rather "what solution will work out best for my parents in the long run" which likely means "will provide the most bang for the buck and be the easiest to maintain" in which case the best answer is almost certainly something pretty close to "just set up a wordpress site" which is something for which you can google and find plenty of step-by-step guides.

4

u/abw Jun 16 '20

I do not have much experience with creating websites, so any information helps.

I would highly recommend you start off building a "point and click" web site from someone like https://www.squarespace.com/ or https://www.wix.com/ (disclaimer: I haven't used either of these companies commercially as I build my sites from scratch, but I've played around with their site builders and have been impressed by them).

That will give you a feel for what the basic components of a web site are and how they fit together. As you gain confidence you can start digging around in the source code to get a better understanding of how it's implemented behind the scenes.

7

u/shadeofmyheart Jun 16 '20

A very good question to ask here is Trip Advisor providing some sort of traffic to the page displaying their property.

You can always make a page somewhere else, but how will people find it? So if they are using TripAdvisor for lead generation, they may need to think about their marketing strategy as well as the website.

Also, what kind of features do they need? Do they need a visitor to be able to book on that site with a calendar? Or is it more of a brochure that leads to an email? The former requires either some additional library or some custom code, the latter less so.

2

u/saintshing Jun 16 '20 edited Jun 16 '20

Depends on what you are trying to do, are you trying to become a web developer or you just want to build a website for your parents?

If you want to become a web developer, you need to learn front end: html, css, javascript, javascript framework(react/angular/vue), backend(node, express), database, etc. Check out https://www.w3schools.com/whatis/
https://academind.com/learn/web-dev/web-development-overview/
A good course would be https://fullstackopen.com/ (you need to learn html, css javascript somewhere else tho, you can look up traversy media or net ninja on youtube or the tutorials on https://www.qhmit.com/ and w3schools) If you want to learn php, check out https://laracasts.com/

If you just want to set up a website in the easiest way, you can use wordpress. Google to find other similar sites to see what features they have. Find the wordpress plugins that provide those functions(booking, payment, google map, etc) e.g. https://wordpress.org/plugins/motopress-hotel-booking-lite/#description
and find a theme that you like.

You may also need to learn SEO(search engine optimisation) to promote your website. Use google ads keyword planner to find the right keywords, set up an ad campaign on social media.

-2

u/[deleted] Jun 16 '20

What is it with the "rising senior" crap I see everywhere now? It sounds like weird copy and paste and makes this thing seem like some kind of weird scam though I don't see how it would be. This doesn't seem to be a homework problem and it would make a lousy high school report.

4

u/jeffbell Jun 16 '20

"Rising Senior" is common around this time of year when it's ambiguous whether a student is finishing their senior year, or entering their senior year. It means the latter.

2

u/tobiasvl Jun 16 '20

I'm not American, but doesn't the change from sophomore to senior happen over the summer break? Surely a "rising senior" on this end of summer could simply be called a sophomore? Where's the ambiguity?

1

u/PM_ME_YOUR_REPO Jun 16 '20

Americans go Freshman, Sophomore, Junior, Senior, but that aside, the answer to your question is "it's convention". Just like how you guys say "washing up liquid" which is quite a bit wordier than "dish soap", different cultures just do things certain ways.

1

u/jeffbell Jun 16 '20

Americans go {Freshman, Sophomore, Junior, Senior}.

Do you become a Senior on the last day of school in June? Or 8:00 AM on the first day of class in September?

"Rising Senior" keeps it (slightly) clearer.

I do agree with the comments that the term is sometimes used to emphasize the status of "Being a Senior" rather than academic progress. I would more likely say "I'm about to begin my Senior year" or I've just finished my Junior year", but I was mainly trying to explain it to someone who said that they didn't understand the phrase.

4

u/[deleted] Jun 16 '20

Makes sense, but damn it sounds belligerently fake if you aren't aware of that convention.

1

u/The_Amp_Walrus Jun 16 '20

code wars 3: rise of the senior

rising senior hidden dragon

senior rising

1

u/jeffbell Jun 16 '20

I've had 12 years of getting used to it.

"Bobby is a rising first grader..."

1

u/[deleted] Jun 16 '20

Yeah, even knowing what it means better, that phrase still makes me instantly feel the need to find the nearest conversational exit.

1

u/ironymouse Jun 16 '20

I'm a rising person, by which I mean it's my bed time now.