Button type=’button’

Do yourself a big favor… and by ‘yourself’ I mean ‘myself’, and by favor I mean…

When you put a<button> tag on an html document. ALWAYS set the type attribute to ‘button’.

<button type=”button”>Click Me!</button>

Seems redundant, but several browsers are known to treat ALL buttons as type=’submit’. Which can be frustrating when you’ve gone to the trouble of putting a bunch of javascript in to prevent the post back if validation fails.

So basic, yet it still bites me, even after all these years.

Ref:
http://www.w3schools.com/tags/tag_button.asp

Snipplr and Snipt

I ran across a couple interesting sites that host code snippets.

Here are some code samples:

First, Snipplr:

And here is Snipt:

Wow, they both do a nice job and it’s stupid-easy to paste their ‘embed’ scripts into the page. I’m leaning towards Snipt. Looks nice and the branding is less conspicuous.

Both of these services have WordPress plugins. But not having to mess with all that is sort of the whole point for me, so I’m not going to bother testing those out at the moment.

Features aside, I’d like to pick the one that has the strongest community. Snipplr seems to have vastly more code snippets, especially for c# and other MS technologies. The searching and tagging seems to work much better on Snipplr, too.

But I have to admit that Snipt has all but seduced me with their tasty style.

It just occurred to me that there may be a major drawback to keeping code on a separate site. Search. Hmmmmmmm. What to do.

When will Microsoft provide the next WSS Developer VPC Image?

I’ve been worrying about when and if Microsoft is going to update their WSS Developer VPC image. The one they published last year is still available here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=1beeac6f-2ea1-4769-9948-74a74bd604fa&displaylang=en

…and yet it just expired.

Unfortunately I recommended to a lot of folks (at a dnug presentation, and here: http://dkitchen.net/blog/?p=166) that they would do well to develop on this image. I recalled proudly that last year, Microsoft freshened the VPC image from the previous year, so “certainly they can be counted on to do the same this year.”

Oops.

My apologies to any trusting friends and colleagues. I’m just another sorry, trusting soul out there along with the rest of you.

Great SharePoint Reality Check Article

Best post I’ve ever read regarding the reality of SharePoint:

http://weblogs.asp.net/bsimser/archive/2009/09/29/sharepoint-fud-spreading-far-wide-and-fast.aspx

My favorite quote (not specifically about SharePoint, but a good jab at developers):

“Would you code SQL statements and database connections in the code-behind page of an ASP.NET form?”

…um, er, *cough* no, uh, who does THAT? uh, excuse me, gotta go somewhere else and check with a guy about a thing… uh…

Stop saying that Linq To SQL has no future!!!

Every so often I run into an article like this: http://reddevnews.com/Articles/2009/01/01/Is-LINQ-to-SQL-Dead.aspx?Page=3&p=1

…or I’ll hear a colleague complain or wonder out loud about the future of Linq to Sql.

First. Can we agree that LINQ (not specifically LINQ To SQL, but the Language Integrated Query feature built into .net) will be around a loooooong time (more than a decade)? I, for one, have been using LINQ, and its related features, Extension Methods and Lambda Expressions, all over the place. Not just for querying databases, but any type of collection or object graph or even a page full of web controls (for example, try it next time when you need to get a collection of checked checkboxes). Nothing has had a bigger impact on my code. Loops evaporate and in their place is simple code with clear intent.

Ok, can we agree that SQLServer will be around a loooooong time? Hundreds of Microsoft products may come and go, but SQLServer will remain.

Great. That settles it! Long live LINQ. Long live SQLServer. So long live LINQ To SQL!!!!

If you’re one of those thinking. “our team just invested so much in LINQ To SQL and now we need to stop because we don’t know if it has future.” Please STOP EXPOSING THE FACT THAT YOU HAVE NO IDEA WHAT LINQ TO SQL IS!! (By the way, when you say “Invested”, what do you mean? You guys dragged and dropped a table on to a canvas. Was that really so hard?).

Next point.

What makes a platform or framework or tool compelling?

If you answered features, vendor support, price, buz, marketing, or any of that rot, please reconsider. I think the key factor is Community. As long as there is a passionate base of happy coders, with happy customers, there will be LINQ to SQL.

Now get back to work!!