6 ms·
It could very well be that I've completely misunderstood the intention of these frameworks then. I was under the impression that at the end of the day you're c
by laichzeit0 11y ago
It could very well be that I've completely misunderstood the intention of these frameworks then.
I was under the impression that at the end of the day you're creating either React components and/or Angular directives when you're building a web application. And the particular framework takes care of how the view changes when the model changes, it provides you with some abstractions like Resources (to talk to REST APIs) and Routers (for navigation). Even when you look at ExtJS I don't see why they couldn't provide ReactExtJS or AngularExtJS by just wrapping their widgets so that you're either creating them with "props" or by specifying the initial "scope" if you're doing it Angular directives, for example.
Creating standardized widgets which can be "wrapped" to expose a React (prop/state) or Angular (isolated scope directive) style interface, and then "skinned" (Bootstrap or Material Design or whatever) I would have thought would be the logical thing to do. As another poster commented, perhaps this is what people are calling "Components"? However, I'm pretty sure it could be done right now with what we currently have.
If you say it's an extremely narrow need, I understand because typically I end up facing problems no one else seem to have :)
- k__ 11y agoThe problem with these front-end frameworks is, that they don't have the same scope. ExtJS is probably the most QT-like web-framework. I like your idea of writing generic code and then expose it to Angular/React/Ember. Including something like Backbone/JQuery would probably be harder, since it uses direct DOM manipulation. But those other frameworks have livecycle-hooks that get called when a component is rendered and have to provide the framework with virtual-dom/handlebars/etc.-templates that get injected at the right position. Since A/R/E don't have their own CSS (contrary to ExtJS) the styling code could be generic too (which it already is in most web-apps, with the help of Bootstrap).
- teen 11y agoI think angular bootstrap handles your use case nicely. I use it for a prod site that gets a lot of traffic. http://angular-ui.github.io/bootstrap/ http://angular-ui.github.io/bootstrap/
- k__ 11y agoSame goes for react-bootstrap http://react-bootstrap.github.io/ http://react-bootstrap.github.io/
- laichzeit0 11y agoI tried react-bootstrap and it was great. Except when you get to the point where one of those components lacks a feature you need, like say searching on the table component (I'd just like to specify that as a prop value), or there is a component you need but is missing. Now you either have to build your own, or go google for "react bootstrap XYZ component" and hope it does what you need to. Do we really need a R/A/E/*-bootstrap everytime a new framework comes out or can we build something more generic like this (R/A/E)-[general_component_library]-(Bootstrap/Material Design/Current Button Style Trend)?
- tracker1 11y agoAnd if a feature isn't built into a QT component, you don't have to compose your own? If you're using MaterialUI, or React-Bootstrap, you should be able to compose what you want out of more primitive components... yes, there's work there, and it isn't magic... if you want something more polished, nobody is stopping you, or anyone else from writing/creating it or paying someone to do it for you.
- marknutter 11y agoThe issue is that instead of the web community as a whole working to create one awesome table widget we are fragmented across X frameworks creating X table widgets that all do the exact same thing.
- tracker1 11y agoI'm trying really hard not to make a snarky comment here... the fact is there is, always has been, and always will be a lot of fragmentation with any web technology. Just like there's fragmentation with desktop apps... QT, wx, GTK and that's just a handful for Linux alone. That doesn't include all the Windows and OSX UI packages over the years... The web is far more flexible and diverse in practice, and also more open, so you simple see more of the options. MaterialUI, MaterializeCSS and Bootstrap are all decent starting points... depending on what you want to do. If what you want is a nice table widget, nobody is stopping you from making one... become part of the web community you're complaining about... If you aren't part of the solution, what are you? In this case you're supposed to be a programmer, with an itch to scratch... scratch, and share.
- marrs 11y agoBoth React and Angular are quite new to the scene and there doesn't seem to be any sign of the industry settling on either (although the enterprise is currently betting on Angular). They are designed first and foremost to make the architecture of large sites/apps manageable, particularly where JS is heavily used. React succeeds at this aim. Angular fails miserably and actually makes everything worse (which is probably why the enterprise chose to go with it). Toolkits of the kind you're looking for (ExtJS/Dojo etc) just haven't really taken off. ExtJS suffers from having an all or nothing approach to its usage, and last I checked its approach left much to be desired. Dojo is a bit more flexible in that sense but both libraries are big and complicated as they have to do a lot of work to achieve the behaviour they require of the browser. Browsers simply aren't designed (still!) to provide the grid-like layouts required by apps. It's generally best to avoid the complexity required to do this unless you have no choice. Flexbox promises to make grid layouts much easier. I have to admit, the last time I tried to work with it I found it quite difficult to get to work for me. Web components promise to raise the number of available HTML elements by creating your own. The are indended to help you move from code like `$('.datepicker').datePicker()` to HTML like `<datepicker />`. Fundamentally, there is not going to be a standard way of doing things on the web because there is no such thing as a standard website. When you visit a website today, you could be visiting an API, an RSS news feed, a database interface), a drawing package, a computer game, etc. Such diversity of applications requires a diversity of tools and approaches, and that is what we are seeing a proliferation of today as we explore and discover the most successful ways of providing digital content.