Skip to main content

Posts

Showing posts from September, 2008

Going Bad with UI Prototypes

This whole month went busy at office, it was challenging work, made a number of mistakes and I am happy to say, by the end of the day I learnt out of it. I was tyring to get the module working with little knowledge of what the requirment was, this led me to lot of re-work and most of the time was spent discussing with the team what API should be given and how things should be done. Now I think it would have been better if we could have understood what we were really building. I have been developing the front end, most of the time it invloved only UI logic, the only thing that I had to do was, make service calls, get the data and display it, the requirment was based on a document that provided what the UI should provide, that was easy...I started designing the the UI, got a bunch of APIs from the service team, and started filling in, what I did not understand was the whole idea behind the requierment. As days went on, issues started to rise, and I had to sit with the service team and as

Dynamic Language Runtime (DLR), IronRuby and Advantages

What's being popular out there right now is something called IronRuby, which is an implementation of the Ruby language in .Net, which is built indirectly on top of the CLR. So let’s talk a little about how IronRuby fits into the .Net world, something that you should know at this point is that Microsoft is building a common platform for dynamic languages called the Dynamic Language Runtime or DLR for the short, which runs as a service on top of the CLR. DLR provides common functionalities like MSIL generation, GC, so that dynamic language implementers can focus on the implementing there dynamic language on top of this without worrying about the “gooing” part to the CLR. All that the language implementer needs to do at runtime is to parse the language, tokenize it and create a tree structure containing the expressions and statements and pass it on to the DLR. At the next step the DLR is going to generate MSIL from these trees, and the MSIL would execute under the CLR. Some pretty in

Don't Try To Handle What You Cannot Handle

One thing that came up last week was that the sorting on one of the paged grid did not work, ok…so we were hunting the bug down, but lucky something popped up in the log file and saved the day. Clicking on the sort headers, makes a service call to retrieve the sorted data, and the UI code was written in such a way that the service call is trapped inside a try-catch block, and if any exception occurred, the exception is logged and empty data returned. And unfortunately the service query had a bug on it. So which brings me to the point, you should catch exceptions only when you can handle it, for example, you might have anticipated that a DuplicateNameException would be thrown, well go ahead, catch it and show a nice message to the user, but if you cant, don’t put it inside a catch block and bypass the exception just for the sake of not crashing the UI. If you really want to log it, fine, log it then remember to re-throw the exception although re-throwing as its own performance cost. And