Friday, March 22, 2013

Java - Exceptions Handling


An exception is a problem that arises during the execution of a program. An exception can occur for many different reasons, including the following:
  • A user has entered invalid data.
  • A file that needs to be opened cannot be found.
  • A network connection has been lost in the middle of communications, or the JVM has run out of memory.
Some of these exceptions are caused by user error, others by programmer error, and others by physical resources that have failed in some manner.
To understand how exception handling works in Java, you need to understand the three categories of exceptions:
  • Checked exceptions: A checked exception is an exception that is typically a user error or a problem that cannot be foreseen by the programmer. For example, if a file is to be opened, but the file cannot be found, an exception occurs. These exceptions cannot simply be ignored at the time of compilation.
  • Runtime exceptions: A runtime exception is an exception that occurs that probably could have been avoided by the programmer. As opposed to checked exceptions, runtime exceptions are ignored at the time of compliation.
  • Errors: These are not exceptions at all, but problems that arise beyond the control of the user or the programmer. Errors are typically ignored in your code because you can rarely do anything about an error. For example, if a stack overflow occurs, an error will arise. They are also ignored at the time of compilation.

Exception Hierarchy:

All exception classes are subtypes of the java.lang.Exception class. The exception class is a subclass of the Throwable class. Other than the exception class there is another subclass called Error which is derived from the Throwable class.
Errors are not normally trapped form the Java programs. These conditions normally happen in case of severe failures, which are not handled by the java programs. Errors are generated to indicate errors generated by the runtime environment. Example : JVM is out of Memory. Normally programs cannot recover from errors.
The Exception class has two main subclasses : IOException class and RuntimeException Class.
Java Exceptions
Here is a list of most common checked and unchecked Java's Built-in Exceptions.

Exceptions Methods:

Following is the list of important medthods available in the Throwable class.
SNMethods with Description
1public String getMessage()
Returns a detailed message about the exception that has occurred. This message is initialized in the Throwable constructor.
2public Throwable getCause()
Returns the cause of the exception as represented by a Throwable object.
3public String toString()
Returns the name of the class concatenated with the result of getMessage()
4public void printStackTrace()
Prints the result of toString() along with the stack trace to System.err, the error output stream.
5public StackTraceElement [] getStackTrace()
Returns an array containing each element on the stack trace. The element at index 0 represents the top of the call stack, and the last element in the array represents the method at the bottom of the call stack.
6public Throwable fillInStackTrace()
Fills the stack trace of this Throwable object with the current stack trace, adding to any previous information in the stack trace.

Catching Exceptions:

A method catches an exception using a combination of the try and catch keywords. A try/catch block is placed around the code that might generate an exception. Code within a try/catch block is referred to as protected code, and the syntax for using try/catch looks like the following:
try
{
   //Protected code
}catch(ExceptionName e1)
{
   //Catch block
}
A catch statement involves declaring the type of exception you are trying to catch. If an exception occurs in protected code, the catch block (or blocks) that follows the try is checked. If the type of exception that occurred is listed in a catch block, the exception is passed to the catch block much as an argument is passed into a method parameter.

Example:

The following is an array is declared with 2 elements. Then the code tries to access the 3rd element of the array which throws an exception.
// File Name : ExcepTest.java
import java.io.*;
public class ExcepTest{

   public static void main(String args[]){
      try{
         int a[] = new int[2];
         System.out.println("Access element three :" + a[3]);
      }catch(ArrayIndexOutOfBoundsException e){
         System.out.println("Exception thrown  :" + e);
      }
      System.out.println("Out of the block");
   }
}
This would produce following result:
Exception thrown  :java.lang.ArrayIndexOutOfBoundsException: 3
Out of the block

Multiple catch Blocks:

A try block can be followed by multiple catch blocks. The syntax for multiple catch blocks looks like the following:
try
{
   //Protected code
}catch(ExceptionType1 e1)
{
   //Catch block
}catch(ExceptionType2 e2)
{
   //Catch block
}catch(ExceptionType3 e3)
{
   //Catch block
}
The previous statements demonstrate three catch blocks, but you can have any number of them after a single try. If an exception occurs in the protected code, the exception is thrown to the first catch block in the list. If the data type of the exception thrown matches ExceptionType1, it gets caught there. If not, the exception passes down to the second catch statement. This continues until the exception either is caught or falls through all catches, in which case the current method stops execution and the exception is thrown down to the previous method on the call stack.

