2007年6月19日星期二

Cygwin tips

1.if the os is windows, the file type will be dos by default. So if you new a shell script, then run it in cygwin, the error like "who/r command not found" will happen. The solution is changing the file type to unix. A approch is using vi. In vi, use ":set ff?" to inquiry file type. Then use ":set fileformat=unix" or ":set ff=unix".

2.In my machine, cygwin.bat is:bash --login -i. This will let shell be a login shell. But only an interactive shell that is not a login shell will read and execute ~/.bashrc. If we want our personal bash, we should create a .profile file in home directory instead of of .bashrc. One example is:

alias h="history"
alias hg="h|grep"

#alias ls='ls --color=auto'
alias la='ls -A'
alias lf='ls -F'
alias ll='ls -l'

 3.use wget with proxy. create a .wgetrc in home directory.

http_proxy = proxy.com:81
no_proxy = localhost

This will make wget to fetch data with proxy by default and you didn't need to swith to proxy model by " -Y on".

2007年6月6日星期三

RESTful Web development

  What RESTful means? I found this document : RESTful Rails development is very clear to express this point. And It is also quickly to test it in Rails. Soon you will find the amazing of RESTful. It just used HTTP GET, POST, DELETE, PUT to manage the resource and some likes JDBC CRUD implement. And more it is a new RPC implement. It has been used widely in web service. So a web service can be invoked by RESTful URL. And I think it make web service more powerful. In some traditional web application, for example a struts or JSF application, RESTful just provides nice URL format.

  But obviously RESTful will be more important when application need to invoke 3rd party functions

2007年6月2日星期六

Visual library of NetBeans

Today I evaluated Visual library of NetBeans org. There are not too much information about it on Sun's site. And it is a part of NetBeans 6 M9. I guest it was just separated from Netbeans as a standalone project. It's many feature is same as JGraph which has been used by many users. But I think this library provides more about UI design but not only concerning on graph as done by JGrah. For example, it has a feature "ComponentWidget - AWT/Swing components on scene". So you can do this:

JButton button = new JButton();
button.setText("xixi");
ComponentWidget widget = new ComponentWidget(this,button);

Then I have a question: Is Visual Web (netbeans) developed on this library? If so, Visual Library is very cool! (From this post, just page flow navigator is based on Visual Library.)
There is a video which created a demo on Visual library. You can find that a JasperReports tool called jarvis is also base on this library. It looks powerful.