Shawn Wildermuth

Author, Teacher, and Filmmaker
.NET Foundation Board Member

The Blog

My Rants and Raves about technology, programming, everything else...


JavaScript for the C# Guy: The confusion about 'this'

As a C# guy I am comfortable with the idea of 'this' in the scope of a class (or 'Me' for your VB'ers). It's a relatively simple idea that allows you to access the instance of the class that you're a part of to call members.

In JavaScript that have a similar idea but because of the nature of JavaScript it can cause some odd behavior. Let's look at the standard behavior first.

If we have global code (outside objects or functions) and check the 'this' object, it usually returns the "Window" object in the DOM:

Read...


Move Your WP7 Apps Links to the Marketplace

UPDATED: Changed links to be universal, not US specific.

 

Recently @WieserSoftware mentioned to me (on Twitter) that my Windows Phone 7 App page was using the old, outdated Zune links. I made the change last night and wanted to explain how to do it in case anyone is confused.

Read...


Atlanta Code Camp Wrap-up

I had the pleasure of joining many of the Atlanta .NET community for the annual Atlanta Code Camp. If you didn't get a chance to join us, you missed a great time. The attendees were enthusiastic and friendly. Thanks to everyone who attended!

I promised the people who attended my sessions I'd post the slides and example code so here you are:

Mobile Web Development

Read...


My Speaking Schedule - 2012 Edition

My 2012 conference schedule is shaping up nicely. I will visiting a series of conferences, code camps and user groups this year. Last year I didn't do this nearly as much as I was building a failed product. So back to my love of badges and beer. If you have the opportunity to be at any of these great events, do it. I love them all. (Also, if you see me at an event, please stop by and say hello.  As many can attest, I don't bite much.)

Here's the current slate (in chronological order):

May 19th, 2012 - Atlanta, GA

Read...


JavaScript for the C# Guy: The Global Object

codeThis is another in my series about (hopefully) interesting JavaScript constructs that might surprise most C# developers. You can see others here: JavaScript for the C# Guy.

Back in the day I was doing some scripting in classic ASP sites (no, not classic ASP.NET) and we screamed and yelled about putting too much in the global scope. We wanted encapsulation and such and that is true today. In my C# work pretty much everything is in a class (static or otherwise) so I don't have to concern myself with it much.  But in JavaScript I know there is an easily accessible global object...but it occurred to me that I don't see the "Global" object accessed much; even though it is used a bit (to hold other containers that have encapsulated code). "Why not?" I wondered.

In JavaScript you can certainly create things in the global space. In fact, in my Architecting JavaScript post from my Modern Web Development series, I show that using an 'app' object for your site can simplify a lot of things. But the app object needs to be in the global space (e.g. in the "Global" object) so everyone can get to it:

Read...


CSS for the XAML Guy - Positional Selectors

AngleBracketsI got into a longish, public discussion last night about XAML versus the HTML/CSS stack last night. I think they both have merit and pros and cons but it made me decide to add a short series of posts that highlight some of the CSS things that surprised me most (like my JavaScript for the C# Guy posts - and yes, more of those are coming too).

The first topic I am covering is some subtleties of the selector syntax. CSS selectors allow you to pick children, descendants and adjacent siblings. I found that I used descendant selector quite a lot:

#main h1 /* descendant */
{
  color: Red;
}

This syntax effectively says, any h1 inside an element named "main". I see people assume this actually means, *directly* inside the "main" element. So if you had some HTML like this, all h1's inside "main" would be colored red:

Read...


Modern Web Development - Part 9

This is the ninth of ten parts of this blog post. mobiledevices_clipThe topics will be:

Why do users complicate our lives by trying to view our content on their phone and tablets?  It's even an issue for smaller sized desktop screens too. Since this is simply a reality for today's web developer I was glad to see there were real strides in working with mobile.

In general there are three techniques for dealing with mobile device browsers:

Read...


I've been Deep Fried...Again!

So I've done it again.  I survived another 30 minutes with Woody and Keith. Whew. We had a good conversation about the current state of Web Development and the future of XAML development.

I also got to discuss fried foods and make fun of Keith. Couldn't have been a better time. Go listen now:

Read...


What is Wilder Minds?

As many of you have known for a while, I've been running my AgiliTrain training company focusing on technologies like Silverlight, WPF and the Web. My interest in training isn't going away, but I've yearned to work with a small group of thought leaders to help companies in more innovative ways. With this goal in mind, I am launching Wilder Minds.

The vision for Wilder Minds is to be a complete solution for companies who are trying to move to new technologies (like Windows 8, HTML5/JS, Mobile Development, node.js, etc.) Instead of just doing training, we're expanding to help in three primary ways:

Wilder Minds is still focused on training. We are still building and teaching our courseware as we did as AgiliTrain. This hasn't changed. We have adapted to the changing way people are taking training and suspending our publically-held courses. We won't be doing our "Tours" any longer, but we will continue to teach our courses (and custom courseware) as clients request them. In addition, we're continuing to build courses for PluralSight and do some remote classes. Training is still a major focus of this new venture.

Read...


Does Silverlight Matter to Windows Phone 8?

right-HERO_MANGO_062411A lot has been made since a report from Microsoft late last week (http://shawnw.me/HPEh0R) that seemed to say that Silverlight on the phone was going away in Windows Phone 8 (Apollo). I liked a lot of what this article had to say (from e-week):

http://shawnw.me/IwMgR2

So it got me thinking that much of the Silverlight community would be jumping out of windows (lower case and not TM) this week due to the news. But of course, if that's the case for you, I'd urge you not to panic. Why? Let me tell you.

Read...