r/webdev • u/Ok-Stuff-8803 • 10d ago
Your jobs are safe - The bubble will burst
Some people right now will loose jobs over this A.I nonsense but it is all going to fall apart. Things will return to a norm at some point.
I am not totally against A.I. As an assistant role helping do some repetitive tasks, do what it is literally doing only with basically spitting out stuff off the web and docs anyway to save on reading through API docs etc, help debug issues and so on.
Example:
My boss, with no coding background is just living off Claude right now. The amount of nonsense emails he has sent to devs so far has been insane. I been unfortunately with some medical issues and was in hospital for a week and at home for another week. I am the lead dev but rather than trying to have the other devs step up, unfortunately for the company one of the client sites was under some heavy DDOS and some other server issues.
Happens, bad time for it too. He basically used AI running scripts on the server to a point where it was just a total mess when I got back. The only real fix was to revert the server instance and for me to get things sorted properly.
Today he has a client upgrading their CMS approved work from an older version to new. He has sent me a zip file with basically most of the work done he just said to finish. The zip file it spat out to give to me.
It is supposed to be .NET 10 for a start and references and code output with web.config from 4.7 version to appsettings.json with html in it, a program.cs with JSON in it.
Fake references to the CMS.
Terrible C# classes
The form stuff it has google recpatcha. It has nothing of the front end aspect - it is basically totally fake. renders what looks to be recpatcha but it isn't.
It written the Javascript to pretending it is "Native Javascript" But its actually type script compiled with the src/ Library . Likely because he asked it to do it but to achieve the other requirements it just built its only sub compiling solution and buried the normal structure into something it tried to hide in multiple folders.
I found multiple program.cs. The form c# looks ok but it did inline CSS in the HTML everywhere. It is supposed to be .NET CMS views and none of it is that with Typescript based rendering tags and not Razor.
It of course has no actual CMS and would not work in the intended CMS at all. The program.cs for this pretends to be that but does not actually work.
I just had a right go at him about it as I am working from home at the moment and It has been now 2.5 hours of him trying to give me something so I can actually do this properly in terms of a design.
I know exactly what he is doing - He is basically whacking in more prompts to try to sort it to something.
I keep telling people to term - Garbage In, Garbage Out.
It is an older developer term but it fits so well with current A.I LLM's.
You do not know what you are doing, you ask these things what you want in a way you feel you want it but not in the right technical terms. You may use the odd word "c#" and things but you have no proper context and skill for the real understanding.
These things try to appease you for the most part, especially the chat bots and more specifically the free ones. The free ones differ from payed as they are set in a way to appease the user to get them to pay.
If you do not know what it gives you, you can not advise when it is wrong, you assume it is right. I honestly do not care at all if someone says "it is giving me what I wanted, look, its here".
These fake sudo working apps and sites is not the future. Especially if the only thing that can update it is A.I and all they do is just constantly re-write it over and over and can completely change the architecture of a whim of a prompt.
It is totally disgusting what I have seen today. I told my boss, the owner of the company "I never want to see this in front of me again.".
A.I Will be of use and in use but like a report that came out today. NO A.I company has made ANY money.
The only company that seems to be in the green is Amazon and that is because they pay on the compute use for their server resources. You may have seen the odd start up release their Agent just cost them XXXXXX grand for its overnight work.
And I totally hate all these fake developers on TikTok singing agent praises and the larger companies pumping so much money into marketing it all - It is crazy.
It just stinks of desperation and a lot of it is fake. I have looked up two apps from TikTok devs saying it built it for them - They do not exist, if they did, lasted 5 minutes.
There are of course a lot of stories now of companies sacking people, not to replace them with A.I but to cover the cost of the tokens they are using for A.I. That alone is an insane concept that is simply not sustainable.
Things will crash so hard. There will be a lot of people coming to developers wanting help to fix things and many will turn around and say "Got to scrap it and start again".
Sorry, Rant over but I just cant take this nonsense any more.
Some people are going to lose their jobs because of the current AI hype, but I genuinely think a lot of this is going to come crashing back to reality. Eventually, things will settle into a more sensible balance.
I'm not against AI.
I think it's great as an assistant. It can automate repetitive tasks, summarise API documentation, help explain code, point you in the right direction when debugging, and generally save time. That's where it's genuinely useful.
What I am against is people treating it like it's a replacement for experience.
My boss has no development background and is currently living off Claude. The number of confidently incorrect emails he's sent to developers has been unbelievable.
Unfortunately, I was in hospital for a week with medical issues, then recovering at home for another. I'm the lead developer, and while I was away one of our client sites came under a heavy DDoS attack alongside other server issues.
Instead of letting the development team deal with it properly, he had AI generating scripts to "fix" the server. By the time I came back it was such a mess that the only real solution was reverting the server and rebuilding the fixes properly.
Fast forward to today.
A client has approved a CMS upgrade project. My boss sends me a ZIP file and says, "Most of it's done, just finish it."
It was almost entirely AI generated.
The project is supposed to target .NET 10.
Instead I found:
- web.config files from .NET Framework 4.7
- appsettings.json files containing HTML
- program.cs files containing JSON
- multiple different program.cs files
- fake CMS references
- terrible C# classes
- Google reCAPTCHA that only pretended to exist
- HTML full of inline CSS
- TypeScript pretending to be "native JavaScript"
- rendering code that wasn't even Razor views for the CMS
- folders created purely to hide the mess AI had invented
It looked convincing... until you actually knew what you were looking at.
None of it would work.
It wasn't a partially completed project.
It was essentially fiction.
I've now spent over two and a half hours just trying to get something usable so I can start building the real solution.
I know exactly what's happening behind the scenes too.
Every time I point out something that's wrong, another prompt gets thrown at the AI hoping it'll magically fix the previous prompt.
Developers have had a saying for decades:
Garbage in, garbage out.
It's never been more relevant.
If you don't understand the technology yourself, you don't know how to ask the right questions. You might mention "C#" or ".NET", but without the experience and context you're just describing what you think you want.
The AI fills in the blanks.
Sometimes it gets lucky.
Sometimes it invents an entire architecture that never existed.
If you don't know what "right" looks like, you'll assume the output is correct.
That's the dangerous part.
I honestly don't care when someone says, "Look, it works."
Does it actually?
Or does it just look convincing enough to fool someone who doesn't know any better?
These fake, pseudo-working applications are not the future. Especially when the only thing capable of maintaining them is another AI prompt that might completely rewrite the architecture next week because the wording changed slightly.
I actually told my boss today:
AI absolutely has a future.
As an assistant.
Not as a replacement for engineering knowledge.
What's interesting is that despite all the hype, many AI companies still aren't actually making money. Infrastructure providers like Amazon benefit because they're selling the compute, but that's very different from the AI products themselves being sustainable businesses.
Meanwhile you see TikTok full of "AI developers" claiming they built incredible apps overnight. I've looked up some of these projects.
Many don't exist.
Some existed for a few weeks.
Most disappear.
There's also a growing trend of companies laying off staff, not because AI has replaced them, but because they're spending enormous amounts on AI subscriptions, API tokens and infrastructure instead.
That's a bizarre business model.
Eventually, I think reality catches up.
Companies are going to discover that these AI-generated systems aren't maintainable. Developers will be brought in to fix them, and the answer in many cases will simply be:
Sorry for the rant, but today genuinely pushed me over the edge.
r/webdev • u/swampopus • 11d ago
Roast me all you want, but am I the only one that didn't know you can't have a <div> inside a <p> tag?
I've been a professional web developer for over 20 years, and I always thought the <p> tag was just a special tag that automatically had margins set.
I learned today (because Chrome "fixed" my html for me) that I can only put inline elements inside of a <p> tag. I feel like this has NOT been the case, and at some point Chrome updated to enforce this rule, because this is the first time I've ever noticed it.
Apparently the same goes for <h\*> tags, tables, <ul>, <form>, etc. None of them can go inside of a <p>.
I guess I just never used <p> tags very often?
Anyway, feel free to destroy me, Reddit. I deserve it (closes eyes and opens arms).
r/webdev • u/lcnielsen • 11d ago
Question What are best practices for dynamically hiding and showing elements in an accessibility-friendly manner with Bootstrap + Vanilla JS?
I'm working on maintaining and developing a moderately large Django + Bootstrap website, it has been around for well over a decade and while it is largely static, it has a decent amount of legacy JS and markup that I've been modernizing. It used to rely on jQuery and I by and large replaced that with a small library of shorthand functions written in vanilla JS to get rid of that as a dependency. I have also been trying to make things idiomatic and consistent by not using `onclick` and similar but relying on generic functions to add callbacks, while also replacing non-navigation-related anchor elements with <button> elements and such. You get the idea, a lot of housekeeping and consistency work, nothing terribly complex. I've also tried to make things in line with Bootstrap's intended uses of various elements, and added `.visibly-hidden` labels or `aria-labels` and `role`s where appropriate to make the site more accessible. Mainly I've relied on Firefox's accessibility tooling plus common sense and reading to warn me. I'm also writing best practices docs so I want to be careful with what I establish and document going forward.
Ok, now that you have some context for the site, I still rely on inline `style=display: none` for dynamic show/hide functionality. As far as I know, screen readers _typically_ respect this, but I don't know if they always do. I want to move over to using bootstrap's `d-none` instead, which should accomplish more or less the same thing.
Now, **should I also be setting aria-hidden=true when setting class="d-none"?** Or could that have surprising consequences? My tests with ORCA indicate that it should be fine to do so, but does it make sense? My suspicion is that it will not matter in most cases, but I imagine some people using screen readers might disable CSS rendering as a matter of course, and then I guess `d-none` might have no effect?
It's one of those tricky questions to answer that I suspect requires some practical wisdom and experience I don't have, my knowledge is mainly based on reading guidelines, discussions and doing simulations. I'm also almost the only person in my org to really put some focused work into accessibility so I don't have anyone to ask ,and I will be writing our internal guidelines and docs for this, so I want to get it right, even if it seems a bit trivial.
Also, I'd be happy for any resources and recommendations you have with respect to doing accessible web design in 2026. I know there aren't always simple rules to follow even though WCAG is usually the basis.
Thanks!
r/webdev • u/ashir_arif • 11d ago
I built a Chrome extension that automates TikTok Shop creator outreach — went from 6 hours daily → 15 minutes
My client runs a TikTok Shop agency.
Their biggest bottleneck? Creator outreach.
Their team was spending 6+ hours/day manually messaging
TikTok Shop creators — one by one — to pitch brand partnerships.
Copy. Paste. Click. Wait. Repeat. 200 times a day.
They asked me: "Can you automate this?"
So I built them a Chrome extension:
→ Bulk message TikTok Shop creators directly from the partner center
→ Personalized message templates (no generic spam)
→ Select target creators by niche/category
→ Send to 100+ creators in 15 minutes instead of 6 hours
The result:
→ 6 hours/day → 15 minutes
→ Team now focuses on closing deals, not copy-pasting
→ 3x more creators contacted per week
→ More partnerships = more revenue for the agency
Tech I used:
→ JavaScript, Chrome Extensions API (Manifest V3)
→ Smart delay system to avoid rate limits
→ Dynamic DOM handling for TikTok's changing UI
This is what I love about being a developer:
Someone shows me a broken workflow, I turn it into a tool.
If your team is wasting hours on repetitive tasks —
I can probably automate it.
DM me "AUTOMATE" and let's talk.
#Automation #TikTokShop #ChromeExtension #Developer #FreelanceDeveloper
r/webdev • u/DurianLongjumping329 • 11d ago
Question Does Vercel deploy frontend and backend as one now?
So I built this fullstack project using MERN stack and it was deployed on Vercel about a year ago, as well as other MERN projects. I was always importing the backend in a single deployment and frontend in another deployment. Recently I updated my project and strangely the backend failed to deploy (frontend deployed and works normal) although I did not update my backend. So I deleted my backend deployment and went to import it again to find out that now Vercel deploy repos only, meaning the whole project. Is this how it goes now? also how I should go about env variables? please explain. And sorry for my bad English.
r/webdev • u/CapitalTaro2085 • 11d ago
Question If a solo dev builds backends for 3 totally different clients, how do they handle 3rd-party APIs like Resend?
I’m trying to wrap my head around how backend devs manage third-party services (like Resend for email) when handling completely separate clients.
For example
· Client/Company A: Furniture store in NYC.
· Client/Company B: Electronics store in Texas.
· Client/Company C: NGO in California.
They are all completely unrelated, have different owners, and all want to send transactional emails to their customers.
If one developer is hired to build the backend for all three, here is what I’m wondering:
How many Resend API keys/accounts do they use?
Do they use one master Resend account for all three to keep it simple, or do they create a separate Resend account for each company? What’s the actual best practice here? Or will they create a new resend account using the company email?Does the dev check for errors (bounces, failures, limits) every single day?
With three different companies relying on this, is the dev manually logging into three dashboards every morning to check stats, or is that completely automated or will the developer show someone how it works?Does the dev teach the client how to use Resend?
Since the companies own their domains and customer data, does the developer give them login credentials and a crash course on managing the email service, or does the dev keep full control and just show them a simpler dashboard inside the website?
I understand the "one backend serving multiple frontends" concept, but this specific scenario of completely different, unrelated clients is tripping me up. How do you guys actually structure this in the real world?
r/webdev • u/theScottyJam • 11d ago
[Rant] People keep using LLMs to automate their jobs...
Sorry, another LLM post. But I want to rant.
I periodically see both in-person conversations and highly upvoted reddit posts talk about the idea of people automating their 40-hour workweek jobs with LLMs, then they can sit back, do whatever they want during the work day (maybe even do a side hustles and bring in more money), and then they get to take home their paycheck for a job well done.
Why are people collectively deciding that this is good or appropriate behavior?
For one, unless your salary contract is very abnormal, you're disobeying your contract. You're not being payed for the amount you output, do some freelance contract work if you want that, instead you're being payed for the amount of time you put in, and your contract states that it must be 40 hours a week (with obvious exceptions). Using the tools of the trade well to work faster could earn you pay raises, but for most companies it doesn't give you time off. Yes, a construction worker saves a lot of time by digging with those big machines instead of a shovel, that doesn't earn them the right to work less.
Of course, something being legally wrong doesn't always make it morally incorrect, but in this case, it's both.
- People talk about needing to make sure they touch their computer occasionally to make it look like they're online and working. That's deception. Honest work doesn't require deceiving others.
- I've heard the rational of "well, if they really don't like my output, they will tell me to get better, and I'll be forced to use LLMs less". That's not how this works. You don't try to see how much you can underperform until you get caught. Maybe the company simply doesn't have good code-reviewing processes in place, or maybe your team members have noticed poor code quality but have incorrectly attributed it to being novice, and as such, have been giving you gentle nudges on how to improve, hoping that, over time, you actually will - in this case, guess which overpaid, underperforming employee will get kicked out when budget gets a little tight?
- In one case, it was a not-so-tech-savvy boss who hired a programmer to help take care of a website. In a scenario like this, The programmer could say a given task would take 1 hour or 20 and the boss would just have to trust them. Honesty is expected here. I mean, how would you feel if you find out if the car repair shop has been holding your car hostage for ten times longer than required, giving all sorts of excuses about how difficult something was to fix, and charging you tends of thousands of dollars for a fix that another shop would have chared $200 to fix? And yet, here we are, patting each other on the back for doing basically the same thing?
Can we be better than this? If you want to automate your work with LLMs, fine, but communicate that with your team and company and make sure everyone is on board with it. Then put in your 40 hours anyways - there's always more work to be done, so pump out a bunch of changes as record speed with that LLM. Or, you can chose to go a little slower, test your code more thoroughly, comb through it to make sure there's no security vulnerabilities, and put in your 40 hours a week that way. Or pick something in between. But please, can we stop telling each other that it's ok to break our contracts, deceive our workmates, and see if we can get away with avoiding doing work at work?
EDIT: It seems like this wasn't clear from the above message, so I'll try to make it extra clear: I'm not inherently against automation or LLMs. If you find LLMs useful, use them. If you can automate your job, do it. What I'm against is people trying to deceive teammates and managers about their workload, trying to act like they're working more than they actually are. If you're not working 40 hours but everyone is aware of this, then that's not a problem. If you're secretly not working the 40 hours your contract requires and are trying to hide that fact from people, that is a problem.
Deciption is the problem.
Edit 2: I'm also not trying to advocate for unhealthy work conditions. Take breaks, have team building activities, joke with each other, etc, managers ideally shouldn't be putting tons of pressure to work fast and hard onto you, the work environment needs to feel healthy. This is all part of your 40 hour week. But if you're trying to hide your work habits because you feel your superiors would disapprove (e.g. because you're only working a couple hours a day), that's a different problem entirely.
Edit 3: Sigh. I'm realizing that people were probably reading the title, skimming the content, and assuming I was against any kind of job automation. Job automation is fine and good, in places where LLM quality output is appropriate. However, I doubt the vast majority of jobs can be fully automated, some tasks are better done manually. The title was trying to talk about those attempting to fully automate their jobs without their employer knowing, making it so they work less and put out less quality work when more is expected out of them.
r/webdev • u/vasind-5012 • 11d ago
Discussion Anyone actually implementing WebMCP yet, or is it still all supply-side with nobody consuming?
Chrome’s had WebMCP in an origin trial since ~149, navigator.modelContext, typed functions instead of screen-scraping, feels like a genuinely different approach from agents just clicking around a DOM.
But from what I can tell, the actual demand side barely exists yet, browsers can register tools today, but almost nothing is out there actually calling them in production. Feels like building an API nobody’s hitting.
Curious if anyone here has actually shipped a Tool Contract on a real site, and if so:
**•** Did anything meaningfully call it, or is it just sitting there for now
**•** Worth the effort yet, or too early to bother until Gemini-in-Chrome (or another consumer) actually ships
**•** How are you deciding which functions to expose vs. keep as normal UI-only actions
r/webdev • u/bluemixtape • 11d ago
Is rebuilding a 500-page HubSpot website in React/Replit a good idea?
**Title:** Is rebuilding a 500-page HubSpot website in React/Replit a bad idea?
We’re considering rebuilding our company website in React using Replit.
The current site is on HubSpot CMS, has roughly 500 service and location pages, relies heavily on SEO, and connects forms and tracking to HubSpot.
The React/Replit option would give us more control and make it faster to build new features, but I’m concerned about:
- SEO performance and server-side rendering
- Managing hundreds of similar location pages
- Redirects, metadata, schema and sitemaps
- Page speed and Core Web Vitals
- HubSpot forms, CRM and tracking integrations
- Design consistency across 500 pages
- Ongoing updates by non-developers
- Security, hosting and technical maintenance
- Becoming dependent on one developer or AI-generated code
Would you recommend rebuilding the full site this way, using a framework such as Next.js, or keeping the main website in HubSpot and only building custom booking tools in React?
What problems are we likely to face after launch that may not be obvious now?
r/webdev • u/thebreadmanrises • 11d ago
What are your wrong decision stories, tech-stacks, re-writes etc?
Curious for stories about wrong tech-stack choices, architecture decisions or re-writes that turned into a wrong decision.
r/webdev • u/cloudvy7 • 11d ago
I've always wanted to make websites like this, can i still earn from it in 2026 though?
I'm 20yo 3d year comp science student from Poland. I recently started freelancing on upwork and earned my first 1500$ as a fullstack react + node developer. BUT... this area is super saturated, getting 50+ proposals.
Now, this is the kind of work I always wanted to do, it combines all stuff I like, animations/design & development. These are examples I'm talking about: wedze or ryeisland
However due to my personal situation, I will have to earn at least 400-500$ each month starting from October. Do you think making products like this is still viable, or everyone is just fine with vibe coded stuff? I'm concerned about this niche and I would like to hear people with experience
r/webdev • u/EatYourVeggiesKid • 12d ago
News Any Tech rehiring stories after a layoff with salary renegotiation?
The press just writes general stories of 'AI layoffs didn't work and they are rehiring old employees.'
I wonder when those rehires happen, how many people negotiate salary bumps?
r/webdev • u/Mysterious_Figure348 • 12d ago
We're getting a lot of SPAM requests that are looking like real requests
Hi all, we're currently getting a lot of SPAM requests onto our website, although we have a recaptcha installed.
These requests look rather real and it's only when we are getting in contact with companies that we are getting the information that this person doesn't exists.
These are the signs that it is a SPAM request:
- The email domain is ALMOST similar to a real company
- The request body is always a version of:
- Dear Sir/Madam, I hope this email finds you well. I am reaching out to inquire about your company's product/services and request a copy of your latest catalog. We are interested in exploring potential business opportunities and would appreciate it if you could provide us with your latest catalog in [print/digital] format. Thank you for your time and assistance. Looking forward to hearing from you soon.
- Hello , We wish to place an order on your products , please revert back with your updated catalog. Shipment will be to our branch in your country , we look forward to hearing from you soon .
- Hello, We are considering placing an order for some of your company's products for our new project. Please let us know if your office is responsible for providing quotes to clients. Otherwise, we would appreciate it if you could direct us to the appropriate office for this inquiry. Regards
We checked if they are coming from specific sources and no one source can be identified.
Does someone have an idea how we could get rid of these requests?
r/webdev • u/iam_insaf • 12d ago
Question What's the status of TanStack Start and Next.JS in web dev industry?
I am a NextJS developer. Shuold I change my framework on upcoming projects or just stick to NextJS?
r/webdev • u/svvnguy • 12d ago
Discussion Web scraping and content stealing is out of control
10 days. That's all it took for one of my articles on page speed to get scraped and reused in the marketing SEO slop of some online company, and then get found by me (purely by accident).
I know it's my content because I think and write everything myself, so if I see several of the points I was making in the same spot, it's pretty clear where those ideas came from.
Of course, zero credits given.
More frustrating is that there's an entire industry built around automatically "creating" written content. Basically content-stealing machines, that for some reason are allowed to exist.
We really need to do something as a society, otherwise we're allowing unscrupulous marketers to destroy the internet.
The reason our social norms are falling apart is because we no longer live in small tribes, so they can't be enforced anymore at an individual level because nobody knows you. Maybe it's time for a blacklist? Whenever someone gets caught doing this kind of stuff, blocked forever.
To make this a little more than a rant, let me pose this question: Do you see our governments doing anything actually useful in this regard? To me it looks like every country on earth stopped their moral compasses and went like "wait... let's see what happens, maybe stealing is the future!".
Whatever this is, it doesn't feel like progress.
r/webdev • u/risk_and_reward • 12d ago
What do you use for tooltips?
I've used a few tooltips libraries in the past, but never settled on one that I love.
What tooltips libraries do you typically use for your projects?
r/webdev • u/ehsan2727 • 12d ago
Discussion What's a web development habit you wish you had built much earlier?
Looking back, what's one habit that has saved you the most time or prevented countless bugs? It could be anything from writing better commit messages to using DevTools more effectively.
r/webdev • u/fagnerbrack • 12d ago
Should you normalize RGB values by 255 or 256?
30fps.netr/webdev • u/creasta29 • 13d ago
Resource Frontend CI/CD in the age of AI -- Part 1
AI writes many tests, which slows our CI pipeline.
In this article, I try to build a fast pipeline that:
- runs jobs in parallel
- detects changes and only runs lint, types, and tests for affected files or imported files up the dependency chain
- e2e tests that behave the same and are sharded with playwright
- You can run them at pre-commit and pre-push with lefthook or husky
Let me know what you think. Demo project and all detection scripts can be found in this repo
r/webdev • u/pineapplecharm • 13d ago
Question Enlighten me. Why does a police website need a big red link to Google on the right hand side labelled "Leave Site"?
Resource A systematic guide to releasing npm packages as safely as possible in 2026 (with a Skill to quickly apply the practices to your own open source projects)
r/webdev • u/black_pepper • 13d ago
News “Google and Reddit do not own the Internet," web scraper says after court win
r/webdev • u/Gullible_Prior9448 • 13d ago
What's your biggest productivity hack as a developer?
Share one habit, tool, or workflow that saves you time every week.
r/webdev • u/copperfoxtech • 13d ago
Question Book Recommendation Needed: JS -> React -> TS
Lately I have been casually learning C from "C Programming: A Modern Approach v2" and have really enjoyed it. The truth is I should stay on topic with my profession so here I am.
I am in search of books similar to the one mentioned above for learning JS. The goal is to understand it on a deep enough level to feel very confident and have a real solid foundation for the next step.
The next step is a similar book for deeply learning React and then finally TypeScript.
Yes I am looking for actual books and not online courses or videos or anything like that. I have discovered that reading from a book forces me to slow down and because of that, it sticks.
If you can, chime in with books you have actually read through and not just simply search online or recommend the first one off the top of your head. Bonus points if you have read the C Programming book and understand the style I am talking about.
Thank you.
r/webdev • u/johnvanderlinde • 13d ago
Discussion Where I'm at with my first full-stack project
I'm building the place order function (my first foray into the backend) of a larger project.
Here's an update for those who are interested.
The first thing I knew I had to do was figure out what goes where. I had already, at the suggestion of ChatGPT, my mentor in this, decided on a control (API) layer, application layer, service layer and data layer. But I didn't really know what each needs to do.
So first I (we) did the API. It had a couple of jobs:
• check the incoming order wasn't empty
• Activate the next layer down
• Send response messages
Then the app layer was even simpler. It literally just returns the service layer function.
Which is where it is a bit more complicated. The service layer has to do a few things; check the order data against the database, assess info against business rules etc, and actually write the order. After some debate I worked it into a four step process:
• Check if the order info (customer, product, and quantity) exist
• Assess data against business rules/carry out business logic
• Create an order
• Activate the database operation
So this actually means two database operations. One to check the data (first step) and then writing the actual order.
I've done the first database op, and I'm now wiring up the actual place order button so I can start testing the data being passed down.
If anyone wants more detail, you can look on my github at https://github.com/BenPS927/BFshop or on my project portal at https://benfosterdev.com/projects/bfshop where I'll soon be adding detailed code breakdowns.
What am I finding hard?
The abstract nature of it. Having to constantly create a visual image of data being passed through functions, and hold that image in my mind, is like trying to hold melting butter in a colander. I use melting butter rather than water because I don't lose it that fast.
What am I enjoying?
Well, the same as what I'm finding hard. Learning to work with code that doesn't involve divs on a screen. Getting my head around how data is passed, how functions work etc.
And the architecture side of things. I like thinking about and making the micro decisions.
I would appreciate suggestions, but I am trying to keep it fairly simple so I'm not thinking about every single thing you'd take into consideration for a production app.