Example:

Here is code segment showing how to use multiple try/catch statements.
try
{
   file = new FileInputStream(fileName);
   x = (byte) file.read();
}catch(IOException i)
{
   i.printStackTrace();
   return -1;
}catch(FileNotFoundException f) //Not valid!
{
   f.printStackTrace();
   return -1;
}

The throws/throw Keywords:

If a method does not handle a checked exception, the method must declare it using the throwskeyword. The throws keyword appears at the end of a method's signature.
You can throw an exception, either a newly instantiated one or an exception that you just caught, by using the throw keyword. Try to understand the different in throws and throw keywords.
The following method declares that it throws a RemoteException:
import java.io.*;
public class className
{
   public void deposit(double amount) throws RemoteException
   {
      // Method implementation
      throw new RemoteException();
   }
   //Remainder of class definition
}
A method can declare that it throws more than one exception, in which case the exceptions are declared in a list separated by commas. For example, the following method declares that it throws a RemoteException and an InsufficientFundsException:
import java.io.*;
public class className
{
   public void withdraw(double amount) throws RemoteException,
                              InsufficientFundsException
   {
       // Method implementation
   }
   //Remainder of class definition
}

The finally Keyword

The finally keyword is used to create a block of code that follows a try block. A finally block of code always executes, whether or not an exception has occurred.
Using a finally block allows you to run any cleanup-type statements that you want to execute, no matter what happens in the protected code.
A finally block appears at the end of the catch blocks and has the following syntax:
try
{
   //Protected code
}catch(ExceptionType1 e1)
{
   //Catch block
}catch(ExceptionType2 e2)
{
   //Catch block
}catch(ExceptionType3 e3)
{
   //Catch block
}finally
{
   //The finally block always executes.
}

Example:

public class ExcepTest{

   public static void main(String args[]){
      int a[] = new int[2];
      try{
         System.out.println("Access element three :" + a[3]);
      }catch(ArrayIndexOutOfBoundsException e){
         System.out.println("Exception thrown  :" + e);
      }
      finally{
         a[0] = 6;
         System.out.println("First element value: " +a[0]);
         System.out.println("The finally statement is executed");
      }
   }
}
This would produce following result:
Exception thrown  :java.lang.ArrayIndexOutOfBoundsException: 3
First element value: 6
The finally statement is executed
Note the following:
  • A catch clause cannot exist without a try statement.
  • It is not compulsory to have finally clauses when ever a try/catch block is present.
  • The try block cannot be present without either catch clause or finally clause.
  • Any code cannot be present in between the try, catch, finally blocks.

Declaring you own Exception:

You can create your own exceptions in Java. Keep the following points in mind when writing your own exception classes:
  • All exceptions must be a child of Throwable.
  • If you want to write a checked exception that is automatically enforced by the Handle or Declare Rule, you need to extend the Exception class.
  • If you want to write a runtime exception, you need to extend the RuntimeException class.
We can define our own Exception class as below:
class MyException extends Exception{
}
You just need to extend the Exception class to create your own Exception class. These are considered to be checked exceptions. The following InsufficientFundsException class is a user-defined exception that extends the Exception class, making it a checked exception. An exception class is like any other class, containing useful fields and methods.

Example:

// File Name InsufficientFundsException.java
import java.io.*;

public class InsufficientFundsException extends Exception
{
   private double amount;
   public InsufficientFundsException(double amount)
   {
      this.amount = amount;
   } 
   public double getAmount()
   {
      return amount;
   }
}
To demonstrate using our user-defined exception, the following CheckingAccount class contains a withdraw() method that throws an InsufficientFundsException.
// File Name CheckingAccount.java
import java.io.*;

