6/24/2008

memcached in Java

I'm looking for memcached client library for Java. Then I found two libraries.
memcached client for java
memcached client for java is simple and synchronous mamcached client libraries. This is easy to use but not support CAS commands.
spymemcached
spymemcached supports asynchronous processing and CAS commands. Updating cache is high-speed. However implementation is very complex.
I think that many web applications don't require asynchronous cache processing. So I think mamcached client for java is better solution.

6/20/2008

prototype.js and script.aculo.us

The next version of Amateras JavaScript editor supports prototype.js and script.aculo.us. These libraries are proposed in code completion proposals.

prototype.js:
script.aculo.us:
In the future version, many other JavaScript libraries will be supported!

The page auto mapping without templates

Click Framework provides the page auto mapping. This is the important feature to decrease amount of configuration.

However Click maps page classes to request-path from HTML templates. So page classes which do not have corresponded HTML template is not mapped automatically.

For example:

  • pages which share a HTML template
  • the page which returns JSON or file (response is written in the page class)
I'm thinking about annotations on Click Framework. How about the @Path annotation which specifies the auto mapping path to page classes.
@Path("/file-download.htm")
public class FileDonwloadPage extends Page {

  /**
   * Writes response for file downloading in this method.
   */
  @Override public void onRender() {
    HttpServletResponse res = getContext().getResponse();
    OutputStream out = res.getOutputStream();
    ...
  }

  /**
   * This method returns null to not render template,
   * because this class writes response contents for file download.
   */
  public String getPath(){
    return null;
  }
}
This is one idea of using annotation in Click Framework.