Web Development

A selection of useful SublimeText plugins for frontend developers

I’m always keeping an eye out for interesting SublimeText addons, of which there’s a *lot* to go through. The lists below are all things which aren’t too useful to me personally (as I usually do this sort of work using Visual Studio), however there’s some handy looking stuff in there for anyone using SublimeText for front end development, so they’re worth posting. How to Add Sass Support in Sublime Text – also contains a rather handy tip: You can avoid this by installing the SublimeOnSaveBuild plugin, which will automatically execute the default build action whenever you save changes...

Delegating access to a single Amazon S3 bucket

I’ve just been playing around delegating access to some Amazon S3 resources using IAM and Cloudberry explorer, and found a small but useful tip for anyone doing the same thing – don’t forget to give the user account access to s3:ListAllMyBuckets, or your testing isn’t going to go very far. I’m using Cloudberry Explorer Pro, and couldn’t see an easy way to do this using the Policy Designer (not saying it isn’t there – just that I got bored looking), so I simply edited the policy script, added the ListsAllMyBuckets action and set the resource to be arn:aws:s3:::* – the final...

Where does technical debt come from

Over the past year I’ve been dealing with some technical debt across a couple of different ASP.NET applications that we recently inherited. As part of that work I’ve spent a bit of time thinking about technical debt, how to deal with it, and how to avoid it. Describing the subject of technical debt as interesting might be overstating things a little however it is a subject which is relevant to most developers at some point in their career. So when I read this article (Lotus Notes - a Double Edged Sword) it struck me as a great example of...

Essential Developer SEO

There are many things that fall under the wide umbrella of SEO/SEM, and as a developer chances are high that you don’t really want to know about a large number of them. However like it or not if you’re creating web sites or applications there are some things you absolutely need to understand. All of what’s contained in this post is pretty simple stuff – but it’s absolutely essential. There are so many resources out there covering SEO, and yet I keep seeing sites which ignore some or all of the basic things I’m going to mention, and I...

Looking back on the past couple of years as a freelancer

It's coming up to the 2 year mark since I resigned from my full time job and went into freelancing / owning my own businesses. After many years of working as an employee, a contractor and doing small bits of freelancing on the side I probably thought that switching to freelancing would be a bit easier than it ended up being, which is part of why I wanted to write a little about my experiences. There's plenty of material out there offering freelancers helpful tips or things to avoid - this post is similar to many of those, but it's...

The obligatory Happy New Year post

This is the obligatory Happy New Year post.. so, happy new year all! I’ve got quite a few posts currently sitting in various stages of draft – I’d planned to write a bit around Christmas, however the novelty of actually having a break took over. So I’m a little behind, but feeling well rested. Here’s a quick preview of what I’ve currently got sitting in draft: My “lessons learned” post from experience over the past couple of years as a freelancer/small business owner. Writing down a bit about my experiences was helpful for my...

Using the asp:Chart control

The world of .NET is an exciting and ever changing environment to work in so it’s easy to occasionally miss useful things when they’re released. The asp:Chart control fits into this category – it was released well over a year ago, however I haven’t had any reason to use it until very recently. Here's a short (possibly the shortest) post with a snippets of information that I found useful about the Control, my 60 second summary if you will. To use the control with version 3.5SP1 of the .NET framework you have to install a...

jQuery and Microsoft

A while ago I did a bit of exploring into jQuery. I really liked what I saw, and was trying to decide whether to invest a bit of time into knowing it better - but with so many JavaScript frameworks and libraries out there it's hard to know which ones are worthy of attention. It looks like Microsoft and jQuery have made that decision a lot easier, with this announcement from Scott Guthrie: I'm excited today to announce that Microsoft will be shipping jQuery with Visual Studio going forward.  We will distribute the jQuery JavaScript library as-is, and will not be...

Echo Chamber++; SP1 for VS 2008 and .NET 3.5 released;

Visual Studio 2008 and .NET Framework 3.5 both had their SP1 releases a couple of days ago, but I’ve not had time to install it. So this post is basically a reminder to myself and a place to store some links. I’ve skimmed over a few people mentioning a couple of compatibility issues with the VS2008 release, so take a skim through the comments sections of these posts before installing to see if you're going to be affected or not. Link: Service Pack 1 for VS 2008 and .NET FX 3.5 released! Link: More about .NET Framework...

