Requested a place at sourceforge for java Libhttpd

Today I requested some space at sourceforge for hosting my java libhttpd project. I would like to increase it's user base and allow people to access the complete repositry without the need for me to open my own PC.

The request is pending. I'll keep you informed!

Today I've got an e-mail from a user that liked to add a custom mimetype to the HttpServer. Well eeuh, that wasn't directly possible, I had to fix this. I've made a patched version for him, you can download it here: libhttpd 20070720

You can add a custom mimetype the following way:

MimeTypeDetector.addMimeType( ".xsl", "text/xml" );

Word of warning this patched version also contains Ruby on Rails like routing support, if you start to use it you'll get spoiled ;-)
I will explain it's usage in a future post.
The next official release will be done at sourceforge. Well I hope, they first need to approve my project request..

Agile Web Development with Rails 2nd Edition – Part 2

Wel I've almost completely read the book while I was away on a summer holiday. I still like the book. Specially the Web 2.0 part has been improved very much. Also the RESTful routes part is interesting, but I don't see the direct need for it.

I still need to read the part about deployment, but after a quick peek, I think it's much completer and more mature then the description in the first book. Also it shifted the usage advice from fastcgi to Capistrano. Well an interesting chapter.

The Ajax part also hinted me about the "readystate 3" problem, which simply means that the web server should not use keep-alive with ajax. It looks like this is the problem I've encountered with a project of mine... Need to figure this out!

Agile Web Development with Rails 2nd Edition

agile_web_development_with_rails_2nd.jpgAfter a three week wait I finally got my ordered book: "Agile Web Development with Rails, 2nd edition". I remember the bookstore salesman "The book is in stock at my supplier, it will be here in three days...". Yeah right!

Last year I bought the first edition of this book, and a few days after buying I noticed there already was a second edition on the way. I felt pretty screwed. Tried to get some discount via Dave Thomas, but unfortunately I didn't get it.. Btw. I really think Dave is great writer and great developer, he always seems to anwers his email personally. Very good!

I told myself, I will not buy this 2nd edition book, I'm not paying the money again for a lot of the same content..

Well I changed my mind, (after viewing an illegal bittorrent PDF version)

And after reading through the depot application (again) I indeed found a lot of improvements and new things about rails I didn't know!

It again is worth the money.

Some highlights of new things I read ( Btw. I still need to read 400 pages ;-) )

  • link_to has a :method parameter. (Very usefull, didn't know this)
  • rjs templates, read about them never used them. Now I can see them in the Depot application
  • Ajax based cart, with nice update effects
  • form_for construct. Didn't know it existed, but I really like it!
  • request.xhr?
  • cycle, for automaticly cycling colours!
  • ... still need 400 more page to read, the items above are only items extra in the tutorial ...

Btw. Another great book from Dave I really advice you to read is "The Pragmatic Programmer From Journeyman to Master". I've got his book a few years ago and it's full of good advice and inspiration.

The coming days I'm not behind a PC, so I will not make a lot of digital adventures... Well I wil read some more in my new Rails book...

Now Oblivion Time ...

Limiting Subversion Users via SVN Access File

I was in a situation I wanted to setup a SVN repostitry which allowed a friend of my to only contact certain projects readonly. To other projects he should have commit rights. Some projects are publicly accessible.

Well after some sweating I found out I was trying it the wrong way. I was trying very hard to use the LIMIT option of the apache config file.. Well this is NOT the way to go. It seems possible to define a SVN ACL file which is extremely flexible in defining the rights. You can even limit rights on path basis !

Summary:

Here 's my solution.
The apache config file

<Location /subversion>

<location>DAV svn
SVNParentPath /data/svn/repos</location>

AuthType Basic
AuthName "Authorization for required"
AuthUserFile /data/svn/.htpasswd
AuthzSVNAccessFile /data/svn/svn-acl

require valid-user
&lt;/Location&gt;

The ACL file "/data/svn/svn-acl"

## The groups
[groups]
committers=john, jake

readers=jan, emma

#
# Format:
#
[project:/]
@committers = rw
emma = r
* = r

[projectX:/path/]
committers = rw
emma = rw
* = r

BTW. You can create users with the standard Apache command

# Create the passwordfile
htpasswd -c /data/svn/.htpasswd  johndoe

# Add a second user
htpasswd /data/svn/.htpasswd  emma

Calendar Formatting Problems

Forget the calendar I wrote yesterday about. It isn't very easy to change the display format of the date it uses. I prefer to use a date in the form dd-mm-yyyy. Not with an English name. The project is for a Dutch client, so it isn't acceptable to show "july 11, 2007".
I've restored my original implemenation.