r/webdev • • 2h ago

Help getting into the depths of web development

Hi all, I’m hoping this is the right subreddit, fairly new to the app for posting.

On visual studio code, I’ve been trying to create a web app for my own personal use similar in purpose to MyFitnessPal, but covering more than just diet tracking. I’m not new to coding in general, I’d say I’m pretty okay at python, but coming into HTML, CSS and JavaScript simultaneously has absolutely blown me away. I’m very confused on where to begin, I’ve learnt some basics for each, but unfortunately every video or article I attempt to use to develop tends to point to “vibe coding” which I’m against doing. I’m not sure how to link my .css, .js and .html files together properly, nor do I know how to do the backend and frontend linking.

Ultimately I’d like to be able to search for a food item in a database, if there is no data, then I’ll add it there and then, and I’ll have pie charts showing me progress for the day/week/month etc.

If I’ve explained this terribly, or it’s a daft idea, do let me know. I’m at a loss.

1 Upvotes

21 comments sorted by

6

u/el_diego 2h ago

Don't use ai to vibe code, instead use it to help teach you and explore these concepts. It can be a very powerful learning tool when you don't let it do everything for you.

2

u/RoguePoet17 2h ago

Useful, thank you!

2

u/el_diego 2h ago

Also, roadmap.sh is quite useful to help plan your learning path

4

u/DMTxxx 2h ago

Man... New devs are going to fucking suck on average now compared to new devs years ago. Too tempting for them to use AI instead of learning fundamentals (not talking about OP)

2

u/el_diego 2h ago

Meh. I think it's like during school when you weren't allowed to use calculators until you understand the fundamentals. Those that follow the same path will excel while those that don't will fall behind.

5

u/jb-1984 1h ago

Don’t let AI do anything FOR you until you understand why and what it is doing. It’ll be much slower, but you’ll find yourself feeling less like you have something that kind of works and no idea how to do it again on your own. Set rules, with Claude for instance, that it interjects a step of asking if you understand before continuing on to do anything.

3

u/ResearcherNaive3320 2h ago

The vibe coding stuff is there because it gets views, not because it's how anyone actually builds a CRUD app. Linking your files is a single <link> tag and a single <script src>, MDN's Getting started with the web covers that in an afternoon and you'll never need a tutorial for it again. Since you already know Python, just run FastAPI or Flask with SQLite behind it and drop Chart.js in the frontend for the pies, no reason to learn Node at the same time as everything else.

3

u/s3rila 1h ago

your migth be interested in roadmap like this

I would personnaly ignore all AI related stuff

3

u/bornmix_dev 1h ago

not a daft idea at all, it's a good first project. since you know python, keep the backend there: fastapi or flask with sqlite is enough. the linking part is simpler than it looks. html pulls in the other two with a link tag for css and a script tag for js. then js talks to python over http: fetch("/api/foods?q=apple") returns json and you put it on the page. build one thing end to end first, search a food and show the result, then add the "not found, add it" form, then charts with chart.js. mdn's "learn web development" covers the html, css and js basics without any ai stuff

2

u/BetaRhoOmega 1h ago

EDIT: When I started writing this reply most of them were telling them to use AI to ask. There are other better replies now, just want to say that up front.


Really disappointed every answer here so far is some flavor of "just ask AI to explain things to you". While fine, this person came to this forum asking for advice probably because they want to hear from humans. I'll try to summarize what basic knowledge you need to know to get a site working.

Web dev can be confusing for someone who didn't start in it. There are many flavors of a "web site/app". It sounds like you have html, css, and js files on your local computer and are editing them in vs code. You're probably aware to actually view them rendered you need to open the html in a browser of your choice. The html will define the look of the page, and will also tell the browser what css/js files are included. In the css and js script tags, there will be a property pointing to the location of that file css/js file, and it can either be a relative/local address (relative to wherever the current html page is on your computer), or it can point to a URL where the file is hosted. This is all well and good for viewing and playing around with static sites, but if you want to take advantage of things like a database for persistent storage, you will need a more complicated setup.

