Random Thoughts from an Agile Developer
The basic premise of Node.js is that I/O is expensive and that, since I/O is expensive, we can’t block waiting for it to complete.
Many traditional Web Servers typically adopt a one thread per request approach, and any I/O (database, web service, file system call…) during the request blocks that thread of execution. This is inefficient in many ways because when the thread is blocked waiting for I/O to complete, it can’t respond to other requests.
read more »
February 14, 2012 – 10:09 pm
Have you ever wondered why Spring MVC supports @RequestParam but not @RequestAttribute? There are probably plenty of philosophical reasons for this – good or bad. But if your hands are tied and you’re stuck with, let’s say a CMS, that insists on passing context as request attributes what are you going to do?
As usual, Google provides some answers. It turns out I am not the only one who’s been asking for this feature and as of Spring 3 it is available albeit in a slightly different form. Instead of @RequestAttribute you would use @Value and SpEL.
@Controller
public class YourController {
@RequestMapping("/xyz")
public ModelAndView handle(
@Value("#{request.getAttribute('key')}") SomeClass obj) {
...
return new ModelAndView(...);
}
}
September 18, 2011 – 8:14 pm
It turns out that I’ve gotten completely side tracked…or maybe not side tracked per se, but at least not completely focused on the client side of the Application. The past couple of weeks I’ve been engulfed in Node. Trying to figure out what it is, what I can do with it and obviously how I can test drive it. I found nodeunit which seemed to be a good testing framework candidate.
read more »
September 7, 2011 – 8:08 am
As I mentioned in my previous entry, the goal of my sabbatical is to build a JavaScript Application. Notice the emphasis is on Application. That is, I don’t intend to build a JavaEE web application with plenty of JavaScript. The goal is to build an Application in the browser. It will probably (eventually), communicate with a server side component for persistent storage and synchronization but for now, that’s secondary.
read more »
August 26, 2011 – 6:31 am
It has finally started. My sabbatical. In April I decided that I needed some time to step back and try some things my own way. I told my current client that in Q3, I would not be available. A lot of Q3 has passed but, as of this Monday, summer in Sweden is over and our two daughters are back at school and daycare which means I can actually start.
read more »