public class CheckingAccount
{
   private double balance;
   private int number;
   public CheckingAccount(int number)
   {
      this.number = number;
   }
   public void deposit(double amount)
   {
      balance += amount;
   }
   public void withdraw(double amount) throws
                              InsufficientFundsException
   {
      if(amount <= balance)
      {
         balance -= amount;
      }
      else
      {
         double needs = amount - balance;
         throw new InsufficientFundsException(needs);
      }
   }
   public double getBalance()
   {
      return balance;
   }
   public int getNumber()
   {
      return number;
   }
}
The following BankDemo program demonstrates invoking the deposit() and withdraw() methods of CheckingAccount.
// File Name BankDemo.java
public class BankDemo
{
   public static void main(String [] args)
   {
      CheckingAccount c = new CheckingAccount(101);
      System.out.println("Depositing $500...");
      c.deposit(500.00);
      try
      {
         System.out.println("\nWithdrawing $100...");
         c.withdraw(100.00);
         System.out.println("\nWithdrawing $600...");
         c.withdraw(600.00);
      }catch(InsufficientFundsException e)
      {
         System.out.println("Sorry, but you are short $"
                                  + e.getAmount());
         e.printStackTrace();
      }
    }
}

JSP - Implicit Objects

JSP Implicit Objects are the Java objects that the JSP Container makes available to developers in each page and developer can call them directly without being explicitly declared. JSP Implicit Objects are also called pre-defined variables.
JSP supports nine Implicit Objects which are listed below:
Object Description
requestThis is the HttpServletRequest object associated with the request.
responseThis is the HttpServletResponse object associated with the response to the client.
outThis is the PrintWriter object used to send output to the client.
sessionThis is the HttpSession object associated with the request.
applicationThis is the ServletContext object associated with application context.
configThis is the ServletConfig object associated with the page.
pageContextThis encapsulates use of server-specific features like higher performance JspWriters.
pageThis is simply a synonym for this, and is used to call the methods defined by the translated servlet class.
ExceptionThe Exception object allows the exception data to be accessed by designated JSP.

The request Object:

The request object is an instance of a javax.servlet.http.HttpServletRequest object. Each time a client requests a page the JSP engine creates a new object to represent that request.
The request object provides methods to get HTTP header information including form data, cookies, HTTP methods etc.
We would see complete set of methods associated with request object in coming chapter: JSP - Client Request.

The response Object:

The response object is an instance of a javax.servlet.http.HttpServletResponse object. Just as the server creates the request object, it also creates an object to represent the response to the client.
The response object also defines the interfaces that deal with creating new HTTP headers. Through this object the JSP programmer can add new cookies or date stamps, HTTP status codes etc.
We would see complete set of methods associated with response object in coming chapter: JSP - Server Response.

The out Object:

The out implicit object is an instance of a javax.servlet.jsp.JspWriter object and is used to send content in a response.
The initial JspWriter object is instantiated differently depending on whether the page is buffered or not. Buffering can be easily turned off by using the buffered='false' attribute of the page directive.
The JspWriter object contains most of the same methods as the java.io.PrintWriter class. However, JspWriter has some additional methods designed to deal with buffering. Unlike the PrintWriter object, JspWriter throws IOExceptions.
Following are the important methods which we would use to write boolean char, int, double, object, String etc.
Method Description
out.print(dataType dt)Print a data type value
out.println(dataType dt)Print a data type value then terminate the line with new line character.
out.flush() Flush the stream.

The session Object:

The session object is an instance of javax.servlet.http.HttpSession and behaves exactly the same way that session objects behave under Java Servlets.
The session object is used to track client session between client requests. We would see complete usage of session object in coming chapter: JSP - Session Tracking.

The application Object:

The application object is direct wrapper around the ServletContext object for the generated Servlet and in reality an instance of a javax.servlet.ServletContext object.
This object is a representation of the JSP page through its entire lifecycle. This object is created when the JSP page is initialized and will be removed when the JSP page is removed by the jspDestroy() method.
By adding an attribute to application, you can ensure that all JSP files that make up your web application have access to it.
You can check a simple use of Application Object in chapter: JSP - Hits Counter

The config Object:

The config object is an instantiation of javax.servlet.ServletConfig and is a direct wrapper around the ServletConfig object for the generated servlet.
This object allows the JSP programmer access to the Servlet or JSP engine initialization parameters such as the paths or file locations etc.
The following config method is the only one you might ever use, and its usage is trivial:

Monday, July 30, 2012

Struts 1 Vs Struts2


