typemismatch

just a projection of my own imagination

  • You are here: 
  • Home
  • .NET

Simple programming can be hard but it’s worth it.

Posted on November 11th, 2007

I recently launched a new site off some old ideas I had. I decided that I didn’t have the time to engineer yet other typical site with logins, account management, features, features, features etc. I wanted to keep the barriers to usage extremely low – since my site was going to be radically different, why lets users leave because your site wasn’t fast enough. I guess this is more about a simple site rather than simple code – which is a whole other story!

This is a short study on what took to build Mafooku and what appears simple sometimes isn’t. Take a look at the site for reference: Mafooku – Top 10

I started off the usual way, lets get the basics done for any site. So here was the initial list of things I thought my site needed. I’ve broken each section down into the initial “bad” list and then the final “good” list.

  1. We’re posting products so we’re going to need an login to edit products.
  2. If you need a login you need registration.
  3. Now I needed password/account recovering pages.
  4. Product edit/save page.

Woah … look at that list. To post a single product the user must first register, remember yet “another” username and password, understand their account layout and finally try post a product. Many users would have given up already so I narrowed down the list to just

  1. Let the user post a product.

A single page, short sweet with limited fields and just one image. Everything you need to get a seller interested in your products. So that may have seemed easy enough but we have a problem now. How does a user edit or re-post a product or more importantly delete it if it isn’t relevant anymore?

You need some creative thinking for this. A user can remove their product because when it is posted they get an email with an encrypted link to disable the product. Since only they have that email it acts like an account. The same idea applies to editing or in my case – just re-posting with updated details.

So from my initial list, item 3 wasn’t ever needed. Item 4 was really just item 1 simplified for the user so no extra coding here. Item 2 again wasn’t needed. There are now no barriers to usage, the site will be faster and much easier to understand.

I applied the same to the actual product listings. Categories etc just get too big for users to really navigate and search, when done right, can help a lot – is it really simple? I decided for this site, no. If you can’t see what we have within 1 click (no typing!) then it isn’t simple enough. Hence the front page items and a list of the last 100 and nothing else.

The actually programming behind the scenes was a bit more complex with some advanced caching, plenty of security and encryption but still remained a small size code base because I never stuffed the site with un-needed features.

-c

Tags: , ,
Filed under .NET, Software | No Comments »

Quick performance tip for VS 2005

Posted on November 6th, 2007

As I’m sure we all know Visual Studio 2005 as great as it is isn’t the fastest application on the planet. The good news is there are a multitude of things we can change to speed it up. Now firstly let me just state that I’m not a fan of just linking to other people’s blogs or regurgitating their information however I have posted the links to Scott Guthrie’s blog below for reference.

The tip I wanted to add was a really quick and easy performance boost for Laptops. I guess you could also apply this to a desktop using the same logic. As you will see below having the OS on one hard drive and apps on another drive gives a huge performance increase in VS but what if your system is already setup? I had this issue with my laptop. The easy fix is to add a second drive to your laptop and move the OS paging file over to this drive. I also moved the SQL databases to this drive since that is easy enough. I noticed a remarkable improvement in visual studio performance and I didn’t have to go through the headache of moving source code, IIS settings or VSS settings. The paging file is the biggest one by far.

Scott’s Links for VS performance tuning:

Hard drive performance

Tags: , ,
Filed under .NET | No Comments »

VS 2005 Style Sheet Tip

Posted on October 29th, 2007

Some of you may already know this little asp.net secret but if you don’t enjoy :)

It appears that when an asp.net page renders due to the fact that the header element is actually being generated on the server before it is sent to the client some nifty things happen. I hope you already know that any style sheets placed in a theme folder will get added to the header automatically. This is really great but what if you want a style to be conditional?

Well, normally you’d put the css into another folder so it isn’t automatically added – for example you might use /css/ie_hacks.css or something like that. In the header you’d probably specify the css source as /css/ie_hacks.css but you can take a short cut. You can just use the style sheet name, ie_hacks.css and when the page is rendered the full path will be found.

I use this a lot with conditional IE hacks where I want a path rendered that I do not know during development since many of my site projects run mutiple clients under one site.

-c

Tags: ,
Filed under .NET | No Comments »