Prev: FAQ Entry Proposal: What is (function(){ /*...*/ })() ?
Next: FAQ Topic - What is Ajax? (2010-03-01)
From: Stefan Weiss on 4 Mar 2010 09:03 On 04/03/10 10:10, Andrea Giammarchi wrote: > The only thing that JSLint should do to avoid blames against > developers that MEANT something, is a bloody flag: > > /*jslint ignore:true*/ ... the code you meant like that ... /*jslint > ignore:false*/ > > or > > /*jslint meant:true*/ ... the code you meant like that ... /*jslint > meant:false*/ > > This will make JSLint useful to get all "gotchas" and document or > ignore all those piece of code that should be exactly like that. > > This will make good JS code as jQuery is valid and will make all those > developers unable to understand WHY IT'S NOT AN ERROR happy (plus > automation against validation) > > I tried to sign into the JSLint group but AFAIK I am not in yet to > propose this change. You can save yourself the trouble. It has been suggested in the past, and rejected by DC with the comment "I recommend that you fix your code instead of documenting that it is intentionally defective". -- stefan
From: Richard Cornford on 4 Mar 2010 11:37 On Mar 4, 4:28 pm, Scott Sauyet wrote: <snip> > Strange, I commented on the same issue with that pattern > in a different forum a few days ago: > > <http://forum.jquery.com/topic/advanced-plugin-authoring-tutorial> Is there some point in posting a URL to a page that just says "You don't have permissions to view this topic!"? Richard.
From: Matt Kruse on 4 Mar 2010 11:56 On Mar 3, 6:57 pm, David Mark <dmark.cins...(a)gmail.com> wrote: > Matt Kruse wrote: > > For example, the response to the selectedIndex discussion really > > highlighted the skewed perspective the core developers have when > > trying to solve problems "correctly". > Sheesh. Who sent you on _that_ errand of mercy? Your habit of trying to point out how _you_ were the root of every solution, every criticism, and every observation is annoying. > You would really like to use CSS selector queries? Too bad as they are > not practical at all. They seem to work very well for me, and are very convenient. I like them. > > doing > > things like hiding and showing and animating, etc. > The animations have always been sub-standard (and ugly as hell on older > or lesser PC's, phones, etc.) If I cared about those things, I wouldn't use jQuery for them. > > jQuery is javascript for the masses. > NO. It isn't. It's a lousy script that makes browser scripting much > more difficult than it needs to be. Why would the masses clamor for that? $('#mydiv').load('feed.php .results',{limit:25}); That is very easy for a casual developer to understand and write, yet it does quite a bit of stuff under the hood. It's extremely convenient. They may not realize the caveats, but if they are developing a simple web site for their child's baseball team or a quick app to automate a process at work, simple syntax like that really empowers people to do complex tasks. > > Once you progress beyond that and learn more, you will naturally see > > its flaws. Then you'll move to something else. Which is great! > So you are now using My Library? No, and I don't see myself ever doing so. Matt Kruse
From: Matt Kruse on 4 Mar 2010 12:07 On Mar 3, 11:36 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > Matt Kruse wrote: > > But having said all that, I want to say again that I still use jQuery > > and recommend it. > Yes, I know you do, but do not understand why. I think I've explained it quite a lot. Perhaps you understand the reasons, but you just don't agree with them. Which is fine, since we are different people working on different projects in different environments. > The amount of code required to make possible css-selector queries is not > worth the amount of convenience it adds. The amount of code doesn't matter to me, so that argument isn't convincing for me. > So jQuery is good for simple things but not complicated things, huh? Can > you show us an example? Simple: <div onclick="$(this).slideToggle()"> Complicated: Google Maps > If jQuery is the starting point, then how do you propose one advance > from that? jQuery will work in most situations, for most people, at a level of efficiency that is acceptable. At some point, a developer may find that: 1) Their code is too slow 2) Their code breaks in some browsers 3) Their code breaks under some situations In these cases, the fault may lie with jQuery, and the developer will learn ways to unhook jQuery to do some process manually. As they do that, they will surely be exposed to more advanced js concepts. > I fail to see how jQuery is good starting point for progressing to learn > how to program rich web interfaces. It may help to just get the job done, instead of forcing someone to struggle endlessly with how to implement 20 different concepts on their own. IMO, it's better than downloading snippets from dynamicdrive or copying examples that may exist in code from 10 years ago. jQuery can help someone write javascript and learn that it's not to be feared. That it is accessible and can do cool things. It's not some terribly cryptic language that makes no sense and always breaks, as many people often believe. jQuery can allow someone to have a successful experience with javascript, rather than fighting it and hating it. > Based on what you've written, you seem to indicate that you have not > moved on, but still in fact do use jQuery for simple things. That is moving on. Keep in mind, I don't use jQuery all that often personally, but it's used in many projects and teams where it is the best choice. Just because it's not something I often code with doesn't mean I don't think it fits for other situations. > I recommend a different strategy: Read the pertinent standards (they are > listed in the FAQ), and study OOP and Agile programming, as it pertains > to TDD, interface design, and code organization. Great plan, for someone who has the time, interest, and capability of understanding all that. If you need to guide a team of junior developers through building a web app that will hopefully actually work at the end of a short development schedule, I doubt your strategy would be very successful. Matt Kruse
From: Gregor Kofler on 4 Mar 2010 12:28
Matt Kruse meinte: > jQuery can help someone write javascript and learn that it's not to be > feared. That it is accessible and can do cool things. It's not some > terribly cryptic language that makes no sense and always breaks, as > many people often believe. No. jQuery won't help anyone to "write and learn" JavaScript. And it is so popular, *because* JS is perceived as "inherently evil". And jQuery won't change that perception. Gregor -- http://www.gregorkofler.com |