FeatureStruts 1Struts 2
Action classesStruts 1 requires Action classes to extend an abstract base class. A common problem in Struts 1 is programming to abstract classes instead of interfaces.An Struts 2 Action may implement an Action interface, along with other interfaces to enable optional and custom services. Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Albeit, the Action interface is not required. Any POJO object with a execute signature can be used as an Struts 2 Action object.
Threading ModelStruts 1 Actions are singletons and must be thread-safe since there will only be one instance of a class to handle all requests for that Action. The singleton strategy places restrictions on what can be done with Struts 1 Actions and requires extra care to develop. Action resources must be thread-safe or synchronized.Struts 2 Action objects are instantiated for each request, so there are no thread-safety issues. (In practice, servlet containers generate many throw-away objects per request, and one more object does not impose a performance penalty or impact garbage collection.)
Servlet DependencyStruts 1 Actions have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse is passed to the executemethod when an Action is invoked.Struts 2 Actions are not coupled to a container. Most often the servlet contexts are represented as simple Maps, allowing Actions to be tested in isolation. Struts 2 Actions can still access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly.
TestabilityA major hurdle to testing Struts 1 Actions is that theexecute method exposes the Servlet API. A third-party extension, Struts TestCase, offers a set of mock object for Struts 1.Struts 2 Actions can be tested by instantiating the Action, setting properties, and invoking methods. Dependency Injection support also makes testing simpler.
Harvesting InputStruts 1 uses an ActionForm object to capture input. Like Actions, all ActionForms must extend a base class. Since  other JavaBeans cannot be used as ActionForms, developers often create redundant classes to capture input. DynaBeans can used as an alternative to creating conventional ActionForm classes, but, here too, developers may be redescribing existing JavaBeans.Struts 2 uses Action properties as input properties, eliminating the need for a second input object. Input properties may be rich object types which may have their own properties. The Action properties can be accessed from the web page via the taglibs. Struts 2 also supports the ActionForm pattern, as well as POJO form objects and POJO Actions. Rich object types, including business or domain objects, can be used as input/output objects. The ModelDriven feature simplifies taglb references to POJO input objects.
Expression LanguageStruts 1 integrates with JSTL, so it uses the JSTL EL. The EL has basic object graph traversal, but relatively weak collection and indexed property support.Struts 2 can use JSTL, but the framework also supports a more powerful and flexible expression language called "Object Graph Notation Language" (OGNL).
Binding values into viewsStruts 1 uses the standard JSP mechanism for binding objects into the page context for access.Struts 2 uses a "ValueStack" technology so that the taglibs can access values without coupling your view to the object type it is rendering. The ValueStack strategy allows reuse of views across a range of types which may have the same property name but different property types.
Type ConversionStruts 1 ActionForm properties are usually all Strings. Struts 1 uses Commons-Beanutils for type conversion. Converters are per-class, and not configurable per instance.Struts 2 uses OGNL for type conversion. The framework includes converters for basic and common object types and primitives.
ValidationStruts 1 supports manual validation via a validatemethod on the ActionForm, or through an extension to the Commons Validator. Classes can have different validation contexts for the same class, but cannot chain to validations on sub-objects.Struts 2 supports manual validation via the validate method and the XWork Validation framework. The Xwork Validation Framework supports chaining validation into sub-properties using the validations defined for the properties class type and the validation context.
Control Of Action ExecutionStruts 1 supports separate Request Processors (lifecycles) for each module, but all the Actions in the module must share the same lifecycle.Struts 2 supports creating different lifecycles on a per Action basis via Interceptor Stacks. Custom stacks can be created and used with different Actions, as needed.

Saturday, January 29, 2011

India Tourist Sport





It might come naturally to you to pass Kochi (or Cochin), as the Kerala Capital. No wonder, for this gorgeous beach-town is not just the most beautiful Kerala-cosmopolitan, but with its brimming coastline, enamoring backwaters, ayurvedic health centers, churches and synagogues --- rightfully positioned amongst National Geographic’s 50 top tourist destinations. Watch Kathakali performance, savor its seafood, dig at the antiques, try fishing with the Chinese fishing nets or attend a traditional marriage ceremony. Kochi is one place you will instantly fall in ‘like’ with!



Tale of the City
Kochi was the favorite seaside entry into India from the Arabian Sea for the Arabs, Chinese, European sea merchants and finally the Portuguese under Vasco da Gama in 1500, and the Franciscan friars. And what had been a quaint fishing hamlet became India's first European settlement. In 1663, Cochin fell to the Dutch, and then to the British in 1795. Each of these foreign influences left their impressions, resulting in a distinctly Indo-European culture, most evident in the architecture and lifestyle of Kochinites.
Chinese Fishing Nets



