Speaking at Roanoke Code Camp THIS Saturday

March 9th, 2010 by Kevin No comments »

This Saturday, I will have the pleasure of speaking at the Roanoke Code Camp.  I will be presenting my talk “jQuery From The Ground Up”.  I definitely recommend that you come out for the day, even if its a few hours drive.  Roanoke has a great community, and I’ve been looking forward to this event since last year.

There are still spots available, so please go register today if you haven’t already.

http://www.rvnug.org/CodeCamp.aspx

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Join the Mid Atlantic Developer List!

March 8th, 2010 by Kevin No comments »

Are you a developer in the Mid Atlantic?

Are you interested in the the goings on in the Mid Atlantic?

If you answered YES to either question, then you might want to join the Mid Atlantic Developer group!  This group is free to join, and you’ll be in direct contact with other developers in the Mid Atlantic region.

If you’re a user group leader, use the list to look for speakers.  If you’re a community speaker, use the group to look for speaking opportunities.  Interested in speaking, but not sure how to get started?  Use the group as a resource to get started in your community involvement.

We’re here to support each other!

Join Today!
http://midatlanticdevs.groups.live.com/

Also, if you’re interested in the Southern Developer community, I would recommend you also join the Southern Developer Community started by Keith Elder.  And yes, I totally ripped this idea from Keith.  Thanks Keith!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Colossal Failures

March 2nd, 2010 by Kevin No comments »

One of my favorite television shows is Mythbusters.  It’s not that I’m enthralled with the myths themselves, but the engineering required prove the myths correct or incorrect (“Confirmed” or “Busted!”).

Recently, I ran across a session by Adam Savage talking about Colossal Failures.  Here is the video if you have an hour to kill (really the first 30 minutes is all you need to listen to), or just skip ahead.

(If you can’t see the video above, please view in your browser and not in an RSS reader)

This video is inspiring for me.  Adam talks about two instances where he took on a task where he bit off more than he could chew.  First, he talked about having to build a baseball throwing machine for department store display.  The store was under tight restrictions, and gave Adam less than a week to design, build, and implement this system.  Adam didn’t succeed due to dozens of unforeseen issues.

Second, Adam talked about having to build a set complete with a talking ATM.  He ran into tons of issues, and didn’t have anything done for the first day of filming.  He was asked to go home, and then several days later was asked to come back to get a verbal flogging from the crew.

What does this mean to us?

Failing is a method of learning.  Failing is a bit of a subjective term.  If you’ve made a mistake, you’ve failed.  Some failures are easier to rebound from than others.  However, failures are worth it if you learn something from them.

Adam learned that while he does good work by himself, the common trait of both his examples was that he didn’t ask for help.  Some jobs are too large for a single person to take on by themselves.  Keep a good network around you of people you trust and respect.  These people can be lifelines in the most frustrating times of a project.  Don’t have a network?  Look for a community event in your area.

How have I failed?

I’ve walked into several situations where I had no idea what I was doing.  Being a younger developer, I don’t have the experience as someone with 10 or 15 years experience.  In my current shop, most projects are on the shoulders of one or two developers.  With any project that has come across my path, I’ve picked them up and ran with them the best I could.  As Adam said, I was “making it up as I went.”  I made several poor decisions that seemed good at the time.  When I discovered they were bad decisions, I took immediate steps to fix them.  Never leave a bad decision for someone else to clean up.  Step up and accept them, and then proceed to make it right.  Adam talked about providing money back to his customers.  He accepted his failures, and wanted to take steps to make it right (even if it meant giving up part of his pay).

Preventing Failures

Keep a support structure.  Join a user group or visit a code camp.  Keep learning.  Surround yourself with people smarter than you.  Listen to their advice (but take all advice with a grain of salt).  One person will sometimes succeed, while a team will never fail.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Using jQuery Tabs and ASP.NET MVC Partial Views For AJAX Goodness

February 23rd, 2010 by Kevin 16 comments »

Note: This example was built using jQuery UI 1.7.2 (which packages jQuery 1.3.2).  If you use jQuery 1.4.1, this example will break.  jQuery UI 1.8 will fix.  Thanks to mvcuser.  http://dev.jqueryui.com/ticket/5065

In my current project, I’ve had the need to use a Tab control but the data inside of the tabs was way too hefty to load initially when page loaded for the first time.  Luckily, the jQuery Tab control provides this functionality for me already.  However, I needed to find a way to easily organize the tab content on the server.  ASP.NET MVC provides a great structure for this called Partial Views.

