Friday 21 December 2012

The following is a list of tips and bits of knowledge:


> The key to any successful website is how well it solves a need.
Going against big players is tough and competitive. One approach is finding (or creating) a niche need and from there growing the site until it's better able to move into the more competitive markets - that is if it's even worthwhile to do so. 

> The amount of text on your site (and more importantly keywords), may help your site get off the ground.
This tip deals with search engine optimization, and how making your site seo friendly can help with search engine rankings. In my experience, having pages with specific keywords and/or lots of relevant text can improve traffic to your site. This is an especially useful practice if your site is new or has little marketing as it's a way to help your site list well in search engine rankings without having to accumulate numerous inbound links which normally takes a while to do. 
 
> Try developing your site in Firefox with the Firebug extension, and the YSlow and Hammerhead Firebug extensions.
Although Firebug has many features, one that I find myself using the most is the Net feature. This feature gives you visual representations of how your site's javascript, html, css and image files (etc, etc) are downloaded by the browser. When coupled with Yahoo's YSlow Firebug extension and Steve Souders' Hammerhead extension, optimizing your site's page load times becomes easier, and it helps in all browsers beyond just Firefox. 

> Minimize DOM styling on page load.
This tip applies especially to Internet Explorer. If you are setting a lot of styling (via javascript) on various DOM nodes during page load, the page will render significantly slower in many cases than if you forgo or keep the styling to a minimum. Applying display, width, or height properties on DIV's with lots of inner HTML can take upwards of 5-10 seconds (in IE at least) depending on the amount of HTML code. Worse still, the browser (again in IE at least) will wait until that styling is finished before showing the contents of the page! 

> onmousedown is ~100ms faster than onclick.
Something to keep in mind. Use only where appropriate (not for links!). 

> Need a repeating background image and another one just for the top of the page? Set the background on both the HTML and BODY tags.
You can set a background on both the HTML and BODY tags in CSS. One techniqu e is to set a repeating (fixed) background image on the HTML tag and a second, top of the page only background (transparent) image on the BODY tag. I would recommend setting the background-attachment attribute on the HTML tag to fixed so that you don't get the jitter effect in some browsers when scrolling (if the background-repeat property is set to repeat). 
 
> Develop a useful window.onerror function if you have a lot of javascript in your site.
If your site has a lot of javascript and numerous pages, it would probably be a good idea to have a useful onerror function to help debug during development and even while in production. The window onerror function provides three arguments: the error message, the url, and the line number. Using these three pieces of information, coupled with other useful bits of data such as the browser user agent string, the os type, perhaps the resolution, and others, you can create an onerror function that could make an ajax call to write to a log file with this useful information that you can later look at. 
 
>Javascript: The Good Parts.
This is an excellent read by Douglas Crockford, creator of JSON and currently employed by Yahoo. It's short, about 120 pages, and is a nice overview of "the good parts" of javascript. It's the book I point to these days whenever someone asks me where to start learning javascript. 

> Good feeds to follow:
A List Apart, Ajaxian, DZone, DZone: JS, TechCrunch, WebGuild. While there are numerous web development blogs out there, I find these to be consistently interesting and useful. A great way to stay up to date in this fast paced world. 

> Technologies worth checking out:
Django and Flex. Flex I'm still taking a look at however Django I've been working with for a few months now and think it's great. It's a Python based MVC framework that has been gaining traction as of late (Google apps and the Russian search engine Yandex use it). It's rather easy to pick up, even if you don't know any Python (as was my case). Coming from a Rails background, I found it was quite easy to port some of my sites (such as this one) over. 
 
> Other useful things:

For editing/development in Windows: E Text Editor (Textmate for Windows.) For tracking/analytics: Woopra. For sitemap generation: XML-Sitemaps.com.



Just as a final note, something I haven't looked into much but will be shortly, is internationalization. There are tools out there that translate web content quickly and easily (and these days more accurately). Might be worth looking into yourself if you get a lot of foreign visitors.