Attractions
Fort Cochin : A quiet landmark to this port-city, the Fort Cochin, comprising Mattancherry and Jew Town (that hosts a 1st century AD Jewish community), is a slice of sepia-tinted world, where they still speak 14 different languages and tumbled-down mansions line narrow lanes. Near the water's edge, old warehouses (or godowns) are filled with the state's treasured cash crops -- pepper, tea, Ayurvedic herbs, whole ginger, and betel nuts -- being dried, sorted, and prepared for direct sale or auction. Walk around at leisure and chances are you will discover something (curio/ architecture) belonging to a world you never thought existed.

Cherai Beach & Vypeen : Bordering one another, this is where the city-chafed locals arrive for a replenishing weekend. The beaches are beautiful; there is an old lighthouse and a 16th century fort. Get there by ferry from Fort Kochi. A typical Kerala village with paddy fields and coconut groves nearby add to the scenic beauty.



St. Francis Church : The oldest European church in India, it went through a myriad associations beginning from the Franciscan friars, Dutch Protestants, to Anglicans, and now this church finally belongs to the Church of South India. Something to keep in mind is, like Hindu temples and mosques, here too you are required to take off



Bolghatty Palace : Situated at the Bolghatty island and accessed by a ferry, is this once British mansion has a postcard golf-course and beautiful honeymoon cottages. Good news is KTDC has taken it up and made it into a heritage hotel.
Back To Top
Mattancherry Palace :Adorned with fine murals from the Ramayana, Mahabharata and some of the Puranic Hindu legends, this double-story palace is an architectural wonder. The Dutch maps of old Kochi along with palanquins and coronation robes of the former maharajas of Kochi are attractions you have to hunt out in here.




Jewish Synagogue : Here is the oldest (17th century) synagogue in the Commonwealth with some amazing hand-painted willow pattern floor tiles brought all the way from China. The Clock Tower, Hebrew inscriptions on stone slabs and ancient scripts on copper plates, along with other ancient artefacts are of tourist interest over there. (Open daily: 10am-12 pm & 3pm-5pm; Sat closed). The area surrounding is an antique-lovers paradise with a myriad curio shops, spices, furniture, artifacts, rare glass and beads, all centuries old.



Parishath Thampuran Museum : This hosts the genesis of Kerala in the form of oil paintings, murals, sculptures in stone and plaster of Paris, manuscripts and coins belonging to the Kochi royal family - all preserved in its complex of 49 buildings, in itself a fine example of Kerala architecture. The area encompassing it has a Deer Park and facilities for horse riding. (Open daily: 9 am-12:30 pm & 2 pm-4:30 pm; Monday closed)



Santhanagopala-Krishnaswamy Temple : About 8 km away from Ernakulam, this museum temple showcases history from the Neolithic Age to the modern era through intriguing life-size figures. One can also catch the sound and light shows, which have commentaries in English and Malayalam.

Find sometime to explore : Pazhassiraja Museum and Art Gallery, Willingdon Island, Kaladi, Vasco da Gama Square, Pierce Leslie Bungalow, Old Harbour House, Koder House, Delta Study, Loafer's Corner, Princess Street, Vasco House, VOC Gate, United Club, Bishop's House, ruins of Fort Immanuel, the Portuguese settlement.
St. Francis Church



Shopping
Your Kochi shopping spree must-have's are camel bone and wood carvings, various metal-ware, coconut shell decorations, cane crafts, embroidered pine mats and so on. Buy one piece each of the indigeneous handicrafts, that is. M.G. Road is where the shopaholics crowd at its various shops, emporiums and private showrooms. There's the huge GCDA shopping complex on Marine Drive, which should be explored at leisure. Antique shopping is another Kochi specialty and items to hunt for are rosewood artifacts, coir floor coverings and tablemats, old dowry boxes from Travancore, gold jewelery exclusive to the South, cotton saris, traditional khadi attire and antiques from Jewtown.




