先做一个实验,假如我们要开发一个小项目,需求很简单,就是一个保存用户基本信息的页面,要求用户可以输入姓名、电话、联系地址、邮箱、手机号码、备注,其中姓名与邮箱是必输项目,我们把这个项目的ui美化工作分给三个美工做(当然这三个人都是虚拟的,其实都不是我做的),三个美工交来的作品都没有样式错误,页面结构正常,让我们看看做出来的效果有什么不一样。
第一个美工交上来的作品,这种作品我们基本上可以理解为实习生做的作品,许多有两年甚至更长开发经验的美工,也会开发出这种作品,不要笑,我甚至见过还比这种作品更烂的作品。如果一个美工有超过一年的工作经验还提交这种作品,基本上没戏了,因为这类美工不会自己思考。不要和我较真,那种从来不与逻辑打交道的美工另当别论了。
许多美工的理解是样式上正常,结构上没有错误就完成了。所以一般来说,让一个美工评估一件工作的工作量,你需要在他评估的工作量上再增加200%。第一个美工交的作品如下图所示:

第二个美工交上来的作品可以算得上是一个合格的作品,中规中矩,没什么太大的亮点。与第一个美工不同的是:
1、他给网页加上了标题信息;
2、他给每一行标题(就是姓名/邮臬等信息)设置了加粗并添加了背景颜色;
3、给必输项加入红色的*号进行标注
4、他把默认的提交按钮文字改为保存,并没有使用默认的提交字样
5、给表格加了连线,这样看起会舒服一些(这项是一种自我提高)
6、为输入框设置了最大可输入长度

再来看第三个美工提交的作品,第三个美工在第二个美工的基础之上又做了一些改进,除了第二美工所做的事情,他还做了这些事:
1、添加了水印备注,让用户更能了解输入框的作用(当然这里只是做了一个示例,实际上姓名的水印是没有必要的);
2、当输入框获得焦点的时候,背景会变颜色,以提醒用户(很多美工不懂js其实是一件很恐怖的事情)
3、给出了正确的效果图,邮箱的错误提示效果都呈现了出来

许多的美工都有这样的想法,我就是一个美工,我只负责界面样式上没有错误,例如说用table将界面对齐,至于页面的第二表现(例如正常应该是什么样,错误应该是什么),应该由程序员负责。实际上在大多数项目中,并没有太多复杂的逻辑。一个美工可以不用管逻辑是否正常,但是一定要把样式弄完整,不要只弄一层样式,而要考虑到更多的情况。其实你并不需要花太多的时间来理解逻辑,而是你要花些心思在上面,多注意几次就好了。
例如在上面示例的Web程序中,程序逻辑代码非常简单,但界面给人的感觉很简洁,最起码看起来不会太难受。而第三个美工所提交的作品,除了页面整洁之外,他还注意到用户的体验,这是很难能可贵的。如果一个美工在设计页面的时候能时时想到用户体验,那么应该离他升职的时间应该不会太远了。如果你能做到文中提到的第三个美工的程度,我认为你已经摸到了产品设计师或者ui设计师的凳子了。
设计页面并不是别人让搞成什么就搞成什么,应该有一些自己的想法,如果你一直像第一个美工那样写样式,你将永远是一个三流的美工。不要像一个鼠标一样,别人拽一下动一下,应该和病毒一样主动出击。在有限的时间里把样式做得最好,无论是界面上还是体验上。
注:本文来源http://iove.net/2679/
2010年08月03日 |
ubuntu |
0 点评
Rhythmbox Titlebar plugin:在任何当前窗口标题栏显示正在播放歌曲的名称
resume on restart plugin 记住上次退出的播放曲目
安装方法,下载插件之后,解压到 ~/.gnome2/rhythmbox/plugins/ 目录,然后重新打开rhythmbox,在插件目录就可以看到这两个插件,启用即可。
为了方便下载使用,已经将插件下载打包放在了 http://code.google.com/p/wallevextend/downloads/list
2010年08月03日 |
开发应用 |
0 点评
PHP函数setcookie的各个参数的意思
bool setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure [, bool httponly]]]]]] )
setcookie() parameters explained
| Parameter |
Description |
Examples |
| name |
The name of the cookie. |
‘cookiename’ is called as $_COOKIE['cookiename'] |
| value |
The value of the cookie. This value is stored on the clients computer; do not store sensitive information. |
Assuming the name is ‘cookiename’, this value is retrieved through $_COOKIE['cookiename'] |
| expire |
The time the cookie expires. This is a Unix timestamp so is in number of seconds since the epoch. In other words, you’ll most likely set this with the time() function plus the number of seconds before you want it to expire. Or you might use mktime(). |
time()+60*60*24*30 will set the cookie to expire in 30 days. If set to 0, or omitted, the cookie will expire at the end of the session (when the browser closes). |
| path |
The path on the server in which the cookie will be available on. |
If set to '/', the cookie will be available within the entire domain. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in. |
| domain |
The domain that the cookie is available. |
To make the cookie available on all subdomains of example.com then you’d set it to '.example.com'. The . is not required but makes it compatible with more browsers. Setting it to www.example.com will make the cookie only available in the www subdomain. Refer to tail matching in the spec for details. |
| secure |
Indicates that the cookie should only be transmitted over a secure HTTPS connection from the client. When set to TRUE, the cookie will only be set if a secure connection exists. The default is FALSE. On the server-side, it’s on the programmer to send this kind of cookie only on secure connection (e.g. with respect to $_SERVER["HTTPS"]). |
TRUE or FALSE |
| httponly |
When TRUE the cookie will be made accessible only through the HTTP protocol. This means that the cookie won’t be accessible by scripting languages, such as JavaScript. This setting can effectly help to reduce identity theft through XSS attacks (although it is not supported by all browsers). Added in PHP 5.2.0. |
TRUE or FALSE |
遇到的问题
在IE下(没有做具体测试,可能是IE的各个版本,我使用的是IE8),php5.2.13版本存在的问题,如果没有设置setcookie函数中的path和domain参数,那么可能会有cookie不能生效的事情发生。不要惊讶,这并不是PHP的问题,而是IE自身的问题,我在firefox下用firecookie来查看的时候,cookie生效了,可是用IEcookieview看的时候,IE下是没有的。
解决办法:尽可能规范自己的代码,将函数参数的设置为正确可用的值(譬如path设置为’/',domain设置为’.127.0.0.1′)