Frameworkless Movement
frameworklessmovement.org
frameworklessmovement.org
Now, if I wanted to, I could build my own application without Django or Rails, as long as I had something to accept incoming HTTP requests, make responses, and a library to make DB calls.
But I wouldn't have gotten to this point had I not learned Django and Rails first.
I think using a framework turns many "unknown unknowns" into "known unknowns".
I can read my framework's documentation and learn it has built in logging, so logging is something I need to think about when building a web app. It lets you filter sensitive data from logs, so that's something I need to think about.
This is why I was building a type of application I didn't build before, I would look for a framework I could use, or something like it.
I'd use go kit for building a microservice for example. I don't get many of the concepts involved with building a microservice (circuit breakers, service discovery, etc) and hopefully the framework would help me learn them.
You would because I did. I started coding CGI scripts in C in 1994 then discovered Perl's CGI.pm
Then I handcoded SQL queries and discovered marshalling / unmarshalling / SQL injections etc. Then started using some library to spare me the issues.
Repeat for any piece of the stack.
Am I going back to frameworkless? No, because I would end up without customers. "No sir, it takes 6 months, not one, because I have to hand code everything or use my own buggy library instead of X which a zillion other developers use."
Of course, frameworks are also incomplete and buggy.
Of course, they could plug existing libraries into their frameworkless application, which seems like a much more reliable approach.
I liked doing it this way round because when I did Finally use a framework I had a pretty good idea of how it was all put together and also really appreciated the elegance and design choices they had made.
I’m not sure I would have appreciated it so much if I had started out with the framework and not learned all the things it takes to build one under the hood.
I'm no longer find MVC approach sufficient for all projects and move on to Javascript, Swift, etc, finally settled on Go just before it turns 10th. I'm really appreciate I could build without web framework today.
Laravel has a "Model" abstraction, but its models are Active Record objects, i.e. database row proxies. The M in MVC is not supposed to be in 1:1 correspondence with your database tables. Laravel's Model class is poorly named.
The closest Laravel would come to being MVC would be by adding your business logic to service classes and adding them to Laravel's service container - an approach that the Laravel documentation mentions as a possibility but doesn't make a big deal of. Indeed, the documentation largely encourages the use of controllers to contain business logic.
(Real) Model -> fetch -> UI Model -> build -> View
^
|
v
build/modify
^
|
v
Controller
The UI Model serves as a simplified version of the "real" model that can also use the data structures/objects used by the technology used in the View.In "original" MVC (outside of the use of this term in webdev), the "M" in MVC absolutely did refer to a 1:1 correspondence with the data at the core of the application. This works too, but when using various UI toolkits, adding the UI Model can make things feel a bit more natural.
Also, PHP is probably not a terrible language or that's subjective at a minimum :)
Well, that's how they could be structured. There are many other ways. MVC is only one option among many, and it has its drawbacks too.
Your application doesn't need logging until you have a problem that is solved by logging. It's possible that you never have such a problem. If that's so, then building a logging subsystem is a waste of time.
> I don't get many of the concepts involved with building a microservice (circuit breakers, service discovery, etc)
This is because you haven't really learned how to think about solving a problem with code, but have instead learned to apply a framework to any problem. If you try solving the actual problem you have first, which involves really understanding it, then you'll probably find that the framework solution is vastly overspecced for your particular situation. Because the framework has to cater for a much wider range of situations than yours. If you write your own solution to the problem, it will (almost by definition, and assuming you write decent code) be a smaller, tighter, faster and more appropriate solution than the framework solution.
It will be more appropriate for right now. Whether it's smaller, tighter, or faster (or any other qualifier) is dependent on the code quality.
As the manifesto says, using a framework involves tradeoffs. One of those is trading that direct current appropriateness for future expandability, reliability (bug repairs etc) and other advantages of using someone else's code that covers more use cases than your specific, current needs.
At least with homebew code, you can adapt it however you like. With framework code you're at the mercy of the maintainers, or you have to spend massively more effort adapting it to your needs, with the risk that a future update to the framework could break your code.
With homebrew code you end up with a few really old developers whom you pay a lot because no one else exists in the universe to support your system. Everybody else comes and leaves while never saying that, to be fair - you really need to rethink your approach to software development.
Your application doesn’t need logging until _right before_ you have a problem that is solved by logging.
I don’t use frameworks these days. I’m glad I was exposed to their ideas in the past. I’m glad that exposure shaped my current approach. A framework is one of the ways that experienced developers can pass their knowledge on to less experienced ones.
This. If you could hire a team of brilliant developers you wouldn't need a framework.
Frameworks capture the design requirements of brilliant developers...but they're not your developers and they may not be your design requirements. The trick is to know when the framework's design requirements differ from yours so much that it's a better business decision to roll your own code than to change your requirements to match the framework. I kinda think far too many businesses change their requirements for reasons of short-term MVP and then paint themselves into a framework corner.
When using a framework (or a library) it can come with a lot of options you don’t need and can bloat your app.
For example, we’ve made parsers that where waayyyy faster than what existed. But only because we knew exactly what was coming in and didn’t have to test a whole bunch of edge cases a standard library have to test.
Same for a framework. To be useful it has to come with a lot of possibility that you probably won’t use for your special case, but that slows down the whole.
But life is too short to always start at first-principles and rebuild civilization brick by brick.
Frameworks have three things: the code artifact: a Rails or a React, then the reified knowledge it abstracts: like how to structure a web application, and the community and their cultural knowledge.
Sometimes it makes sense to forego all of them and make it your own - especially when that layer of abstraction is core to the value you're creating and you want complete creative control over it. But often times they can be the difference between business success and failure.
Only if you know what you are doing.
I have read smart people admit that at some point they realized that the compiler had outsmarted their clever inline assembly hacks and I fully expect this to be true in a frameworks vs homebuilt scenario as well.
Also: The number of people who knows my or your brilliant solution will always be dwarfed by the number of people who knows Rails, Django, Laravel or Spring, meaning as soon as you need to hire you are at a significant disadvantage.
(I've seen brilliant people running frameworkless also, but I wouldn't necessarily recommend it for more ordinary people like me ;-)
But the framework maintainers aren't looking at your specific situation. I mean sure, if you're writing yet another CRUD system for yet another SaaS product, then fine, use Rails, that's what it was designed for.
But if you're not building Basecamp, then your application is eventually going to want to do something that Rails wasn't intended to do. And then you're going to have to write your own code. And if you're not confident that you can write that code, because you don't think you can write good enough code for this... then... why are you doing this?
I don't think that's the actual message. I think the real message is more like "framework maintainers have significantly more total time invested than you do..." (especially when you add up over all the maintainers and bug reporters over the entire life of the framework) "...so they are more likely to have correctly handled some particular rare bug or special case than if you try to do it all yourself."
As had been pointed out before: they don't have to be much smarter, they just have to have more time at hand or be more people, get more bug reports, get more improvement ideas etc.
> But the framework maintainers aren't looking at your specific situation. I mean sure, if you're writing yet another CRUD system for yet another SaaS product, then fine, use Rails, that's what it was designed for.
Let me assure you that I am not using Rails for my hypothetical real time radar tracking system and I'm not recommending anyone else using it for anything either except what it is made for ;-)
That said I think many people will find that their use cases aren't that special.
> But if you're not building Basecamp, then your application is eventually going to want to do something that Rails wasn't intended to do. And then you're going to have to write your own code.
Did you ever try Rails?
> And if you're not confident that you can write that code, because you don't think you can write good enough code for this... then... why are you doing this?
This is a very uncharitable interpretation IMO.
Maybe we just have better things to do than reinventing the wheel again right now..?
(To be clear: sometimes the wheel needs to be reinvented, but every single time.)
> Well, that's how they could be structured. There are many other ways. MVC is only one option among many, and it has its drawbacks too.
IIS on Win 2k-ish and PHP were a sweet balance. Save file, reload page, file is seen with directives executed. Very much like JS now, sans live reloading. Rails and Django and Nuke and Drupal etc. were a good step toward including a lot of good patterns beyond the point of the required “common.php” getting too long and also CI reports became fancy with common frameworks out of the box, and other operational benefits.
Everyone can build their functionality in any way they want to, but the trade off is that anyone else who works on your code then has to figure out how you structured it, documented it and make sense of everything else along the way. It’s a huge headache if anyone other than you is ever going to work on your code.
But that also only works if there is a clearly dominant framework in your language (like Rails and Django).
In languages that are more built for the web out of the box like PHP, JS and Go most frameworks are just putting the pieces together in different ways and that leads to a lack of a dominant structure.
Anybody can strip out parts to make something fast. There’s nothing special or magical about that.
Assembling a cohesive approach to solving a repetitive problem that thousands of other people can get behind is significantly more challenging. It’s an exercise in optimizing education rather than optimizing performance.
Good frameworks are hard. Bad frameworks are numerous and easy. Look for languages with a single dominant framework.
Yes, people should learn the basics - plain Python or Ruby or vanilla JS or SQL - before moving onto frameworks. But having done that, sometimes you just need to get shit done without reinventing wheels, and sometimes you need to know when the precision instrument beats the pile driver. Frameworks are just one tool in the toolbox. Refusing to use that tool when it's warranted is just as bad as always using that tool because you don't know how to use the others.
From the manifesto: "We don't hate frameworks, nor we will ever create campaigns against frameworks, but we perceive the misuse of frameworks as a lack of knowledge regarding technical debt and we acknowledge the availability of alternatives to frameworks...The purpose of this Manifesto is to have valuable conversations about the movement. We firmly believe that to be useful this manifesto should be modified during the time as a result of the conversations that our community will have."
What is absolutist here? To me, this seems like the most even-handed, least absolutist manifesto that I've ever seen.
I wonder how many (besides myself) would not even apply for these jobs working with outdated framework? I imagine most would want something relevant to their career?
Frameworks might help with the bus factor but eventually they become the bus? (hit by the back of the bus? how visualize this?)
I think you are selling yourself short, I would really love to read your code. If the alternative is familiarizing myself with the horrors of [say] Angrular (no really, say it out loud) the choice is easy.
Maybe the job ad should demand the applicant to be familiar with CrapPOS. Then I would be like, hummmm interesting company? maybe? In stead of my usual aaaahhhhh no no not [say] Angrular (really say it out loud, say it really slowly twice)
I would think twice before applying to work with an outdated framework; I would think three times before applying if it said “you are going to be developing for our home-grown web framework” :)
Only if you are a major player which defines the de-facto in the industry.
It almost reads like "we get why people use wheels. We're not saying wheels are bad."
I like your random bespoke shit less than frameworks that tend to solve the same problems but in a more standard way with slightly more robust design.
If you don't want to use it then fine. Totally depends on your needs. To create a movement shunning frameworks entirely just seems to be a totally fashion driven idea.
Sure, some things shouldn't be built with frameworks. However, some things should be.
Personally, if the project is large enough/warrants it, give me rails/django/laravel or ember/angular over something frameworkless _most of the time_.
Why? because there is documentation and an established community. With the frameworks I mentioned there is also sometimes conventions (i.e rails/ember).
Can you build something with frameworks that is horrific, madding, and complex? Yes. Can you achieve that same result without a framework? Yes.
IMO the propensity to get things wrong in the context of a framework is less than the propensity to get things wrong without one.
I think this manifesto is missing more thought/detail to properly reason about.
Basically, it seems everything they believe is "follow extreme programming as rigidly as possible and it will alleviate the downsides to being as short sighted as possible."
https://github.com/remfs/remfs-delver-js/blob/master/compone...
Don't look to closely at the code as a whole. It's prototype quality.
FWIW, it is actually nice to take hold of the details. In many situations you realize that you can alter the way things work to achieve cool effects or performance gains or whatever. Things you don't imagine or explore when React is just going to do whatever it does on your behalf.
I wholly agree with this. However, I'm sort of baffled by this approach. What frameworks allow is you not to have to continiously solve the same problem and waste weeks implementing something that others have solved.
For example, I worked with a team that spent weeks on "given a certain event happens in the software, dispatch a notification to the user". In the world of Rails, Django, Laravel and Phoenix this is a configuration task, with existing libraries. In Javascript it was a slog getting the implementation that still lacked much of the functionality of these mature frameworks (there are notification frameworks for Javascript but it was decided not to use them - "no frameworks"!). While it is fun to implement your own thing, here the reasons behind the existence of the code are essentially developer vanity in thinking their notification situation is an absolutely special case, and developer desire to do something stimulating like develop a notification system rather than serve product, organisational or user needs.
To have a clear discussion of this, however, it might be useful to define "framework". Is the target here frontend or backend frameworks? One thing I have observed is in the frontend world frameworks have caused some core skills to atrophy. For example, how many Javascript front end engineers can now confidently, given you click on something, change the colour of it. Probably here a framework is wildly overkill and you will get there with plain Javascript until such a point as complex user interaction is needed.
Realise rhetorically there is less punch to "use a framework mindfully" but this should be basic to any engineering decision "use a language mindfully" and in the last instance "do we need to solve this with software"? Doesn't sound like a movement per sae but corre software engineering skills - use the right tool situationally.
> a team that spent weeks on "given a certain event happens in the software, dispatch a notification to the user".
This is trivial without a framework as long as there is a library you can use to "notify the user" (e.g. an email or chat library). It's actually easier without a framework because "event" is just a line of code somewhere in your own application, while in a framework, it can mean a million things and maybe NOT what you actually wanted.
But whereas in Rails this would be mixing in a library to a controller to allow events and configuring them, this was building a new set of models and code over the top of a library for something like Mailgun from no code. A two hour job in Rails/Django/Phoenix but a two week sprint long job to roll your own. Why bother?
Say an event that shows a message to a user next time the user sees a page has to know about users, has to be able to store messages for users and remove them once they have been shown, it needs to know about i18n, and have tools to display the current messages in HTML.
A Django library for it can assume the existence of Django for all those things, a general library has a much harder time.
The overwhelming majority of JS developers learn the basics before moving on to a modern framework. The most common exception I've seen is backend developers picking up front-end tasks.
If all you're doing is changing the color of something, obviously you don't need a framework. In other breaking news, you don't need a chainsaw to slice bread.
I'm not sure if this is the case.
I actually set this as an interview question for mid-weight to senior on paper front end engineers and a solid 60% couldn't do it - this was four years ago. Not being able to do this wasn't a "fail" by the way, it was more something to talk around, especially when people successfully reasoned it out without knowing the underlying API, but it did reveal a relatively shallow understanding of the browser environment.
I imagine it is significantly worse now. Do the training course at boot camps take people up from `querySelectorAll` before jumping into React? I'm not sure they do.
Oh, you're making HTTP calls directly in React components? Well, you done goofed and that's not React's fault.
Would be nice to have a style sheet to just slap onto that whole other framework ...
Scoped styles seem like the framework version of the style attribute.
You’d need to build those apps/apis in a minimal and elegant way to prove it’s possible. It’s beyond conception for many.
In other words, the complete opposite of what the frameworks show. They always show a todo list, or a blog. You’ll have to come heavy with way more complex apps with simple implementations.
That would be ambitious and could change minds. I’m rooting for you guys. In fact, it might be a great re-take on CSS zen garden if you guys accepted submissions for vanilla implementations and just showcased all the ways it’s possible.
He has been an advocate of this frameworkless approach for many years, and in his book he shows exactly how it's done (might have aged a bit, pre-ES6, this niche is moving fast, but the gist hasn't changed).
The running example in the book is a chat web app with a frameworkless js front end and a node.js backend, using socket.io and mongo.
For what it's worth, this is one of the recommended books for MIT's web dev course alongside Javascript The Good Parts, Ninja and Patterns (https://stellar.mit.edu/S/course/6/fa18/6.170/courseMaterial...)
https://github.com/mmikowski/hi_score/tree/master/js/app-tb0...
It is actually an instance of the frameworkless approach he describes in the book above.
I never used frameworks because they seemed like a lot of overhead for some small problems, and then you had to keep migrating, updating, etc.; that is, instead of solving a problem I had to keep solving it, over and over. Dismissing the maintenance of your solution, whatever it is, is unwise.
And certainly the churn of the framework faddishness was not appealing to me. Why learn something and then simply discard all of it for the next cool new thing?
Still, I got roped into a toy project. Got set to use Flask, because it seemed simple. Bought the book, got my environment set up, felt nervous but a little excited ... only to find that my partner decided that we were suddenly switching to Django. When I mentioned that I had invested the time in this (and my own money for the book) to start, I got a little "Agile up" speech, which is apparently the equivalent of "git gud."
So I can see how someone might want to reject frameworks entirely: quite a lot of their in the field use seems to be churn.
However, I still think a stable, mature framework would be valuable so long as upgrades are painless and infrequent, as part of a shared lingo for describing a possible solution to a problem. As a "hustle," no, that sort of thing is a huge turnoff to me, but I do not want to discard the concept entirely.
There’s certainly also the probability of new holes in the newest libraries so keeping to the old ones is okay.
I once worked for a company which had a high developer churn rate - for them it was the most logical decision to run with a wide spread framework (ruby).
Why does it often feel like too many ideologies and tools try to convince you that requirement analysis is optional in their world - one size fits all.
Please choose what is right for you.
In my entire career I have never seen more confusion and misunderstanding about how to use frameworks than I have when working for companies listed on major stock indexes with multi-billion USD market caps.
If instead this company was focused on long term support or fixing other companies' mistakes, I think the view would be different.
If they mostly get called to fix legacy projects they probably only see the issues and limitations imposed by frameworks.
If they mostly get called to jumpstart a new project they'll probably love frameworks that let them deliver quickly and reliably, since they don't have to worry about long term scope changes and maintenance.
Is it actual confusion, or just difficulty in interoperating with the libraries/frameworks that large companies often already have?
I mean, yes maybe my framework is actually a badly designed weapon that is too complicated and overburdens me. But it solves my dragon problem. With my bare hands I am no longer overburdened, but now I’ve traded that advantage for much worse problems.
Which is why I figure, on balance, I do need frameworks.
I'm pretty sure he said he wrote SoundSlice [2] without the help of any framework (although can't find the quote atm). Soundslice is one of the most impressive and polished web applications I know, so pretty inspiring stuff.
It's odd because in the talk he advocates patterns over frameworks. Django is an implementation of MVC, as is well known. What is the value of implementing MVC again in Python when someone really has done that job for you?
There is a bit of a slight of hand here. If someone had built a frontend framework in Javascript and was now no longer advocating them, that would be a cleaner argument. But we have a shift of abstraction here from front to back end, when the two domains need to deal with different worries.
Django is used as an example of the downsides of a framework, and how the complexity of frameworks explode even though any given user only needs a small percentage of the features.
I wouldn’t by a chainsaw until I felt the pain point from using an axe and branch cutters, or buy a leaf blower until the raking/sweeping got old.
There’s a lot of problems a framework can solve but as a software engineer you should know intimately what each of those problems are before relying on more powerful tools.
I actually find frameworks limiting in a lot of ways so I prefer mixing in specialized libraries
Happened to me for example with ORMs or third party WPF components. They were good to start but at some point became limiting.
I think you often can’t or shouldn’t skip that step because otherwise the learning curve would be too steep.
I've written an HTTP server from scratch before. I've experimented with scaling it up in multiple ways. I've admitted defeat and gone back to using pre-existing software. Other than scratching an itch to learn, I can't tell you one fungible benefit I got from that exercise as it relates to developing a REST API. Why should a software engineer who builds a REST API need to understand the inner workings of HTTP to use an HTTP framework? Why should a software engineer need to build a massive UI to understand how hard state tracking is to use React? Chances are someone is paying for that code which, by definition, is worse than it should be because it's an exercise in learning why the framework is necessary.
Exactly. you're a better software engineer for it because you understand the underlining problem better and you've internalized the need for more powerful tools.
It's not about "earning the chainsaw". It's about learning.
> What does the day of struggling with branch cutters and an axe before succumbing and renting a chainsaw really earn you?
Perspective? Reverence for the how hard humans used to live? Being in better shape? idk.
I bought a push broom to clean off my driveway and patio. It took about five minutes to realize I was wasting my time and needed to buy a leaf blower.
I also bought a chainsaw even though I had never used one nor punished myself by trying to use an axe to take down and cut up a tree. It was obvious that the chainsaw was the right tool, even if it is more complicated, is more expensive, and requires more upkeep than an axe.
exercising is "punishment" too. it's perspective. thats how you grow, even as a software engineer.
I have 3+ acres and live in the mountains. Splitting a stump with my strength and a axe is rewarding and good for me, even though i used a chainsaw to get the stumps.
It seems to distinguish between frameworks and dedicated libraries, so I think we can apply a react test here: Is react a framework?
... the declarative pattern is a part of React’s way.
Where there is a “framework’s way” of doing things, there is a framework.
In software it's the same thing. The framework defines the structure, you just fill in the blanks like you would fit floors, add wheels, etc.
The pro is that it's an easy way if you want to build an application that closely follows an existing type of application. But it's too constraining if you want to be able to customize the structure down the line; all of a sudden, you realize that it's defined outside, in a technology that is not your own and you don't understand.
Frameworks catalyse development. It's much easier for a new team member to read the very rich and well explained Django documentation than to pour through reams of poorly documented code for a custom mvc for instance.
This feels like both tilting at windmills and irrational expectations on devs who for the vast majority need to turn out features, not core libraries.
Very clever!
In reality, you'll most likely be a software engineer specialised in react development.
React is a library because you can have websites with as many render roots as you want. You can use it only for small parts of the site/app, control all of the props from the outside, etc.
People use it as a framework because they take the SPA route with a single root. Usually a bundler even generates the HTML file for them, tying the entire app to a single render call.
That is, if you're going to go through the trouble of shadowing the DOM, creating "components", etc., then why expose the DOM at all and why make those components HTML-bound? Why surface CSS by default?
A framework could completely abstract away the messy Web semantics that make webdev so painful. Use a GUI for laying out the UI and let it generate the HTML. Use an event-driven component model for "true components" that don't carry the weighty mishmash of CSS, templates, and code.
Rather than go back to vanilla, it'd be interesting to explore going forward beyond Web semantics and protocols. That feels more like evolution.
To me, that's a foolish trade off all for warm fuzzies to validate how smart you are.
VIVA LA FRAMEWORKS
I did this one time as the lead/ architect on a large project. I had valid reasons (at the time) but it was a pain to onboard people. I had to answer everyone's questions / etc even though most of it was vanilla for that platform.
Like all engineering decisions, there are tradeoffs.
This is very appealing to me. I've done a lot of different kinda of programming over the years (embedded C, FORTRAN engineering simulations, years of modeling and ux/tool with Smalltalk, Linux processing and tooling with python, mobile apps in objc, kotlin, and swift, and lately flutter), but I've largely remained aloof of the web. I can skim JavaScript, I get sockets and http (done quite a few protocols over time). Despite all of that, I found web programming very daunting/overwhelming. Every time I dabble, the upside learning curve/awareness just overwhelms me. Maybe because I'm a "dive deep figure out how it works" guy. But this is appealing to me.
We use Phoenix with Elixir now, and I don't see Elixir dying anytime soon. With Nim, there's Jester, but I can definitely see that framework dying once Nim gets it's "one true batteries included web framework".
My point is, it's a gamble. Pray you don't fuck up.
I like this manifesto, and you should definitely try to build something without a framework. Database migrations, querying data, data processing, background jobs, it's pretty fun to write something right there up on the edge, your way.
Like most, I started with React/Vue etc and realized that I was trying to learn a whole language and ecosystem on top of JS and that was why i always found frontends to be so complex. There's simply no comparison.
I wrote an article on my learnings on using vanilla js to create spa. If anyone wants to read it, its here https://dev.to/rishavs/making-a-single-page-app-in-ye-good-o...
This is a good example of why a vanilla JS app is much simpler than a framework driven app. Because you've only done the absolute minimum, and it wouldn't work for even a moderately complex real world project.
There's no security considerations. There's no state management. There are no tests. There's no performance improvements like memoization or a VDOM. Even simple things like managing constants isn't done well (eg you've hardcoded the API address in to the getPost function). There's no error handling, so if an API call to fetch a post fails nothing will happen except you'll get a JS error in the console to say 'post.id' not found when PostShow tries to expand out the template string.
Making a simple app in vanilla JS by ignoring everything that makes a fast, robust app hard to build is easy. That's not what most developers are trying to do when they use a framework though. People reach for frameworks so they can implement the hard things without having to build them from the ground up.
No doubt you could implement all of those things, but by the end of it you'd probably have implemented something very similar to React. It's not unreasonable for people who want those things in their apps to just use React in the first place.
VDOM is only a performance improvement if you already bought into a specific version of the reactive architecture (namely, the declarative one, pioneered by Elm and popularized by React).
Otherwise VDOM is an overhead both in performance and in complexity.
Svelte has shown it's possible to do away with that overhead and still keep a nice, declarative API (which is much faster than any VDOM-based solution as it doesn't pay the cost of having a mirror of the DOM in memory + having to run a diff algorithm on every change).
Older frameworks also were able to get by with no VDOM by manually binding different parts of the DOM, which can be done well, but admittedly may result in difficult-to-read code.
> There's no state management.
But there is state management via variables in every view. The state management is about decoupling views and data. in case you want a full featured redux like state manager, i don't even see its point.
> There are no tests.
Its an article. adding basic api tests is a trivial task. There are no tests as that wasn't what I wanted to show case.
> There's no performance improvements like memoization or a VDOM.
Using VDOM has no performance improvement unless you need to rerender the entire dom very fast which is where memoization and VDOM are superior. This is a simple event based html/js app. user clicks on something, DOM is rendered. thats it. why the hell would I want to rerender the DOM every time for no use. This is like saying vanillajs is bad because I didn't write my code in typescript and convert to webassembly to drive web components in my html. I did none of those things because they are not needed...
> Even simple things like managing constants isn't done well (eg you've hardcoded the API address in to the getPost function).
I am not sure what the problem is here... Would it be better if I abstract it to a module where I maintain the map between the api and the function?
> There's no error handling, so if an API call to fetch a post fails nothing will happen except you'll get a JS error in the console to say 'post.id' not found when PostShow tries to expand out the template string.
yep. its a hook. This is a simple article on how things can be achieved. expecation is that when people can show the error message in the console, they can easily consume it in the html as well, if they so desire. In my other project, where I am using the same error hook, i don't post it to a console but to an notifications div on top of the, page.
> No doubt you could implement all of those things, but by the end of it you'd probably have implemented something very similar to React. It's not unreasonable for people who want those things in their apps to just use React in the first place.
And my argument is that all of us don't really need all those things so why use the full react/vue ecosystem? just a 100 lines of vanillajs would suffice.
Anyway, the point of the article was to show a different way of doing things. i don't expect everyone to agree with it and its fine. each to his own. I personally don't like using frameworks when i can do the same stuff by myself with minimal effort.
This is intriguing because as someone who started with vanilla JS long time ago I lived through the period when jQuery was seen as the breath of fresh air and React was welcomed as a great alternative to the tangled mess of bespoke code with callbacks all around.
One problem that makes deciding what to use is evaluating the size to which a project will grow. For a one pager or a very simple web app a framework (be it front or backend) is often an overkill. But maintaining a large app that does not use one is quite hellish.
To get around it, and not use ORM, and build out the tables yourself, is difficult. The documentation examples appear to be lacking.
I don’t have a problem with writing my own SQL queries, or writing my own table creation query code, but I tend to have problems trying to get Django to work with my custom tables. Mostly because the documentation doesn’t seem to be geared around doing that.
And then, some people say, that if you’re not using the Django ORM, then there is little point in using Django anyways, and you should use something more lightweight like a Flask.
Maybe someone else with more Django experience can chime in here.
A lot of the benefits that you get from Django and its plugin ecosystem come from having the models available as a common representation of the database that you can be transformed and inspected by various other tools.
If you don't want to use Django models, then I think Django is the wrong option.
Flask is a pretty great option. FastAPI adds some stuff that I really like and does it well, but is still only a year or two old, so might be too risky for some projects.
https://github.com/frameworkless-movement/awesome-frameworkl...
A showcase of successful real life applications would also make frameworkless more compelling.
The other news about frameworks is that you had better be an expert if you need to deviate from their approach.
I prefer Flask's minimalist approach, for all it means spending time (as noted in TFA) wading through various libraries to "build your own framework", which isn't for noobs.
How about a movement to help decide whether using a framework is or not is the best option according to the context?
Is this about CSS frameworks like Tailwind, Bootstrap etc?
Is it about web frameworks like Django and Rails?
Is it about React, Vue, Angular?
All of the above?
Walking - library
Riding a horse - framework
Framework : taking a taxi (you do get where you want, but don't fully understand how).