2008 Oct 8

When Ajax meets jQuery

基于AJAX的应用现在越来越多,而对于前台开发人员来说,直接和底层的HTTPRequest打交道又不是一件令人愉快的事情。jQuery既然封装了JavaScript,肯定已经考虑过AJAX应用的问题。的确,如果用jQuery写AJAX会比直接用JS写方便N倍。(不知道用jQuery长了,会不会丧失对JS的知识了……)

这里假设大家对jQuery语法已经比较熟悉,来对ajax的一些应用作一些总结。

载入静态页面

load( url, [data], [callback] );
  • url (String) 请求的HTML页的URL地址
  • data (Map)(可选参数) 发送至服务器的 key/value 数据
  • callback (Callback) (可选参数) 请求完成时(不需要是success的)的回调函数

load()方法可以轻松载入静态页面内容到指定jQuery对象。

$('#ajax-div').load('data.html');

这样,data.html的内容将被载入到ID为ajax-div的DOM对象之内。你甚至可以通过制定ID来实现载入部分内容的Ajax操作,如:

$('#ajax-div').load('data.html#my-section');

Read More

2008 Sep 18

It’s never about tech

今天把《超越CSS Web艺术精髓》这本书看完了,终于。跟我之前读老外的书一样,感觉废话真多。
起初我深刻的怀疑真是再继续榨取《CSS Zen Garden》的商业价值,之后再阅读了很多篇书评后,我像有些迷信似地去寻找这本书。终于我在学校图书馆里翻到了这本书,相信我,书竟然是崭新的……

书的前半部分是十分玩味的,它将重点放在(X)HTML语言上,讲解网页的语义性实现。当然这少不了Microformats。准确的说它用了四分之一的容量来讲述HTML,讲解如何将设计稿转换为HTML文档。

之后,你会高兴地看到作者开始介绍一种设计流程。这个流程的确被大多数设计师采用,好吧,应该叫做“被公开的秘密“吧。作为设计师,你可能读过很多关于平面设计的文章,你会发现里面任何一篇都比这书上写的好……

再之后,就到了这本书我最喜欢的部分,虽然这些内容依旧不是讲CSS的……这部分在于如何延伸、拓展设计师的思维,如何将自己的作品放得更开。他介绍了一些很有趣的方法,比如看看杂志、电影、摄影之类,收集一些具体的小物件,等等。我个人觉得这是这本书最值钱的地方了。

后半部分?拜托,它终于在讲一些定位和CSS3的问题了,不过现在谁在乎了?大概大多数读者都已经忘记这本书的标题里有”CSS“这个词了……

这就是这本书,一本将布局、设计原理、HTML、CSS混在一起的书,它的售价是69元……
如果你真的想了解一下优秀的CSS是怎么达到的,也许拥有一本《CSS Zen Garden》是更加实际的选择,再说网上还有N多的文章给你做扩展阅读。忘了告诉大家,《CSS Zen Garden》价值49元,但是已经出版有一段时间,所以都在打折。

2008 Sep 10

20 Amazing Photoshop Light Effects

好吧,如果我是PS达人而且有N多的时间来写文章,我也会写这些教程的。不过……废话少说,光感相信是数码CG相对于传统CG的一大特色。就光感本身来说,可以说是美术的大部分都牵涉到光与影的描述。古典时期的画派甚至直接用处理光线的方法划分学派……Orz……废话太多了……CG里面,光线基本上是疯狂的,完全考验你自己的想象力。

教程为英文,过几天我会挑几个最炫的来翻译以下……

Well, these tutorials are not written by me. Had I had such fine skills and so much time, I have done this already……Believe everyone accept the fact that light and shadow are eternal theme of arts. In the classic times, people even classify the artists by the way they handle it. In Computer Graphics times, there is just no limitation to how we handle light and shadow. Ok, let’s go down to our bussiness…..

Read More

2008 Sep 9

jQuery webPrejudice Plugin

Description

I believe most developers have been experiencing compatiblity issues with so-called brwosers. I know you have spent lots of time fixing pages to grace all browsers. So have I. I feel distressed, exhausted when finishing tweaking. The last words I want to voice out —- I hate this!
Why not ask visitors to change another browser?! This plugin is set to list pros and cons of various browsers and recommend visitors to alter their browser!

描述

相信大多数开发人员都遇到过浏览器兼容性问题。你一定花费了大量的时间调试页面以便让大多数浏览器都能正常显示你的页面。我也如此!我觉得不爽,而且很累。我最后想说的是——我恨死这种工作了!
为什么不能让劝说浏览者换个浏览器呢?!这个插件就是用来干这个的,它会自动判断浏览者的浏览器,并且列出其他浏览器的优缺点,推荐浏览者使用某个其他的浏览器。

Read More

2008 Sep 5

Microformats, too early or too silly?

<div id="hcalendar-Wrote-a-Letter-about-Microformat" class="vevent">
<a href="http://pagetalks.com/" class="url"><abbr title="2008-09-05T18:47+08:0000" class="dtstart">September 5, 2008 6:47</abbr> – <abbr title="2008-09-05T19:10+08:00" class="dtend">7:10pm</abbr> : <span class="summary">Wrote a Letter about Microformat</span> at <span class="location">Workshop</span></a>
<div class="description">Seeing too much disscusion about microformat and I wrote some words about microformat. </div>
<div class="tags">Tags: <a href="http://eventful.com/events/tags/mircroformat" rel="tag">mircroformat</a><a href="http://eventful.com/events/tags/xhtml" rel="tag"> xhtml</a><a href="http://eventful.com/events/tags/xml" rel="tag"> xml</a></div>

