Telerik blogs

Latest

  • Productivity

    To leak, or not to leak…(memory) - Part Two

    As I have mentioned earlier (see "To leak, or not to leak…(memory) – Part One") the closures are the most common reason for memory leaks in Internet Explorer. They are extremely good at forming circular references especially in the context of Host objects. The most common example is event handlers “owned” by a Native object which are attached to a specific event raised by a DOM element and hold a reference to that DOM object kept in the Native object. Example:DOMElement.Event ->  NativeObject.EventHandler -> current execution context scope -> NativeObject. DOMElementRefference -> DOMElement Very frequently websites and web applications with a rich UI include components which produce...
    May 27, 2021 4 min read
  • Productivity

    Migration to Visual Source Safe 2005

    A few weeks ago a couple of colleagues and I established that our source control system (VSS 6.0d) needs to be updated. There were numerous issues that were plaguing our daily struggle with Source Safe – slow speed, frequent crashes and file corruptions. Naturally we began looking for alternatives of the aging software (version 6.0 was originally released with VStudio 6.0 and was only patched a bit with the release of VS.NET in 2002). In a nice bit of synchronicity with our efforts, Visual Studio 2005 was just released and introduced a brand new version of Source Safe (it was internally...
    May 27, 2021 3 min read
  • Productivity

    To leak, or not to leak…(memory) - Part One

    As a newbie blogger perhaps I should have started with a brief info on who I am and should have continued with a post extending my best wishes for Xmas and Year 2006. Nonetheless, I thought it's a better idea to post some technical content that might be of use to our community. Perhaps the info will benefit some of you and will let you spend Xmas Eve with your family, rather than sit in the office trying to fix problems for which our team has found solutions. Ever been shocked with how much your memory usage grows on every refresh...
    May 27, 2021 3 min read
  • Productivity

    Code complexity and metrics

    My name is Vladimir Milev and I am a software engineer at telerik. I would like to talk about code metrics in my first post on the company blog. The r.a.d.controls suite has come a long way and features a lot of components. This has come at a price though – increasing complexity of the code. Code complexity is measured in different ways, however, the most commonly acclaimed metric is called “Cyclomatic complexity”. It was introduced by Thomas McCabe in 1976, and it measures the number of linearly-independent paths through a program module. The score is determined by the following...
    May 27, 2021 2 min read
  • Productivity Testing

    Poor man's ASP.NET testing

    Sometimes you have a simple page with some web controls on it.  You would like to have a simple way to make sure that the text of a status message is exactly the one you expect.  Well, it turns out that the .NET class library has a real gem that can help you.  The System.Net.WebClient class helps you request pages, post data, upload files with a simple interface.  Getting the page contents is easy: [Test]public void GetPage(){   WebClient client = new WebClient();   using (Stream dataStream = client.OpenRead(pageAddress))   {      XmlDocument document = new XmlDocument();      document.Load(dataStream);       XmlNode label = document.SelectSingleNode("//label[@id='nameLabel']");      Assert.AreEqual("Name:", label.InnerText);   }} I have taken some extra care to return valid XML,...
    May 27, 2021 2 min read