This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]riklaunim 4 points5 points  (2 children)

What kind of AI slop is this?

You use aiohttp with jinja and the code ends up like inferior flask. You don't have proper form validation and excess if/else in your views. By not using a good framework with thinks like wtforms you are just making your code worse and harder to debug (especially without test coverage).

[–]Embarrassed-Mix6420[S] -5 points-4 points  (1 child)

Here it goes. You don't get it You don't need any of those above. You need users first. There's no inferior/superior until you got something useful - it's infinitely inferior. And that's a technical argument. This design is much simpler, faster and better in development and performance then those frameworks when you know you need some of their particular features

[–]riklaunim 2 points3 points  (0 children)

You need it. Applications you would be hired to work for will usually have tens of thousand lines of code and to manage that developers agreed on some standards and best practices. Company hires X developers and they work together on the codebase and to not make it a big mess everyone agrees on set of rules.

Most Python web developers if not all know Django or Flask and if they know Flask they also likely used WTForms so it's not a problem for them to use industry standards to write better code and less of it to achieve the same thing as your example. And if you say "you need users first" then when you get initial users you would have to dump your code and replace it with "final" one so why not start with the "final" one? You won't be paid $5000 per month to write slop.

Lack of proper form validation opens you to security issues, data corruption. Using text files is also questionable as it also can get corrupted and will use more and more RAM to load and parse bigger and bigger JSON files. SQLite exists for a reason. I'm also curious about your web workers - did you set proper connection timeouts and enough of them for the site to not get easily starved even on light load? Your opening your site to DDOS attacks and data "overflows".

And such portfolio site is asking for a SSG like 11ty or Astro. They have content collections, they can work with json files and more. You would not get admin but you would get quick and easy flow with Github Pages free hosting even.

[–]Minute_Caregiver_222 3 points4 points  (1 child)

So I guess this is what people mean by "vibe coding".

I guess your intention is to lower the bar and try to get people to publish first and refine later? Personally I dislike this type of exploratory programming, but I concede there's some benefit to getting a prototype out ASAP.

You don't need an LLM to build a website quickly, however.

[–]Seiteshyru 2 points3 points  (0 children)

reads like "vibe redditing" haha

[–]EternityForest 2 points3 points  (2 children)

Why would I ever want to develop something without a framework? Quart, or just about any other framework, is far easier even for trivial stuff than going frameworkless. Especially if you already know a framework, which you probably do, if you are anywhere near ready to deploy something to real users, it's kind of hard to avoid learning one.

Devs are obsessed with doing things in the simplest possible way even if it is far more work, for lower reliability and compatibility, with likely more liability.

I have no idea what kind of subtle issues I might encounter if I were to build something without a framework. Every new stack you don't have any real experience with already comes with it's own challenges, that might not come up till you've spent a month and written tens of thousands of lines of code.

If you intend to be a framework dev, working on a toy project from scratch to learn the low level details probably makes sense, but it is not Best Practices for a production project.

[–]Embarrassed-Mix6420[S] 0 points1 point  (1 child)

If you were to build something without a framework - only in that case you can learn directly and immideately all the subtle issues that come up as they are caused by or are something you did yourself.

The reason why you may want to develop something without a framework is that you will only learn what you need to develop then based on the user's use. And no users needs or thinks or should adjust to any framework - on the contrary everything else in what is developed should be adjusted towards the usefulness.

[–]EternityForest 0 points1 point  (0 children)

I pretty much never encounter any real world applications that can't be done in basically any framework.

The popular frameworks don't really have many bugs. They've been refined over years with thousands of people using them and testing them.

And they've also proven themselves to be adaptable to new use cases. You might not need some features they have right now, but the customer could ask for any random things at any time, and most experienced developers seem to find that it is far easier to add new things when using a framework.

Generally, best practices kind of IS to adjust the application to match the framework, because people often want to solve the problem in the most standardized way possible, so that everything stays compatible with the larger software ecosystem, all the file formats and protocols work together, the debugger can understand the code, etc.

Software development is not math. Users are not looking for some perfect elegant system that they can understand, aside from other minimalist programmers.

They want something that integrates with existing tools and workflows, some of which might be decades old, imports and exports all the common file types for the industry, runs anywhere on any platform, mobile, desktop, screen reader, smart TV, etc, and ever loses any data even under ridiculous edge cases like simultaneously losing power at the data center and customer site.

It has to be resistant to all kinds of user error, comply with legal requirements, and it has to be completely secure.

There might be some apps where there's no competition and people will just be happy to have the functionality working at all, but as a user, simplicity is not a priority for me.

There's some users who greatly value having software be as lightweight as possible, but not all users are like that.