Jax and Hazz go to Switzerland
January 7th, 2008Here’s a little taster of some of things we did while we were in Switzerland at Christmas 2007
The trouble with ASP.Net
September 27th, 2006ASP.Net was a huge step up from ASP classic with it’s nasty non-OO, non-typesafe, spaghetti code limitations, but it’s not all good. It’s easy to create a site in ASP.Net that search engines, browsers and users all hate. Here’s a few thoughts on avoiding some of the pit falls.
The fundamentals of HTML
Like anything, it’s hard to do web development well unless you understand the fundamentals. Joel Spoesky wrote a great piece on the law of leaky abstractions. In it he talks about the way that ASP.Net tries to make web development more like VB development…you create a blank form, add some controls, and double click to add functionality, just like VB! But the web is not VB, and that’s the first trouble with ASP.Net.
To understand why ASP.Net can get you into trouble, you need to understand the fundamentals of HTML, and I really mean the fundamentals.
- What’s a URL?
- What’s a query string?
- How do you use the query string to pass information from one page to another?
- How long can a query string be?
- what’s a FORM?
- What does the ‘METHOD’ attribute do on a FORM? What’s the difference between METHOD=’GET’ and METHOD=’POST’
- What’s a hidden form variable?
- How many forms can be on a single HTML page?
- What’s a cookie? What are they used for?
- What’s the HEAD section? What should be in there?
- What are the following tags HTML tags? H1, H2, P, A, OL, UL, LI, DL, DT, DD, DIV, STRONG, BR
The nasty postback
The first, and nastiest thing that ASP.Net does that causes trouble, is that it tries to make web pages event driven. It does this, using a clever series of javascript files that can found in the ASPNET_Client directory. Aside from the obvious limitations of browsers with javascript disabled, the biggest problem with this approach is that it confuses search engines.
For example, if you build a menubar on your home page in ASP.NET that uses the standard controls, your site simply won’t be indexed. Spiders can’t follow the javascript postbacks that make the buttons work.
Same thing for grids, lists or any control that ends up taking you to another page. Avoid ASP.Net navigation controls in most cases, a simple html anchor works best for everyone.
The tendency to build everything on one page
Because the ASP.Net model is trying to be more like a VB application, it tends to make developers write web pages like VB forms with too much stuff happening on a single web form. The classic case is the master detail product list where both the product list and the product details are located on a single .aspx page.
Again, the problem with this approach is that it’s difficult for search engines to spider all the contents of the page, and it’s difficult to bookmark the product detail, or send a link to a certain product to a friend.
Of course from the programmers point of view, it’s a snap, because you don’t have to maintainstate between pages, it’s all done for you.
The tendency to use controls to set up your page template
Not sure if this is a trouble with ASP.Net or a trouble with developers, but I’ve seen lots of web sites where the page header is extracted into a user control, including the whole HEAD section, TITLE and META tags. Unless done correctly the result of this is that all pages have the same TITLE and META tags. Search engines hate this, and it makes the back button, history and bookmarks difficult to distinguish.
The way forward
First let me say again, that ASP.NET is a huge advance over ASP classic. But, like many things, if you use it the way the manual suggests, you’ll end up with a pretty poor excuse for a website.
To get the most out of ASP.NET, put it away for a while, pull out notepad or php (or even asp classic), and write a simple website using pure HTML fundamentals. Treat each page seperately, pass information via query strings or forms, create TITLE and META tags for every page, don’t use javascript.
Put this site on the web, and see how it rates in the search engines. See how easy it is to bookmark, then apply what you’ve learnt to your next ASP.NET project.
For Richard - Surf Photos
July 15th, 2006Hi Richard,
Nice to meet you on Sunday, hope you got a few good shots.
As mentioned, I’m a Software Developer most days, and recently I’ve been dabbling a bit with online photo albums because I’ve bought a new digital camera (no I’m not a ‘photographer’)
I’ve been playing around with Gallery (http://gallery.menalto.com). You can see my album here: http://kwips.com/photos (it’s just the usual stuff). I’m actually not particularly happy with my current web hosting company, I think the performanace could be better, but the online album stuff is really good I think, particularly since it’s free.
Gallery is interesting because it has heaps of support for printing, and e-commerce type stuff which may or may not interest you.
Anyway, you mentioned you’re having some problems with your web developer. I’m not hawking for business (I’ve got a full time job) but I would be happy to give you a second opinion or some ideas or whatever.
If you’d like to have a chat or whatever, just leave a comment on this post.
See you in the surf,
Harry.
Code like Marco Baghdatis
February 21st, 2006In the recent Australian Open, Marco Baghdatis won plenty of hearts with his gutsy performance as a relative unknown to make it to the finals…and have a go at beating Roger Federor.
Marco impressed a lot of people both on and off the court and I think we can learn a few things from Marco in our parrallel universe of IT and software development.
1) Be courageous
Marco Baghdatis is one of the most courageous sportspeople that I’ve ever seen. Even under the enormous pressure of the finals of a grand slam tennis tournament, Marco still backed himself to make the hero shots when they mattered most.
As a software developer, sometimes you need to back yourself on the big calls. You need to believe that you can make something work, then just get in and do it. You need to trust that you will find a solution to any problems that you didn’t anticipate.
Being courageous is particularly necessary when you are refactoring or working on other people’s code. It’s all too easy to be scared about the consequences of modifying code that you aren’t familiar with. Sure, there’s a reason you’re scared, you could screw up really bad, but that’s the nature of courage. If you continue to take the soft option in this situation, you’ll end up with dirty, hacky code. (Oh and one more thing, remember the unit tests).
2) Be bloody good
There is no substitute for talent and hard work. Marco Baghdatis might be a relative unknown in the tennis world, but you can bet your bottom dollar that he has been perfecting his craft since he was knee high to a grasshopper.
If you want to be a great developer, you have to be smart, and you have to work hard. So many developers seem to learn a basic set of technologies and that’s it, forever. You have to keep learning outside your day job, and you have to keep probing the fringes of technology for new ways of doing things.
3) Don’t think you’re too good
I think perhaps one of the things that we all love about Marco Baghdatis is that he is refreshingly not-up-himself. Just because you are good at what you do doesn’t give you the right to be an arsehole.
Software developers are notorious for thinking we’re just a little bit too good. If you’re good, people already know it. You don’t need to act it. Who knows, maybe that silly user giving you grief on the end of the phone might be right?
4) Enjoy what you do
Marco Baghdatis enjoys himself. What’s the point of doing something if you don’t enjoy it? How do you expect be bloody good at what you do, if you don’t enjoy yourself?
Sometimes software development can be a thankless job, everyone wants more from you than you can possibly give, and everyone expects you to get it right first time every time.
Try to organise your work so you seperate the personalities and pressure from your coding. Use a bug tracker, use agile methodologies and communicate with your stakeholders face to face if you want to reduce the tension in your environment.
Finally, balance work and play….girls are fun too…just ask Marco…

