Monday, April 02, 2007

How to choose a web framework for python?

I am comparing the web framework in python. It's a little bit complex.
  1. Is the template engine in that framework support the template re-use?
  2. How about the database access layer? Is there more flexible SQL script inline supporting and has many popular database server can be connected?
  3. Is there any weird or some kind of unreadable code special?
  4. Does it support Apache integrated?

mssql and python on *nix

I can not find a good implement for the connection to the MSSQL on *nix.
unixODBC and iODBC and pymssql are not working correctly. And the pymssql can not support the query parameters with "?" or named parameters. It's not safe for the internet usage.

Sunday, March 25, 2007

HTTP_X_FORWARDED_FOR the real variable name in the http header

The HTTP_X_FORWARDED_FOR http header name is 'X-Forwarded-For', so we should use
<%=request.getHeader("X-Forwarded-For")%> to get the real i want.

Saturday, March 17, 2007

Python or Ruby

Everything is about the web development for the rapid speed.
So the FastCGI is revived by the Ruby Rails. I still prefer the Python and the plenty of function library. I tried the django and TurboGear, but the TurboGear 1.0.1 can not work with the Python 2.5 now. The django can work with the new version.

Friday, February 23, 2007

When Spring talk about configuration file

It's so funny that the Spring framework talk about how to reduce the configuration file's quantity. ;-/

Thursday, January 11, 2007

Development plan

The project will be track by the plan. Had done today.

The HttpSessionBindingEvent

The listener of HttpSessionBindingEvent used for collecting the site user session event. When i wish to count the users online of a web application.

The interface HttpSessionAttributeListener and attributeReplaced method is always called and then i can event.getSession() is return the current session object. So, i can getAttribute to get the current value, and the event.getValue() is the old attribute value returned.