New PowerShell Course
I've been working on the new Powershell course to be offerred here at Interface Technical Training. Holy Cow, it's going to be FUN!!!
I'm so impressed with this language.
To me PowerShell is the Black Flag of anything that touches .NET. It's so unassumingly powerful that you almost feel like you've been in a gang fight and won after you get the hang of it. It's very addicting. You can solve so many problems, so simply and quickly, it's almost like your writing in Perl and C# and Python and PHP all at the same time. You almost begin to feel like your playing with the .NET framework like a cat's toy. This is not in any way to minimize the .NET Framework which will go down in history as the code achievement of our age (in my opinion), it's simply to point out the Power of Powershell.
I love the name Powershell it's perfect, I also love the name Silverlight as well, man someone is doing their job in naming these technologies. Just think of something like SharePoint. Perfect name for a huge beautiful monster of a technology that is changing the world!
I'll keep you posted on when the course goes live but it will be a fantastic dive into the world of Powershell.
Desert Code Camp Wrap Up!
Desert Code Camp 2007 was a resounding success! Congratulations to Lauren and Scott and everyone who helped to make this such a wonderful event!
I would like to thank everyone who attended my presentation and as promised, here are my powerpoint slides and code files.
You should simply be able to open the folder codecamp2007 as a website. The default.aspx page is the one with the master page attached. You will have to go into the web.config and remove the entry which says: <pages styleSheetTheme="codecamp" /> if you want the theme disabled, then go ahead and re enter it in the same spot when you want to enable the theme.
This page has not been tested in FireFox yet so there might be some display things that come up, but it should be minor.
The text file is what I use to keep a running html if statement, it's not part of the web application, I just find it to be a useful way of doing it.
Many people have asked me about a book which I would reccomend and the absolute best book to be published as far as really helping you to learn is this one from Wrox:
Beginning CSS: Cascading Style Sheets for Web Design, 2nd Edition
by Richard York
The format is amazing with full color which really shows off some of the examples with astute clarity not available in a black and white book. I especially like the sections on psuedo classes and selectors and he does a stellar job of pointing out which features of CSS are supported by which browsers. He even has a section about referring to expressions right from within your CSS. The book is noted as beginning, and i understand why since it starts at the beginning, however I must say that if you are a CSS expert you will also LOVE this book so it might just as well have been called beginning through advanced. If you work through this book you will know CSS cold. I highly reccomend this book.
Well that's it for now. So many great sessions, Dan Wahlin's Silverlight, Mike Palermo's Code to not write code...my brain was hurting but in a good way. I also attended an e commerce security session which made me want to get a job unloading trucks, but only for a couple of hours until I got to do some more code!
By the way, directly in line with the session and after you finish the book above, I highly reccomend this book as well which just came out from Wrox:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages
by Jacob J. Sanford
This book even includes a very helpful guide to Photoshop which can definitley get you started. The book provides in depth explanations of setting up layouts and design using CSS for Master Pages and Themes. The info in this book is awesome and I would reccomend it as a staple in any ASP.NET 2.0 and up's developer library. If it seems like I'm super pro Wrox books, it's because I am. They rule.
Enjoy!
Desert Code Camp 2007!
It's that time again and holy semi colons this is going to be a big one. The annual Desert Code Camp over at the University of Advancing Technology in Phoenix is 2 code packed days. I am very grateful for the opportunity to present at this prestigious event. I am scheduled for Saturday at 4:45 in rooms 234/235, you can click here to sign up. My presentation will pretty much follow along the same topic content as the article I wrote for ASP.NET Pro magazine and will cover some easy steps to create Master Page Layouts using CSS as oppossed to tables.
It's a great thing to see the advancement of Web Standards throughout the internet as we are moving into a greater variety of devices on which to display our xhtml. Interface Technical Training has several presenters including:
I must say that sadly missing from this year's big event is a presentation by our very own Simon Allardice. If you have not gotten the chance to see his code camp presentations, they are legendary. It's one of the only times when you will see the entire room stand up and scream and break into a long applause at the end, his presentations really are spectacular. He had to go out of town on a trip so we will miss him.
Here is a screen shot of the schedule:

