r/webdev • u/RoguePoet17 • 3d 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.
8
u/el_diego 3d 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/Human_Experience0810 2d ago
It's not a daft idea at all. I'd suggest starting small rather than trying to learn everything at once. First, get comfortable with HTML for structure, CSS for styling, and JavaScript for interactions. You can link them with a
<link>tag for CSS and a<script>tag for JavaScript. Once you understand how the frontend works, learn a backend framework like Flask since you already know Python. Flask can handle database searches, saving new food items, and sending data to your frontend. I'd build one feature at a time, starting with adding and searching food items, then move on to charts and progress tracking. You don't need a big framework or AI to get started. Building it yourself is a great way to learn.10
u/jb-1984 3d 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.
4
u/s3rila 3d ago
your migth be interested in roadmap like this
I would personnaly ignore all AI related stuff
4
u/Ahmed_Hisham0 2d ago
the reason it feels like a wall is that you're learning three languages at once and they don't overlap the way python does.
the order that makes it click, and it's boring:
html first, properly. not tags, but structure and what a form actually submits. a day.
then css with one page, no framework, no tailwind. flexbox, then grid, then media queries. a week of actually building the page you have in your head.
then javascript alone, in the console, before it ever touches the dom. variables, arrays, objects, functions, fetch. this is where python knowledge helps, and where most people skip ahead and regret it.
only then do you put them together, and the first thing to build is a page that reads from an api and renders a list. it's the whole job in miniature.
and use the same small project throughout instead of following three different tutorials. following along feels productive and teaches almost nothing, which is why the "blown away" feeling doesn't go away when you watch more videos.
3
u/ResearcherNaive3320 3d 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/bornmix_dev 3d 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 3d 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 3d ago
If you dont understand something, ask thr ai for it
That is all, self control
1
u/Strong_Engineering95 3d 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
1
u/Gullible_Subject5220 3d ago
three files blew you away, huh
1
u/Aggressive_Sound2536 3d ago
every tutorial is vibe coding now
1
u/funcyChaos 3d ago
It's crazy that it's come to this x.x
1
u/PippaKelly62 3d ago
Since you already know python, flask would be the easiest way to get a backend going. For the front end, mdn’s learn web development section is free and shows exactly how the html, css, and js files link together, with a link tag for the stylesheet and a script tag for the javascript. Miguel Grinberg’s flask mega tutorial is a good one for connecting a python backend to a database and a web page. Later on, chart.js will give you the pie charts, and open food facts has a free food database you can search before adding your own entries.
1
u/Saver411 2d ago
Since you already know Python, lean on it. Don't try to build a slick single-page JS app right out of the gate. Use Python to serve basic HTML templates and handle the data logic first. Treat the frontend like dumb forms before touching modern JavaScript or obsessing over CSS layout. It keeps you from debugging state, styling, and server logic all at the same time.
1
u/Last_Pay8887 2d ago
Since you already know Python, spin up a tiny Flask or FastAPI backend with SQLite first
1
u/Pure_External955 2d ago
Since you already know Python, just use Flask or FastAPI to serve your HTML/CSS/JS templates directly and handle your database
1
u/Mammoth-Creme-7019 2d ago
Since you already know Python, start with a simple Flask or FastAPI backend and SQLite for the food DB, wire a basic HTML/CSS/JS page with
fetch()calls, and add charts later1
u/Large-Bell3409 2d ago
Use Python (Flask or FastAPI + SQLite) for your food DB and API endpoints, link
<link rel="stylesheet">and<script>in your HTML, and usefetch()to talk to your backend1
u/greta_emery_dev 2d ago
The confusion comes from treating them as separate languages rather than layers of one system. HTML is the structure, CSS is the look, and JS is the behavior.
For linking them: use <link rel="stylesheet" href="style.css"> in your HTML head and <script src="app.js"></script> right before </body>. This keeps the DOM ready for when your scripts run.
Since you’re coming from Python, think of the DOM as a document object tree. When you need to update that chart, you don't just 'link' the data; you use JS to select the element and mutate its attributes or innerHTML. For state management later, start with simple local variables. If you find yourself passing props down ten levels, look at React context or Zustand, but don't overengineer it now.
For the food database part, you'll eventually need a backend. Since you know Python, Flask or FastAPI are lightweight ways to serve JSON endpoints that your JS frontend can fetch().
1
u/Medium-Debate-258 2d ago
Not a daft idea at all, it's a great project to learn with.
To link your files, keep them in one folder. In your HTML, put
<link rel="stylesheet" href="style.css">inside the head, and<script src="app.js"></script>just before the closing body tag.For the backend, since you know Python, try Flask. Your JavaScript can talk to it using
fetch(), and Flask can read and write to a SQLite database for your food items. For the pie charts, Chart.js is easy to start with.My advice is to go in small steps: HTML page first, then CSS, then one JS button, then connect the backend. No vibe coding needed. Good luck!
1
u/Ronin-s_Spirit 1d ago
This sounds like you need guidance instead of a single post reply. I can't promise you anything mind blowing (I'm mostly bad at visual design, I prefer basic looks) but I can explain how stuff works.
0
u/Clear-Aide1349 3d 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/barrel_of_noodles 3d 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.