Blog Home  Home Feed your aggregator (RSS 2.0)  
.Net Jonesie - May, 2007
A simple programmers blog
 
# Thursday, May 31, 2007
It's been a long time between posts.  I'm currently finishing up a project and moving on to a new client so I thought it would be a good time to document a few things I've (re)learnt along the way.

The project I've been working on is for a large travel web site. In 6 months we have :
  • Replaced the backend web services with WCF services and connected these to new external providers and databases
  • Upgraded the site from .Net 1.1 to .Net 3
  • Replaced 60% of the pages and changed the rest
  • Added significant AJAX functionality and lots of client scripts (JavaScript)
  • Fixed numerous issues and bugs
Here's a list of my lessons in no particular order.

MS AJAX
The new pages are composed of many integrated user controls, some of which use ajax functionality.  UpdatePanels can cause grief to client side functionality and tracing the interaction can be a nightmare.

Tip:  Keep it simple! Only put update panels at the page level.  Only have PageMethods and WebServices called from the page.  Use properties and events in user controls to bubble up control to the page - or better yet use a strong MVP or MVC pattern.

ASP.Net server controls can also frack with your brain. I would love to try creating a site totally without server controls and just use AJAX.

I Love JavaScript
I could do it all day!  Langauges like C# & VB.Net are certainly rich and powerful but JavaScript is small and elegant.  Of course, you wouldn't want to debug a 5000 line JS file too often (and we had a few of those!).

WCF
WCF is very easy to use and configure but you can end up with some huge network traffic issues very easily.  Try to keep your data contracts as small as possible.  Compression helps.

Visual Source Safe
Dont use it if you have any choice.  Don't get me wrong, I actually like VSS for small 1 or 2 developer projects.  My biggest issues are:
  • Exclusive checkout is a real PITA with devs in another room or building.  Sure, you can do non-exclusive checkout but...
  • It still doesn't play nicely with Visual Studio at time.
  • It's slow
  • I don't trust it because it does some really weird things
Task Tracking
This project would have benefited hugely from having Team System available.  I really miss not being able to create work items when I find something wrong or need to remember something to do later.  We are suffering at the end of the project because a few issues had been forgotten or deferred.
Of course, you don't need VSTS to track your todo's but make sure you have somewhere to record things on the fly. Don't use email to tell your BA or PM - they are just as forgetful as you are!

Environment
Also take the time to setup a decent development and test environment BEFORE you start coding.  We lost many days due to problems with the development server - too many projects using the same server, poor performance, lack of control etc.

Web Application Projects
The file based web projects are ok for simple things but Web App Projects give you settings and properties and a few other nicities.  I'm stuffed if I know why MS ever dropped them from VS 05.

CSS & HTML Must Die
There has got to be a better way.  CSS & HTML are ridiculously imprecise.  I'm yet to meet anyone who can sit down and design a web page from scratch that is gaurenteed to work on all browsers and look like they expect it to (except for the simplest of pages).  I'm sure there are a few genius designers out there you can do this, but they are few and far between.

FireFox & FireBug
FireFox with Firebug is an awesome development tool for client side debugging.  You can use FF to debug from Visual Studio by specifying it as the external startup program in your project web settings.

Be Stong. Stay True
Sometimes you are asked to do things that you know are wrong.  A good argument does not always convince a closed mind.  Stay true to your beliefs but do what they want anyway - safe in the knowledge that you will have the last laugh.

Thursday, May 31, 2007 12:43:35 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [2]   General  | 
# Friday, May 11, 2007

Creating deployment documentation for .config file changes is a freek'n nightmare and something that should be automated as much as possible.  I haven't found a tool that does this completely as I want but there's a number of XML Diff'ing tools around that do the hardest part of the job.  I just found this one on MSDN.  It's a little old now but it comes with source and it's fast and simple. 

Ideally I'd like to be able to have XMLDoc comments in .config files and then generate some help from this - much like you can do with NDoc or Sandcastle for your code files.

Friday, May 11, 2007 3:54:40 PM (New Zealand Standard Time, UTC+12:00)  #    Comments [0]   General  | 
Copyright © 2010 Peter G Jones. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: