Archive for the ‘JavaScript’ Category

JavaScript Meetup – Friday 6/12/09

Monday, June 8th, 2009

One of the hardest thing about living in the suburbs is that the overwhelming majority of computer developers live in the city. Although I live in the Chicago area, this is undoubtedly true of any city and it makes it harder to connect with industry peers.

Over the past two months, I’ve been trying to organize a local JavaScript meetup group. At first I thought the group would be ExtJS specific (as I’m very involved with the ExtJS community), but I’ve had second thoughts over the past couple of weeks. I’m thinking that it would probably be a good idea to organize a more general JavaScript (or even front-end development) group that would attract a larger audience and discuss a wider range of topics.

While I haven’t fully figured out what direction the group will take, I have secured classroom space this Friday, June 12th at the College of Lake County. The meeting will be held in room T232 at 7:00pm. This will be the group’s first meeting, where I plan on presenting:

  • An introduction to ExtJS
  • Unit Testing in ExtJS (a personal project of mine)

I am sending an open invitation for everyone to join us at CLC this Friday. I’m hoping to see some familiar faces, but I’m looking forward to meeting new people as well.

If you can’t make it, I have setup a website where I’ll have updates about future meetings: Chicago Ajax Developers

Recent AJAX Project

Wednesday, June 3rd, 2009

Before I left for vacation, I finished the latest-round of edits to a project I’ve been working on. I’ve received word that the code is live and I think it’s worth bragging about.

College Movers Inc. is (obviously) a moving company that specializes in helping college kids get to/from college. I was asked to build the AJAX controls for their order form, and I’m really happy with the way it turned out.

The order form uses Ext Core for some client-server interaction, as well as DDAccordion which is a cool JS/CSS slide effect built on top of jQuery.

I can’t take credit for the graphic design or back-end PHP/MySQL work, but every line of code on the order form was written by me. Check it out and let me know your thoughts!

JavaScript Unit Testing in ExtJS

Wednesday, May 13th, 2009

*** Update 12/21/09: This is now an open source project available on Google Code! ***

I’ve been using ExtJS for almost a year now and I’ve built quite the library of custom extensions. As many JavaScript developers will tell you, the problem with having large code libraries is that (at some point) you have too much code to keep track of. Documentation is essential to maintaining organized code, but documentation doesn’t help you find a bug in 16,000 lines of code. Upon this realization, many developers begin researching a topic known as unit testing.

