Rey Bango

Icon

20 Years in IT & Still Going Strong

jQuery Still Amazes Me After 3 Years

I have some downtime at the moment so I wanted to get back to coding a little bit. One of the things I’ve been wanting to mess around with for some time is the Flickr API, mainly because I upload a boatload of pics to the service. Chris Heilmann posted a really great tutorial on pulling back pics using JSON and plain ole JavaScript. I have to admit that it was insanely easy and Chris, as always, did a great job of breaking it down. I made a few tweaks since, as he mentioned, document.write isn’t the best choice for outputting and the code was trivial:

function jsonFlickrFeed(o){
var i = 0, mainDiv = "", foo = "";
mainDiv = document.getElementById( "main" );
while(o.items[i]) {
foo = document.createElement( "img" );
foo.setAttribute( "src", o.items[i].media.m );
main.appendChild( foo );
i++
}
}

So I wanted to do this in jQuery just to see what it would look and had a “woah” moment:

function jsonFlickrFeed(o){
var mainDiv = $( "#main" );
$.each( o.items, function( index, node ) {
$( "<img />" ).attr( "src", node.media.m ).appendTo( mainDiv );
} );
}

It was a silly little snippet of code but it took me back to the feeling I had when I first jumped into jQuery way back in 2006 where the brevity, power & simplicity just amazed me. And the feeling truly hits home after I had read the following from Chris just yesterday:

Use libraries

And for that, use libraries like Dojo, jQuery, YUI, mootools or whatever to work around the browser problems so that you can concentrate on what you want to build rather than how it fails.

Libraries fix browsers

Our main enemy to build cool products are browsers. The technologies and standards that drive the web are dead easy – we just don’t have time using them as we spend most of our time testing and wondering why browsers don’t implement them in a predictable manner. This is where libraries come in and my plea here is to use them. Using libraries you can write predictable applications built on a base that can be altered for all the browsers to come – if you build towards the browsers in use today you build for the past. We’ve done that before and paid dearly for it.

I wholeheartedly agree with this. Yes, it’s very important to understand plain ole JS, which is why I wanted to do this exercise using it but just seeing the minimal effort required to do the same in jQuery just reinforces my belief that libraries are an extremely important arsenal in your toolkit if anything solely for the cross-browser handling that they provide. In my case, jQuery is my tool and I love it. What’s your library of choice?

Is jQuery Safe?

Today I saw an interesting question posted on the jQuery support group asking if jQuery is virus & trojan free. I found it a bit of a strange question considering that:

  • The jQuery Project has been alive and growing for 3 years
  • The library itself is basically text

I have heard of occasions where Norton AV would throw false positive alerts on packer or minified versions of jQuery but that’s Norton’s fault for bad heuristics. So I wanted to address it here.

The jQuery downloads are basically text files that we manage. We have a tremendous number of users downloading and leveraging jQuery from our sites daily so the likelihood that we’d know something was up is VERY good. In addition, a ton of well-known companies are using jQuery and it’s a pretty good indication that everything is cool when you see who is using it:

http://docs.jquery.com/Sites_Using_jQuery

If you’re concerned about downloading it from our site or using the Google hosted version, we provide the code so that you can create your own copy of it. This gives you the best level of control over the build process:

http://docs.jquery.com/Downloading_jQuery#Subversion_.28SVN.29

Now, is it possible that someone is offering up a bad version of jQuery? Sure and that can be the case for Prototype, MooTools, Dojo or any other popular framework. We obviously can’t control what someone else does, only what *we* can provide via our site.

With that said, please only download jQuery from the official site or use the version hosted on Google’s CDN. Here are the official site links:

http://jquery.com/
http://code.google.com/p/jqueryjs/
http://jqueryui.com/ (for the jQuery UI library)
http://code.google.com/apis/ajaxlibs/

Downloading jQuery from any site other than the ones listed above is not recommended as we can’t ensure the validity of the code. And if you do find a version of jQuery that is doing some “evil”, please let us know so we can advise the jQuery community.

We want you to enjoy your experience with jQuery and provide the best option available for your usage.

Happy 3rd Birthday jQuery! – jQuery 1.3 and the jQuery Foundation

Happy Birthday to jQuery! jQuery is three years old today, after being released way back on January 14th, 2006 at the first BarCampNYC by John Resig.

We have four announcements for you today, we hope you'll enjoy them!

jQuery 1.3