In this quick tutorial, I’ll give you a run down on how to set up a jQuery tab control and how to configure ASP.NET MVC Partial Views to work with the tab controls.

Configuring Your View

Since we’re working in ASP.NET MVC, we’re going to talk about our pages in the form of Views.  I’m working with the default “blue screen” ASP.NET MVC application.  After you’ve downloaded and linked the jQuery and jQuery UI scripts to your View (either in the view itself or in the master page), you’re going to add the following code:

    <script type="text/javascript"><!--mce:0--></script>
 
<div id="tabContainer">
 
<ul>
 
	<li><a href="/Home/GetHomeTab">Home</a></li>
 
 
	<li><a href="/Home/GetProductTab">Products</a></li>
 
 
	<li><a href="/Home/GetContactUsTab">Contact Us</a></li>
 
</ul>
</div>

This code replaces the existing content section in the Index view for the Home controller.  The most interesting part of this is the tabContainer div.  Inside of it, we’ve declared a unordered list, and several list items.  jQuery UI uses this determine how to format the tab control.

You’ll notice that inside of our list items (<li> tags) that we’re using links to various action links (and yes, I know I could use HTML helpers to build these links for me).  Now, we need to build the views that will be rendered inside the tabs.

Here is an example of building the GetHomeTab view.  Nothing special, but make sure that you select Create a partial view.  Partial views won’t have any of the HEAD, HTML, or BODY fluff inside of them.  These are perfect for our tabs.

image

Repeat for GetProductTab and GetContactUsTab.  Add a few lines of text to the views in so you know they’re working.  Here’s an example of what my GetHomeTab looks like:

&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %&gt;
 
<h1>Home</h1>
 
 
You're inside the Home tab, which was rendered via a partial view!

Before we can test, we need to update our Controller to return the views as requested.  Here’s the additions you’ll make to your Home controller:

public ActionResult GetHomeTab()
{
return PartialView();
}
public ActionResult GetProductTab()
{
return PartialView();
}
public ActionResult GetContactUsTab()
{
return PartialView();
}

You can attach models to these views and they’ll work fine.  Build and run the application.

image

And to prove that everything is working as AJAX call backs, we can look at FireBug:

image

Firebug will show that when I clicked on the Contact Us tab, it automatically made an AJAX call to our Home controller and retrieved the partial view.

That’s awesome Kevin, now Why?

Tabs can be bloaty.  They contain a ton of markup for rendering inside the tab, and all this needs to be maintained within a single file.  By loading our pages dynamically, we’re eliminating the strain on the server.  Imagine we have 10 tabs.  If the user only needs to access two of them, we’re wasting bandwidth by downloading all the additional markup.  Then the browser needs to render it and store it, waiting for the user to come along and do something.  In an AJAX environment, we only download tabs as needed.  Much less strain on the server.

Second, maintaining 11 small files is much easier than maintaining 1 large file.  If you need to make a change to the Contact Us tab, you don’t need to go searching through the main page to find it.  Instead, you locate the GetContactUsTab view and make your changes!

I hope you’ve learned something from this, and maybe implement it into your future projects.  I can tell you that it definitely makes a difference in my app where there are 10 tabs containing a lot of data.  Separating out all the pieces makes it much easier to maintain and update.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

INETA Mentor for Virginia

February 8th, 2010 by Kevin 1 comment »

My first experience with INETA was back in 2008, when I started the planning for the Hampton Roads .NET Users Group.  I think they are a wonder organization, who are a huge help to user groups across the country.OfficialLogo[1]

It was very surprising for me to have been asked last week to be an INETA mentor for the state of Virginia.  Mentors are the liaisons for users groups to INETA, and their purpose is to give the user groups the tools they need to succeed.  This is a position I take very seriously, as I think its a huge chance to give back to the community that has helped me so much over these past few years.

I’m hoping that over the next few months, I’ll be able to get around to all the user groups in Virginia and get to know better the people who run them.  Is your group registered with INETA?  If not, take a few seconds and register it today over at http://www.ineta.org.  If you’re running a group already registered with INETA, expect an email from me within the week!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

I’m now an ASPInsider!

February 4th, 2010 by Kevin No comments »

I just received news yesterday that I have been invited to join ASPInsiders.  This is really exciting for me, as it opens up a new world for me professionally.  I’m really hoping that being a part of the Insiders group will help me be a better person in the community.

I would also like to extend a huge thanks to the members of ASPInsiders that thought enough of me to consider me for joining the group.  I really hope that I don’t let any of you down.

ASPInsider_Logo_Small[1]

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Community Megaphone Podcast with @JoelCochran

January 28th, 2010 by Kevin 2 comments »

