Hefeng is the new Component Development ChampionFriday, June 29, 2007 After three days of on-site finals, hefeng emerged as the winner of the 2007 TopCoder Open Component Development competition, taking home the top prize of $15,000. PE came in second, and cnettel took home the third. Wednesday, June 27, 2007 This component, by offering to uniformize the handling of the data within a web application, has the potential to save its users many development hours. Even though simple in appearance, its developers needed to pay special attention to minute details. And the opportunities were many to create a difference with the other submissions. One of the most exciting things about one of the submissions was the way it avoided the traps presented by the multithreading aspects and managed to add some efficiency to the designer's algorithms by finding workarounds to reflection's pitfalls. It should be interesting to see what usage this component is put to in the following weeks. Thursday, June 28, 2007 The AJAX Customizable Page Layout component provides an AJAX-based mechanism for use with web applications to give the ability for a web application user to customize the layout of a page by dragging and dropping content sections. The component consists of custom controls that implement the movable sections, and server-side objects that handle AJAX-based notifications of customization actions by recording them in a persistent store for use during subsequent page views. The movement of sections is supported by the client-side JavaScript classes. Yes! C# developers had to write JavaScript code here. Actually this part could be identical in Java and C# versions but designers used different ways of interacting with the underlying TopCoder JavaScript Drag and Drop component. In the C# version, the designer suggested developers explicitly control the absolute coordinates of the movable sections. In this case when any action occurs we need to manually rearrange elements. It includes calculation of parent's absolute coordinates and relative position of each section within the parent. But JavaScript functions have different behavior depends of the browser (we need to support IE and FireFox) and page mode (quirks or strict) and it is not easy to make all these things workable. The other common challenge came from the fact that developers have to recalculate positions not only after the layout change but after other events (load, resize) also. In the Java version developers didn't work with coordinates at all but instead swapped elements in the DOM. It is much easier and requires less effort to make the component workable. Compared with JavaScript, the implementation of the custom controls and server side objects was straightforward and relatively easy. Friday, June 29, 2007 The Stress Test component provides a framework for defining and executing stress tests. The tests can be running on multiple threads with flexible scheduling options. Both designs (Java version and .NET version) are very clear and the implementation notes for most methods and algorithms are detailed. Developers should pay attention to thread safety, since most submissions had thread safety issues. In the test runner class of the .NET version, the original design uses the .NET framework API, which cannot handle more than 64 threads. One submission made improvements on this, and can use more than 64 threads to run the tests. Component Development: Scores & Wagers
|