The html/css/js portion of your site is typically referred to as the frontend and this is the code and markdown that a browser actually renders. The backend instead will be some sort of other running program that can run code to do things like talk to a database. I come from the C#/.NET world of dev, but you can absolutely run a Python based backend so you can comfortably write whatever code you need in Python. If you're confused I would start here and explore python backend frameworks.

Backends come in all sorts of flavors so I won't talk universally here, but in .NET core, you can create a .net web application which uses the .net runtime to actually run backend code. You can separately configure a database and run that, and have your backend talk to the database to persist data and read from it. In .NET, when you run your backend, it will also launch a web server (I think it defaults to Kestral) which is a program that knows how to listen over tcp/ip for http requests and can wire up request addresses (relative paths of a url like GET /api/users) to entry points in your code.

So to conclude,

  1. Your html/css/js is your frontend and this markdown/code is actually run in a web browser. To render a local html file in a web browser, you can just put the full path in the browser and browsers are smart enough to find that file on your computer.
  2. If you want to run backend code, you will need a web server running. Running a local (on your computer) web server is simple enough for testing/development, but exposing your site to the public internet requires more infrastructure and for that you should look into hosting solutions. You would need a VM or some other hosting solution and on that computer you would run a public web server.
  3. Your backend could be bundled with this web server or it can be a separate thing. I would look into Python options and see if python backend frameworks handle running a background web server as well. In .NET this is the case - you run your .NET program and it launches a kestral server and runs your backend code. You "link" your frontend to your backend by having your frontend javascript make http requests to the entry points of your backend (see the relative paths I mentioned above).
  4. A database is a separate running program and not directly related to web dev, but your web server can run code to talk to your database.

Getting a modern website up can be quite confusing. Please let me know if you have any questions. And feel free to use this as a starting point talking to claude or whatever. Use it to dig into terms or concepts you're not familiar with.

1

u/sasmariozeld 2h ago

If you dont understand something, ask thr ai for it

That is all, self control

1

u/Strong_Engineering95 1h ago

Linking your files together is pretty straightforward. Best place to find information on this stuff without using AI is Mozilla Docs. This link tells you how to link your external .css stylesheet in your .html doc: https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Styling_the_content

0

u/Clear-Aide1349 1h ago

not sure how someone who's "pretty okay at python" gets stuck on linking files. it's a <link> tag in the head and a <script src> before the closing body tag, two lines you look up once. i doubt every article you've opened is telling you to vibe code that.

1

u/RoguePoet17 57m ago

A lot of things were writing the JavaScript embedded into the html file which threw me off. I figured it out, but I’d imagine our “pretty okays” are different. I can code a game of chess and that’s the best I can do there

0

u/barrel_of_noodles 1h ago

"I'm a pretty decent mechanic, but I'm not sure how to change tires" -- ol big dawg. Sometimes ish just aint add up. Story ain't right. Requires investi-gatoon. Yessir.

This one doesn't add up.

There no way you're doing backend python and are "blown away" by markup, style sheets, and basic dom logic.

Like, if you a fiction writer, right? And you can't understand prepositions? That jus don't make sense.

Come on now. This story funnier than that damn car urkel drove. Smells like cheese too.

1

u/RoguePoet17 1h ago

I said “I’m pretty okay at python” - I can make an in-window game of chess and that’s the extent I can get to with it.

I’m not a developer by trade, I don’t have a trade I’m 18 lol

1

u/BetaRhoOmega 1h ago

Modern web dev is absolutely not intuitive even if you come from a different programming background. There is no guarantee they would know about client/server architecture or how the web works. Don't be a dick

1

u/barrel_of_noodles 43m ago

I'm just saying. If I have a good mechanic that fixed my engine, but then was confounded by how to use a lug wrench ... I have questions.

And you don't think that's a reasonable response?