Blog of the month!
All things considered I have to say that this blog wins blog of the month hands down in my book:
http://blogs.interfacett.com/michael-palermo/tonight-will-be-fun.html
Awesome job Mike!
Tucson .NET Users Group
I would like to say THANK YOU to Gordon Bennett and everyone over at the Tucson .NET users group for coming out to the presentation!
I had a fantastic time and you had some awesome questions! As promised here is a copy of the project folder,. You should be able to just uncompress it and open it via Visual Studio or Visual Web Devveloper Express as a website, make sure to open the folder Tucson that will be nested within the folder Tucson if that's how your file uncompressor ('technical term') works.
Here is a copy of my power point presentation. It was created with the magnificent Office 2007!
Here is a link to the N-Layer application video on Dan Wahlin's blog i was talking about. Like I said, I've gone through it no less than 12 times and if you were to ask me if I'd rather go have dinner with Pamela Anderson or go through this video for the 13th time, I can tell you that Pamela will just have to wait. It's that good to me.
Here is a link to find out more about 'LINQ' that we spent a little time chatting about, it would have been very easy to make the entire session about LINQ!
And of course I want to point to the ASP.NET Pro Magazine article we spoke about today. You have to get a membership or subscription but I can tell you that this magazine is worth it! (With or without this article)
Remember to use stylesheettheme not just theme and here is a version of the html if statement in case you need it:
<!--[if IE 5]>
<style>
</style>
<![endif]-->
<!--[if IE 6]>
<style>
</style>
<![endif]-->
Put your styles between the <style> and </style> tags.
Thanks Again for a great time!
Spike
Deploying a SQL Database to a Remote Hosting Enviroment
I have developed many sites locally in SQL Express edition and when it comes time to deploy to my hosting provider I run into difficulties. I found this blog by Scott Guthrie which explains the whole process and provides a tool to use for deployment which solved everything for me.
You still have to work on an account having permissions to perform the tasks on the database which your application requires but if you get the NT Authority Service blah blah blah error that's what it's talking about.
Click here for a link to Scott's blog post.
PowerShell
Holy Cow! I am in! I am hooked! I am committed!
I love PowerShell.
Simple as that. This is the first in a series of blogs which will explore the amazing technology PowerShell. This 'command' language works with the .NET framework to allow for just about anything a .NET programmer can think of. I am going to start at the very beginning since that is where I am at right now! If you don't have any .NET programming experience you will still be able to follow along with these examples but as I progress in my understanding of the language and these blogs get more advanced you will be in the dark on a lot of the power in PowerShell. It's not too late, the .NET framework is only getting better, release by release! The best way I know of to learn the .NET framework and how to use it is via Instructor Led Training, you may as well go to the best school in the country (in my and several others opinion).
Once you get a class or two under your belt I suggest involvement with a local user group. I was so lucky to begin here in Phoenix where we have the AZGroups run by Scott Cate and Lorin Thwaits it's free and fun and EXTREMELEY informative!
Last but definitely not least you can take FREE online Training via Microsoft Learning. It's an unbelievable resource and it's free. If you come from a php or Java background you can learn ASP.NET very quickly with the above mentioned steps.
Check out the Microsoft Learning Site Here!! In this case there is a such thing as a free lunch and you should definitely get it while it hot!!!
Well here goes.
Lesson 1: Creating A File and Writing Text To It.
Step 1: Create a folder on your C drive named PowerShellTesting.
Step 2: Open up PowerShell. (you can download it here).
Start > All Programs > Windows PowerShell 1.0 > Windows PowerShell

Step 3: In the Command Window, Change Directory to the PowerShellTesting Folder (from the C drive) with the following command: cd PowerShellTesting

Step 4: Use the write-output command to write 'Hello World!' out to a file which will be created with this command called foo.txt:
Type in this command: write-output Hello World! > foo.txt

Step 5: Open up the folder PowerShellTesting and verify that a file 'foo.txt' now exists.

Step 6: Open up the foo.txt file and look inside!

That's it!
It's that easy.
We are just getting started, check back soon or subscribe I will be posting at least bi-weekly. There will be a lot of PowerShell related suprises here over the next few years!
Psuedo Classes and Child Selectors
I have a friend with whom I attended several courses at Interface Technical Training and he recently inquired about pseudo-class and child selectors. He is amazing at XSLT and although I haven't been through a course with him in several years I suspect he's amazing at C# by now as well. In any case he is so good at XSLT that his version of a tshirt with a moniker Keeping It Real would more likely say: Keeping It CDATA!
His question was regarding the correct format for directing styles to links nested in specific tables with a class of mytable.
To be honest I always have to check on where to put the period, is it mytable.a, or a.mytable etc.. in any case I went ahead and put together a page to point out one way of doing it which works well for me. I have commented the code as well and included a couple of screen shots of the rendered page to illustrate the true power of pseudo classes and child elements.
Figure 1 - illustrates the differences in the link properties.
Figure 2 - illustrates the difference in the hover properties.