For most developers (those using Java and C#, among many others) unit testing is a fairly easy process to start. However JavaScript (in particular AJAX) doesn’t play nicely with unit tests. Not only do AJAX developers have to worry about variable scope (i.e. JavaScript’s wonderful global namespace), but we also have to consider connection/latency issues. It is incredibly hard to write reliable tests that have to sit and physically wait for a server response.

I’ve spent a lot of time researching the subject, and while I’m no expert I can clearly see that frameworks like YUI and jQuery have successfully engineered JavaScript/AJAX unit tests. But where does that leave ExtJS?

Up to this point, ExtJS developers have had two options:

  1. Use the YUI Test, qUnit or similar testing suites (none of which use the ExtJS libraries), or
  2. Complain that ExtJS has no unit testing suite

Anyone who attended the Ext Conference this year will remember how many people were asking about unit testing. . . it actually became really frustrating to hear the question asked so many times.

So while I’m certainly not an expert on the subject of unit testing, I’ve decided to actually do something about this problem. Today, I posted a thread on the ExtJS message board detailing my custom Unit Test class – which is built using ExtJS objects, and comes with a mediocre user interface. I’ve posted a demo of the ExtJS Unit Testing code on my own site.

My code is far from complete (I’ve posted as version 0.1), but I’m hoping over time to develop it into something as powerful as YUI Test. In the current version, I’ve got the following functions:

  • generateGuid()
  • assertEquals()
  • assertNotEquals()
  • assertUndefinedOrNull()
  • assertNotUndefinedOrNull()

These methods tackle some very basic testing functionality, and I think they’re pretty self-explanitory. The next step will be attempting to test ExtJS objects and their extensions.

ExtJS Conference 2009

Tuesday, April 14th, 2009

So I’ve been down in Orlando for a little over a day attending the ExtJS Conference 2009. So far, the conference has blown away even my highest expectations.

To start the conference, the ExtJS staff setup the event like it was some sort of fashion show — complete with lighting effects, cool music and an announcer to get the crowd excited.

ExtJs Conference 2009

After we were introduced to the ExtJS team members, Douglas Crockford from Yahoo! Inc. was the first of many speakers to take the stage discussing an assortment of topics.

Keynote

I particularly liked what Mr. Crockford had to say. While he had a number of points, the ones which resonated most with me were:

  • Java failed as a web development language.

…well, kind of. It failed in the respect that Applets are virtually nonexistent in today’s Web 2.0 movement, and it certainly didn’t live up to the hype that all of my college professors tried to convey. JavaScript, more specifically AJAX, really succeeds today where Java failed.

  • W3C Standards aren’t necessarily worth of blind devotion.

Why do so many developers blindly follow the W3C? Sure they’ve helped to standardize modern web development, but they’ve made (and in some cases, continue to make) questionable decisions which seriously affect the Web environment. Think about how bad the security model is for JavaScript inside a browser. The folks at the W3C failed to prevent things like XSS — yet many people still believe the W3C is going to save the world (wide web).

  • Is the new browser war a good thing?

An interesting question. When IE and Netscape fought the first browser war, HTML developers were left with a ton of markup tags and browser-specific syntax which ultimately thwarted JavaScript developers from doing anything useful until very recently. With IE, Firefox, Safari, and a host of other browsers playing fast-and-loose with web standards and supported features, are web developers really even getting a say? Or are Microsoft and Mozilla simply touting their own agendas to make money?

Release of ExtJS 3.0

Listening to the new features of Ext3.0 has me very excited, yet slightly worried as I’m forced to look very hard at my source code to prevent new bugs when I decide to upgrade from v2.2.1. The new charting components, button upgrades, and RowEditor() class really sound like cool improvements.

Roundup

The rest of the day was spent sitting in various sessions about this-or-that feature. All were extremely informative, and I thoroughly enjoyed meeting the team.

Complaints

I was the first of many people to complain about our accomodations at the Ritz Carlton hotel in Orlando, FL.

Yes — I’m complaining about the Ritz Carlton, and here’s why:

  • They don’t offer transportation to/from the Orlando airport. Using the hotel’s recommended car service one-way to/from the airport will cost you $60.
  • If you rent a car, parking is $12 a day… $20 for valet service
  • There’s no free internet in the hotel — $9.95 for 24 hours
  • The restaurants inside the hotel are very expensive (not really unexpected)

I do need to point out that the Ritz gave us discounted rates, and that we have complimentary lunch with the conference (which is quite good). We did have free wireless internet inside the conference center, but it didn’t extend into our hotel rooms.

Personally, I feel like we’re being nickle-and-dimed by the hotel and I wish ExtJS had provided all of this information ahead of time so I could have chosen a different hotel. My company will reimburse me for some of the expenses for this trip, but certainly not all of them — which means I’m personally losing money. Not cool.

Tomorrow is day number two for the conference, and I am definitely looking forward to it. Despite my feelings toward the hotel, the conference has thus-far been well worth the trip.

JSMAG – Online JavaScript Magazine

Friday, April 3rd, 2009

I was on Facebook the other day, and I saw an advertisement for an online magazine aimed at JavaScript developers: JSMag.

I checked out the site, and I have to say that I’m pretty impressed with the idea. Each issue is something like 35+ pages (in PDF format), and the magazine can be purchased ad hoc or by yearly subscription. The price is basically the same as any other magazine you’d buy at the grocery store.

Topics include things I use everyday: ExtJS, jQuery, debugging, unit testing. I’ll be honest and say I haven’t actually read any of the issues yet (I’m trying to get my company to buy a subscription), but I do like that a magazine is dedicated to JavaScript development.

I do have a funny story, though. When I first visited their website I was using IE7 and their CSS was all messed up. I sent them an email and I got a response this morning:

Me: Have you looked at your site in IE7? (v7.0.6001.18000) It looks like shit. Looks great in Firefox though.

M. Kimsal: I’m aware.  We were supposed to have some fixes in place for groovymag and jsmag this month, but they’re not in place yet – probably  by next week.  Only 8% of the visitors are IE users, but that might be a self-fulfilling prophecy. Thank you for being a proverbial light under our proverbial backside, though.

I found it funny.

I do look forward to reading the magazine, and I hope JSMag succeeeds.