'구글'에 해당되는 글 2건

  1. 2007/11/12 구글 Web Developer 문제 (5)
  2. 2007/10/23 Zendframework 를 이용한 Google 즐겨찾기 공유

구글 Web Developer 문제

2007/11/12 17:50
얼마전 Google Developer Night에 참석했다가 기회가 닿아 Web Developer position에 지원하게 되었으나, 오늘 불합격 통보를 받게 되었다. 홧김에! 는 아니고, 메일 내용 중 비밀 유지에 관한 의무가 없길래 문제 내용을 한 번 올려본다. 참고로, 이전에 구글로 부터 이런류의 테스트를 받았을때에는 비밀 유지 서약서(?) 같은 것을 작성했던 기억이 있다.

Web  Developer Exercise Details

Attached are three states of a new contacts widget. This widget will be used across Google and may be anywhere on the page. Designers will also use this in mocks for usability tests. Create the HTML, CSS, and JavaScript for the widget as described in the image. Your solution must work in Firefox v1.5+ and IE v6+. Bonus points for a solution that degrades nicely on older browsers.

사용자 삽입 이미지

WebDev Excercise

이 문제에 대한 나의 풀이는 아래 링크에서 확인해 볼 수 있다. 물론, 이 답안은 불합격 처리되었으므로, 별 도움은 안될 것이다.



댓글을 달아 주세요

  1. 잡티제거 2007/11/12 17:53  댓글주소  수정/삭제  댓글쓰기

    잘 좀 하자.

  2. 프로채터 2007/11/12 18:01  댓글주소  수정/삭제  댓글쓰기

    잘 좀 하지.

  3. jeongyoon kim 2007/11/12 18:03  댓글주소  수정/삭제  댓글쓰기

    NDA 위반이다

    신고한다?

  4. 컴미ㆀ 2007/11/13 11:05  댓글주소  수정/삭제  댓글쓰기

    Please try again later. ^^;

  5. 잡티제거 2007/11/25 16:04  댓글주소  수정/삭제  댓글쓰기

    Insert Coin(s)

Google의 다른 서비스들은 GData라는 모델을 통해서 데이터를 가져올 수가 있는데, 구글툴바에 포함된 구글 즐겨찾기 (http://www.google.com/bookmarks/)는  개인정보라 생각해서인지, 그럴 수 없었다.

그동안 유용하다고 생각해서 추가한 즐겨찾기들을 del.icio.us처럼 공유하고 싶어서 한번 만들어 보았다.

간단히 http://www.google.com/bookmarks/lookup?output=rss&num=10000 만 읽어오면 되는데, 접근하기 위해서는 구글 인증이 필요하다.  num 이라는 parameter는 몇 개의 item을 가져올 건지 나타내는 값인데, 모두 가져오기 위해서 10000이라는 큰 값을 주었다.
<?php
		Zend_Loader :: loadClass('Zend_Http_Client');
		Zend_Loader :: loadClass('Zend_Feed');

		$client = new Zend_Http_Client();
		$client->setAuth("사용자ID", "패스워드");
		$client->setHeaders('Accept-Charset','utf-8');
		$client->setUri('http://www.google.com/bookmarks/lookup?output=rss&num=10000');
		$response = $client->request();
		if ($response->getStatus() != 200) 
		{
			Zend_Loader :: loadClass('Zend_Exception');  
			throw new Zend_Exception('An error occurred while fetching data: ' . 
			$response->getStatus() . ': ' . $response->getMessage());
		}
		$body = $response->getBody();
		
		$feed = Zend_Feed::importString($body);
		
		// 레이블별 정렬
		$feeds = array();
		
		foreach($feeds as $entry) 
		{
			$label = $entry->bkmk_label();
			// 레이블이 두 개 이상인 경우
			if(is_array($label))
			{
				foreach($label as $labelItem) 
				{
					$feeds[$labelItem->nodeValue][] = $entry;		
				}
			}
			else
			{
				$feeds[$label][] = $entry;				
			}
		}
		
		ksort($feeds);
		// end of 레이블별 정렬
?>
<h1>즐겨찾기</h1>
<? foreach(array_keys($feeds) as $label) : ?>
	<h2><?= $label ? $label : '분류 없음' ?></h2>
	<ul>
	<? foreach($feeds[$label] as $entry) : ?>
		<li class="<?= $entry->bkmk() ?>"> 
			<a href="<?= $entry->link() ?>" target="_blank"><?= $entry->title() ?></a>
			<span class="added">(추가된 날짜  : <span class="date">
			<?= date("Y년 m월 d일 H시 i분", strtotime($entry->pubDate())) ?></span>)</span>
			<? if($entry->bkmk_annotation()) : ?>
				<p class="annotation"><?= $entry->bkmk_annotation() ?></p>
			<? endif; ?>
		</li>
	<? endforeach; ?>
	</ul>
<? endforeach; ?>

실행결과는 http://fguy.com/bookmarks/ 에서와 비슷하게 볼 수 있을 것이다.

댓글을 달아 주세요