First, we have an excellent new release of jQuery ready for you to enjoy. The big features of this release are:

  • Sizzle: A sizzlin' hot CSS selector engine.
  • Live Events: Event delegation with a jQuery twist.
  • jQuery Event Overhaul: Completely rewired to simplify event handling.
  • HTML Injection Rewrite: Lightning-fast HTML appending.
  • Offset Rewrite: Super-quick position calculation.
  • No More Browser Sniffing: Using feature detection to help jQuery last for many more years to come.

The full details of the release can be found in the release notes:
http://docs.jquery.com/Release:jQuery_1.3

We're currently planning on a follow-up jQuery 1.3.1 release sometime within the next week or two to catch any straggling bugs that might've slipped through. If you spot any bugs please be sure to submit them to the bug tracker.

Sizzle

jQuery has a brand new CSS selector engine – nicknamed 'Sizzle'. You can read the full details behind it in the jQuery 1.3 Release Notes (including performance numbers).

More importantly, though, we're taking a big leap with Sizzle: We're releasing it as a completely standalone project to be collaborated upon by many library creators and developers. We saw an opportunity to give something back to not just the jQuery community but to the JavaScript development community as a whole; and at the same time be able to collaborate with developers of other libraries on a single, unified, selector engine. We feel that there's too much competition and not enough collaboration occurring and so we put our code out on the line as a good first step towards working together.

As a sign of good faith and willingness to collaborate, we've turned over Sizzle to the Dojo Foundation (an excellent non-profit well suited for this project, not to be confused with the Dojo Toolkit). We wanted a common meeting ground where all developers would be able to work together and under which there would be a clear long-term copyright holder.

Our request for collaboration has already seen an amazing resopnse: Developers from Prototype, Dojo, Yahoo UI, MochiKit, and TinyMCE (and many other projects) have all shown interest in refining Sizzle to perfection.

A rough Sizzle project page can be found here:
http://sizzlejs.com/

Along with the full source code:

http://github.com/jeresig/sizzle/tree/master

New API Browser

Along with the release of jQuery 1.3, I'm pleased to present the new API browser, developed by Remy Sharp, available at: http://api.jquery.com/.

jQuery API Browser

This is an alternative view to the existing jQuery API that should be easy to navigate and use.

The new API browser includes the following features:

  • All the latest jQuery and jQuery UI documentation.
  • The ability to mark pages as favorites for those pages you keep wanting to return to.
  • Syntax highlighting in the code examples
  • Live running of examples within the browser
  • Links to edit and experiment with the code examples

