So your custom framework user base is much bigger than Svelte's or is it just you and a couple people on your team?
Here are some actual criticisms I have of Svelte:
Rich Harris thinks it's fast because it doesn't use a virtual DOM. No, it's fast because V8 speed has increased dramatically since React found a virtual DOM necessary. Now React is stuck with it's virtual DOM. But sure Richard, take the credit for being fast if you want.
A command line tool to parse some text based .svelte files and assemble them into regular browser files is almost trivial, not rocket science. Adding hashes to the CSS identifiers to namespace is also not hard.
Data binding and reactive programming are part of the observer pattern in the Gang of Four book. Rich Harris invented some sugar reactive syntax, but more power to him. I just don't think Svelte does that much.
Edit: Rich not Richard
https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
Would it be hard for React to remove VirtualDOM(if they don't believe), and maintain most of API?
Not to be pithy, but I believe that was Rich’s intention.
My biggest beef with Rich Harris is that he doesn't credit Lars Bak and the small team at Google for doing incredible work speeding up V8. Google saw nodejs take off and realized they had to make V8 faster, so they put a lot of money into doing so. Unfortunately the virtual DOM took off before V8 got super fast. Look up "you don't need a virtual DOM" for confirmation.
I believe it's one of the reasons Microsoft threw in the towel and adopted Blink. If you can't beat 'em, join 'em.
Harris also doesn't give any credit to the reactive binding work that came before him. He acts like he used a spreadsheet and had the bright idea to make a website that way. I have a strong sense of fairness so I don't think a designer/dev working for newspapers should take the credit from the geniuses at Google who made it possible. I think it's quite possible that he doesn't know any computer science but he's a gifted amateur.
Im looking at Shadow DOM components myself, but it's quite possible I might use Svelte. It's a nice tool, but it's not the magic beans that solve all your problems like no one ever before.
https://en.wikipedia.org/wiki/Data_binding
https://en.wikipedia.org/wiki/Observer_pattern
https://developer.mozilla.org/en-US/docs/Web/API/Window/requ...
It has syntax very familiar to react, but works differently under the hood.
There are some really good comments about Solidjs in this thread and some others backing up what I'm saying about the virtual DOM
I don't understand what the criticism is supposed to be here.
I don’t know how they settled on 15kb, but “don’t want to force people of future” is as stupid of a reason as I have seen. Surely, “people of future” can refactor old code, or have different constraints altogether
Whatever your choice is, you're going to have to move off of it one day.
Way more fun than actual customer problems
> Our choice does not need anyone to learn anything, and one can create a widget in no time!
As someone who made the mistake of writing their own internal framework, I tip my hat to you.
You just created your own framework that people now have to learn. And best of all, the documentation is always going to be less detailed than what you'd get with popular frameworks.
Writing your own framework is almost never a good idea. It is only a good idea for the one writing it because we like tech and we like to show how good we're at building things ourselves. Business wise is the worst mistake ever... unless you're Figma or something like that building something radically special, I don't see how this is a good idea.
You have the first example of this problem in the post itself:
"...We did lost something with this choice. First, we lost compatibility with a couple of tools that we really wanted to use. One of them was storybook, that is a super-nice preview system. We had to develop our own frankenstein to do the same...."
The more your project grows, the more of that you will get. Then one day the people that took this decision leaves the company. And then the new joiners are stuck with an undocumented, failing, spaghetti frankestein mess they have to work on day to day.
And finally...those "few simple" components, will evolve...and sooner than later they won't be neither few neither simple anymore.
It is true that simple apps can usually keep up with trends and documentation of a chosen framework.
But, all too often, the choices in how to use a framework pile up and are lost to the tribal knowledge of a team. This was worse when libraries are pulled in easily to scratch itches for each part of the application without care to the whole.
can you give some examples of poor documentation? most frontend JS frameworks (react included) have friendly, comprehensive documentation.
- https://beta.reactjs.org/learn
The background image on his blog post is 168K
What are the key criteria and what core does each framework get? Also, the "built some new thing" must be evaluated and scored alongside the others.
If "we are building for super low bandwidth users" matters then it should be stated in this blog post.
Here's a start point for criteria for evaluating JS frameworks - each framework should get a score against the criteria, and the criteria should be weighted to indicate importance for this project:
* Open source number of project maintainers and activity level of project commits
* Maturity
* Size of user base/community
* Size of runtime
* Quality of documentation
* Availability of third party components
* Recruiting new team members - availability of developers experienced with this framework
* IDE support
* Availability of third party documentation
* Number of questions and answers on Stack Overflow/online forums
* Experience level of framework within our team
etc etc add criteria that matter to you.
So was their basis of choosing that low bundle budget solely around reducing carbon emissions? I’d really like to see their math on that. I looked for a calculator that would try to estimate it, but couldn’t find one. If anyone know of one, please reply.
I imagine a lot will depend on how many users there will be for it, but how big of a difference could there be? If we’re talking 1 million users per month, what will the difference between 15kb and 150kb look like? Are we on the scale of emissions of a couple dozen cars, or pack of coffee filters?
I would expect it’s important to figure that out before spending “months” making a decision. At the very least, if you’re making a blog post about it, you should try to figure that out because right now is sound like “we spent a lot of time figuring out the smallest possible bundle size we could have because something something greenhouse gasses.”
But yes, there should be more emphasis on what drives business value (hence on picking a stack that allows providing that value as efficiently as possible), and with the minefield that's modern web development, starting from scratch doesn't seem sensible. The post doesn't go too deep into what they're building though, so maybe I'm missing something.
There are reasons for choosing "front-end frameworks" and once you get into Enterprise-level territory you start to see why.
I'm both front and back and Angular is hitting the sweet spot with our developers who come from OOP backgrounds and can grasp TypeScript at a glance and don't get scared by compiler errors.
TypeScript is love, TypeScript is life :)
CSS is the least of your problems, wait until your career gets to the point of 20+ developers.
And by "compiler errors" I don't mean TypeScript, that is easy peasy ... I mean Angular.
And even that is easily sorted if you know why it's complaining and how to fix it.
The "legacy/debt" issue is more interesting matter. React and Angular are obviously big right now so most shops go with these.
But I explored the best ways to front-end without any framework, what would be the minimal boilerplate to deal with views and trees of components.
Webcomponents are OK for components but they don't really solve all problems React solves, like component aggregation, updating a component tree easily, and of course, testing without having to fire a browser instance (testing is the biggest reason as to why React is useful in my opinion).
We kind of have events covered with event delegation and custom events.
In my opinion, a native DOM diff algorithm as part of the DOM spec would already goes a long way for the teams who want to get rid of third party frameworks. It is very easy to build a view functionally (then use the visitor pattern to serialize functions into a DOM tree, which is basically, let's admit it, a poorman's XSL). Updating the DOM attached to a webpage is the hardest part in terms of performance and third party libraries aren't often as fast as they should be.
I'd be interested in hearing about alternative "frameworkless" approach regarding building interactive HTML pages without too much initial boilerplate (which can quickly turn into one owns framework anyway).
The legacy debt issue is mostly because nobody knows what the future of the framworks are. It's not like Vue will be bad. There might not even be something better, just new and shiny and 2kb lighter.
With code size a complete non-issue and native optimization, things could be a lot better.
All our components could be under a unified standard with no overhead. Trivial sub-kb things could take advantage of reactive type design.
So, not only EJS is strictly less useful than any FE framework, at 22kb (min) it is also heavier than some of the options
The vagueness about this project doesn’t help.
The project / use case is what should matter / drive this, less so rando idea like “ we don’t want to add any extra KB that is not strictly necessary”. Maybe if we understood the project the decision might make more sense.
On Side Note: I think very soon most of JS Frameworks will reach that saturation point where all have equal performance metrics. After that it's more of developer experiance in building applications.
I've built a complex internal app at Netflix with this, primarily composed of small widgets roughly the size and complexity of that todo app.
My main motivation is to make it as easy as possible to do the right thing when it comes to user experience engineering. And also to be able to hire people with less experience.
Library Documentation: https://thelanding.page/tag/
Todo MVC Demo: https://thelanding.page/apps/todo
Todo Demo Source: https://git.sr.ht/~tychi/todo-list/tree
Not only that but this evaluation took you months?
In a nutshell: specify some important scenarios based on your requirements; for each scenario make a list of desired quality attributes and a way to measure them; use this combination of (scenario, quality attributes) to evaluate each option.
It’s a simple and obvious method, but for some reason is barely used.
A critique to the article: the evaluation criteria doesn’t seem to take into account any real scenario. For example why 15kb? Are they planning to serve people with very low bandwidth? Is the speed of the FCP more important that time to interactive (TTI)?
Regarding frameworks. A difficult metric to measure is hiring: if you are planning to grow your team, a popular, nice to use framework is another point to attract talent (eg choosing Backbone,jQuery,and CoffeeScript may fit your quality attributes but in 2022 is not very attractive for a job description).
[1]: https://en.wikipedia.org/wiki/Architecture_tradeoff_analysis...
There are some caveats though; if you need to do any fetching based on user interactions and reassembling based on that data, then Svelte will ultimately need to run some things on the front-end. If you just need to fetch some data and render the page based on that data however, Svelte can do all the rendering on the server.
EJS is not "anything", imo. I'd probably feel at home with it since I've used a bit of ERB, but despite how simple it looks there's some gotchas, syntax highlighting is always going to be an issue, and making those widgets modular is going to require at least some conventions to be used, and at worst some helpers that will eventually start looking like a framework (of course this depends on the scope of the project). Also, bundle size for EJS is not mentioned.
Most people don’t realize that Svelte is just as old as React. It’s predecessor, Ractive.JS came out years before React or any of the others. It’s not new in any sense, we just got over the “React is the only truth” phase.
Besides, the community is already huge. When react came out having 1k starts on GitHub was a massive achievement!
As another commenter put well, they’ll just end up with their own little framework, which is riskier than any of the choices they had.
I love EJS but it is not comparable to some of these other frameworks and libraries.
Full control over input data validation, rich controls, easy integration with other libraries (Charts, Editors, PDF viewers), the rapid web app development in its the original meaning.
No need to touch JS.
The 2.5 paid version is for .NET Framework, but the upcoming 3.0 has limited free licensing and net.core support.
And VS Code make them easy to write.
In 20+ years of web development, I've never felt an environment that refreshing.
We did lost something
Just nitpicking here but I think the correct statement is
"We did lose something"