ASP.NET AJAX Roadmap

If you work with ASP.NET and AJAX then you'll probably want to take a look at Microsoft's ASP.NET AJAX Roadmap document. After restating their goal of "making ASP.NET Ajax the first-class choice for all Web 2.0 Developers" they start listing some of their ideas for the future. Template driven binding sounds useful, and I've recently come across a few people mentioning that even though the version in Atlas had it's faults, that it was still a good idea. The DOM APIs around element selection look useful,  and there are various other shiny things such as increased animation effects...

Identation and Readability

Somehow (and I can't remember how) I recently ended up reading the Wikipedia entry for the K&R style of indentation. K&R just seems so ugly to me – who out there loves it and feels like defending it for my benefit? Indentation styles are such a personal preference, I get that. But K&R just seems to sacrifice so much readability for what? Is it just a case that it's defenders simply can't adjust to anything else? On the subject of indentation styles, I'm wondering a lot about the default HTML formatting built into Visual Studio 2008. When I...

In/Out

In/Out by 37signals is basically Twitter for corporates. I'd use it. It's the sort of idea that makes you wonder why no one has thought of it before (although in this case, it seems that someone else did). Tags: Web 2.0

IE8 on acid

Hopefully my last IE8 link for a wee while - The IE team posted that they were passing Acid2 a few months ago, yet people are seeing a broken face when they tested with IE 8 beta. If IE8 ends up passing ACID then there are a lot of presenters on web standards out there who are going to have to remove those chunks of their presentations where they load ACID in IE and laugh a lot.. what a shame! Tags: Internet Explorer , Microsoft

IE8 - apparently good for JavaScript developers!

JavaScript in Internet Explorer 8 is apparently good better! Tags: Internet Explorer , Microsoft

Be afraid, be very afraid

The cynic in me can't help but ask the question - is Internet Explorer 8 going to make life as a developer better, or worse? Time to break out the Virtual Machines and find out. Tags: Microsoft , Internet Explorer

VS 2008 Web Development Hot-Fix Roll-Up Available

Scott Guthrie posted on Friday about the release of the long awaited hotfix. Although there are a lot of issues addressed with this release, the ones I was most interested in were those around HTML Source view performance - after a quick test this morning it seems fixed. (Thanks Sonic, that's a nice way to start my Monday!) Link: Scott Guthrie: VS 2008 Web Development Hot-Fix Roll-Up Available Tags: Visual Studio , Microsoft

From the "glad it's not just me" files

Initially I thought it was possibly my work machine playing up when the Visual Studio 2008 HTML designer was crawling. I went through and applied all the usual tweaks for 2005 in an attempt to speed things up, but no joy. So I'm quite relieved to find out that it's a known bug. A hotfix is due shortly, and Scott Guthrie has promised to blog about it when it's released. Until then, it's back to Notepad for me! Woo! Tags: Visual Studio , Microsoft

ASP.NET and HTML Injection Protection

5 signs your ASP.NET application may be vulnerable to HTML injection is worth a quick read, and How Dangerous is HTML injection makes a good companion piece. There's something amusing sounding about the phrase "Injection Protection".

Silk Companion Icons

Silk Companion is a set of icons designed to compliment the FamFam Silk set. Both are useful additions to the box of tricks of any web developer.

A few quick links

Joel on Software's Strategy Letter VI - On Lotus Symphony, AJAX, and history repeating itself. The post is a couple of months old now, but I missed it when it was first posted. Worth a read. What's Ailing ASP.NET Web Forms - Rick Strahl on the historical strengths and weaknesses of ASP.NET webforms (prompted by the impending release of Microsoft's ASP.NET MVC framework). Using Visual Studio 2008 with VSS (Visual SourceSafe) - basically "grab the patch", or migrate to some decent source control (yeah I added the second one in). Facebook Beacon Privacy Issues Worse Than Previously...

LLBLGenProDataSource2 v2.5 and hosted environments

A while back I mentioned that I was playing about with LLBLGenPro's ObjectDataSource in conjunction with ASP.NET GridViews in order to deliver a simple user interface allowing basic CRUD type operations in little or no development time. I hit a slight snag the other week when I upgraded to release 2.5 of LLBLGenPro. Everything was looking fine until I deployed the solution up to my hosting provider - at which point every page containing a LLBLGenProDataSource2 control started throwing security exceptions. It's always fun debugging issues with a hosted environment. The provider's setup is always something of a black box,...

IE7 now available to non valid Windows users

In an interesting move, Internet Explorer 7 is now available to users not running a genuine copy of Windows. Previously IE7 required the Windows Genuine Advantage validation process be completed before download. This could easily be a strategy tactic in the ongoing browser wars. Having a single (larger) number for one browser is going to look a lot healthier than having 2 smaller numbers. It could also be something that Microsoft are doing for the general good of the Internet community, which is certainly the tone that the blog post tries to convey - however you can make your...

SQL Command Visualizer for Visual Studio 2005

SQL Command Visualizer for Visual Studio 2005 will give you a visual representation of a SQL Command object, allowing you to work with the connection details, parameters, properties, and values. I can't remember the last time I actually worked with ADO.NET at this level, but still this could be very useful for anyone who still needs to work with SQL Commands.   Tags: Visual Studio, ADO.NET

More real world LLBLGenPro code

I love working with LLBLGenPro. However sometimes I go through a process of adapting what I want to do into LLBL speak. I'm still pretty new to using the tool, so I figured I'd throw up some of the more useful chunks of code relating to real world problems just in case someone else finds them useful. The Problem You have a list of entities, lets call them "Categories". You're dynamically creating a total related to these categories, lets say "the number of images in each category". Finally, you want to filter your result set (using LLBLGenPro -...

LLBLGenProDataSource2, GridViews, and Case Sensitivity

I've been playing about with LLBLGenPro's Object Data Source recently. Mostly because I want to know if it's the sort of thing which could actually be used in a commercial project, or whether it's not quite all the way there yet. In my experience, working with GridView style pages goes one of two ways: They're simple, basic CRUD type operations. Maybe some sorting and/or paging. They're so insanely custom that you might as well have written your own control and not even used a GridView/Repeater. I'm looking at LLBL's Data Source for the occasions which fall into option #1....

AJAX Control Toolkit 10920

The 10920 release of the AJAX Control Toolkit was shipped a few days back (thanks Doug). Lots of general fixes and control specific fixes - check out the link for more info. A couple of the fixes look like things I've experienced in the past, so I'm looking forward to some time to upgrade various solutions to 10920 and have all my AJAX woes magically fixed! Technorati Tags: AJAX , ASP.NET

Accordion 2.0

What an unfortunate version number. He should have skipped straight to 3.0, or even 2.5. Anywho, Accordion 2.0 is an update of the scriptaculous based Accordion script. It's quite a neat accordion, which works nested, or horizontally. If you don't like Accordion controls then you can just read all the people who hate the guy because of the writing tone he uses on his own site - yeah, seriously. Tags: JavaScript

Thursday Linkorama

I've had a load of tabs open in my browser for the last week, all of which are useful and interesting, but none of which justify a full post. Here they are: Scott Guthrie talking about the asp:Listiew Control which is coming in ASP.NET 3.5 - I've been working with GridViews and Repeaters over the past couple of weeks, and doing so is making me really look forward to the ListView! As welcome as the control will be, you have to think that it's been a loooong time in coming (thanks for the link Doug, even if I did forget...

Fun with Forms

"Fun"! This weekend I was working on some basic ASP.NET input forms inside an existing application. The forms can be opened for read mode, or for edit mode - as you might expect from a form! There was some C# code which was setting the textboxes to be enabled or disabled (but still visible) depending on the appropriate edit mode, and I naievely figured it'd be pretty easy to throw in some css to simply remove the textbox borders when the form was being viewed, which would make the data look like labels. Labels being what should have been used in this...

Developing Linq for LLBLGenPro

Fans Bouma is documenting the process of adding linq support to LLBLGenPro in a series of posts. One of the pingbacks named the series "A diary of LINQ pain" which sounds pretty appropriate! Tags: LLBLGenPro, Linq

Web Site Projects

I've never liked Web Site projects. It's not that I've ever really had a reason to despise them, I've just always chosen Web Application Projects if given a chance - even in the pre SP1 days when they came as an additional install. Now, after being forced to use them for a few months (in one of those "not my architecture" situations) I've come to be able to put names and faces to all the reasons I'd subconsciously discriminated against them in the past. Firstly, the time delays in building - by default, with large projects the build...

Testing Web Applications on IE6

I've talked previously about options for performing IE6 Web Application testing. Some of them are pretty half arsed, and really the best approach is to keep a Virtual Machine handy. It's a funny situation when you need to quickly verify an IE6 issue, only to find that you don't have a copy of IE6 on ANY machine ANYWHERE - even servers! Fortunately Microsoft has a solution, even if it's a temporary one. This Virtual PC Image is a pre activated copy of Windows XP that comes with IE6 - you're a mere 600mb download away from being able to perform...

Silverlight 1.0 Final Release!

Wednesday, September 05, 2007 Today Microsoft announced the release of Silverlight 1.0, the fully supported version of its cross-browser, cross-platform plug-in for delivering the next generation of media and rich experiences on the Web. As the above says, Silverlight 1.0 has now been released! This is a pretty important step, because it brings us one step closer to the final release of Silverlight 1.1, which is when the fun really begins. In all seriousness, it's great that 1.0 has it's final release out, and that it seems to have happened in a pretty quick timeframe. I'm currently involved with a Silverlight project...

A couple of quick fixes to the AjaxControlToolkit CalendarExtender

The AjaxControlToolkit CalendarExtender is one of the more usable and useful controls in the kit. However there are a couple of things you might want to do to it in order to increase it's usefulness: First, the default behavior is to hide the calendar when the textbox you're extending loses focus. This might be ok for some people, but I wanted it to disappear when a date was selected. Simply add a hideCalendar function, which you can either do in static JavaScript or via RegisterClientScript block depending on your application: Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "hideCalendar", @"function hideCalendar(cb) { cb.hide();...

JavaScript cross browser compatiability tip #98439483

If you're dynamically resizing anything in your browser using JavaScript, and you'd like it to work in more than one browser, then you need to remember to set the unit type of your object as well as the value. The following code works in IE, but not in Firefox: myDiv.style.width = height1 + height2; This however, works in both browsers: myDiv.style.width = height1 + height2 + 'px'; As for Safari? Right now your guess is as good as mine. If I get a spare few minutes I'll throw together a...

The Most Useful .NET Utility Classes Developers Tend To Reinvent Rather Than Reuse

Wow, what a post title. It's a couple of weeks old, but this list over at haacked.com is a quick list of classes that developers tend to code themselves rather than use what's provided in the framework. The constant reinvention is symptomatic of a large and comprehensive framework - there's so much in there, it's sometimes hard to know where to look for something that does what you're trying to do. Looking through the list was quite refreshing. There were a few obvious ones such as System.IO.Path.Combine, however I'd never thought that a framework which is destined to...

Apple enters the Windows Browser Wars

As the browser wars heat up signs throughout the web show that the pro Firefox crew are becoming less subtle with each passing day. As far as Apple are concerned it's a pretty good time to get their latest offering out into the Windows world. The somewhat evangelical momentum behind Firefox has definately helped to educate people into realising that there are plenty of Windows based browser alternatives. I spent a bit of time playing with Safari on Windows Vista today. Visually it's very Mac like - thats to be expected. Ive never been an iTunes user, but...

Styling the Atlas UpdatePanel and UpdateProgress controls

Out of the box, the ASP.NET Ajax UpdatePanel and UpdateProgress controls do a pretty good job of removing postbacks from your applications, but they need a little bit of styling to get them looking their best. Here's a couple of links to get you started on the right track: Link: Using the UpdateProgress as a modal overlay Link: Gmail style 'loading' indicator using UpdateProgress Link: UpdateControls: UpdateHistory and AnimatedUpdatePanel Raj's modal overlay (the first link above) allows you to target either an individual control (such as a panel or a GridView), or the entire page. It's very slick looking, but...

SQL Server Web Report Viewer Issues on Longhorn/IIS7

It seems I've come across yet another AXD related issue. This time with the SQL Server Web Report Viewer Control which was being served up via IIS7 on a Longhorn server. As soon as the page loaded I was getting JavaScript errors of 'RSClientController is undefined'. The report had been working fine on development boxes, so I was pretty sure it was either related to the deployment or IIS. In checking the source of the page I found the following entry: <script src="/Reserved.ReportViewerWebControl.axd? OpType=Resource&amp;Version=8.0.50727.817&amp;Name=Scripts.ReportViewer.js" type="text/javascript"></script> Which of course didn't exist when I pasted the URL into...

A quick tip for working with UpdatePanels

UpdatePanels are a pretty neat part of Microsoft's Ajax Extensions. It's interesting to note how much faster pages *seem* when you remove all visual aspects of the postback. Sure, the postback is still happening, but without the need to re-render the entire page things seem so much snappier. However to make sure that your page is running as fast as it possibly can, remember to set the UpdatePanel's UpdateMode to Conditional (which isn't the default). It might seem like an obvious thing, but when you're working on complex pages that contain multiple UpdatePanels, multiple UpdateProgress controls, as...

C# and the Compilation Tax

I write this post at the risk of sounding like a complete and utter ReSharper fanboy. However I had a great moment while reading C# and the Compilation Tax when I went "Huh?" at a couple of paragraphs: What's particularly sad about this is that, in my experience, most C# developers think manually compiling all the time is a natural state of affairs. Well, it isn't. In VB.NET we have this clever little technology we call background compilation. Background compilation saves you the effort of all that meaningless, repetitive, mind-numbing manual compilation. It's very simple: as...

From the 'why oh why' department..

Sort of following on the theme of Visual Studio customisations, here's one which I don't use: VIEmu is a piece of commercial software which provides full VI/VIM editing inside Visual Studio. There are also versions for Word & Outlook, and SQL Server 2005 Management Studio - each priced at $69.95. Ouch, however there are also a couple of package deals which mitigate the pricing somewhat. For the 3 people out there who happen to code in Visual Studio and love VI, then this is for you! On a related note, I tried to adopt gVim (a...

My Visual Studio Customisations

Every developer has their own list of customisations and tweaks which they apply to their IDE to give it that personal touch. This is my personal list of settings and customisations for Visual Studio 2005. I'm partly writing this down as a reference guide for myself lest I forget - reinstalling Visual Studio is something I try to do as little as possible, and so having a reference list is useful for those moments after a reinstall where you know something doesn't quite feel right in the IDE, but can't remember exactly which setting you've missed! I realise...

IIS7 beta3 now available

The IIS 7.0 Beta3 shipped a few days ago with a Go-Live License for those of you who simply can't wait to get your production apps installed on the latest and greatest version of Microsoft's web server. Alternatively, there are plenty of webhosting providers who have installed the beta and are now offering it to customers so you can perform some testing without needing to perform any upgrades. This is especially handy if you're still using Windows XP or 2003 server, and don't have any spare hardware available to install Longhorn or Vista (which IIS7 requires). On a...

ReSharper 2.52 released

ReSharper 2.52 has been released. Although it's only a minor build, there's a nice long list of fixes as well as a change in their evaluation license model: Another maintenance release of ReSharper is here. The release includes a number of bug fixes and a new evaluation model which needs some explanation (but don’t worry, it will only make things easier for you as an evaluator!). Link: ReSharper 2.5.2 Released Link: Download ReSharper 2.52 Link: ReSharper 2.52 Release Notes Tags: ReSharper

RegEx Performance Options

It's obviously not new, but the January 2006 edition of MSDN Magazine has some useful performance tips, particularly in the area of Regular Expressions. File this under the category of 'things I talk about here so I can refer to them myself later'. A few quick quote snippets: In the Regular Expression (Regex) space, there is the option to specify that a regular expression is compiled through use of the RegexOptions.Compiled setting. This switch hints at an underlying aspect of regular expressions in .NET: they have three modes. Interpreted Regexes have the...

Debugging DataSet Constraint issues

If you work with typed datasets often enough, then chances are that at some point you're going to run across this error message: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. The error message is logical enough - it tells you what's wrong. You have a dataset, and there's a piece of data which is violating it's constraints. If you have a small dataset, then you can usually spot where the problem lies quickly enough. However for larger datasets the offending table(s) and/or column(s) are usually harder...

Fun with MSMQ

Working with MSMQ is pretty simple. A couple of quick google searches will return a nice array of code snippets and tutorials to help you get started. If you prefer books, there are heaps of them out there too, although I'm not really sure how you write entire book which is based soley on MSMQ, but I assure you they do exist. I understand that if you're developing an enterprise application that you'd probably want to use some more complex features of MSMQ, but the basic concept isn't that hard - put a message on the queue, take a...

SQL Server 2005 SP2 now available

SQL Server 2005 SP2 is now available for all versions. Link: Microsoft SQL Server 2005 Service Pack 2 Link: What's New in SQL Server 2005 SP2 Tags: Microsoft, SQL

Generate SQL data INSERT statements from a table

If you've ever had to work with reference data across multiple instances of the same application, or have simply needed to script data contained in a table, then you'll know what I'm talking about here. I've needed to do this a few times recently, and finally managed to come across something which does exactly what I needed. Here's the blurb from the description, which sums it up better than I have here: This procedure generates INSERT statements using existing data from the given tables and views. Later, you can use these INSERT statements to generate the data....

Small DataSet tip - blank/empty .cs files

If you happen to press F7 in the while working in the DataSet designer, it will generate you a class file for your DataSet. If you've pressed F7 accidentally and dont want/need this file, then you might delete it at some point, or someone tidying up your code might decide to do it for you. The file might seem like an obvious candidate for deletion - the main hint being that it contains no code! However, if the file is simply deleted then your solution may no longer compile. The solution is pretty simple - you simply need...

Visual Studio 2005 Service Pack 1 (SP1) Released

This one managed to slip by me. I'm not sure on the exact release date, but looking at digg.com makes it look like it was released only a couple of days ago. There are seperate downloads for Visual Studio 2005 Team Suite (includes SP1 updates for Standard, Professional, and Team Editions of Visual Studio 2005), Visual Studio 2005 Team Foundation Server, and Visual Studio 2005 Express Editions. The version for Windows Vista (beta) is apparently coming soon. There are a lot of important fixes in this service pack, especially for anyone working with Team Suite to do load...

Visual Studio Team Edition for Database Professionals

Database change control and versioning is an incredibly important part of development which can occasionally be overlooked. While there are some good tools out there to help make this task easier, a lot of what I've seen so far has been incredibly manual. Microsoft is hoping to make this task easier with the release of Visual Studio 2005 Team Edition for Database Professionals. I guess they're hoping to make some money too. Team Edition for Database Professionals gives you a new database project, which you can use to manage your database as well as integrate it with Team...

ReSharper 2.5 released

The main enhancements in 2.5 seems to be performance related, which is always a good thing: ReSharper for Visual Studio 2005 provides performance improvements in all areas, including: Visual Studio startup time with ReSharper is close to that of Visual Studio without ReSharper The speed of typing in the editor is greatly improved, including autopopup on Code Completion More speedups for code formatting, error highlighting, Live Templates, parameter info, and more However the most useful feature I've found so...

Connection Strings (and nothing else)

ConnectionStrings is one of those sites which deals with only one thing, but deals with it very well. In their case, the subject is hopefully quite obvious. The site contains samples and variants of connection strings to pretty much every database out there. Handy. Tags: SQL

ASP.NET Text Character Counter

A textbox character counter is a pretty simple piece of functionality, and there's a lot of different ways to apply one to your application. The following method is nice and simple, and can be done using only clientside JavaScript if required, or combined with server side code in order to create a more dynamic effect (ie, turning the counter on/off conditionally). First, we'll add the most basic static implementation of the field counter to a form using only a JavaScript function and event handlers in the aspx file, then we'll look at how we can extend the functionality...