Lately, I have been experimenting with a technique to accelerate web application development in Java. It does without custom servlets and relies on Java Server Pages (JSP). Here is how it is implemented. First, define an interface called Controller. Declare a method called handleRequest that takes as arguments an HttpServletRequest and an HttpServletResponse. The method …
Author Archives: Eddy Young
The magic of Ctrl-K in NetBeans 4.x IDE
If there is a single shortcut that one must learn in NetBeans 4.x, make it Ctrl-K. It auto-completes a word if that word is present elsewhere in the same file, thus reducing typing. Fire up NetBeans and give it a try.
How to handle spam efficiently
Opening messages to decide whether they must be read or be discarded works well with low volumes of email. However, with ever increasing messages and more sophisticated spam techniques, this filtering method becomes unsustainable. Spam filters based on statistics and heuristics are useful to cut down the number of unnecessary messages that we have to …
Better Software Faster
I rediscovered the website for the book Better Software Faster. Bizarrely, although very good, this book is hardly ever referenced. Describing similar modelling techniques as but written much earlier than Domain-Driven Design, it can be considered as the latter’s precursor. Unlike DDD, however, it includes practical examples and source code, which make the techniques more …
Tip: How to find a browser user-agent string
This is an easy way to find the user-agent string of any browser that supports JavaScript. Simply enter the following in the address bar. javascript: alert(navigator.userAgent);
Domain-Driven Design, the quest for software perfection
I have been reading Domain-Driven Design by Eric Evans since last August. Although the book is interesting, it has been difficult to read—at least for me. The author explains the concepts of domain models in great detail but provides few practical examples. As a developer primarily interested in implementation, I am forced to pause frequently …
Continue reading “Domain-Driven Design, the quest for software perfection”
Copy/paste command-line utilities
Inspired by the programs pbcopy and pbpaste in Mac OS X, I created similar utilities in Windows. .NET Framework 1.1 is required for these programs to work. clipin.cs using System; using System.IO; using System.Windows.Forms; public class ClipboardCopy { public static void Main(string[] args) { string input = Console.In.ReadToEnd(); Clipboard.SetDataObject(input, true); Console.WriteLine(“Text copied to clipboard.”); } …
Mauritius .NET User Group
I just learned about the Mauritius .NET User Group. If you are a .NET developer and want to become a member, you can submit your application on the website.
How to Develop JSF Applications in NetBeans
This post is a step-by-step guide to setting up NetBeans for JSF (Java Server Faces) web development. It shows how to configure NetBeans for auto-completion of JSF tags and the meta-data in faces-config.xml.
wxWidgets time control
Whilst learning wxWidgets last year, I wrote a simple GUI time control. I forgot about that project until I found the code today as I organised files on my computer. It was rather difficult for me to understand because there was little documentation to explain how it works.