Cuisine
Kochi restaurants cater to both local and international tongues with cuisines ranging from Kerala cuisine to Chinese selections, American hamburgers, Italian spaghetti and so on. A permanent flavor you should expect in all traditional cuisine is that of coconut oil. The best food-joint are flaked around the at Fort Cochin and Willingdon area. Fresh seafood is an obvious favorite. And Kochi’s favorite palate will have rice, fish and coconut (in some form). Some restaurants you can trust for its quality of food and delight are Pandhal at M G Road (South Indian food), Bimbi’s at Jose Junction (low-priced Indian & Continental cuisine), Fry’s Village Restaurant at Chitoor Road, North End (spicy south Indian specialities like patthri, a Calicut-Muslim delicacy).
Back To Top
Snippets
Black Gold: In Kerala, pepper is referred to as karuthu ponnu, or "black gold," and represents the state’s international spice trade backbone. Consider a visit to the ginger, black pepper, betel nut, and Ayurvedic medicine warehouses, so very reminiscent of Salman Rushdie's The Moor's Last Sigh; or head for the Kochi International Pepper Exchange (Jew Town Rd., Mattancherry) to see Kerala's black gold being furiously sold off to the highest bidder.

Some Original names & Changed ones of Kerala’s cities: Trivandrum ?Thiruvananathapuram; Quilon ? Kollam; Alleppey ? Alappuzha; Trichur ? Thrissur; Palghat ? Palakkad; Cannanore ? Kanoor; Calicut ? Kozhikode; Cochin ? Kochi.


Getaways
Alwaye(21 Km):Banking the river Periyar, is this famous Shalvaite pilgrim center and a summer resort.

Malayatoor (47 km): Go there for the St Thomas Catholic Church on the 609 m high Malayatoor hill, specially if your trip coincides the annual Malayatoor Perunnal Festival (March-April).

Alleppey/Alappuzha (64 Km): This is the core tourist center for backwater cruises in Kerala and has often been referred to as the Venice of the East. If you are here in August, do not miss the Nehru Trophy boat race held here on the second Saturday.

Thrissur (80 Km): Former capital of Cochin, Thrissur is famous for the Vadakkumnatha Temple and is the venue of the annual Pooram Festival held in April/May. Buy some of its wood carvings and temple-arts are souvenirs.
Interested?? Send Online Query.

Kumarakom (80 Km): Famed for its backwaters and the quaint village surrounded by paddy fields and the Vembanand lake.

Cheruthuruthi (100 Km): Go there if you are an art connoisseur to witness Kerala’s training center for art forms such as Kathakali, Mohinlattam, etc. The center is called Kalamandam.

Wynad: Located on the foothill borders of the state adjacent to both Tamil Nadu and Karnataka, is Wynad, famous for its temples, the Wynad Wildlife Sanctuary and its Lakkdi area known for its scenic beauty.
Lakshadweep Islands

Lakshadweep Islands (300 km away in Arabian Sea): An archipelago of 12 atolls, 3 reefs, 5 submerged banks and 36 islands in the Arabian Sea forms a favorite getaway from Kerala. Only six of the 36 islands are inhabited and open for tourists - Androt, Amini, Bitra, Chetlat, Kadamat, Kalpeni, Kavaratti and Minicoy. They are the only coral reef island in India and rich in flora and fauna. Just the place for adventure enthusiasts who love snorkeling and other Watersports, Fishing etc.

Search Engine Optimization (SEO)

SEO is an acronym for "search engine optimization" or "search engine optimizer." Deciding to hire an SEO is a big decision that can potentially improve your site and save time, but you can also risk damage to your site and reputation. Make sure to research the potential advantages as well as the damage that an irresponsible SEO can do to your site. Many SEOs and other agencies and consultants provide useful services for website owners, including:


* Review of your site content or structure
* Technical advice on website development: for example, hosting, redirects, error pages, use of JavaScript
* Content development
* Management of online business development campaigns
* Keyword research
* SEO training
* Expertise in specific markets and geographies.

Keep in mind that the Google search results page includes organic search results and often paid advertisement (denoted by the heading "Sponsored Links") as well. Advertising with Google won't have any effect on your site's presence in our search results. Google never accepts money to include or rank sites in our search results, and it costs nothing to appear in our organic search results. Free resources such as Webmaster Tools, the official Webmaster Central blog, and our discussion forum can provide you with a great deal of information about how to optimize your site for organic search. Many of these free sources, as well as information on paid search, can be found on Google Webmaster Central.



