r/webdev • u/RoguePoet17 • 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.
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.
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,
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.
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.