5 ms·
This looks nice. I'm not a framework guy (more on that in a second) but they at least seem to be heading in the direction of letting me get work done without f
by Zelphyr 7y ago
This looks nice. I'm not a framework guy (more on that in a second) but they at least seem to be heading in the direction of letting me get work done without forcing me to do it their way.
That said; first it was Backbone which wasn't terrible but kinda clunky in my opinion. But then Angular came along and everybody rushed over to that pasture. But then React came along and everybody rushed over to that pasture. Now Vue is appearing to be greener than the others. Is Svelte where everyone will go next?
My point is this: if all these frameworks were so great, why do we keep running to the latest new one? I actually heard a contractor say the other day, "five years ago everybody wanted Ember developers and now everybody wants React developers. I even have those old Ember clients coming back asking for developers to rewrite the Ember projects in React."
Maybe it really is turtles all the way down...
- deleted 7y ago[deleted]
- s_y_n_t_a_x 7y agoSome people are running around to new frameworks, but most are with React. Imo Vue and Svelte are going backwards.
- wishinghand 7y ago> Imo Vue and Svelte are going backwards Big claims need big evidence.
- s_y_n_t_a_x 7y agoI said in my opinion. I think going from JSX to templates is a bad idea and going back to where we were.
- daliusd 7y agoWhat exactly JSX offers what templating does not?
- mhd 7y agoVindication for both XHTML and the ternary operator.
- kansface 7y agoJSX is JavaScript. I do not have to learn a new language to iterate over an array. I can interact with it using whatever JS libraries I prefer. JSX components are functions or classes which are trivially composable. I can type functions and classes with typescript unlike string templates.
- deleted 7y ago[deleted]
- daliusd 7y ago> I can interact with it using whatever JS libraries I prefer. Could you give an example with JSX where templating will not cut? > JSX components are functions or classes which are trivially composable. This is framework's feature IMHO not language's. > I can type functions and classes with typescript unlike string templates. Situation where types are important in other frameworks is JS part not templates part. Could you give an example where typing is import purely in component's return value?
- Chyzwar 7y ago> Situation where types are important in other frameworks is JS part not templates part. Could you give an example where typing is import purely in component's return value? You will lose type-safety when composing components in template-based frameworks. It is jsx part where types are most important. Instead of getting runtime errors because you passed wrong props you get instant feedback from tsserver and compile error.
- daliusd 7y agoI have not checked any typescript implementation in svelte but I think this case can be done. The only special case being for cycle. * * I use React with typescript mainly and I understand what you are referring to.
- Can_Not 7y agoVue supports "templates" (both es5 string and single file component compiled), JSX, jade/pug, and render function. Svelte's single file components, similarly, are not "dumb string templates". The compiler applies some correctness checking onto them at build time.
- dragonwriter 7y agoI don't think the claim that that is his opinion is a big claim, and while it's possible that he is misrepresenting his opinion the fact they he claimed the opinion on HN with no obvious benefit from misrepresentation is itself fairly strong evidence that it is his opinion.
- cheapsteak 7y agohttps://npmcharts.com/compare/react,vue?interval=7&start=500 https://npmcharts.com/compare/react,vue?interval=7&start=500 Vue adoption does seems to be tapering (Naively looking at download counts)
- hardwaresofton 7y agotl;dr watch this fantastic intro to svelte talk by it's creator: https://www.youtube.com/watch?v=AdNJ3fydeao https://www.youtube.com/watch?v=AdNJ3fydeao , it covers some of the growing pains of React that svelte addresses. While it might look like the frontend is going around in circles, there are major & minor differences between the technologies, and they have each introduced novel (to JS at least) things... Off the top of my head (this timeline might not be right but it's how I went through it at least): - Backbone got you away from jquery spaghetti, helped you actually manage your data & models. Often paired with Marionette to handle views (if you squint this is the precursor to components) and bring some order in that part of the app. - Angular bundles backbone's data handling (services), marionette's orderly view separation (views, directives), but they made a fatal mistake in the apply/digest cycle and maybe encouraging a bit too much complexity. Angular is everything bundled together, with consistent usage/documentation/semantics, a familiar programming pattern (MVC), and a large corporate sponsor in Google it caught on like wildfire. - Knockout sees Angular's MVC, laments it's complexity and focuses on MVVM -- simple binding of a model and a relatively simple reactive-where-necessary controller - React comes along and suggests an even simpler world where the only first class citizen is components and everything else comes separate (this isn't necessarily new, there is an article out there comparing it to COM subsystems for windows). React is almost always used with react-router and some flux-pattern supporting data management lib -- these are also departures from how angular, backbone and knockout structured in-application communication (backbone was pure event bus, angular had the usual MVC methods, knockout was just callbacks -- if you have a handle to an observable when you change it things reload). - Vue sees the complexity that React grew to (case in point: shouldComponentUpdate) and devises a much simpler subset along with a new way to handle reactivity -- using the `data` method of a vue component. Vue made a lot of decisions that helped it stay simple and small yet very productive and this is in large part thanks to React existing before hand. - Svelte comes on the scene and realizes that truly optimal rendering could be achieved by just compiling away the excess and eschewing the virtual dom all together in most cases. No need to track all the structure if you compile the code with the updates necessary. Don't quote me on this but I think a whole host of things influenced this project -- smarter compilers, better type systems, the ideas around zero cost abstractions & doing more work at build time. - Ember (formerly SproutCore) is actually an anomaly because it tries it's best to be both angular like (so large, and usable by large teams) and keeping up with the tech as it evolves (see: Glimmer, Octane). Ember also has some innovations, like Glimmer's VM-based approach -- turns out you can just ship binary data representing how to draw your components to the browser and skip a bunch of JS parsing, if you bring your own virtual machine that is optimized to draw the components. As all this moves forward, there are ecosystem pieces like typescript that have gained tons of steam and changed how people are writing JS code these days.
- dangoor 7y ago> I actually heard a contractor say the other day, "five years ago everybody wanted Ember developers and now everybody wants React developers. I even have those old Ember clients coming back asking for developers to rewrite the Ember projects in React." React came out a little over 6 years ago and Khan Academy started using it soon after. We haven't been itching to switch and, from what I've seen, there are _still_ a lot of people adopting it. Its model is working pretty well, generally. I like that Svelte is taking a different approach. To move away from React will take something that's as big a switch as the jQuery+Backbone switch was when React came out.
- jf22 7y agoPeople and companies that can rush do rush but there are still lot's of projects where developers are using old frameworks.
- sullyj3 7y ago> My point is this: if all these frameworks were so great, why do we keep running to the latest new one? If last years processors were so great... If steam engines were so great... If the wheel was so great... Honestly I don't even know why we bothered inventing fire