Saturday, December 24, 2005

Using Stored Procedures in VB.net

writing an insert statement
CREATE PROCEDURE sp_InsName
@FirstName varchar(20),
@LastName varchar(30)
AS
BEGIN
INSERT INTO Names(FirstName, LastName)values(@FirstName, @LastName)
END
GO
This doesnot return any values, if we need to call it in vb.net then
add key="GMR" value="server=localhost;database=databasename;uid =userid pwd =password;"
Public ObjCon As New SqlConnection()
Public Sub OpenApplicationConnection()
ObjCon.Close()
ObjCon.ConnectionString = ConfigurationSettings.AppSettings("WebTeam")
ObjCon.Open()
End Sub

Public Function ExecuteQry(ByVal strsql As String) As Boolean
OpenApplicationConnection()
Dim cmdExecute As New SqlCommand(strsql, ObjCon)
cmdExecute.CommandText = strsql
cmdExecute.ExecuteNonQuery()
cmdExecute.Dispose()
End Function

OpenApplicationConnection()
strsql = "sp_InsName 'Abc', 'DEF'"
ExecuteQry(strsql)

Friday, December 23, 2005

Developer Guidelines For SEO

SEO guidelines For Developers

• Do not pass more than 2 values from one page to other to generate any dynamic content.
• Never hold a URL with session id. Most of the search engine spiders do not cache dynamic URLs with session Ids.
• As Search engines do not access the pages created dynamically, the only way to have the spiders observe the dynamic page is by giving static links in the table of contents page. Search spider stops if there is a ‘?’ in the link. Ex: www.mysite.com/anycategory?cat=1 then the value of cat keeps on changing dynamically. For this create a static html page and in the table of contents write all the html tags along with the product description.
• Write the individual dynamic page URL’s in robots.txt and then submit to search engine.
• XQASP offers a product that will automatically remove the query strings from your .asp pages and replace them with "/" marks. For more details click on the following URL: http://xde.net/xq/tool.xqasp-deep-web/qx/index.htm
• We can increase the chances of indexing individual products or product categories by including good descriptions and descriptive links of a product on a static table of contents page.
• Avoid paging as far as possible, as Spider searches for items that are available on the first page. If paging is unavoidable, show the list of all page numbers that are available in the form of links. Ex: 1 2 3 4 5 6 7 8 9 Displaying 6 out of 9
• Remove any unused variable declarations in the code
• While retrieving any image from the database, do retrieve its altText and display it dynamically.
• Have some static content on top of the dynamic page so that robot can understand what the products are all about.
• Use Hyperlink buttons as far as possible; only use link buttons if there is any server side scripting.
• Write comments in aspx page if any grid controls or server controls are used, indicating why the grid/Control is placed? What are the type of products that are displayed in the grid?
• Shopping carts are displayed in the search engine only if the special features of the products are highlighted. Common items require a large amount of advertising; thus, see to it that special features of the product are displayed in a more logical way. Make any special feature bold in nature with size varied from rest of the content.
• Avoid any error pages by giving a custom error page. Search engine black lists a website if there is a yellow screen indicating an error.
• Navigation from one page to other should be logical. Do not place any irrelevant pictures in any display pages.
• Writing the developer comments in aspx pages is advantageous but not mandatory.
• Avoid spam data and keep cleaning the junk data from the database.
• Modify at least two products in a day, like provide a sequence to display today’s Featured product or this week special so that website look gets refreshed when there is a search engine robot. This creates a better rank.
• Do not display more than 3 advertisements in a single products page.
• Notify to the customer that flash and images make the website load slowly, to avoid this make the images small in size and if needed more in number to have a better ranking.
• Place the image with its product name so that images are also ranked well in the search engine.
• Have the Meta tags and content load dynamically, so that owner will have full control on the website and the keywords that needs to be used.

SEO guidelines for designers

Designer Guidelines for a Better Design

