Skip to content

This is an assessment that I had to complete within 12 hours for a company. The idea was to create a simple google search. You can see more details in the README file and in the docs folder.

Notifications You must be signed in to change notification settings

oguiller/googleSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Assignment

Create a Google search page in HTML5 (JavaScript, CSS3 and HTML), according to the given design. You’ve to use RequireJS in your solution and you’re not allowed to use any other framework. You’re also not allowed to use any back-end technology (for example: PHP, Node, etc…). You can use the old Google search API (https://developers.google.com/web-search/docs/), but you’re not allowed to use the Google search JavaScript library. You can’t ask any questions about the design, so use your intuition to come up with a proper solution if something is not 100% clear. We’ll test your page on Chrome version 31.x and support for more browsers is a plus but not required. We’ll check your solution on the following criteria:

  •  RequireJS usage
  •  HTML5 Semantic elements usage
  •  CSS3 usage
  •  Code readability and maintainability
  •  Error handling

Design

A simple Google search page, that shows both the image results of your search query as well as the normal Google search results.

// The exact description of the problem can be seen under the docs folder

Be aware of the Same Origin policy

There is two ways of solving this issue but I thought you were aware of it. You can either disable the security options in the browser, in my Mac I used the following command to run the browser from console disabling the security options:

	/usr/bin/open -a "/Applications/Google Chrome.app" --args --disable-web-security

Or either you can create a reverse proxy in your server, activating the proxy packages in apache I did it like this in my proxy because I had the same problem some time ago using some API so I had to fix that before. You will have to uncomment the mod_proxy modules and then add the following lines to your httpd.conf file:

<IfModule mod_proxy.c>

ProxyRequests Off

SSLProxyEngine on

ProxyPass /googlesearch http://ajax.googleapis.com/ajax/services/search
ProxyPassReverse /googlesearch http://ajax.googleapis.com/ajax/services/search

</IfModule>

You can then perform the queries using something like, "http://localhost/googlesearch/web/xxxx" and "http://localhost/googlesearch/images/xxxx" where xxxx are the parameters you want to pass in your request.

About

This is an assessment that I had to complete within 12 hours for a company. The idea was to create a simple google search. You can see more details in the README file and in the docs folder.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published