深奥?看仔细点……这简直就是顾弄玄虚啊!不就是XHTML加了一群Class标签么?非也,此乃Microformat……

秉承以人为本,机器为其次的理念,微格式是一套构建于已经广泛接受的标准之上的,简洁、开发的数据格式。

Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards.

官方是如此定义的。如今Microformat已经成为了标准之一,可它就像众多其它标准一样,不为人知。尽管Microformat的技术仅仅是通过定义一套合法、合理的Class属性来进一步“格式化”HTML文档,但如今并没有并广泛使用。除了Yahoo、微软、Goolge的诸多服务中已经应用此项技术,众多网站还未加入这一行列。
Read More

2008 Sep 2

Google Set Off its Comat in Explorer Market

更新 今天我下载试用了这个软件.大多数站点都能够正常、快速浏览(看下面的那张Chrome的内存统计页面,竟然会显示自己跟其他浏览器对比,这个数据是都只打开PageTalks页面取得的。FF其实已经加入了很多插件了,这个对比显然不公平). 并且,你可以在这个浏览器中整合你想要的网络应用程序,或者创建到网络应用的快捷方式. 有人说这不仅仅是对IE8的一种挑战,而且是对MS本身的一次挑战,因为Google Chrome表演的角色是在云计算时代的一个操作平台,绝非单纯的网页浏览器.

Google要做浏览器了!疯掉了,这个世界疯掉了!这个场景让我们回到之前传言Google要开发手机一样……不过事实表明,只有我们想不到的,没有Google做不到的。事实上英文版的Google Chrome已经在今天发布了。
 

从界面来看,我们设计了一个简单而高效的浏览器窗口。对大多数人来说,浏览器本身并不重要,它只是一个能够运行互联网网页、网站和网络应用等重要程序的工具。正如谷歌的经典主页,谷歌浏览器延续了简洁、快速的设计理念,帮助用户快速准确地到达目的地。
从根本上讲,我们提供了一个能更好地支持各种复杂网络应用的浏览器基础平台。通过让每一个标签相互独立开来,从而避免了两个标签页产生冲突的可能,同时面对来自恶意网站的攻击,谷歌浏览器提供了更好的保护。我们提高了浏览器整体上的速度和响应度。我们还建立了一个更强大的 JavaScript 引擎 V8,以便为下一代网络应用技术提供支持,这些网络应用在目前的浏览器上几乎不可能实现。

Google的官方如是说,对广大用户来说,算是又多了一个简洁、快速的浏览器。(相信会和Google服务无缝链接)
对于开发者来说,JS V8的支持是一个亮点(不过现在JS V8过于前沿?)。必须注意的是,Google Chrome是基于Webkit的浏览器,我们能够大胆猜测,在Safari下能够测试通过的网页,在Google Chrome也应该没问题,希望……
Google有特地强调安全机制方面问题,我不知道会不会造成脚本和各种嵌入元素的安全特性造成改变。种种猜测,希望在正式版发布之后给我们一个答复吧!
更多消息请到Google 黑板报,以及Google的官方宣传漫画

Update I test Google Chrome today. Most sites are displayed properly in this browser. (See the picture below. It’s a system page in Chrome where shows the clear comparision to other browsers on memory usage. System gets date when I only open PageTalks in FF and Chrome, which is apparently unfair as FF has lots of plugin enabled……) Most importantly, it’s fast and combined with quick links to any web service. You can custom shortcuts to your favorite web applications. And a auto type checking. Others say that it’s not only a challenge to IE8 but it’s totally a challenge to MS, as it’s supposed to be a new operation platform in Cloud Computing era.

Google is beginning to develop its own brwoser. Crazy, huh? This remind us of the familiar situation when rumor saying that Google was creating its own cell-phone. It turns out that there is nothing Google can’t create, just something you can’t imagine. In fact, Google has released a Google Chrome beta today.
 

On the surface, we designed a browser window that is streamlined and simple. To most people, it isn’t the browser that matters. It’s only a tool to run the important stuff — the pages, sites and applications that make up the web. Like the classic Google homepage, Google Chrome is clean and fast. It gets out of your way and gets you where you want to go.
Under the hood, we were able to build the foundation of a browser that runs today’s complex web applications much better. By keeping each tab in an isolated “sandbox”, we were able to prevent one tab from crashing another and provide improved protection from rogue sites. We improved speed and responsiveness across the board. We also built a more powerful JavaScript engine, V8, to power the next generation of web applications that aren’t even possible in today’s browsers.

As Google explains, for most end-users, they have one more choice of brower which is undoubtly clear, fast. (We believe that all Google Service will connect to Google Chrome seamlessly).
For all developers, JS V8 is not a highlight ( but a little remote application?) We should note that Google Chrome is based on Webkit. Therefore we can predict that the websites working well in Safari will act perfectly in Google Chrome as well. (Hopefully). Google has emphasized on the security issues, which makes me thinking whether this means a lot some changes the way scripts and embedded elements work.Hope we will get answers in the finnal release.
For more info refer to Official Google Blog: A fresh take on the browser and an offcial comics.

Page 3 of 712345...Last »