• Every image name should reveal the image description. Ex: Company Logo should be named as “your company name.gif/jpg” Avoid using logo.jpg or img.jpg. If company name has more than 1 word separate the company name using underscore. Ex: GMR web Team should be written as gmr_web_team_logo.gif
• While attaching an image into the design, there should be a div tag before the image and div id should have the main idea of what the image speaks. (if it is more than one word separate with underscore). Provide Alt text for each image attached to the design.
• If a new table is created then comment should be there at opening and closing tag indicating the table number.
Reason for having this: The comments would be attached to this tag line indicating the idea of the content placed in that particular table.
• Avoid unnecessary creation of tables
• Avoid using the same image names again and again. Ex: Do not use img1 and img2 or logo1,logo2.
• Title of the page should keep changing from page to page for a better search facility.
• Do not copy and paste the title. If done so take some time to change it.
• Google claims the most effective sizes for click-thrus/Advertisements as 326x280, 300x250 (inline rectangle), 160x600 (wide skyscraper).
• Google allows 3 ad units maximum on any one page of your site. Having Ads on every page result in more click-thrus.
• Delete any unnecessary commenting before uploading.
• Do not take the back up of any file in the same folder. This would result in page repetition. This is bad for SEO.
• Google/Yahoo prefers light colors for the website. MSN/Alta Vista do not consider the color seriously
• Avoid busy backgrounds that obscure the text, Black color text is the best color for spiders.
• Some spiders are programmed in such a way that 8 pixel fonts are seen as less important as 12 pixel fonts. Make the size of the content as 10 and heading contents as 12 to have a good crawl from the site.
• Bold text is more liked by the audience and crawler engines. If the size of the font increases 16 then there is a danger of search engine considering it as spam.
The emotions and concepts that you associate with specific colors may differ from other people's associations, but there are themes that run throughout each color. Hëre are some:
Red:
Positive: Sense of power, strength, action, passion, sexuality
Negative: Anger, forcefulness, impulsiveness, impatience, intimidation, conquest, violence and revenge
Yellow:
Positive: Caution, brightness, intelligence, joy, organization, Spring time
Negative: Criticism, laziness, or cynicism
Blue:
Positive: Tranquility, love, acceptance, patience, understanding, cooperation, comfort, loyalty and security
Negative: Fear, coldness, passivity and depression
Orange:
Positive: Steadfastness, courage, confidence, friendliness, and cheerfulness, warmth, excitement and energy
Negative: Ignorance, inferiority, sluggishness and superiority

Tuesday, December 20, 2005

Techniques to write RSS Feed

Definition of RSS feed
RSS is an abbreviation of Really Simple Syndication. According to Harvard it is a web content syndication format. This format is used for syndicating news and the content of news-like sites. It is written in Xtensified markup language (XML) to have an update of latest information on the website.
RSS feed can check for changes, if the changes are made then the changes are appropriately displayed in the area where this RSS feed is utilized.
Formats in RSS
There are three widely used RSS formats RSS 0.91,1.0 and 2.0 being the latest.
This is a case sensitive language, thus be careful with capital cased letters.
Step by Step procedure to create an RSS feed on the website
Before starting to write an RSS, we need to understand that there are several formats of RSS, we shall be formulating the steps taking RSS 2.0 format into consideration.

-
Channel is a component where mandatory and optional fields are declared.
-
Channel contains items in which each news item is drafted independently. Ex:
-
Step 1: There are certain mandatory fields and certain optional fields in writing RSS. Identify the mandatory RSS feed items
1. Title : This is how people refer the website from another website. This title should be same as the title of the page that the RSS is pointing.
2. Link: URL of the corresponding website
3. Description: Phrases or sentences that speaks about the website and summarizes the content. This should be opted to be same as the metatag content description for a better SEO. Ex:
Affordable Website for Small Business
Step 2: Identify the optional fields that are necessary in writing a good RSS
• Language: if the website is English or Spanish, this will tell to the person who is posting the rss feed about the language of the website. By knowing he can post all the similar language rss feeds at one place. Ex:
en-us
• Copyright: reveals the copyright notice of the owner Ex:
2005 gmr web team
• managingeditor: This will contain the email id of a person to whom the content belongs to. Ex: ajay@gmrwebteam.com
• webmaster: email address of a person responsible for any technical issues relating to the rss feed. ex: webmaster@example.com
• pubDate: The publication date of the content written on the website is declared. This automatically changes for every 24 hours. The date format is confined to RFC 822 specifications.To know more about that specifications click on the http://asg.web.cmu.edu/rfc/rfc822.html. Ex:
Tue, 10 Dec 2005 04:00:00 GMT
• lastbuilddate: This indicates the last date during which the content was changed or modified. Ex:
Tue, 20 Dec 2005 09:41:01 GMT
• category: It is a good practice to categorize the item that is written in rss feed. By doing this several items with different categories can be posted in a single rss feed. Ex: Newspapers
• docs: It is a link that points to the place where rss is written, so that a person who has posted this rss in his website has an idea of from where he has copied this content. Ex: http://www.gmrwebteam.com/xml/rss1.xml
• ttl: ttl is an abbreviation of time to live. This is written in terms of minutes that indicates how long a channel can be cached before refreshing from the source. Ex: 120
• image: image has an url, title ,link, width and height. These are given to see an image displayed along with the rss feed. Ex: http://www.gmrwebteam.com/images/image1.jpg
• skipHours: this is used to have a positive effect on the bandwidth requirments of weblog. This will hint the aggregators the hours they can miss without refreshing. Ex: that says to skip hours from 6 to 11

6
7
8
9
10
11

• skipdays: similar to that of skip hours, except that it is specified in number of days
• guid: used to identify each item in a unique way.