星期日, 8月 17, 2008

GAEO用不完的油

有用過CakePHP、Zend framework或者喜歡Ruby Rails的朋友們

一定對裡面mapping的功能很吸引吧,在網路上看到有個網友,發起

了Google App Engine Oil (GAEO)專案,可以用此框架簡化在GAE上的

開發。

詳細介紹
http://blog.ericsk.org/archives/1034

星期四, 7月 31, 2008

jquery好用連接點整理

最近在看jquery的相關使用
找到了蠻多的,好玩應用

jquery插件

http://plugins.jquery.com/

jpgrid
http://trirand.com/jqgrid/jqgrid.html

很多的插件蒐集

深深覺得寫jquery的人,實在太猛
javascript多了一層框架,整個價值翻漲十倍

使得WEB的UI變得如此迷人

星期二, 7月 29, 2008

監委黑頭車 菜農沒飯吃

這幾天看到新聞
監委要買車
菜農沒飯吃

如果換成監委沒飯吃 菜農黑頭車
大家覺得如何?

這兩則新聞,讓人覺得心痛
覺得台灣的政治,早已脫離台灣人的精神

聽前一輩的人講他們的故事,覺得台灣以前
在風雨飄搖的時候,撐過去了

卻在盛世時,萎靡

有人說富不過三代
但台灣的經濟奇蹟不過三十年
卻已顯老態龍鐘

覺得買那麼大台的黑頭車
才能夠顯得出監委跟考試委員的地位嗎?

發個牢騷~!!

星期四, 7月 24, 2008

GAE之perl也來摟

除了python外,使用google app engine的使用者又有新的語言選擇摟
perl是除了python外第一個支援的其他選擇

http://brad.livejournal.com/2388824.html

希望JAVA PHP Ruby也能快點一同來湊熱鬧

星期六, 7月 05, 2008

使用Google替你的jquery分流

目前我們使用jquery時,大多是利用自己網站來提供下載
現在google有可以利用他們大批的CDN提供分流摟
先分享一下,目前提供可以使用的方法

用自己的下載




利用Google code的載點
載點一

載點二
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"> script>


利用
Google AJAX API Loader 的 google.load()




目前google提供了許多的javascript lib供人使用
google.load() 的第一個參數填入library 的名稱
就可使用
  • jquery
  • prototype
  • scriptaculous
  • mootools
  • dojo
目前各家都有提供自己的技術
完整的文件:http://code.google.com/apis/ajaxlibs/documentation/
目前 AOL 也有提供 Dojo,在這裡:http://dev.aol.com/dojo
Yahoo 也用自家的 CDN 提供 YUI,在這裡:http://developer.yahoo.com/yui/articles/hosting/


微軟也替Jquery分流
  • http://ajax.Microsoft.com/ajax/jQuery/jquery-1.3.2.js
  • http://ajax.Microsoft.com/ajax/jQuery/jquery-1.3.2.min.js
  • http://ajax.Microsoft.com/ajax/jQuery/jquery-1.3.2-vsdoc.js
  • http://ajax.Microsoft.com/ajax/jQuery/jquery-1.3.2.min-vsdoc.js

  • http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.js
  • http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate.min.js
  • http://ajax.microsoft.com/ajax/jquery.validate/1.5.5/jquery.validate-vsdoc.js


星期日, 6月 22, 2008

如何使用Google App Engine

README
Copyright 2008 Google Inc.
All rights reserved.
App Engine SDK - Development tools for Google App Engine
CONTENTS
========
* Installing on Mac OSX
* Installing on Windows
* Installing on Linux and other platforms
* Running the SDK
* Using the SDK
INSTALLING ON Mac OSX
=====================
1) Download and install Python 2.5 from http://www.python.org/download/
2) Download the SDK installer from http://code.google.com/appengine/downloads
3) Install the SDK by double-clicking on the GoogleAppEngine.dmg file and
running the installer.
INSTALLING ON WINDOWS
=====================
1) Download and install Python 2.5 from http://www.python.org/download/
2) Download the SDK installer from http://code.google.com/appengine/downloads
2) Install the SDK by double-clicking on the GoogleAppEngine.msi file and
running the installer.
INSTALLING ON LINUX AND OTHER PLATFORMS
===============================
1) Download and install Python 2.5 from http://www.python.org/download/
2) Download the SDK zip file from http://code.google.com/appengine/downloads
3) Unpack the zip file.
RUNNING THE SDK
=========================
You can run the SDK with the following command:
dev_appserver.py [options]
Application root must be the path to the application to run in this server.
Must contain a valid app.yaml or app.yml file.
Options:
--help, -h View this helpful message.
--debug, -d Use debug logging. (Default false)
--clear_datastore, -c Clear the Datastore on startup. (Default false)
--address=ADDRESS, -a ADDRESS
Address to which this server should bind. (Default
localhost).
--port=PORT, -p PORT Port for the server to run on. (Default 8080)
--datastore_path=PATH Path to use for storing Datastore file stub data.
(Default /tmp/dev_appserver.datastore)
--history_path=PATH Path to use for storing Datastore history.
(Default /tmp/dev_appserver.datastore.history)
--require_indexes Disallows queries that require composite indexes
not defined in index.yaml.
--smtp_host=HOSTNAME SMTP host to send test mail to. Leaving this
unset will disable SMTP mail sending.
(Default '')
--smtp_port=PORT SMTP port to send test mail to.
(Default 25)
--smtp_user=USER SMTP user to connect as. Stub will only attempt
to login if this field is non-empty.
(Default '').
--smtp_password=PASSWORD Password for SMTP server.
(Default '')
--enable_sendmail Enable sendmail when SMTP not configured.
(Default false)
--auth_domain Authorization domain that this app runs in.
(Default gmail.com)
--debug_imports Enables debug logging for module imports, showing
search paths used for finding modules and any
errors encountered during the import process.
USING THE SDK
=======================
For instructions on getting started with Google App Engine, please see the
Google App Engine Getting Started Guide
http://code.google.com/appengine/docs/gettingstarted

星期二, 6月 10, 2008

GAE的使用者認證

在google app engine上開發程式,可以使用google帳號來認證
http://code.google.com/appengine/docs/gettingstarted/usingusers.html

/*************程式碼*******************/

from google.appengine.api import users

class MainPage(webapp.RequestHandler):
def get(self):
user = users.get_current_user()
if user:
self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, ' + user.nickname())
else:
self.redirect(users.create_login_url(self.request.uri))

/*************程式碼*******************/

上面的程式主要是使用google 使用者認證的API
如果有登入的話就執行(說聲hello使用者)

self.response.headers['Content-Type'] = 'text/plain'
self.response.out.write('Hello, ' + user.nickname())
如果沒有的話
就轉向到google的認證網頁,進行官方的認證手續。
self.redirect(users.create_login_url(self.request.uri))

經過測試在本地測試時,因為沒有google資料庫的原因
所以不用輸入密碼,如果你測試覺得很奇怪的話,將它
上傳至appspot就會正常認證。