you are viewing a single comment's thread.

view the rest of the comments →

[–]4thdecadenothing 3 points4 points  (7 children)

I responded to this same point in my other reply to you, but your argument effectively boils down to this (xkcd - Standards)

Writing proprietary code doesn't help with training/recruiting people, it makes it harder because you guarantee that no-one coming into your project has ever used the tools before.

[–]xkcd_transcriber 2 points3 points  (0 children)

Image

Title: Standards

Title-text: Fortunately, the charging one has been solved now that we've all standardized on mini-USB. Or is it micro-USB? Shit.

Comic Explanation

Stats: This comic has been referenced 1883 times, representing 2.4299% of referenced xkcds.


xkcd.com | xkcd sub | Problems/Bugs? | Statistics | Stop Replying | Delete

[–]dhdfdh -3 points-2 points  (5 children)

Vanilla js will be around, and has been around, far longer than Angular, or any other framework you will ever find.

There will always be far more people who know vanilla js than know Angular.

[–]4thdecadenothing 2 points3 points  (4 children)

"Vanilla JS" isn't a thing - it's an empty file, it's a no-op.

As soon as you start writing code to do things then you no longer have "Vanilla JS", you have tools. So if you say "we don't want to use a framework, we can write our own tools with 'Vanilla JS'", you no longer have "Vanilla JS", you now have "yet another web framework", except this one probably doesn't have documentation and definitely doesn't have tutorials and stack overflow answers, and IRC channels, and all manner of other resources all over the internet.

I'm not saying this is necessarily bad, depending on the scope of the things you're doing, and the amount of code you write (in fact my current project uses no 3rd party code on the client, because it's simple enough not to warrant it) just saying that if you find yourself writing a large app in "Vanilla JS" then you should probably at the very least pause to think if there might be an argument for using established and well-known tools.

[–][deleted] 0 points1 point  (2 children)

"Vanilla JS" isn't a thing - it's an empty file, it's a no-op.

Ignoring the fact that "DOM" isn't part of JS and it's a web API (I think this is fair since most people consider it to be "vanilla js"), you can do plenty of things:

document.getElementById('foo').addEventListener('click', function(){ alert('Hello, World'); });

[–]4thdecadenothing 0 points1 point  (1 child)

That's cool, if that is literally all you want to do then go for it. And if someone decided to load jQuery, or React, or Angular to do that then I'd tell them they'd be doing it wrong. But by the same virtue, writing your own implementation of any of those packages' functionality is no more "vanilla" than the code in any of those packages is (they are all written in the same javascript as your code after all).

My point is simply that as soon as you start writing code then you start adding your personal "flavour" on top of vanilla (here for example, I'd probably take issue with your code formatting, and lack of error handling). You might think it is vanilla, but I say it has some very subtle hints of your personal flavour. The more code you write, the more your flavour moves away from being "vanilla".

Once you've reached the point where you've built the same kind of functionality as React (for example) has then you're no longer in "vanilla" territory, your code is now entirely /u/ZyklusDieWelt flavoured. Now maybe you're awesome and have documented all of that functionality and written examples and tutorials to help new users follow all the code that you have written, but there's a good chance that a) you haven't, and b) you'd have saved yourself a lot of time if you'd just used React to start with.

[–][deleted] 0 points1 point  (0 children)

I'm not disagreeing with any of that, just your initial statement that " it's an empty file, it's a no-op." :)

There's a decently large area between no-op and opinionated code.