Take a few minutes and head over to the Community Megaphone Podcast, and listen to their latest podcast with guest Joel Cochran.

Joel is a good friend of mine, and has certainly taught me a lot when it comes to WPF and how to navigate through Expression Blend.  He’s a terrific resource, and I definitely recommend that if you bump into him at an event, chat him up (although he might do most the talking). 

image

Listen here

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Leaving It Better Than You Found It

January 26th, 2010 by Kevin 1 comment »

When my wife and I bought our house back in April, one of my pet projects has been to renovate the room over our garage.  I knew buying the house that it would be a lot of work, partly because the previous owner didn’t know what he was doing when finishing a room.  I’ve spent the last week and half sanding, mudding, and fixing all the walls in this room.  While sanding some dried mud tonight, I had a thought about how this experience was a lot like building software.

When building software, you’re not sometimes lucky enough to build a system from the ground up.  Normally, you’ll inherit code from developers who have been hacking it for years.  I related this to me working in my room.  I inherited a poorly maintained room.  The joints weren’t level with each other and the mud of the wall wasn’t smooth.  The person doing the work took no pride in the work being done.  The ceiling was also a “hacked” popcorn ceiling.  I say hacked because, instead of using a hopper, the person slung dry wall mud onto the ceiling giving the illusion of popcorn.  The illusion failed though because it looked horrible.

Fast forward to my work in the room last week.  I had to go through and scrap all the excess mud off the wall.  Each wall and joint had to be sanded, and mudded again in order to level everything.  I’ve spend hours of time trying to reverse the effects caused by performing the job incorrectly.

What does this have to do with software development?  Think about when you’re working on a bug in a piece of code, and it’s your first time looking at this code.  How the previous developer left the code is how you’re going to inherit it.  You might have to spend hours undoing the work of the previous person in order to get the code to a state it can be worked with.  Hacks might have to be removed and properly implemented.  Hours will be wasted that didn’t have to be.

When working on new code, do yourself and future developers a favor and leave the code in a state where it can be easily picked up and worked on.  If you’re working on existing code, try to leave it in a better state than it was when you found it.  In the long run, time will be saved, code will be more secure, and a developer will say fewer curse words.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Review My 2010 Presentation Abstracts

January 21st, 2010 by Kevin No comments »

I’m hard at work right now preparing some presentations for the 2010 code camp/user group season.  In order to make these presentations the best they possibly could be, I’m putting them out for the public to see and review.

Asynchronize with jQuery

jQuery is a fantastic tool for web developers interested in giving their web applications a little glitz and glamor. In addition to its powerful DOM transversal engine, jQuery also comes equipped for handling AJAX requests. In this presentation, Kevin Griffin will guide you through getting started with jQuery’s AJAX functionality. A basic understand of jQuery is recommended, however not required for this presentation.

Awesomize Your Windows Apps

With the release of Windows 7, many developers might be looking to take advantage of the features Windows 7 offers. This presentation offers attendees a broad overview of the Windows API Code Pack, which is a managed library for .NET developers to use for accessing some of the underlying functionality of Windows that was typically reserved for Interop fans. Topics and demos include Windows 7 taskbar functionality, Task dialogs, Libraries support, and more.

ASP.NET MVC From The Ground Up

ASP.NET MVC has taken the web development world by storm. It’s a technology that many people are curious about, but might have had trouble adopting. In this presentation, we’ll take a look at ASP.NET MVC from the ground up. We’ll peel back the layers, and look at each component of MVC individually without the Test Driven Development or Dependency Injection mantra. The goal is for you to walk out of this talk with enough knowledge of MVC to dive in! This talk assumes no experience with MVC or Web Forms (although some web forms knowledge would be helpful).

jQuery From The Ground Up

Web 2.0 has taken over; there is no doubt about it.  However, many developers are being left in the dust.  Amazing technologies such as jQuery allow developers to easily add flair to their web applications.  In this presentation, Kevin Griffin will guide you through the world of jQuery.  Starting from the bottom, we will discuss what is possible with jQuery, how do you obtain and setup jQuery in your projects, and then actually putting jQuery to work.  This presentation is designed for developers with no experience with jQuery (or Javascript in general).  An understanding of HTML and CSS is recommended.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Don’t forget to subscribe to my RSS feed

January 21st, 2010 by Kevin No comments »

Don’t forget to subscribe to my RSS feed.  Point your RSS reader of choice to http://feeds.feedburner.com/KevinGriffin and always stay up to date!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)
Get Adobe Flash playerPlugin by wpburn.com wordpress themes