About Me

My photo
Experienced Web Developer using C#, ASP Classic (VBScript) and ASP.NET, MySQL, T-SQL, and other SQL variants, JavaScript (W3Schools Certified and very well versed in jQuery and learning Dojo), and XML. Heavy interest in JavaScript, framework creation on various language platforms, and keeping up with the best industry-accepted practices.
Showing posts with label javascript libraries. Show all posts
Showing posts with label javascript libraries. Show all posts

Monday, August 1, 2011

It's been a while!

It truly has been a while since I have posted anything here. To be quite honest, I have immersed myself in so much JavaScript best practices, new patterns, performance optimization, etc, that I have highly neglected this blog!

Since my last few posts, I have increased in my JS knowledge IMMENSELY, and that is no joke. I am w3schools certified (link to cert) *with excellence*. I got 69 of the 70 questions right! Woo hoo!

I have studied very carefully presentations, books, papers, etc from various JS gurus, Nicholas Zakas, Douglas Crockford, John Resig, etc. I actually printed out the current ECMAScript specification and read it on a flight to Las Vegas for a team meeting.

I am not joking when I say this, JavaScript is one of my biggest passions. If I could do nothing but analyze problems and engineer solutions in JavaScript all day long, I would do it!

Unfortunately, there isn't really that great of a job market that I can find. I don't have any degrees as of yet, and the area I live in really kind of prevents me from finding any solid JS jobs, and it'd be REALLY hard for me to relocate.

Members on my team at work think I'm really good at JS, and I think I'm pretty good, too. I'd like to be able to focus solely on that, as it is easily my biggest strength, but it's really hard to do that right now.

I'll keep it as a hobby, and maybe one day, I'll find a JS engineering job to call my home.

In other news, I am going to check out Dojo. I've been using jQuery for a very long time now, and I'm interested to dive into another JS library. I like what Dojo brings to the table. I haven't had a chance to dive into the source just yet, but at face value, it promises to offer some really neat functionality.

I am in the process of checking out the repository for the source now (it's huge). I like to dive into source code when I'm picking something new up.

I also purchased a book called Mastering Dojo: JavaScript and Ajax Tools for Great Web Experiences to read over the next few days.

I'm excited to really dig in and learn some new stuff!

Monday, September 14, 2009

Let's keep it DRY, folks.

If there's one thing I've come to love more than anything else in programming, it's the concept of DRY (Don't Repeat Yourself).

Seems like common sense, doesn't it?  I mean...really -- DUH!

As common sense as it may seem, there are a lot of people out there who do repeat themselves.  In fact, I used to be one of them!  I have been spending a little extra time lately sitting down and seeing what I can functionalize because what may initially seem like added work from the tried and true copy-paste method, can actually save you a ton of time not only in later stages of development, but also in instances where you need to debug and make additions to your applications.

Let's look at the run down on DRY coding in JavaScript and why it's useful.

As any programmer with even a little bit of experience can tell you, requirements for projects are normally constantly changing.  It's because of this constant change that the DRY style of programming really shines.  As the criteria change, if you weren't using DRY methods of coding, you would have to make changes in multiple locations.  Keeping it DRY allows you to make a single change and be done with the modification.

Let's face it-- everybody hates debugging.

Imagine you're debugging an application that's a few thousand lines in code. You spend an hour or so on it and finally find the issue that's been causing it all.  You tried to call the getElementById method of documnet, which is undefined.

Too bad you copied/pasted this functionality into about ten different places...

Now imagine that you utilized a functionalized method in those ten places.  You find the error sooner because you're digging through less lines of code, and when you find it, you only correct it in one place and then you're done!  The same goes for making changes to that functionality.  You make the addition in one place and you're done!


A really good way to implement DRY programming is by creating or using pre-built JavaScript libraries.
Using a JavaScript library, you utilize reusable, functionalized code that can really decrease dev time, increase performance and make your code look a lot cleaner.
There are some really good libraries out there.
Some ones you may want to look into are (in no particular order):
I use jQuery.  It was the first library I stumbled upon and it's suited my needs perfectly.  Each library has its strengths and its weaknesses, so be sure to check them all out before deciding which one to use.
John Resig also wrote a very good blog about Building A JavaScript Library

The concept of DRY can easily be adapted to any programming language.  The reason I chose to talk about it in JavaScript is because that is the language I am most familiar with, but the logic is sound in any language that can utilize functionalized code.

Do you have any good examples of DRY programming?  All languages welcome!