3 ms·
I think it’s important to note that jquery and react aren’t really the main point in the problem or solution. The problem is they have three things that they w
by jmull 6y ago
I think it’s important to note that jquery and react aren’t really the main point in the problem or solution.
The problem is they have three things that they want to be the same but aren’t, and the solution is to rewrite so the significant parts can, in fact, be the same. React and jquery are details... that is, you can have the same problem and same solution with different details.
I also wonder if this particular approach will end up being successful for them. Can’t the editor, signer and final pdf all be rendered by different browsers and different versions of browsers? IDK, maybe it’s close enough for their cases or there is a strong filter on input that limits this to elements that render consistently enough. Or maybe this is a “must use updated Chrome” app?
- vips7L 6y agoI've thought about this alot. I know how to protect my backend from frameworks and to make the framework/database a detail, but how do I do this for front end applications? Especially when things like React abandon the dom/web platform.
- dntrkv 6y agoYou can't avoid that when using a framework, since the main differentiation between a library and framework is inversion of control. Writing some kind of abstraction on top of the framework is a pointless endeavor since at the end of the day, all of your code will be structured in a way that adheres to the contract defined by that framework. Databases don't dictate the structure of your entire application like a framework does, so that comparison is not useful.
- tracker1 6y agoReact isn't really a framework, though it's very close and a pretty flushed out DOM abstraction. I'm not really sure what you're trying to "protect" from React in this case? It renders what you tell it to. From a component perspective, whatever the output of your component is, that's what gets rendered/updated on screen. There are a few escape hatches in place, depending on what you're trying to do though. From TFA examples, when faced with similar issues (though not quite the same), I found directly writing SVG markup over a document background to be extremely straight forward with React. For the most part, the problem you are describing is when you are actively trying to NOT use the tool you're using. I've been developing web based applications since the mid 90's and React is hands down the best tool I've used in that timeframe for web applications. That said, if you're mostly delivering static content, then it may not be the best fit. In those cases using something like Vue, or another option for enhancements (even jQuery-like) may be a better option. If you're going to use React, you are best off understanding and embracing it... if you aren't, then don't use it. I don't intend to be mean, it just seems your perspective is off. It's much like asking how you use a SQL oriented database without the inconvenience of SQL or data types.
- tracker1 6y agoI'm half surprised that this isn't utilizing canvas + wasm. I know it wouldn't work for all web clients, but would really be a good way forward to shift the processing to the browser/client for many devices. As to variations in rendering, for some things like this, there isn't that much different. A project I work on at work does similar overlays with scanned images for marking up manual verifications and creates a final composite document in a similar way (react fe, .net core be).