城市衚衕: 技術
by Andrew Turner
Modern websites and web-applications appear drastically different from sites on the web 5 and 10 years ago. Tools like GoogleMail, BaseCamp, and TiddlyWiki have revolutionized the general concept of what a webpage can do and how users interact with it. The days of clicking on a simple hyperlink to be taken to a new page, or sitting and waiting for a form submission are rapidly dwindling.
The technology driving these sites is not really new, but their application and use has only recently become widespread and supported by a majority of web browsers. Furthermore, many web developers feel daunted by the rapid pace of the changing techniques and don"t have a clear understanding of how the technologies are implemented and used.
One of the most revolutionizing of these technologies has been dubbed AJAX (or Ajax depending upon whom you ask). Ajax is responsible for dynamic page content, marking database entries, and in-line text-editing without the need for page-reloads or large, complex plug-ins like Flash or Java.
The goal of this article is to teach you the basics of Ajax and demonstrate that it is not as difficult a concept as it may first appear. In reality, Ajax is simple and easy for any web developer to add to their new or already existing site.
What is Ajax?
AJAX is an acronym for: Asynchronous Javascript and XML. The most important concept of AJAX is the "asynchronous" part. Asynchronous communication means that commands do not need to wait for a response. By contrast, synchronous communication requires the command to wait for a response before continuing. An example of synchronous communication is a typical hyperlink; the user clicks a link, and then waits while the resulting page is requested, returned, and displayed. An asynchronous example may be having a contact name and phone number lookup with dynamic autocomplete with names already in the database. For application developers, it may be useful to think of synchronous communication as modal, while asynchronous is non-modal.
Javascript is the client-side scripting language that has been used to implement the input, output and server-response handling. Because the code is client-side it is fast and scales up with increasing usage. The last part of the AJAX acronym is XML (extensible Markup Language), which is used in the response to encapsulate information. By using a structure like XML, the client can parse the tree for specific data without having a predetermined order of the data. As we will discuss, XML or Javascript are not required to implement "Ajax" in a site.
Ajax uses several other technologies and functionality to work. XHTML and the Document Object Model (DOM) allow Javascript to dynamically modify a webpage. CSS (Cascading Style Sheets) are not necessary, but are typically employed to provide for easy layout and design of a webpage and allow the Ajax functionality to work on the data, and not the view.
The reason the technology is referred to as either AJAX or Ajax is because of the blurring between the concept, and the implementation. Ajax (non-acronym) has become the terminology associated with the ability to dynamically modify a webpage or backend content without requiring a page reload, while AJAX (acronym) is the specific implementation of Ajax employing Javascript and XML. The term Ajax was coined by Jesse Garnett of AdaptivePath (see resources) as a better name than the previously used "Asynchronous JavaScript + CSS + DOM + XMLHttpRequest". The technologies were all originally combined by Microsoft for developing their Outlook Personal Information Manager (PIM) web application interface.
Why use Ajax?
While the web has inarguably drastically changed the way a computer user works, to date they haven"t been able to fully replace, or even work entirely in tandem with, desktop applications. To clarify, a desktop application is software that must be installed on a user"s computer and is run in a self-contained window/context. By contrast, a web application operates primarily within a user"s browser and is not required to be installed on a machine. This provides users access to the application and associated data from any computer using a suitable browser.
However, with the advent and widespread use of technologies such as Ajax, users can now complement, or even replace, their desktop applications with a web application. Many users are now switching to reading their email in GoogleMail, storing their documents and notes in TiddlyWiki, reading their RSS news via Gregarious, or working with colleagues in BaseCamp.
Adding Ajax to your own web site or web application provides a much smoother, and rich user experience. Furthermore, Ajax websites more closely imitate their desktop counterparts, allowing users to interact and understand the user interfaces in a similar way.
Ajax is also a relatively straightforward and simple technology to provide in a website. Developers may quickly become confused by all of the terms, techniques, and options. However, at its core, Ajax is quick to setup and begin using, and completely flexible for whatever the developer and site requirements need. Ajax can be used for features such as inline form validation, database queries, content editing, drag-and-drop, page updating, and many others
Parts of Asynchronous Communications
In order to understand the essential parts of an Ajax framework, we will discuss the necessary parts of asynchronous communications. The parts are split up by Client, the user"s browser, and Server, the website hosting server.
Client: Create a request object
BClient: Assign a response handler
Client: Send a query to the server
Server: Receive the query, and perform operations
Server: Send the response to the client
Client: Handle the server response
Figure 1: Asynchronous communications allow a user to continually interact with the browser, and provides dynamic updating of the web site
The client requests to the server can happen continually, updating the web page or application on each response received. Each request happens separately from the interface, allowing the user to continue to view and interact with the web page.
However, it is a good idea to only support a single asynchronous command at a time as the response may affect the interface data. If multiple asynchronous requests are supported, you must be careful to handle potential conflicts due to user interaction with outdated data.
Create a request object
The first thing to do is to create a constructor that will build a client-side request object. A request object is responsible for wrapping up the actual request, response handler, and state of the request.
Remember that this Javascript code is being run on the user"s desktop browser. Therefore creating the request object is the one place where browser specific code is required. In this case, Microsoft"s Internet Explorer uses an ActiveX object as the request object, whereas the other browsers all support an XMLHttpRequest() constructor call. We can interrogate the browser to find out what type it is and create the appropriate object. This function is universal for any Ajax use.
AjaxFramework.js
// request object constructorfunction createRequestObject() { var ro; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ ro = new XMLHttpRequest(); } return ro;}
You should now create a global request object that will be used by the client for all future communication.
AjaxFramework.js
// global request objectvar http = createRequestObject();
Assign a response handler and handle the response
Our second step is to assign a response handler. A handler is the function that will be called when the request comes back from the server to the client"s computer. This function is responsible for verifying the state of the answer, and parsing the response as appropriate. This function is implemented on a project specific basis. It needs to know what the expected response from the server looks like and how to place that response back into the user"s browser document.
AjaxFramework.js
// callback function that handles any state changes of our request to the serverfunction handleResponse() { if(http.readyState == 1){ // request loading document.getElementById("status").innerHTML = "requesting..."; } else if(http.readyState == 4) { // request complete if(http.status == 200) { // OK returned var response = http.responseText; // Add more advanced parsing here if desired document.getElementById("responseArea").innerHTML = response; } else { document.getElementById("status").innerHTML = "error: " + http.statusText; } }}
The first thing the handleResponse function does is check the current state of the request object. If the object is loading (1), then the user is alerted to this, or if the request is complete (4) then we handle the response. This example just puts the response text (use responseXML for an XML response from a server) into our document"s responseArea.
Send a query to the server
Now that we have setup the request object structure, as well as the state handling function, the next step is to create a function that our webpage will be calling for each outgoing request. This function could either accept information via an input parameter, or retrieve user input by querying the document.
Once the user input is received, we create a GET request to a URL. It is important to note that due to security concerns the request can only be made to a server that is hosting the webpage. The domain name must be exactly the same as the request URL, if there is a preceding www. to the domain name. As usual, however, there are some fairly straightforward work arounds for getting external data for your Ajax requests. Several options will be discussed.
This example demonstrates using a REST input (parameters passed via the URL), but other remote query and command options are also possible. Furthermore, the open command supports passing a username and password to the server for accessing protected services.
AjaxFramework.js
// function for filling out and sending a request - called by the actual webpagefunction sendRequest() { var query = document.getElementById("queryInput").value; var queryURL = "http://localhost.com/service.php?q=" + query; http.open("GET", queryURL); http.onreadystatechange = handleResponse; http.send(null); return true;}
We have now completed the necessary parts of our Javascript code to handle creating, sending, and receiving an asynchronous request through a client"s browser.
Server handling of the request
The client makes a request to some service or page that is served on the same domain as the original webpage. This service for this example is expecting a value passed via the URL in the GET parameters. The response can be well formed XML, or simple text that will be parsed by the client"s browser as discussed above in the handleResponse() function.
service.php
<?php$query = $_GET["q"];$response = some_service_handling($query);echo $response;?>
This server page just passes the query onto another php function and then echoes the response. Since our Ajax request from the browser has made a GET request, this operates like any normal opening a page in a browser. However, instead of the page showing up in a window, it is handled by the client"s handleReponse() function.
Using a remote service
As we mentioned earlier, security does not allow the Ajax, specifically XMLHttpRequest, to call another domain in the GET URL. The way around this is provide a locally served wrapper to the remote service. We can parse and pass on each of the incoming parameters. Also, many hosting services don"t allow a URL to be opened via the fopen() command, so this example uses curl to make a request to a server. The subsequent response is read by the local server and then returned to the calling Ajax function.
remote_service.php
<?php$remote_params = "";foreach($_GET as $key=>$value){ $$key = $value; if($value != "") $remote_params .= "&".$key."=".$value;}$remote_url = "http://remotehost.com/remoteservice.php?";function get_content($url){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_HEADER, 0); ob_start(); curl_exec ($ch); curl_close ($ch); $string = ob_get_contents(); ob_end_clean(); return $string; }$content = get_content ($remote_url.$remote_params);echo $content;?>
This example makes no checks on the incoming request. The query and parameters are passed directly onto the remote service. In a real application, it would be responsible to do some basic parameter checking before passing on the request to someone else"s hosting service.
That said, it is still a means by which to provide asynchronous services in your own website. You should also be aware that making these remote calls may have longer response times. While this situation is an excellent reason why an asynchronous interface provides a better user experience, users may be left wondering if their request was just lost. Therefore, you should, when appropriate, let the user know that the request is pending in some way.
Furthermore, it would be possible to setup a timeout timer for each request that would call abort() on the request object if the request took too long.
Supporting non-Javascript functionality
This framework will generally work for any modern, Javascript capable browser. However, not all users are using Javascript capable browsers, and other users may have disabled Javascript. Therefore, it is advised that your site support a non-Javascript version of your interface. At the very least, alert the user that they will not be able to use all of the functionality of your web application or page.
To provide a non-Javascript interface only when necessary, your page should use the <noscript> tags paired with any <script> sections.
The Javascript framework is logical backend functionality of an Ajax enabled website. In order to use Ajax, the page must be properly constructed and typically web developers also wan the page to look nice. For both of these requirements, we will use XHMTL and CSS respectively.
Example query and response
Lets illustrate the Ajax framework with an example. Our service could return a name and phone number of a contact from our webserver. The query parameter, q, could be some search term, and the response would be the contact"s name, and phone number. Testing such a service is easy:
http://localhost.com/service.php?q=Jones
We will then expect a response like:
Edward Jones, 800-555-1212
Our handleResponse functionality need to be expanded to split the response with the comma (or multiple commas for more data).
AjaxFramework.js (handleResponse)
var data = response.split(","); // more advanced parsing document.getElementById("contact_name").innerHTML = data[0]; document.getElementById("contact_number").innerHTML = data[1];
This example response illustrates how easy Ajax is to begin to use. There is no need for complex XML parsing and handling. Any simple response can be used to dynamically update web content. We must be careful, however, as we have forced the response to return the information in a specific order and format.
A more robust application should use XML to provide multiple contact data. The response handler could then iterate through the elements of the contact entry without having to predetermine the order of the response. In our example, if we switched the contact name and contact number order the application would behave incorrectly.
In this case, we would instead get the responseXML and parse the XML document tree similar to the DOM of the browser document.
AjaxFramework.js
var response = http.responseXML;var contact_name = response.getElementsByTagName("name").item(0);var contact_number = response.getElementsByTagName("number").item(0);
However, XML is not necessary, and may be daunting when first starting to use Ajax, or integrate it into already existing web services. Therefore, we will continue our example using the simple text response. Since the XML handling is encapsulated in the handleResponse() function, it is possible to later change to using XML without modifying the rest of our framework.
Example page
To use the Ajax searching, we will need to provide an XHTML user interface for the query input, and the service response. The first thing we need to do is include our Javascript framework code in our page:
<html><head><script type="text/javascript" src="AjaxFramework.js" charset="utf-8"></script></head>
Next we create the query input and "Send" button. Note the use of the ambiguous anchor link, #, in the href tag. We use an href link to allow standard style formatting of the "Send" button to match the rest of the sites hyperlinks. By using the local anchor, but with no actual anchor, the hyperlink won"t cause a page refresh since the browser thinks it is just scrolling down the current page. Another option would have been to use a generic div and provide a unique formatting for Ajax link as compared to actual hyperlinks.
<body><input type="text" size="30" id="queryInput" value="" /> <a href="#" onClick="sendRequest();">Send</a><div id="status"></div><br/><div id="contact_name"></div><div id="contact_number"></div></body></html>
When the "Send" link is pressed, the queryInput text input is sent as a query to our name lookup service. The user is free to continue to use the web browser. When the response is sent from the server, the retrieved name and number are placed in the contact_name and contact_number divs.
A more advanced version of this application could add in-line searching of the contact name as the user types, similar to autocomplete.
Ajax is quickly transforming websites from repositories of data into dynamic and useful web applications. This article demonstrated how easy it is to get started with Ajax and add it to your own site. Some examples you can use it for include form checking while the user is entering information, site/document search, database row updating, or editing web content in place.
For more advanced applications you may want to look at several available and supported Ajax toolsets that provide a ready framework and lots of other functionality. Prototype (see resources) is used in Ruby on Rails for its Javascript Ajax functionality, and Sajax is an Ajax toolset for PHP code.
Ajax technology
Adaptive Path: http://www.adaptivepath.com/publications/essays/archives/000385.php
Mozilla Ajax documentation: http://developer.mozilla.org/en/docs/AJAX
XMLHttpRequest documentation
http://documentation: developer.apple.com/internet/webcontent/xmlhttpreq.html
Ajax applications
TiddlyWiki: http://www.tiddlywiki.com
Gregarius RSS Reader: http://gregarius.net
Basecamp: http://www.basecamphq.com
Geocode lookup (with source): http://highearthorbit.com/projects/geocode/
Ajax toolsets
Prototype, a Javascript framework for web apps: http://prototype.conio.net/
Sajax, Ajax for PHP: http://www.modernmethod.com/sajax/
The following files are the summation of the framework code developed in the article above. It can serve as a skeleton for building your own Ajax applications. Place these files in your /Library/WebServer/Documents directory on your Mac, and turn on "Personal Web Sharing" in the "Sharing Preference Pane".
AjaxFramework.js
function createRequestObject() { var ro; var browser = navigator.appName; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ ro = new XMLHttpRequest(); } return ro;}var http = createRequestObject();function handleResponse() { if(http.readyState == 1){ // request loading document.getElementById("status").innerHTML = "requesting..."; } else if(http.readyState == 4) { // request complete if(http.status == 200) { // OK returned var response = http.responseText; document.getElementById("status").innerHTML = "loaded"; document.getElementById("responseArea").innerHTML = response; } else { document.getElementById("status").innerHTML = "error: " + http.statusText; } }}function sendRequest() { var query = document.getElementById("queryInput").value; var queryURL = "service.php?q=" + query; http.open("get", queryURL); http.onreadystatechange = handleResponse; http.send(null); return true;}
AjaxDemo.html
<html><head><script type="text/javascript" src="AjaxFramework.js"></script></head><body><noscript>Your browser does not support Javascript. Please upgrade your browser or enable Javascript to use this site.</noscript><input type="text" size="30" id="queryInput" value="" /> <a href="#" onClick="sendRequest();">Send</a><div id="status"></div><br/><textarea rows="20" cols="70" id="responseArea" value="" ></textarea></body></html>service.php<?phpecho $_GET["q"];?>Andrew Turner is a Systems Development Engineer with Realtime Technologies, Inc. (www.simcreator.com)and has built robotic airships, automated his house, designedspacecraft, and in general looks for any excuse to hack together cooltechnology. You can read more about his projects at www.highearthorbit.com.
Grails 1.1 Beta 2 版本發布By kevinwu on December 30, 2008 6:44 PM | No Comments | No TrackBacks
Grails是一個構建在Java 和Groovy 之上的動態Web應用框架 ,利用Java EE 領域的最好的breed APIs 包括Spring, Hibernate 和 SiteMesh 。允許Java 開發者利用他們使用多年的已有知識和被證實配置複雜的經歷, Grails 給Java 和 Groovy 開發者帶來了基於約定快速開發的樂趣。
1.1 版本的新特性:
更好的GORM 事件 (Better GORM events )對象的只讀訪問默認的排列順序批處理動態 Finders 的改進單項的One-to-manys 遺留映射增強枚舉類型的支持全局插件多插件倉庫自動安裝插件方案屬性子集的數據綁定集合類型的數據綁定模板和動態腳手架支持更多關聯類型在JSP 中支持JSP 標籤庫Maven 集成
等等,詳細的內容請看這裡。
新版本下載地址:http://grails.org/Download
(開源中國社區)
幾款優秀的開源數據挖掘工具By kevinwu on December 28, 2008 2:39 AM | No Comments | No TrackBacks本文只對幾種流行的開源數據挖掘平台進行了檢視,比如Weka和R等。如果您想找尋更多的開源數據挖掘軟體,可以到KDnuggets和Open Directory上查看。為了評測這些軟體,我們用了UCI Machine Learning Repository上的心臟病診斷數據集。
R
R (http://www.r-project.org) 是用於統計分析和圖形化的計算機語言及分析工具,為了保證性能,其核心計算模塊是用C、C++和Fortran編寫的。同時為了便於使用,它提供了一種腳本語言,即R語言。R語言和貝爾實驗室開發的S語言類似。R支持一系列分析技術,包括統計檢驗、預測建模、數據可視化等等。在 CRAN(http://cran.r-project.org) 上可以找到眾多開源的擴展包。R軟體的首選界面是命令行界面,通過編寫腳本來調用分析功能。如果缺乏編程技能,也可使用圖形界面,比如使用R Commander(http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/)或Rattle(http://rattle.togaware.com)。
Tanagra
Tanagra (http://eric.univ-lyon2.fr/wricco/tanagra/) 是使用圖形界面的數據挖掘軟體,採用了類似Windows資源管理器中的樹狀結構來組織分析組件。Tanagra缺乏高級的可視化能力,但它的強項是統計分析,提供了眾多的有參和無參檢驗方法。同時它的特徵選取方法也很多。
Weka
Weka (Waikato Environment for Knowledge Analysis, http://www.cs.waikato.ac.nz/ml/weka/) 可能是名氣最大的開源機器學習和數據挖掘軟體。高級用戶可以通過Java編程和命令行來調用其分析組件。同時,Weka也為普通用戶提供了圖形化界面,稱為Weka KnowledgeFlow Environment和Weka Explorer。和R相比,Weka在統計分析方面較弱,但在機器學習方面要強得多。在Weka論壇 (http://weka.sourceforge.net/wiki/index.php/Related_Projects) 可以找到很多擴展包,比如文本挖掘、可視化、網格計算等等。很多其它開源數據挖掘軟體也支持調用Weka的分析功能。
YALE (IDMer:現在已經更名為RapidMiner)
YALE (Yet Another Learning Environment, http://rapid-i.com) 提供了圖形化界面,採用了類似Windows資源管理器中的樹狀結構來組織分析組件,樹上每個節點表示不同的運算符(operator)。YALE中提供了大量的運算符,包括數據處理、變換、探索、建模、評估等各個環節。YALE是用Java開發的,基於Weka來構建,也就是說它可以調用Weka中的各種分析組件。
KNIME
KNIME (Konstanz InformationMiner, http://www.knime.org)是基於Eclipse開發環境來精心開發的數據挖掘工具。無需安裝,方便使用(IDMer:呵呵,大家喜歡的綠色版)。和YALE一樣,KNIME也是用Java開發的,可以擴展使用Weka中的挖掘演算法。和YALE不同點的是,KNIME採用的是類似數據流(data flow)的方式來建立分析挖掘流程(IDMer:這個我喜歡,和SAS EM或SPSS Clementine等商用數據挖掘軟體的操作方式類似)。挖掘流程由一系列功能節點(node)組成,每個節點有輸入/輸出埠(port),用於接收數據或模型、導出結果。(IDMer:感覺KNIME比Weka的KnowledgeFlow更好用,連接節點時很方便,直接用滑鼠拖拽連接埠即可。而Weka中則需要在節點上按滑鼠右鍵,再選擇後續節點,比較麻煩,剛開始使用時找了半天才知道怎麼連)KNIME中每個節點都帶有交通信號燈,用於指示該節點的狀態(未連接、未配置、缺乏輸入數據時為紅燈;準備執行為黃燈;執行完畢後為綠燈)。在KNIME中有個特色功能----HiLite,允許用戶在節點結果中標記感興趣的記錄,並進一步展開後續探索。
Orange
Orange (http://www.ailab.si/orange)是類似KNIME和Weka KnowledgeFlow的數據挖掘工具,它的圖形環境稱為Orange畫布(OrangeCanvas),用戶可以在畫布上放置分析控制項(widget),然後把控制項連接起來即可組成挖掘流程。這裡的控制項和KNIME中的節點是類似的概念。每個控制項執行特定的功能,但與KNIME中的節點不同,KNIME節點的輸入輸出分為兩種類型(模型和數據),而Orange的控制項間可以傳遞多種不同的信號,比如learners, classifiers, evaluation results, distance matrices, dendrograms等等。Orange的控制項不象KNIME的節點分得那麼細,也就是說要完成同樣的分析挖掘任務,在Orange里使用的控制項數量可以比KNIME中的節點數少一些。Orange的好處是使用更簡單一些,但缺點是控制能力要比KNIME弱。除了界面友好易於使用的優點,Orange的強項在於提供了大量可視化方法,可以對數據和模型進行多種圖形化展示,並能智能搜索合適的可視化形式,支持對數據的互動式探索。Orange的弱項在於傳統統計分析能力不強,不支持統計檢驗,報表能力也有限。Orange的底層核心也是採用C++編寫,同時允許用戶使用Python腳本語言來進行擴展開發(參見http://www.scipy.org)。
GGobi數據可視化是數據挖掘的重要組成部分, GGobi (http://www.ggobi.org)就是用於互動式可視化的開源軟體,它使用brushing的方法。GGobi可以用作R軟體的插件,或者通過Perl、Python等腳本語言來調用。
結論----以上介紹的幾款軟體都是優秀的開源數據挖掘軟體,各有所長,同時也各有缺點。讀者可以結合自己的需求來進行選擇,或者組合使用多個軟體。對於普通用戶可以選用界面友好易於使用的軟體,對於希望從事演算法開發的用戶則可以根據軟體開發工具不同(Java、R、C++、Python等)來選擇相應的軟體。以上這幾款軟體(除了GGobi)基本上都提供了我們期望的大部分功能。
10大最熱門的網站開發技術By kevinwu on December 27, 2008 1:11 AM | No Comments | No TrackBacks 雖然現在美國經濟出現危機,但是網站開發領域依然很繁榮,因為不論是現在或者將來,網路必定是人們日常生活中不可缺少的組成部分。NETTUTS上列出 10大最吃香的網站開發技術。作為網站開發工程師,如果你精通這些技術,即便在經濟不景氣的時候,仍然很容易找到一份好工作。1. Framework knowledge (架構知識)架構是大型網站開發的重要部分。開發者已經從Rails, Django等公司提供的網站架構工具中收益,因為架構工具可以幫助完成那些需要一定編程知識的重複性的任務。如果你擁有領先的架構技術(像Rails, Django, CakePHP, Symfony等),你的擇業面將非常廣闊。2. Widget Development (窗體小部件開發)窗體小部件(Widgets)是一個嵌入網頁的迷你應用程序,通常也可以下載到Windows或者Mac桌面下運行。它讓數據變得便與攜帶而且更具交互性。比較出名的像Yahoo Widgets和AOL Music Widgets。窗體小部件開發除了需要掌握網路應用程序開發所需的語言知識,還需要精通Javascript和Flash知識。3. Custom CMS themes (內容管理系統主題定製)如今越來越多人開始使用CMS(內容管理系統,例如Wordpress和Drupal)來構建他們的網站。可以想像不可能大家都用CMS提供的默認主題,為了讓自己的CMS網站在外觀設計上獨樹一幟,就需要一些專門給CMS開發主題的技術人員。4. CMS Customizations and plugin development (內容管理系統的定製以及插件開發)同樣隨著CMS的流行,對CMS的功能定製以及插件開發的需求也越來越大。5. PSD to XHTML services (PSD轉換XHTML的服務)在建站中,許多公司是先用Photoshop設計好網站的外觀原圖,然後再轉換成XHTML。這需要很強的CSS/HTML知識。6. Javascript Plugin creation(Javascript的插件開發)Javascript的Framework非常流行,因為它使Javascript的代碼開發變得簡單。就比如說現在流行的Javascript Framework - jQuery,如果你在它的基礎上開發優秀的插件,那麼你的插件也會跟著流行起來。7. Facebook/MySpace applications (Facebook/MySpace 應用程序開發)Facebook/MySpace兩大社交網站在美國紅遍半邊天。給他們開發應用程序,不用說一定是相當熱門的。8. iPhoneapplications (iPhone 應用程序開發)同樣給iPhone開發應用程序,也一直都可以被大量下載,因此也是很賺錢的活。9. E-commerce integration (電子商務一體化)如今電子商務網站(像Ebay,Amazon)與在線銀行服務系統(像Paypal和Google Checkout的)之間的配合越來越緊密,因此電子商務交易平台的開發也是相當有前途的。10. Flash and Actionscript Knowledge (Flash和Actionscript知識)越來越多的公司採用Flash來製作自己的網站、展現自己的產品,因為精美的動畫總是容易吸引人們的眼球。因此Flash動畫技術也必然迅速發展。(新浪博客) 巧用Google特殊搜索 準確尋找可用資源By kevinwu on December 25, 2008 3:46 PM | No Comments | No TrackBacks搜索Google大家都用過吧?其實我們站長可以用他的一些特殊搜索功能來查找所需要的資料:
首先打開Google,在關鍵詞輸入框中輸入""index of/"inurl:lib",選擇"搜索簡體中文網頁"選項,回車搜索,得到了一些網頁,不要以為這是一些普通的頁面,其實它們是一些圖書網站的資源列表,點擊打開它來看看,怎麼樣?是不是所有資源一收眼底了?
使用其他關鍵字可能得到更多的資源:
在搜索框上輸入:""index of /"cnki",按搜索你就可以找到許多圖書館的CNKI、VIP、超星等入口!
在搜索框上輸入:""index of /" ppt",按搜索你就可以突破網站入口下載powerpint作品!
在搜索框上輸入:""index of /"mp3",按搜索你就可以突破網站入口下載mp3、rm等影視作品!
在搜索框上輸入:""index of /"swf ",按搜索你就可以突破網站入口下載flash作品!
在搜索框上輸入:""index of /""加上要下載的軟體名,按搜索你就可以突破網站入口下載軟體!
在搜索框上輸入:""index of /"AVI",按搜索你就可以突破網站入口下載AVI視頻
到這裡,大家也許都明白了,其實就是""index of /""這個關鍵詞在起的作用,使用它可以直接進入網站首頁下的所有文件和文件夾中,不必在通過HTTP的網頁形式了,從而避免了那些網站的限制,作到了突破限制下載。(八哥網)
30個最好的Firefox插件By kevinwu on December 23, 2008 9:16 PM | No Comments | No TrackBacksDejan Cancarevic是一名優秀的網頁設計者和開發人員,他精選了30個他經常使用的Firefox插件,這些插件都能很好的幫助網頁設計者和開發人員,簡化工作量,或是增加設計應用功能等等。
1. CSSMate - 在線的CSS編輯器擴展插件
2. ViewSourceWith - 讓你查看頁面資源的Firefox擴展應用
3. PicLens - 變換你的瀏覽器為一個三維的瀏覽環境來查看網頁圖片的Firefox擴展插件
4. FireShot -強大的網頁截圖/截屏插件
5. SeoQuake - 搜索引擎優化和網站推廣插件
6. Font Finder -簡單的高亮一個事件並且左鍵點擊彈出菜單可以查看CSS樣式
7. Live HTTP Headers - 在瀏覽網頁的同時查看一個頁面的HTTP頭部信息
8. Modify Headers - 允許你添加、修改或過濾http頭部請求信息的Firefox擴展插件
9. CSSViewer -一個簡單實用的擴張,可以讓你查看當前網頁中任何部分的CSS代碼
10. EditCSS - 只需要右鍵點擊就可以在瀏覽器的側邊欄中查看和編輯樣式表代碼
11. Firebug - 查看,編輯和跟蹤 網頁上面的CSS, HTML和Javascript的Firefox插件
12. View Formatted Source -為網頁上的每一個元素格式化並使用不同的顏色高亮顯示
13. Professor X -讓你不看源代碼就能看到頁面頭部信息的Firefox插件
14. CSS validator - 一鍵檢查當前網頁是否符合W3C CSS 標準的驗證器插件
15. Validaty -提供給你一個類似於validator.w3.org的校驗器按鈕
16. Html Validator - 添加HTML校驗器
17. Copy as HTML Link -給選中的文本創建一個當前頁面的HTML鏈接
18. TableTools - 過濾、排序 HTML表格等的Firefox擴展插件
19. CHM Reader - 讓Firefox支持HTML編譯文件的Firefox擴展插件
20. PageDiff - 幫助網頁設計者和開發人員在不同的網頁之前查看頁面源代碼
21. Clipmarks - 讓你保存當前頁面中的任何元素的Firefox插件
22. SourceEditor - 查看和編輯HTML元素代碼的Firefox擴展插件
23. Total Validator -使用官方DTDs提供一個真正的HTML檢查器的Firefox擴展插件
24. LinkChecker - 檢查任何網頁上面的有效鏈接的Firefox擴展插件
25. Web Developer - 添加一個菜單和工具欄,包含各種網頁開發工具的Firefox擴展插件
26. Style Sheet Chooser II - 讓你選擇網站作者為網站提供的候補風格的Firefox擴展插件
27. View Dependencies -顯示網頁上面所有被裝載的元素信息的Firefox擴展插件
28. Accessibar - 可以輕鬆地操縱網頁顯示和文本語音輸出的Firefox擴展插件
29. Aardvark - 用來清楚網頁的冗餘信息和列印網頁等功能的Firefox擴展插件
30. JSview - 添加能夠查看外部檔案源代碼的功能
推薦閱讀:
※東四N條衚衕(二),有古樹的四合院
※人均50元 北京衚衕酒香不怕巷子深 (09.9.7)
※走進京城老衚衕[101P]
※前門的水和衚衕--李俊玲
※南鑼鼓巷對面這條衚衕 竟然沒幾個人去過