@Luggage If you introduce new requirements which bring incompatible changes, you introduce a new version. Simple, right? Of course it won't work if your whole system is a mess of entangled eventhandlers and globals (he mentions the eventhandlers), but that has hardly anything to do with classes.
In other words, I do what that articels says NOT to. But I was already aware of the risk and am careful to keep them light. I'm the only dev on the project so it's easy to control.
Perhaps the problem with JS is that there are no tools that support easy and simple OO coding / refactoring. Thus strong discipline is required in a dev team, which often isnt there
Ignoring the ES6 class sugar, JS is just a handful of primitives (objects, functions, arrays) and you can use them 'like classes' or with many other patterns.
no, I don't want it to sound bad. I like the ability to be dynamic. some languages are restrictive so it becomes a pain to "pass around" arbitrary types to random functions. templates can work but it can cause an explosion of instantiations
in js, it is a non-issue, so free functions are fine if you really want to
agreed (with @Meredith ) . I have some functions in JS that I apply to different sets of state. I even have a wrapper that exposes one style of object (plain JS object) as another (backbone-style object, ugh) so that I can re-use the code. I love JS for that.
shows that the first implementation just let undefined go through normal symbol lookup. that shows that he was not micro-optimizing anything in the slightest, just banging out code
there's a list of attributes that are unimplemented on <text>
you can't write svg in FF, your attributes probably won't do anything and when a real browser shows it, suddenly everything is supported and it is all messed up, or vice versa
I have a list of sports in the database. I bring these sports with ajax call on page load and show them with checkboxes in a dashboard. An employee can update his choice just by checking or unchecking the checkboxes. My problem is to handle the update process. Currently, I am sending all checked choices (Id of sports) to the database and deleting all previous choices and inserting new choices again
@ChanchalZoarder Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
I am looking for some suggestions, I made a little gallery that you can choose a folder and it will display all your videos and images in that folder on the page with some minor paging, but I want to add some cool features
I am going to put it in a jsfiddle now and link it
@Chris very nice :) ui needs some improvement but even without that it is already highly usable and infact less sucky than some popular image viewers. good job
I can handle keyword tags, but I will have to get my localhost running for that, and I want this as lightweight as possible so I think I will skip the adding and searching of keywords
I can't decide which kind of books to read. There are domain specific knowledge ones, so like a book on haskell or JS which teaches you just those things. And I don't find these much interesting at all, unless they are like 7 languages in 7 weeks which teach you a lot of things in a blast. Then there are more on philosophy side with titles like "being a better programmer" etc. dunno if they are any good. Then language/platform agnostic stuff (like that microservices one)...
Also I prefer lightweight books which could be read within a week even on a tight schedule. Too long of a book might suffer from me losing interest mid-way.
@doug65536 No it's not a transaction. But I have to show all the options because clients can uncheck his/her existing choice. Option is not more than 30
@SwatiMaheshwari Welcome to the JavaScript chat! Please review the room rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.