Web Development Tips

When it comes to Web Development, we've been there, done that, now serving 119 tips in 10 categories ranging from ASP and Web Development to Web Services Tips.

What do I need to know about SEO?

What is SEO?

Search engine optimization, or SEO, is one of the buzzwords of the day, but does it have real significance? Yes, it does. For a while, SEO experts focuses on directly manipulating search engine rank through SEO. However, Google frowns up that, and you should look at SEO as a way to naturally grow your traffic and improve your rank through consistent practices.

SEO starts with creating quality content on a frequent basis. Update your website as least once per week. Use catchy headlines, post your content to social networks like Facebook and find an unique angle. Keep your paragraphs short and use lists, images and headings to make your content easy to digest. When you can, use graphics or images that readers especially like to share. Add widgets or buttons that let people submit your content to Facebook, Pinterest and other social networks without leaving your website.

You should always link to your previous content from your own website to help search engines index your site. Make sure to use keywords applicable to your content and industry in your content, titles, URLs, and metadata. When possible, have others link back to your site using those keywords. However, your keywords should also use natural text like your company or website name.

Join forums, communities and social networks. Use the appropriate keywords in your profile. Don't forget to link to your website on Google+ and Facebook. Remember that Google favors its own services, so create a Google+ page and feed your updates to it just like you would on Facebook.

SEO is an ongoing process that doesn't always produce immediate or drastic results, but it can bring more traffic that converts to sales or signups.

   
What color combinations should I use on my website?

Good use of color

The Color Wheel shows the primary, secondary and tertiary colors. To find complementary colors (these colors go well together on websites) simply pick a color and look at the color OPPOSITE. For example, yellow's complementary is Purple (which is blue and red's secondary). Balancing color on a website is important. The wrong colors and color combinations can spell disaster - for instance, reds are hot, excitable, angry, blues are soothing. Try to find color combinations that work for the mood, and use the color wheel when in doublt what combinations work well. The color wheel (my crude interpretation of) can be found Here Wikipedia has a good resource on Color Theory.

   
Is my website too busy?

Don't clutter your page

In attempt to cram as much information possible into a 15" screen, many websites become way too busy and distracting. Remember the main 2 purposes of a website - users want to find information, you want them to find information. Therefore, you want the website to be easy to navigate, easy to find what they are looking for, and pleasing to the eye. 50 advertizements, with blinking flashing marquees, bold red text, links thrown all over the place, will not meet this goal, it will just make things confusing. Have a navigation bar somewhere that from page to page remains consistent and familiar, and hopefully in the same place for each page, have each page give the information it's intended to give, and nothing more (provide links to other pages obviously), make use of whitespace to separate paragraphs, advertisements, images, and use colors correctly: in another tip I will tell you about primary, secondary, tertiary and the use of complementary colors in websites.

   
How can I save my variable information in cookies for later retrieval?

Using cookies

You can use cookies (local files) to store information instead of having to post variables back and forth between pages. It's easy - just use the request.cookies and response.cookies objects and methods. To save a value to a cookie, simply create a value, such as oranges: response.cookies("oranges") = 13 -- now you have a cookie on your computer with a key name of "oranges" which has a value 13. To retrieve the information, use the request.cookies method as: myVar = request.cookies("oranges") which will retrieve the value 13. You can also use the cookies as collections, such as response.cookies("oranges")("navels")=13. Now you have 13 Navel Oranges stored. To retrieve, use the same format: myVar = request.cookies("oranges")("navels").

   
Do I need to do cleanup for instantiated objects?

Close those objects!

When you instantiate an obbect, such as a connection, recordset, filesystemobject, etc., remember to .close them, and to also set them to "nothing". Each time an object is created, memory is used up. Yes, when you exit a function the object instantiated within them go out of scope and supposedly are close, but it's a good programming practice to close and free up anyway.
For example:
dim rs
set rs = getUsersRS()
if not rs.eof then
do while not rs.eof

'do something here
rs.movenext
loop
end if
rs.close
if not rs is nothing then set rs = nothing

this effectively kills off the recordset object rs.

   
How can I improve code readability.

Standards

When starting a new project (or jumping into an existing project) define a set of standards for function and variable names. This may sounds simple and maybe even irrelevant, but creating a document defining these standards will go a long way towards code management and maintenence. For example, if you prefix every variable or function/sub call with the type of call and the return value (or variable type), use case-consistency, and name functions/variables properly, you only need to glance at a function name or variable name to know what the return value is, whether it's a function, sub or variable, and what it does. Here's an example of a FUNCTION that returns a STRING value of a person's username: fnStrGetUserName(). Here's an example of a global variable, that is a long number, and holds a value of a calculation of a circle: gvLngCircleValue. Pretty self-explanatory. AND somewhat self-documenting. The more readable your code, the less comments you need, the less chance someone might misuse the variable or function (and throw an error), and the better chance someone ELSE will be able to read your code.

   
Not finding the advice and tips you need on this Web Development Tip Site? Request a Tip Now!


Guru Spotlight
Alexis Niki