4 ms·
Yes and no. Homerolled solutions such as this are free of another developers assumptions, but tend to scale poorly. Generally they need to be modified as new r
by ry_ry 11y ago
Yes and no.
Homerolled solutions such as this are free of another developers assumptions, but tend to scale poorly. Generally they need to be modified as new requirements are created, or unforeseen circumstances arise.
Over time you end up putting together more and more logic in and the illogical conclusion is that you end up building your own heavily bespoke version of React/Angular/jQuery/whatever, before realising you actually need to go back and start again.
There is absolutely nothing wrong with writing your own libs (it's educational and character building!) but to chuck json through a constructor is trivial. Sure - this code renders views in a simple and relatively inefficient way, but drawing boxes is only part of what React is doing.
- adrianp 11y agoI totally agree with you on the scalability aspect, but I think one of the main issues correctly pointed out by @ilovefood is that a lot of juniors nowadays start directly with one of the big frameworks, with no idea on what vanilla JS is. I really hoped that we learned something from the jQuery experience but it seems to happen again and, maybe this is just my feeling, but JavaScript is kind of the only big enough language with this issue.
- ry_ry 11y agoCan't blame the tools for a lack of decent developers any more than you can blame a spell checker for illiteracy.
- adrianp 11y agoTrue; us, the Web community (which also built the frameworks) as a whole, is to blame.
- yazaddaruvala 11y ago> Can't blame the tools for a lack of decent developers any more than you can blame a spell checker for illiteracy. > True; us, the Web community (which also built the frameworks) as a whole, is to blame. Doesn't this come across a bit naive? Is the suggestion that web development is somehow different than all other software development? or that unless you're one of the ~0 people who are able to build a usable programming language, OS, and libraries on top of them, that you're not a "decent developer"? Because while I get you're discussing JavaScript frameworks. "Learning the Framework" and not the details, has been the only reason software development has been able to scale so beautifully. Frameworks that lower the relative complexity should and are encouraged in all other forms of software development, why should web development be different?
- ilovefood 11y agoYou are absolutely right, but I do believe people should start learning the alphabet before trying to read a book. React looks fine to me and at my daily job our frontend devs do some amazing job. I just wanted to learn and all I seem to find is how to learn javascript through React, and not React through Javascript. I do agree this is a home made solution and would not work nicely with lots of devs involved. I'm talking about learning though, and we devs are usually bad teachers when we don't know how to boil it down to the essentials. How many people do you know that only use React to draw boxes and not for the advantages it brings?
- wanda 11y agoReact is JavaScript. jQuery, sure, that's probably harmful in the long run, but you have to know JavaScript to use React. /Structuring/ an app is a different skill that takes lots of consideration, especially in a language as flexible as JavaScript.
- yazaddaruvala 11y agoI'd argue that you're analogy is broken. Yes, frameworks are built from the basics and novels are built from an alphabet. However, Frameworks reduce relative complexity, increasing their audience. Novels actually have an increased relative complexity reducing their audience. While, its hard to find good analogies outside software development, it might be more correct to say: if javascript is the alphabet, then React is a picture book. Picture books lowering the relative complexity, allow literate and illiterate people alike to mostly understand a story. Here its easier to see that the Framework (pictures) help novices (the illiterate, i.e. children), as soon as possible, to become independent and productive (understand the story). There is also the added benefit that exposure to both words and pictures simultaneously allows for an understanding of the alphabet and grammar, i.e. helps the learning process.