Most importantly though, the API browser is also available offline as an Adobe AIR application (thanks to Tane Piper's AIR framework). The interface looks and works the same, and includes an auto-update mechanism, so you'll always be up to date.

Download and install the AIR API browser

If you find problems please submit a bug to the bug tracker under the 'site' component.

Which leads us to the last, and certainly not the least important, point…

jQuery Foundation

With the jQuery Project growing at a tremendous rate, it was important for us, as a team, to take a step back and determine how the project's ownership should be handled. Currently, John Resig, jQuery's founder and lead developer, and Paul Bakaus, lead developer for jQuery UI, both maintain ownership of their respective projects. This posed several concerns from a practical and legal perspective as it enjoined two individuals as the owners of the projects instead of a formal organization. As more individuals and corporations started contributing to the projects, these concerns became even more evident causing confusion as to who were the correct copyright holders for specific units of work.

After meeting up to talk at the recent jQuery Conference, we decided to really make a concerted effort to fix this and determine how we could shift ownership of the jQuery projects to a foundation-type organization that would:

1. Understand the nature of open-source software development.

2. Allow us to continue to manage the project unhindered.
3. Ensure that the projects continue to live on regardless of who is involved in the effort.

After examining many options we came to a final conclusion – and we're excited to announce that the Software Freedom Conservancy has extended the jQuery project an invitation to join the non-profit organization and continue developing software under its auspices. By joining The Software Freedom Conservancy, the jQuery projects and community immediately realize some important benefits:

1. It allows the current project members to continue to manage the projects and maintain ultimate responsibility for the direction of current and future efforts.
2. It allows the projects to be considered a true non-profit efforts allowing us to be able to accept donations and contributions without incurring tremendous personal financial liability.
3. The copyright of the code will be assigned to the conservancy thus ensuring that no single person will own contributions or assets of the project.
4. It will allow corporations to write off time when an employee contibutes to a project.
5. Most importantly, it ensures that the jQuery projects will always be open and free software.

This is a big step in formalizing the jQuery projects and an important accomplishment in ensuring that the investment being made by the jQuery community is protected. We'll be making the transition into the conservancy over the coming weeks. There will be very little, to no, change in how the project will run. The jQuery Team will still run and manage the project and we're still going to work hard to build the best JavaScript library possible. If anything this will help to free up some of our time so that we can spend more time coding – and who doesn't like the sound of that?

Happy 3rd birthday, jQuery!

Thoughts and Goals for 2009

As I begin 2009, I've been pondering quite a bit about which direction I'd like to take my career in. At the age of 40, I'm certainly not a spring chicken but I do feel that I'm at a great point in my life where I have a tremendous amount of experience while still feeling the fire to learn more. For the last 19 years or so, my career has revolved around development. Basically, I've been a coder most of my career and apart from some short stints in a business development role, I've really focused on the development side of things. This isn't a bad thing by any means and I think I've been fairly successful at it. I do feel, though, that it's time to expand a bit and 2009 will be the year to do it.

Product Management

I want to get more involved in product management. Taking a product from inception to production is REALLY challenging. I'm not talking about coding it. I'm talking about overseeing the process of taking an idea and helping drive it to market. That means more interaction with users, marketing, biz dev, PR and media.

The fact that I have a strong technology background, in my opinion, will help by being able to understand the bottlenecks in the process and helping any team that I work with overcome those hurdles.

My new boss, Nick Nguyen, has already started mentoring me on this and I believe he'll be able to teach me quite a bit.

Technology

My bread-and-butter has always been my technical side and I can't ever see that going away (although diminishing in importance slightly).

Firefox Add-ons

Apart from a focus on product management, I think that becoming “Mark Finkle” knowledgeable in add-on development will be the single most important goal for me in 2009. It's such an important part of my day-to-day and will go a long way in helping me support the add-ons community. Having a solid understanding of the development process will help me do a better job of being a product manager in the future.

ColdFusion

For the last 10 years, I've been knee deep in ColdFusion and, if I say so myself, one of its biggest supporters and flag-wavers.

While I love ColdFusion and think it's an amazingly powerful application server, I also feel it's time for me to explore other server-side options. When you look at the landscape, there's an abundance of very hot languages and frameworks which are not only feature-rich but monetarily appealing. The demand for Python, Ruby & PHP skills, especially when coupled with Django, Rails/Merb or CakePHP, has grown steadily and the need to diversify is pretty obvious. There's still a great demand for ColdFusion developers but I think to keep yourself fresh, you need to try new things (even if they're more painful than what you're used to).

With Mozilla heavily vested in PHP & CakePHP, chances are that I'll go that route although the other two server technologies are very appealing.

jQuery & JavaScript

I think many of my blog readers know that I'm a member of the jQuery Project Team and it's something that I'm very proud to be a part of. The project has skyrocketed in part to the amazing team that we have and I firmly expect to continue to push the jQuery message into 2009.

Just before I started using jQuery, I was a server-side developer who wanted to expand in to JavaScript and client-side development mainly because of Ajax. So I bought a book and started hacking at JavaScript, DOM and XHR. Shortly after I discovered jQuery and it was like the sea parted and I saw the road to the client-side. I jumped onto the jQuery train and never looked back.

With that said, of recent, I've felt a bit of hole in me. Over the last 2 years, I've met some amazingly smart JavaScript developers and read some really awesome JavaScript articles and it hit me how much I want to learn more about the JavaScript language. Mind you, I'm not interested in being the next John Resig or Peter Higgins but I do want to develop a much stronger understanding of the techniques and patterns that make libraries such as jQuery, Dojo, YUI & MooTools so helpful.

The great thing is that my time with jQuery has really helped me understand so key concepts of the JS language but I also know there are techniques that I am not fluent in and I think understanding them will help me dramatically improve my contributions to the project & community as well as my own development work. Does this mean I'll stop using jQuery? No freaking way! jQuery continues to be a God-send and I couldn't picture having to hand-code all of the script that jQuery provides in one small method call. And if I want to learn how to do it, I have no better teacher than John Resig himself, whom I can call anytime and ask him for help. In other words, jQuery FTW!

What it does mean is that I will start practicing straight JavaScript a lot more and going back to the basics to make sure I understand things clearly. I've already started by cracking open Christian Heilmann's book “Beginning JavaScript with DOM Scripting and Ajax”. I'm planning on following that book up with the following:

  • Pro JavaScript Techniques by John Resig
  • Pro JavaScript Design Patterns by Dustin Diaz
  • Object-Oriented JavaScript by Stoyan Stefanov

I'll also be hitting up the YUI theatre since they have some really awesome videos by Eric Miraglia & Douglas Crockford.

Getting a better grasp of JavaScript will also help me in achieving my goal of knowing the Mozilla add-on platform at the guru level.

CSS

One of my biggest weaknesses is my lack of advanced understanding of CSS techniques. I can certainly use CSS and create a basic stylesheet but there are so many dimensions to CSS which I don't know. If I could be half as talented in CSS as Bradley Sepos or Scott Jehl, I'd be happy and I think that achieving that isn't unattainable.

I've bought a couple of books including a video tutorial by Eric Myers and yep Sitepoint books, all highly recommended.

Writing

One area that I've been falling behind on is writing more articles and blog posts for my personal blog as well as Ajaxian. Ajaxian is extremely important as it allows me to share techniques and code that I find useful, in the hopes the community will also find it beneficial. It's a great soundboard and I really need to dedicate some time to it.

The AMO blog is another site that I plan on giving more attention to especially as I become more proficient in add-on development.

Finally, I want to contribute more content to LearningjQuery.com. My good friend Karl Swedberg has done a great job building that site and I need to do a better job of supporting him.

Next Steps

The next logical step for me is to decide how to prioritize what I learn. The product management side of things is easy since it'll be part of my daily work and I have good mentors including Basil Hashem and Nick Nguyen.

Learning another server-side language may ultimately fall to my lowest priority simply because I see a greater value proposition by becoming strong in add-on development and JavaScript.

The nice thing about my job is that I can expand into a non-technology role (at least not coding) while still being able to dabble in technology.

I have some planning to do in the next week or so so I can set a workable schedule.

jQuery, Microsoft, and Nokia

We have two pieces of fantastic, albeit serendipitous, news today: Both Microsoft and Nokia are taking the major step of adopting jQuery as part of their official application development platform. Not only will they be using it for their corporate development but they will be providing it as a core piece of their platform for developers to build with.

Microsoft is looking to make jQuery part of their official development platform. Their JavaScript offering today includes the ASP.NET Ajax Framework and they're looking to expand it with the use of jQuery. This means that jQuery will be distributed with Visual Studio (which will include jQuery intellisense, snippets, examples, and documentation).

Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your .NET applications. jQuery helpers will also be included in the server-side portion of .NET development (in addition to the existing helpers) providing complementary functions to existing ASP.NET AJAX capabilities.

Nokia is looking to use jQuery to develop applications for their WebKit-based Web Run-Time. The run-time is a stripped-down browser rendering engine that allows for easy, but powerful, application development. This means that jQuery will be distributed on all Nokia phones that include the web run-time.

To start Nokia will be moving a number of their applications to work on the run-time (such as Maps) and building them using jQuery. jQuery will become part of their widget development platform, meaning that any developer will be able to use jQuery in the construction of widgets for Nokia phones.

Microsoft and Nokia aren't looking to make any modifications to jQuery (both in the form of code or licensing) – they simply wish to promote its use as-is. They've recognized its position as the most popular JavaScript library and wish to see its growth and popularity continue to flourish.

In fact their developers will begin to help contribute back to the jQuery project by proposing patches, submitting test cases, and providing comprehensive testing against their runtimes. As with any contribution that comes in to the jQuery project it'll be closely analyzed, reviewed, and accepted or rejected, based upon its merits, by the jQuery development team – no free ride will be given.

A significant level of testing will be added to the project in this respect. The jQuery test suite is already integrated into the test suites of Mozilla and Opera and this move will see a significant level of extra testing being done on Internet Explorer and WebKit – above-and-beyond what is already done by the jQuery team.

The whole jQuery team is quite excited by these prospects and wishes to take this opportunity to welcome both companies to the jQuery community. It's phenomenal to see these two, major, corporations take the large step of using jQuery as a base for their, and their developers, future development. They will join a long list of happy jQuery users, including Google, Intel, IBM, Intuit, Reuters, and many others.

Update: Blogs posts by Scott Guthrie and Scott Hanselman, both at Microsoft, have posts on the subject matter from their perspective.

jQuery Replacements for CFGRID, CFWINDOW, and CFTOOLTIP

Sean Corfield blogged about some new jQuery-based Ajax replacement widgets created by Michael Sprague.

Michael wrapped the functionality of FlexiGrid, jTip and jqModal (3 of the best jQuery plugins available) into easy to use ColdFusion tags that serve to replace CFGRID, CFWINDOW, and CFTOOLTIP.

I checked them out and Michael did an excellent job!

Thanks for finding this Sean.

jQuery Site Redesign – The Community Speaks

As many of you have seen by now, the jQuery Project's site has been redesigned. It had been a long overdue task and it was important to put a fresh new spin on the main hub, and the face, of jQuery. One of the things about the jQuery Project is that we've never run with the crowd or accepted the norm. By pushing boundaries and sometimes being “in your face” we've not only grown tremendously in popularity but we've pushed most of the other JS library projects to rethink their own principles and make changes to improve their products. That's a good thing for everyone as competition is always good.

So, it should come as no surprise by the drastic change in the jQuery website. So far, the single biggest complaint has been associated with the new banner (ie: rockstar caricature & slogan). Again, we wanted to push the boundaries and come up with something that would generate a lot of buzz. Overall, we've succeeded in that goal with plenty of positive feedback but unfortunately, with some very negative comments as well. We actually value both types of feedback and want more as it's the only way to determine if we're on the right track. As with any site redesign, you can't please everyone and we understand that. But we also want everyone to realize that this is a first cut and it doesn't mean that it can't be tweaked.

We're actively reviewing all of the feedback and will certainly be looking at how to best handle some of the concerns of the community. After all, the community is what makes the jQuery Project so special and so different from other projects. In addition, the jQuery team has always listened to the needs of the community and this time is no exception. Again, I think the team is unique in that we *DO LISTEN* to the community and we're going to work on making the site an invaluable tool for everyone. So just give us some time to go through the messages and keep an eye on this blog for updates.

Thanks for your patience and we truly appreciate your feedback.

jQuery Conference 2008 Registration Open

Registration for jQuery Conference 2008 is officially open. Register now to ensure your spot!

As announced, this one-day conference will be held in Boston on Sunday, September 28, and will feature two tracks of presentations (beginner and advanced) from jQuery project members and a few special guest speakers. A registration fee of $50 will help cover the cost of the venue, as well as food, beverages, and T-shirts for all attendees.

We're finalizing a convenient venue, especially for those who will be attending The Ajax Experience conference the following Monday through Wednesday. We're still firming up the agenda as well, but you can expect this to be a blow-out event.

If you have any questions, please feel free to contact us at events [at] learningjquery.com

jQuery Camp 2008 Announced

The jQuery Team is pleased to announce the second annual jQuery Camp! jQuery Camp 2008 will be held on Sunday, Sept. 28, the day before The Ajax Experience, in Boston, MA (location TBA).

Last year, over 100 jQuery developers gathered for a full day of jQuery sessions, which included talks from such big names as jQuery creator John Resig and other core team members, as well as talks from expert users exploring new and exciting jQuery projects. It brought together the largest group of jQuery Core Team members ever assembled, and gave users the opportunity to pick their brains and pitch new ideas.

The event was a *clear* success, and this year's camp promises to be even better.

jQuery Camp 2008 will offer two tracks, providing both introductory and advanced sessions, covering a variety of topics. Ajax development, Ruby integration, mashups, security and the recently released jQuery UI component and effects library are just some of the topics already lined up.

jQuery Camp 2008 will charge a nominal fee of $50 per person, which will include lunch. Attendees need NOT be registered for The Ajax Experience to attend. Registration will open in July; keep an eye on jQuery.com for more details!

For those attending The Ajax Experience, show organizers have recently announced a half-day time slot for additional jQuery sessions, on September 29th at the conference center. The agenda is still up in the air, but we're thinking of offering a “Dream Team Code Review” session, where users can have code reviewed by members of the jQuery team. We're interested in your feedback; would you attend this session?

jQuery Camp 2008 is a truly fantastic opportunity to learn from the jQuery team and socialize with top jQuery developers; we're looking forward to meeting everyone!

See you all in September.

Asked by Packt to Review Their jQuery Books

I've been very fortunate to have met some very smart people through my involvement with the jQuery Project and two of those are Karl Swedberg & Jonathan Chaffer. Apart from being really awesome developers, they're just all-around good people and so when Duane Moraes of Packt Publishing asked me if I'd do a review of their jQuery books, authored by Karl & Jonathan, the answer was easy.

I've started to read the books already and I do have to say that I'm immediately impressed. The style is similar to the way that Learningjquery.com is structured using real-world examples to get the concepts across. This should be a great read.

You can get more info below by clicking the images or the book titles and visiting Packt's website. My review will follow in the near future.

Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques

The jQuery Reference Guide

Twitter

Contact Me

AIM: iamreybango
GTalk: reybango at gmail dot com
GMail: reybango at gmail dot com




Rey Bango is Digg proof thanks to caching by WP Super Cache