Here's The Code:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Psuedo Classes Example Page</title>
<style type="text/css">
/*set the margin and padding for all elements to 0 (for firefox and others)*/
*
{margin:0px;
padding:0px;}
/*standard stuff*/
body
{background-color:#ADAE8C;
color:#2E291A;
font-family:arial;
font-size:large;
margin:0px;
padding:0px;}
/*set the styles for the wrapper div, set the margins to 0px auto 0px auto so that the content
is centered*/
#wrapper
{width:800px;
margin:0px auto 0px auto;
}
/*set the properties for the header div, add some letter spacing for spice*/
#header
{
height:70px;
background-color:#2A2A2A;
color:#F1FFF9;
letter-spacing:3px;
text-align:center;}
/*push the h1 off the top a little bit*/
#header h1
{padding-top:10px;}
/*set the properties on the content div which will wrap around an inner content div*/
#content
{width:800px;
min-height:700px;
background-color:#EAEAD4;
color:#3D3D32;}
/*set the padding on the inner content div to avoid box model hacks but push my stuff away*/
#innercontent
{padding:20px;}
/*set the psuedo class properties for the links on the page, of course they go in order:
link, visited, hover, active (loveha) so they don't override eachother*/
a:link
{color:#A35407}
a:visited
{color:#A35407}
a:hover
{color:#523419;
background-color:#D4D0C8;}
a:active
{color:#A35407}
/*set specific psuedo class properties for links which are nested in a td which is nested in a tr
which is nested in a table with a class of mytable. Simple, elegant, powerful*/
table.mytable tr td a:link
{color:#523419;}
table.mytable tr td a:visited
{color:#523419;}
table.mytable tr td a:hover
{color:#A3945D;
background-color:#2A2A2A;}
table.mytable tr td a:active
{color:#523419;}
/*set some basic properties in on tables in this page so that it's more visually appealing*/
table
{border:2px solid black;
padding:4px;}
td
{border:1px solid black;
padding:4px;}
</style>
<!-- the old html if statement, our freind!-->
<!--[if IE 5]>
<style>
#content
{
height:700px;
}
</style>
<![endif]-->
<!--[if IE 6]>
<style>
#content
{
height:700px;
}
</style>
<![endif]-->
</head>
<body>
<div id="wrapper">
<div id="header">
<h1>
Pseudo Class Child Selectors</h1>
</div><!-- end header div -->
<div id="content">
<div id="innercontent">
<a href="http://www.interfacett.com" target="_blank">Interface Technical Training</a><br />
<a href="http://www.interfacett.com" target="_blank">Interface Technical Training</a><br />
<a href="http://www.interfacett.com" target="_blank">Interface Technical Training</a><br />
<a href="http://www.interfacett.com" target="_blank">Interface Technical Training</a><br />
<br />
<table class="mytable">
<tr>
<td>
<a href="http://blogs.interfacett.com" target="_blank">The Blogs</a></td>
</tr>
<tr>
<td>
<a href="http://blogs.interfacett.com" target="_blank">The Blogs</a></td>
</tr>
<tr>
<td>
<a href="http://blogs.interfacett.com" target="_blank">The Blogs</a></td>
</tr>
<tr>
<td>
<a href="http://blogs.interfacett.com" target="_blank">The Blogs</a></td>
</tr>
</table>
<br />
<hr />
<h1 class="mytable">
<a href="http://www.interfacett.com" target="_blank">An H1 + A With A Class Of mytable</a></h1>
</div><!-- end inner content div -->
</div><!-- end content div -->
</div><!-- end wrapper div -->
</body>
</html>
Colorized by: CarlosAg.CodeColorizer
Click Here to go to the W3C spec on selectors.
Only the biggest news in the history of I.T., and it's free!
Microsoft Across America Launch Event I.T. Pro Track:
<Attention: I just read this incredible related piece of news on Brian McCann's Blog click this link and see what you miss if you miss this event!- Holy Shnikees!>
The only thing bigger and more important in the world of I.T. than these launches would be if Aliens landed and told us that we were not alone, and asked if we could show them how to install Vista! If you have anything to do with a computer you will want to be there. I will try to help put this into perspective:
- If you love NASCAR this is the equivalent to a day in a car on the track!
- If you love Aerosmith, this is as if the band sent you back stage VIP passes at their biggest show.
- If you love football this is the equivalent of being asked to be the quarterback, with the assurance that no one will tackle you , unless you specifically asked to be tackled!
- If you love boxing this is like getting a chance to spar with the champ and knock him out!
- If you love painting, this is like a chance to try some painting with Picasso!
- If you love I.T. this is a free invitation to the most important launch event of the last 10 years!
Don't Miss Out! This is going to be awesome!
- Phoenix Main Launch event (Developer and IT Professionals): Jan 17 - register here
- Las Vegas Developer: Jan 30 - register here
- Las Vegas IT Professional: Jan 30 - register here
- Albuquerque Developer: Feb 13 - register here
- Albuquerque IT Professional: Feb 13 - register here
- Denver Developer: Feb 15 - register here
- Denver IT Professional: Feb 15 - register here
New Video Code Warmup - XML
Yet another blockbuster video code warmup. This one is on XML. Most of us find ourselves working with XML. Whoever thought it up was a genius. It's very easy to work with using the .NET framework. In this video we simply create a stream using the XmlWriter class and write XML directly out to the console. After you watch just a little bit of the video you will get the idea of how easy it is. Of course should you need to work with DOM properties you will have to use the XML Document class but the XmlWriter Class works fast as heck for getting the job done!
You can view the video by clicking Here.
This is a screen shot of what the console looks like when you are done (I have my console background white and font color navy):

Here is the code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
namespace CodeWarmUp_xml{
class Program
{
static void Main(string[] args){
XmlWriterSettings settings = new XmlWriterSettings();settings.Indent = true;
using (XmlWriter writer = XmlWriter.Create(Console.Out,settings)){
writer.WriteStartElement("Categories");writer.WriteStartElement("DotNet");writer.WriteStartElement(
"Instructor");writer.WriteAttributeString("Name", "Jennifer Campion");writer.WriteEndElement();
writer.WriteStartElement("Instructor");writer.WriteAttributeString(
"Name", "Mike Palermo");writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteStartElement("Cisco");writer.WriteStartElement("Instructor");writer.WriteAttributeString(
"Name", "Mike Storm");writer.WriteEndElement();
writer.WriteEndElement();
writer.WriteEndElement();
}
}
}
}
Advanced CSS Course
We are not running classes for 2 weeks at Interface Technical Training but over the break I will be working on an advanced CSS course which I hope to have done. The course will focus on ASP.NET 2.0 using Master Pages and Thems and it will be very intense and a very deep dive. All of the advanced CSS techniques used today are applicable to ASP.NET 2.0 but there is a whole world available as it relates to server side controls which will be covered in the class. Specifically an entire section on CSS control adapters as well as skins.
I'll post more over the next few weeks as it becomes available, hopefully a preliminary outline and we'll be sure to let you know when you can sign up. Expect to be working hands on with screen readers, MacIntosh Computers, every browser you can probably name, and more!!!
Advanced ASP.NET 2.0 Course At Interface Technical Training
The New ASP.NET 2.0 Advanced Course 6100 is running this week at Interface Technical Training!
This course is very advanced and not for the 'light of code' but if you are ready it will take you just about as deep as you can go without writing straight out MSIL or machine code. I am hoping to attend the course but I want to get some areas a bit stronger so I can get the most out of the course. It's was written and is being taught by Mike Palermo and if you've ever had the pleasure of taking a course from him you know that he is an expert at pushing your skill level to the next phase while at the same time delivering an entertaining and fun class.
Good Luck to Mike and all the students lucky enough to get in this class. It runs again February 26th so if you want to really take your skills to the next level, start prepping now and sign up!
I just might see you there.
Here is the outline for the course:
Advanced ASP.Net 2.0 Development
5 Days
COURSE NUMBER: 6100
Currently Scheduled Dates:
February 26 2007
April 16 2007
Five days of intense advanced ASP.NET 2.0 development with Visual Studio 2005. Accelerated learning with hands-on workshop that demonstrates how to take web development to the next level. This is for serious ASP.NET developers only.
NOTE: It is strongly recommended for attendees to take the following course prior to this class (or have at least 6 months experience with ASP.NET 2.0): * 5092 – Web Development Using ASP.NET 2.0
Audience This course is ideal for individuals already doing web development with ASP.NET version 2.0. Attendee may also have taken the 5092 course to meet the prerequisites (see note box above). This course is not intended for attendees who have little experience with .NET or web development. Deliverables
Attendees receive the following items when taking this course:
- Workshop materials for accelerated training
- Code samples beyond courseware derived from real production environments
- Video excerpts to reinforce concepts learned in class
Topics Covered
After completing this course, attendees will be able to:
- Implement custom configurations in web site
- Custom sections
- Encrypt sections
- Read and write to sections from code
- Understand ASP.NET Compilation
- Create dynamic code with custom build provider
- Create declarative code with custom expression builders
- Enforce requirements by implementing custom parser filters
- Create or extend built-in ASP.NET Providers
- Custom Profile Provider
- Custom Membership Provider
- Troubleshoot difficult problems in enterprise level sites
- Provide custom error management
- Create custom URL manager for URL Rewriting
- Leverage the event model (at control, page, and application levels)
- Exploit the HttpPipeline
- Create HttpModules
- Create HttpHandlers
- Use tips on how to fully utilize MasterPages.
- Use asynchronous techniques
- Script callbacks
- Async pages
- Using a windows service
- Create dynamic images
- Configure web site for localization and globalization
- Leverage advanced caching techniques
- Create powerful server controls
- Dynamic, data-bound user controls
- Custom, templated server controls
New Video: Code Warm Ups : Arrays
Recently at Interface we began doing a lot of video blogs. These are short instructional movies to help with particular topics of interest. I have done 2 so far. This is a link to one in a series I'm calling "Code Warm Ups". I use these exercises before starting a project to help 'get in the zone' and also to remind myself of certain syntax etc.. It has helped me out a lot. I have found that coding is like playing guitar, until you get to a certain level it's great to 'woodshed' (the practice of musicians locking themselves in a wood shed for hours at a time to practice) to keep the knowledge you have gained sharp and ready for use. Well enjoy the video, of course there is a little humor thrown in here and there to spice it up. Click Here to view video.
Here is the final code when the code warm up is done:
Enjoy!
using System;
using System.Collections.Generic;
using System.Text;
namespace Deletethisdrill{
class Program
{
static void Main(string[] args){
string[] names = new string[] { "Simon", "Jason", "Jennifer", "Dan", "Michael" };for (int i = 0; i < names.Length; i++){
Console.WriteLine(names[i]);}
Console.WriteLine(Environment.NewLine);string[] copyNames = new string[names.Length];
names.CopyTo(copyNames, 0);
for (int i = 0; i < copyNames.Length; i++){
Console.WriteLine(copyNames[i]);}
Console.WriteLine(Environment.NewLine);
for (int i = copyNames.GetUpperBound(0); i >=copyNames.GetLowerBound(0); i--){
Console.WriteLine(copyNames[i]);}
Console.WriteLine(Environment.NewLine);Array.Reverse(copyNames);
foreach (string name in copyNames){
Console.WriteLine(name);}
}
}
}
FireFox Margin Issue
Let's face it. When it comes to the actual layout of a website, almost every thing has been done. 2 column, 2 column header and footer, 3 colum header only etc.. and this is not a bad thing. Imagine if there was a drastic difference in how grocery stores were laid out. Normally you can go to a dairy section, a meat section, a spices section etc...although they will contain different products and different display techniques and ideas, the layout is generally very similar. Once you get the basics of CSS layout down you pretty much have it down.
Every once in a while I am reminded of the differences in the browsers. It's often little things that just don't make too much sense. I think that IE6 got a bad rap for the box model thing, but check this out:
I recently put a site together and build a body, then a wrapper div then inside the wrapper div I put a header div. Inside the header div I had an h1.
I put a margin-top on the header div to push it off of the border of the wrapper div.
Here is the result in firefox and in ie6:
FireFox:

IE6:

In the CSS file here is the culprit:

To remedy this situation I simply changed the margin-top:15px; to margin-top:0px; and substituted a padding-top:15px declaration which works fine in both browsers.
Here is a shot of the change:

And finally here it is in FireFox and IE6 with the changed CSS:
Firefox

IE6 After:

Here is the ASP - XHTML and CSS:
Default.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">
<title>Dynamic Controls Page</title>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]><style>
#content
{height:500px;}
#innercontent
{height:480px;}
#wrapper
{
height:600px;
}
</style>
<![endif]-->
</head>
<body>
<form id="form1" runat="server">
<div id="wrapper">
<div id="header">
<h1>Dynamic Controls</h1>
<h5>Interface Technical Training - http://www.interfacett.com</h5>
</div><!-- end header div -->
<div id="content">
<div id="innercontent">
<h1>Content</h1>
<p>This is an example of dynamic server controls being added to an .aspx page based onan event from an existing control.</p>
<p>When you select an item from the drop down list a postback occurs as well as a selected indexchanged event firing. By using (Page.IsPostBack) to determine that the page has
in fact posted back, this page uses an event handler and grabs the value of the
selected index item in the drop down menu and creates that many textboxes. If you
continue to change the number selected in the drop down list, the number of text boxes
will change accordingly. When you click the submit button, a label which is located
just to the right of the drop down list will display a message indicating the number of
text boxes you created.</p>
<asp:DropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<asp:Label ID="Label1" runat="server"></asp:Label>
<asp:Panel ID="Panel1" runat="server" Height="50px" Width="125px">
</asp:Panel>
</div><!-- end inner content -->
</div><!-- end content div -->
<div id="footer">
<p>
©2006 Interface Technical Training</p>
</div><!-- end footer div -->
</div><!-- end wrapper div -->
</form> </body>
</html>
StyleSheet.css
body
{
background-color: #584E37;color: #2E291A;
margin: 0px;padding: 0px;
font-family: Arial;font-size: medium;}
#wrapper
{
width: 800px;min-height: 600px;
margin: 0px auto 0px auto;background-color: #A3945D;
border: solid 2px #2A2A2A; padding:0px;}
#header
{
background-color: #2E291A;color: #ADAE8C;
height: 80px;border-bottom: solid 2px #2A2A2A;
padding:0px;margin:0px;
text-align: center;}
#header h1
{
margin-top:0px;padding-bottom:0px;
margin-bottom:0px;padding-top:15px;
line-height:.5em;letter-spacing: 3px;
}
#content
{
min-height: 500px;}
#innercontent
{
background-color: #F5F9DE;margin: 40px;
padding: 20px;border:inset 2px #523419;
min-height:480px;}
#footer
{height:30px;background-color: #2E291A;
color: #ADAE8C;font-size:80%;
text-align:center;}
#footer p
{padding-top:10px;}
ASP.NET AJAX Training DVD Rocks!
I got my hands on the new ASP.NET AJAX training DVD from Interface yesterday afternoon and it ROCKS! This is the second best way to learn apart from instructor led training in my book. I love computer books but this is so cool. I just put the DVD on one monitor and then followed along on my other monitor. WOW! I learned so much in a couple of hours. This DVD will be given to each attendee of the Seminar tomorrow over at Microsoft so Kudos to everyone who was lucky enough to get a seat!
firefox doesn't support innerText?
What the?
I recently scratch loaded my dev machine for the second time. I am working with a lot of beta software right now and I think something went wrong. No big deal but one of the apps I have been using is aptana for which is awesome for writing javascript. One of the best things about Aptana is the fact that it shows you which methods are supported by which browsers. I recently did a website for an author of a book called "The Foundered Mule". One of the features of the site is an image map which shows a traditional native american calendar stick which has an illustration for each chapter in the book. When you click on the area of the image which corresponds to the image for the chapter a paragraph changes to reflect an excerpt from the corresponding chapter. Here is the JavaScript:
// JScript File
function changer(chapter)
{
var holder = chapter;
var quote;
var topper;
switch(holder)
{
case 0:
quote="This is the symbol for Victor Bright Eyes the central character in the book.";
topper ="Victor Bright Eyes";
break;
case 1:
quote="As Victor continued to scan the blue void of the universe, he listened to the crackong sound of the crickets as they continously sounded off. Frogs also joined in with never-ending croaking. Even at a distance, the ominous sound of the coyote could be heard. All were generating the symphonic sound of the desert, a sound Victor had longed for ever since his departure from his reservation.";
topper="Excerpt from: Chapter 1";
break;
case 2:
quote="The pine trees and brush-wood in this region were very thick and served as a camouflage for both sides, and both were very cautious of being captured. At the conclusion of this encampment, a huge parade was in order for the Arizona National Guard. The Ajutant General and his staff were on the reviewing stand, which also included the Governor of Arizona and his guests. The parade ground was filled with many battalions waiting for the Commanding Colonel to give the order to pass-in-review.";
topper="Excerpt from: Chapter 2";
break;
case 3:
quote="The 158th was now ready for combat after excessive jungle training in the Panama Canal Zone. The unit was now called the 'Bushmasters,' and proudly wore patches on the sleeves of their uniforms with a Bushmaster Snake wrapped around a Machete. It was a sad day for the men in Company F when Captain Lewis was detached from his duties as Company Commander. The men stood at attention in company formation as the distraught Captain gave word that he was being transferred to another duty station. He did not know the reason for this move, but was ready to cope with whatever the higher command had in store for him. The men could hardly believe he was being detached. He was not only the Company Commander, but just like a father to most. Eventually, they settled down and accepted the fact that he would no longer be with them. Bright Eyes was especially sad to see the Captain leave because of the promotionn to Corporal he was given a few days back. He wanted to show the Captain his ability to fulfill the standards of being a Corporal. His friend Bill White Cloud still remained a Privte First Class.";
topper="Excerpt from: Chapter 3";
break;
case 4:
quote="The two Indians drew hidden sticks in the old INdian fashion, and the one who drew the longest would go. Unfortunately, Bill White Cloud made preparations to enter the enemy positions ahead. As minutes seemed like years, Bright Eyes waited impatiently for his friend to return. His intuition produced a negative feeling, as he knoew something was wrong. He could feel that his brother was in a vulnerable position. Quickly, he looked for his C.O., asking to enter enemy lines to see if his partner needed help! Permission was graned, and Bright Eyeds prepared to enter the enemy infested lines with his M-1 and a few grenades.";
topper="Excerpt from: Chapter 4";
break;
case 5:
quote="She met Bright Eyes at different secret locations throughout the hospital, mostly in the picnic area, which was filled with over-hanging tree branches and large evergreen bushes along paths used for strolling and meditative purposes. It was a place one could sit on benches without being disturbed. One day, Victor sat at this location with June. She wanted to know about his reservation life and what he purposed to do after his discharge.";
topper="Excerpt from: Chapter 5";
break;
case 6:
quote="Harriet and Victor were raised on the reservation village and attended the government day school. As they grew older, they were transferred to an INdian School located in Phoenix, Arizona. Harriet's parents were very involved in religious activities. In fact, her father was an elder in the Presbyterian faith. When Victor was away fighting for his country, Harriet constantly wrote him letters, keeping him informed of what was happening in the Awthum village. She would also send him packages of goodies that included Indian fry bread that was crumpled, pinion nuts and baked salted corn kernals, which were favorites among Indian people.";
topper="Excerpt from: Chapter 6";
break;
case 7:
quote="Victor Bright Eyes was now standing among other hoop-dance performers, along with other tribal dance groups awaiting their entrance into the arena. Again, shivers of excitement ran up and down Bright Eyes, as he thought of a mistake that may take place, preventing him from winning first prize. When Victor's group began its entrance, a courage of wanting to be victorious controlled his inner feelings, especially when the band played a military march, reminding him of the many times he paraded to the tune of the Foundered Mule. Victor continued his entry by carrying his hoops, with small bells clinging on both his ankles and an abundant array of round bustled feathers placed on the back hip of his semi-naked body. On both of his arms were artistic beated bands. On his forehead was another beeded band, made with a symbol of hope. He was determined to win.";
topper="Excerpt from: Chapter 7";
break;
case 8:
quote="The two new Indian friends told Victor about drinking in public, so they had to find a place undetected by the police. Instead of the usual alley, they led Victor to an empty lot where tamarack trees stood, whose branches hovered over a ragged old couch. A few wooden boxes served as chairs, and empty beer cans and wine bottles littered the ground where they were sitting. Victor then recognized that this place was a haven for all unfotunate Indian 'winos.' victor never had an introductory experience to this new environment his people practiced, sneaking an escape from thelaw who no doubt were eager to arrest drunken Indians. This was confirmed by his new Indian friends while sipping on a wine bottle being passed around. After many swigs of wine, Bright Eyes felt a tingling sensation penetrating his body. His speech began to slur, and everything seemed to be as funny as laughter occuring from old stale jokes. Slowly the elements of the wine in his system took place, as Bright Eyes slowly slumped to the ground.";
topper="Excerpt from: Chapter 8";
break;
case 9:
quote="Sitting close by on a park bench, he noticed another Indian who seemed to b ein his same position. Bright Eyes asked him if he was holding, which was an expression used to see if he had any money. smiling, as if the questin doubted his integrity, the Indian patted his waist, indicating he had a bottle hidden. Now both men were smiling as they looked for a place to consume the 'happy grapes,' a term they used as an expression for wine. It didn't take long for Bright Eyes to land in jail along with his generous friend.";
topper="Excerpt from: Chapter 9";
break;
case 10:
quote="As Victor bright Eyes sat among dignitaries, a feeling of exceptional pride settled within him, especially when the drumbeats sounded and danceres performed the war dance in full native costume. This was an Indian's way of honoring heroic men who gave their all in fefeating a reluctant Japanese nation, a nation whose intention was to rule the world along with their Nazi German counterparts. The Tribal Chairman came to the stand and welcomed all the visitors to theis small community who were there to honor one of its tribal members who received the Silver Star Medal by risking his life for others and who received deadly wounds during the course of action! Afterwards, a short speech was given by tht Governor. He praised the 158th and its members' heroic accomplishments in the Asiatic Theater of War, indicating at one time the outfit was formed in the State of Arizona as a National Guard unit. He also informed the audience that other members of the 158th came from all over the United States, and that they were proud to be members of this fighting unit. After a big applause for teh Governor, Victor Bright Eyes was called to the podium.";
topper="Excerpt from: Chapter 10";
break;
default:
quote="I don't know";
topper="Calendar Stick Page";
break;
}
var txt= document.getElementById("chapters");
txt.innerText=quote;
var txt2 = document.getElementById("topper");
txt2.innerText=topper;
}
Normally I will run a script which checks for support of things like document.getElementById and innerText but in this case I couldn't think of a graceful way to degrade an image map so I just went with it.
This code works great in IE all versions after 5, and Opera, but lo and behold FireFox choked. I couldn't figure out why but as it turns out it was the use of innerText. I will have to change it to innerContent or innerHTML and it will work fine, in fact it will probably be fixed over the weekend (along with a couple of typo's) but I think it's odd that FireFox doesn't support this common JavaScript Oh well you know what you get when you assume!
Microsoft Hidden Video
This is hilarious. The dart in the neck is the best part. If you look closely the code in one of the shots I think it says:
<h1>Interface Technical Training</h1> (just kidding): Click Here to Watch Video
Dev Connections
I went to the Dev Connections conference last week in Las Vegas. I went to many sessions and they were all very good. I can't remember a weak one. Jeff Jones and Dan Wahlin from Interface Technical Training also attended. Dan gave several presentations which were well attended and informative. I videotaped 3 of Dan's sessions and although I got a little 'Blair Witch' with my technique, it looks like he was able to use some for his blog. I got a new Wrox book on Generics to add to my collection. Here is a photo from the shelf in my book case at home where I store most of my Wrox books!
The next Wrox book I am going to buy will be the one co-authored by Scott Cate. Scott runs AZ Groups, the Phoenix area .NET users group I have been a member of for the last few years. Although I haven't attended every single session, I have been to many, many sessions, and I have gotten some great information there. It's always nice to spend some time with other developers and discuss technology. One of the many great things about working at Interface Technical Training is that I get to work with and speak with such incredible technical talent every day, you can always get a fresh perspective or idea by speaking about a project with more experienced people. If you don't currently attend User Group meetings you might want to check them out as they are free and fun and informative.
Here is an image of Scott's book. Scott is second author from the left.
With all the new ASP.NET Ajax stuff out there I want to know as much about JSON stuff and all the under the covers stuff driving the technology. I am glad that all those late nights with my Java Script books were not in vain! Actually I've always maintained that every web developer can benefit from a solid understanding of XHTML, CSS, and JavaScript.
Getting back to Dev Connections here are a few observations:
ASP.NET Ajax is going to change the user experience for the better
Iron Python.NET looks astounding
Richard Hundhausen is hilarious
Developing against Databases is about to change drastically
Another highlignt was running into Scott Guthrie. He posed for a photo with Dan and I all holding up our No More DLL Hell t-shirts. The funny thing was none of us 'tech savvy' guys could figure out how to take a still shot with Dan's new camera, so we had to call in the reinforcements (Dan't wife Heedy) who helped us out and snapped the photo. You can see the famous photo by clicking here and going to Dan's blog.
That's all for now. Needless to say it was a fantastic conference and I felt very lucky to be able to go. Peace to everyone everywhere.
IE7 Page Display Issues
The title of this blog is slightly misleading. IE7 is not causing the display issues at the present time. It is actually correcting interpreting the HTML element box model, it's just that most of us have been coding with previous versions which did not. If your page is not displaying correctly it's most likely due to the use of the height property on your div rather than the min-height property. Firefox actually blieved you when you said height:600px and if you had content that went beyond that and didn't use the overflow property you were in trouble. Well many people used the voice family hack but to deal with this but a better choice might be the html if statement.
The syntax looks like this:
<!--[if IE 5]>
<style>
#content
{
height:600px;
}
</style>
<![endif]-->
<!--[if IE 6]>
<style>
#contnent
{
height:600px;
}
</style>
<![endif]-->
You delcare the min-height of the content div at 600px in your style sheet then go ahead and pop this baby in the head section of your document and adjust your div's according to your use and wammo your site works all over the place.
Good Luck!
Hat's off the the IE7 team they did a spectacular job!
By the way the DLL Hell Song is going strong, if you haven't heard it you can listen here.
DLL Hell Song Still Going Strong
The song "DLL Hell" that Dan Wahlin and I released last week has gotten an overwhelming response. The next one is called C# and is a tribute to this incredible language. We just announced a 1 Day ASP.NET AJAX Course to be held at Microsoft in Phoenix and we also announced course 6100 - Advanced ASP.NET Development. This proves to be a DEEP dive into ASP.NET development and will reward serious developers with some very deep content!