Before beginning your search for an SEO, it's a great idea to become an educated consumer and get familiar with how search engines work. We recommend starting here:

* Google Webmaster Guidelines
* Google 101: How Google crawls, indexes and serves the web.

If you're thinking about hiring an SEO, the earlier the better. A great time to hire is when you're considering a site redesign, or planning to launch a new site. That way, you and your SEO can ensure that your site is designed to be search engine-friendly from the bottom up. However, a good SEO can also help improve an existing site.

Some useful questions to ask an SEO include:


* Can you show me examples of your previous work and share some success stories?
* Do you follow the Google Webmaster Guidelines?
* Do you offer any online marketing services or advice to complement your organic search business?
* What kind of results do you expect to see, and in what timeframe? How do you measure your success?
* What's your experience in my industry?
* What's your experience in my country/city?
* What's your experience developing international sites?
* What are your most important SEO techniques?
* How long have you been in business?
* How can I expect to communicate with you? Will you share with me all the changes you make to my site, and provide detailed information about your recommendations and the reasoning behind them?



While SEOs can provide clients with valuable services, some unethical SEOs have given the industry a black eye through their overly aggressive marketing efforts and their attempts to manipulate search engine results in unfair ways. Practices that violate our guidelines may result in a negative adjustment of your site's presence in Google, or even the removal of your site from our index. Here are some things to consider:

Friday, January 21, 2011

SEO Link Building

Everyone need to understand the importance of SEO, in order to get more number of visitors and good traffic to your website. We know that there are two types of SEO techniques, off-page and on-page.

On-page optimization is used to make the search engines like yahoo, google, bing to crawl through your website. It can be done by optimizing the contents like title, meta tags, images, links in your website. The major factor of off-page optimization is link building.

Link building is an effective strategy of Search Engine Optimization (SEO) and it can be done by building links to a website. Link building with quality backlinks is the important factor considered by the search engines, while determining Page rank. Each link to your web site from another web site (i.e., backlink) is considered a “vote” to your site’s popularity. These votes can increase the importance of your web site from the search engine’s prospective.

Link building requires content to be posted along with the backlink. This content can affect the value of the backlink. If the content is relevant with the keywords in the backlink and the subject of the page contained in the backlink, it will increase the value of the backlink. Therefore, you must choose a keyword to link your website.

Friday, January 7, 2011

Interior Design Ideas

Need inspiration for decorating your home & garden?

At Look4Design you can easily navigate to view a wide variety of exhibitors in the area of home and interior design.

The products are shown using a unique technology which makes them easy to view.

There is a careful selection process of the companies which participate in this exhibition.
The exhibitors must comply with the highest quality design standards.

decorating a bed room, keep in thoughts that the finish outcome should produce a disitnct and memorable impression. Colors, space and decorations all set a bedroom's mood, and when put collectively nicely, can create a definite, pleasurable look.

With regards to the arrangement of items inside a bed room, symmetry is the most significant factor. The bed room is your personal space and should not be cluttered with too numerous objects making a claustrophobic impact. For a space to seem personal, special touches ought to be additional that reflect your special loves and interests. This includes your preferred colors, books, photographs, etc. Make certain colors are balanced in subtle shades reflecting your lifestyle and interests. The older generation appears to choose much more subdued shades than the younger generation, who opt for vibrant, textured colors. To maintain stability, the colour of a chair placed at 1 finish from the space could be repeated on throw, pillows or carpet.

Furnishings in the bed room is of utmost importance. Do not over do it with too numerous pieces making your bed room look overdressed and cluttered. The size from the bed ought to be in proportion to the size from the bed room. What issues the most is comfort. Therefore, a bed should offer high quality, comfort and a feeling of elegance. Nightstands or side tables ought to be on both side from the bed for books, medications and telephone. A dressing table comes in useful for women, and dressers with a lot of storage space are perfect. Ample closet space is essential, as are mirrors and wall decor. Mirrors assist to provide a space a larger look as well as assist to reflect light. Lighting ought to be gentle and soothing. Valence lighting is perfect for bedrooms, and colored lights could be used for additional effects. Delicate light provides a romantic feeling to the space, and targeted light is great for detail work like reading with out disturbing somebody sleeping in the space.