Inspired by this article I decided to find out if the same technique can be exploited in my current project which is developed in django.
My first problem was to come up with a viable cache key scheme since simply using the full request URI as suggested in the article wouldn’t work for me because my site renders a different version of a navigation menu depending on the authentication state of current the user. After weighing in the advantages and disadvantages between the super clean variant of factoring the session cookie and all other cookies into the memcached key and a less heavy weight method that would only append a server supplied abstract “page version” field to the request URI, I went for the latter. My resulting nginx virtual host config was looking like this:
[More]
About a year ago I’ve switched over to IntelliJ as my primary Java IDE. When I began to dabble a bit in Django a few days ago, I realized that IntelliJ had me spoiled when it comes to Editor Features – especially when working with Javascript and HTML files. Notepad++ - although a great text editor on its own right - simply didn’t cut it for me for web development.
When I tried opening my Django files in IntelliJ I had to realize that IntelliJ needs a project context for opening a file. Even for a simple html file. Fortunately the solution was pretty straight forward. Navigate to your Django project root directory and create a new file .project. Some of you have guessed it: we are pretending to be Eclipse. Open the file in a text editor and paste the following snipped into it:
<?xml version=”1.0″ encoding=”UTF-8″?>
<projectDescription>
<name>myproject</name>
<comment></comment>
<projects></projects>
</projectDescription>
Edit the <name> tag value and change it to your liking.
[More]
Sometimes I can’t help but getting nostalgic when I think about the old days when Microsoft Visual Studio was the benchmark for Integrated Development Environments. Back then when I used Visual C++ 2.0 the first time, I immediately fell in love with it. The IDE ran under Windows NT (I refused to use Windows 3.1 and 95 for anything productive), had an excellent editor and kick-ass debugger, was fast, and just did what it was supposed to do without getting in my way. The following releases improved on that foundation and introduced features such as IntelliSense, incremental Compilation and minimal Rebuild. Everything was good in Developer Land.
Unfortunately, all of that ended with the release of Visual Studio .Net 2002. This was the first release which introduced support for the .Net Framework in the IDE. Don’t get me wrong. I still regard the .Net Framework as one of Microsoft’s better products, but this post is about Visual Studio and the impact the framework plus other contributing factors had on the quality of IDE. Visual Studio .Net 2002 took approximately two hours to install on my relatively powerful workstation. After that, when I was allowed to launch the IDE, the greatly increased startup time was immediately noticeable. But hey that’s the price you got to pay for all those shiny new features right?
[More]
I’ve spent the past week juggling with GWT, Maven 2, Eclipse, Jetty 6 and Tomcat 6. My goal was:
- Run GWT hosted mode using noserver switch in order to use my own application server / container. The reason for this was that I wanted to experiment with Jetty 6’s continuations and Tomcat 6’s Cometprocessor servlet interface
- Keep full debugging support for both server and client code in Eclipse in noserver mode
- Fully automated command line builds, packing and deployments using Maven
Switching to noserver hosted mode in GWT has a couple of implications. When using the -noserver flag, your external server is used by the GWT Hosted Mode browser to serve up both your dynamic content, and all static content (such as the GWT application’s host page, other HTML files, images, CSS, and so on.). GWT’s internal Tomcat is no longer used. This also means that you are totally on your own with everything happening on the server side.
[More]
I’ve recently stumbled upon O’Reilly Safari and after using it for a couple weeks I don’t want to miss this great service anymore. Having instant access to thousands of books from all the major publishers is a huge boost in an industry as dynamic as IT. The only downside is the price which at 40$/monthly isn’t exactly cheap but well worth the money considering how much time you can potentially save by using it.
They also have a cheaper edition called “O’Reilly Bookshelf” which allows to to preselect ten books which you can search at any time.
Since I recently fell in love with Maven 2 I’ve been looking for ways to integrate this great tool as tightly as possible into my development routine. What I wanted was to manage all project configuration information through maven and just have my java IDE of choice - eclipse - pull all project related information from pom.xml.
My first stop was the maven-eclipse-plugin which you register in your pom.xml as plugin to maven and then by issuing a “mvn eclipse:eclipse” generate all eclipse project information from there. Initially everything was looking good, until I actually tried to run my test web application in Tomcat from within eclipse. The web application came up just fine but failed to resolve any references to the business logic project it depended on. After a while I figured out that maven-eclipse-plugin is able to reflect inter project dependencies into the generated eclipse project files - which makes a build in eclipse complete without errors - but what it is unable to do is to mark those dependend project outputs for inclusion into the deployment process (ie add them to the J2EE Module dependencies). Of course the work-around would be manually check the J2EE Module dependencies for those projects but that would defeat the intial purpose of managing everything through maven. While googling for solutions I stumbled over this ancient thread which explains the problem in all it’s glory.
Enter m2eclipse which works quite opposite to the maven-eclipse-plugin since it is an eclipse plugin rather than a maven plugin. Seems to do what it is supposed to do, namely solving the problem with the J2EE Module Depedency by introducing it’s own classpath container to eclipse which encapsulates all maven artifacts. What I’m currently missing is the ability to bootstrap a project solely using maven because m2eclipse lacks (to my knowledge) the abilty to generate or import pom.xml into eclipse. Nonetheles I think I’ll stick to it for the time being.
As you might have noticed the old weichhold.com is gone and the web content has moved to this shiny new site. There were several reasons for this decision. To give you a little insight: the former site was hosted on a dedicated linux box running debian located a Hetzner’s Nürnberg facility. At the beginning the server was just handling email and the website using my own asp.net based CMS. But over the years more and more services were hosted on this box ranging from an MMO guild forum to our family picture gallery. Not surprisingly the amount of time spent with administration work increased by an equal amount - don’t get me wrong: I’m still totally convinced that linux/bsd hosting is the right way to go in terms of stability, security and scalability - I just don’t have the time anymore to manage it on my own.
Another aspect for my decision to “outsource” everything was the quality and maturity levels that content management systems like squarespace.com have reached by now - the squarespace CMS is absolutely incredible and beats everything I’ve used so far hands down. So here we are. My web content is served by squarespace, email/calendar/contacts is hosted by google and our pictures reside on flickr.
P.S: If you are looking for dedicated hosting solution give Hetzner a shot. These guys are just great. If you’ve ever experienced the so-called support of some hosting companies, you appreciate that calling hetzner’s support line connects you directly with the technician with physical access to your machine.
Marvin and I had a fun day together that concluded with a boat trip on Frankfurt’s Main River. You can tell by the picture that he quite enjoyed the trip :)