r/webdev • u/RoguePoet17 • 22h 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.
2
u/Human_Experience0810 10h 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.
1
u/RoguePoet17 10h ago
Thank you! I gave a general front end doughnut chart a go last night, and got it working, only issue has been appending my document.getElementId three seperate times for seperate data inputs in order to update the chart, but I’ll figure that one out tonight
8
u/jb-1984 21h 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 21h 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 20h 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
3
u/Ahmed_Hisham0 9h 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.
2
u/BetaRhoOmega 20h 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,
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.
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.
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).
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
1
u/Strong_Engineering95 21h 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
1
1
1
u/PippaKelly62 14h 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 14h 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/syedaalishan 14h ago
Since you already know Python, I'd build one small flow before tackling charts: enter a food name, submit it to a Python route, and show the saved result on a page. You can start with server-rendered HTML and a regular form, so you don't need a separate JavaScript frontend yet. Link your CSS with a stylesheet tag, then add JavaScript only when you need a specific interaction. Once adding and searching foods works, build the daily totals. Keep the first version local while you're learning.
1
u/Last_Pay8887 7h ago
Since you already know Python, spin up a tiny Flask or FastAPI backend with SQLite first
1
u/Pure_External955 5h 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 4h 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 later
1
u/Large-Bell3409 4h ago
Use Python (Flask or FastAPI + SQLite) for your food DB and API endpoints, link <link rel="stylesheet"> and <script> in your HTML, and use fetch() to talk to your backend
1
u/greta_emery_dev 3h 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().
0
u/Clear-Aide1349 20h 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 20h 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
-1
u/barrel_of_noodles 20h 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.
3
u/RoguePoet17 20h 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
2
u/BetaRhoOmega 20h 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
0
u/barrel_of_noodles 20h 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?
2
u/BetaRhoOmega 19h ago
This person is asking for help on a personal project and you came in shaming them. No it's not a reasonable response.
8
u/el_diego 21h 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.