6 ms·
Rebecca Murphey: An Online jQuery Class
- euroclydon 16y agoTangentially related: I've started using the Google Closure Compiler, and I see JS in a whole new (and mildly depressing) light now. When I first learned to use jQuery, I went hog-wild, running circles around fellow devs who didn't use it. I got so into JS, that I started writing more logic in the client, because I could, and because JS, with it's loose typing and object notation was just a fast place to write code. Now, two years later, I've embarked on a large project, an HMI in an industrial sector, and I of course made heavy use of jQuery. After 4000 LOC, the program needed some serious re-factoring in order to handle the next level of complexity. To handle the complex demands of the application, I decided to use the Closure Compiler, which is great! The only problem is, that now, I'm writing typed code, in a non-typed language, and there's not much to really like about the language, besides the fact it's on all web browsers and has a ton of third-party support. I guess my point is: I think tools like Closure Compiler and others which produce "compiled Javascript" are the future, if anything is. Maybe we'll see Python, or Java get JS like support in the browser, but if I could talk to the me from two years ago, I'd tell him: "Start using the Closure Compiler, and use less jQuery."
- jeffreymcmanus 16y agoI think there'll always be a place for scripted (non-compiled) languages, particularly in the web context, no matter how complicated Web apps become. And there are lots of strategies for complexity management; compilation is just one possibility. It's never the case that the shiny new technology blows away the busted old technology; more like the new stuff becomes another blade in your swiss army knife. What's the learning curve for Closure like and how did you come up to speed on it? It is like an API or more like a tool like gcc?
- ericlavigne 16y agoHi, I'm you from two years ago (loving jQuery, moving more code from server to browser, never used Closure Compiler). I'd like to take your advice, but I'm confused about something. It sounds like you said (1) you had a great experience with jQuery, (2) writing Javascript is a much worse experience with Closure Compiler, (3) therefore use the Closure Compiler and not jQuery. Could you please explain why you like the Closure Compiler, so I can understand the jump to (3)? (1) "running circles around fellow devs", "JS, with it's loose typing and object notation was just a fast place to write code" (2) "now, I'm writing typed code, in a non-typed language, and there's not much to really like about the language" (3) "Start using the Closure Compiler, and use less jQuery"
- euroclydon 16y agoIt depends on the size of your project. Mine is large. Javascript becomes unwieldy after a few thousand lines. Closure Compiler really helps, but in you have to use comments to tell the compiler what types your functions take and return. This becomes a drag, making JS, to me, less fun. If you're going to make a big project, I recommend CC from the start.
- ericlavigne 16y agoThanks, that makes a lot more sense. My projects so far have included well under 1000 LOC of my code per page. If and when this changes, I will watch out for this issue and consider Closure Compiler as a possible solution. I also wonder if (runtime-checked) pre/post-conditions could bring much of the benefits you speak of, with the option to use them sparingly and avoid the "drag" part. In other words, make the type annotations optional and only put them where it looks like the extra safety is important enough to be worth it. In any case, I'll cross that bridge when I get to it. Thanks for the heads up.
- kls 16y agoYou may want to look at ShrinkSafe and the Dojo build system. While it does not create quite the compactness of the Closure compiler it does get you close without enforcing constraint on the way you write JS. As well, if you are doing large apps with jQuery then you should take a look at Backbone. It helps organize the JS application architecture. In saying that though there really are better toolkits for large JS apps that are designed to provide the frameworks of application architecture in your app. Dojo is the one that I use and recommend, once over the learning curve you will find that it is designed to handle large JS application is an intuitive manner and not just by making it look like Java in the browser. It exploits the best parts of Javascript while bringing in language constructs from several schools of thought to provide a very robust toolkit. I have used most all of them and it is my choice when the webapp surpasses a certain point in complexity. I always tell people that I can save them a lot of time when it comes to JS toolkit selection and then I tell them if it's small use jQuery and if it's large use Dojo. It is meant to be slightly humorous but there is a grain of truth to it. There is nothing faster to learn and more intuitive that jQuery but it comes at the cost of reduction in it's robustness. There are tools to address this but to me they always feel like bolt on's. Dojo on the other hand trades up front intuitiveness for robustness. A trade off that toolkits like Closure make is to make JS more like Java to bring back some of that intuitiveness but at the cost of some of that robustness. Dojo is unapologetic a JS toolkit and uses JS concepts as first class citizens. It then borrows best of class language constructs from other areas of language progression. Anyway, my long winded point is, if you are having issue with growth of your jQuery application you may want to give Dojo a try. Rebecca did and was pleasantly surprised: http://blog.rebeccamurphey.com/2009/11/12/dojo-confessions-or-how-i-gave-up-my-jquery-security-blanket-and-lived-to-tell-the-tale http://blog.rebeccamurphey.com/2009/11/12/dojo-confessions-o...
- duck 16y agoI wish CodeLesson did a better job showing you what a course of theirs is like. If you have taken one before could you share what it was like?
- jeffreymcmanus 16y agoThis is a FAQ: http://codelesson.com/faq http://codelesson.com/faq CodeLesson courses are taught online; there are weekly assignments but no set meeting times for classes, which works well if you have a day job, as most CodeLesson students do. That said, there is plenty of structure, including weekly readings, message board Q&As, and several hands-on assignments each week that are evaluated by each course's instructor. Most courses have screencast videos and some have live chats.
- duck 16y agoThanks Jeffrey. I think it would be great if you put your summary from above as the top of the FAQ. I finally read through the entire thing and saw everything you mentioned, but it is just too much for a quick overview (to answer the first question that came to my mind - is this worth $xxx?).
- jeffreymcmanus 16y agoI agree that we do need to do better at conveying what our courses are like. We'll do more in the near future to make that happen -- a guided tour on codelesson.com is one obvious and easy thing we have planned. Another thing we're planning are free courses -- our first one (on programming the Etsy API) will take place in December. Taking a free course might be a good entree to what CodeLesson is about if you're unsure as to whether it's for you or not.
- catshirt 16y agoAs information begins to flow freely, it's monetary value approaches $0. Forgive my insensitivity- but based on that sentiment the content of this course is worth relatively nothing. I am of course not speaking towards the instructors ability, time, or guidance. Granted, $350 is a steal compared to formal education; but if teaching 20 people how to AJAX is worth upwards of $8,000... I need to move on to teaching.
- ericlavigne 16y agoThe instructor of this course has also written an excellent book, jQuery Fundamentals, and I am convinced that she would be an excellent instructor as well. The $350 seems steep to me as well, but I might be willing to pay it if I expected jQuery to be my main development tool. (I'm more interested in Clojure, and would have gladly paid the $1k in expenses to attend the Clojure Conj if my employer hadn't offered to cover it. http://clojure-conj.org/ http://clojure-conj.org/ That was just a two-day event, rather than a whole month of training.)
- jeffreymcmanus 16y agoThe course is a month long. How much do you bill each month?
- catshirt 16y agoLike I said- if the time spent maintaining this course (even considering there might "probably" be office hours) is worth that much money, I need to consider teaching. I don't doubt the instructor of this course in particular is capable of maintaining 4 of these courses in a month. More arguably: this information is information that is not only documented thousands of times- but there are even plenty of human resource available for free as well (consider stackoverflow). I'm certainly not suggesting Rebecca value her time at nothing. But of all professions, I'd expect programming to be the first of which you can truly learn for free. I don't mean to be argumentative, I am just being idealistic.
- jeffreymcmanus 16y ago