I think I’m interested in UI
January 27th, 2006Of all the elements of software development, I think it’s the UI that I spend the most time pondering. I don’t really care how pure my object model is, or normalized my database is, or whether curly braces are better or not. I kind of assume that that stuff is in order, and yes, it is very annoying working with dodgy software at any level (trust me I know dodgy software).
No, I’m most interested in the user. I get more of a kick when a user goes wow! than a fellow software developer, dunno why, just do. Perhaps it’s because users have higher expectations, or perhaps I just think it’s really hard to build a really good UI.
Interestingly, I don’t have an artistic bone in my body, so I’m no good at creating beautiful icons, or coordinating colours, but I’m getting to know what makes a good UI, mostly by studying others, either good or bad.
I’m a big fan of Inductive User Interfaces (IUIs) or Web Style navigation. Here’s just one example of this style of UI (not necessarily the best).
Of course, I’m stating the obvious when I say that this style is not appropriate for all occasions, and I’m not here to lecture anyone on when it isn’t appropriate, but I’ve had some success recently using this style of navigation in a couple of business applications that I’ve been involved in recently.
Interestingly, although many people criticise IUIs for being too ‘dumb’ for power users, my users who use the same single app day in and day out, seem to be really happy with the IUI approach compared to their previous app, which was basically document-centric.
I also think the IUI approach is great for anything that’s basically automating a workflow, e.g: loan approvals, sales automation, payroll processing etc. The IUI approach just seems to keep everything fairly simple.
So, I’ll probably explore the UI a bit in the next post or two, see what we can come up with for kwips
Welcome to the couch
January 14th, 2006It’s Sunday afternoon, the cricket’s on. Australia is having a shocker: 6 for 71. I’ve spent the weekend racing around as usual. This weekend it’s been house hunting and a little triathlon (yes there is such a thing).
So with Australia in Dire Straights, and the weekend behind me, I sit down to my first post from the couch.