Blog

Posts written in June 2013.

  • Published on
    -
    1 min read

    A Hidden User Control Is A Running User Control

    I've been a .NET Developer for around 6 years and it still amazes me how I can overlook something that I never really questioned. For example, when a user control is hidden, I always assumed that all the code it contained would never run since until it was made visible.

    However, after being told by one of my work colleagues that in fact a hidden user control will always run, it will just simply is hidden by the client. After searching the web for a definitive answer, I found a StackOverflow post that fully backed up his theory: http://stackoverflow.com/questions/12143693/hiding-user-controls-using-code-behind-does-internal-code-still-run-ie-am-i.

    As the StackOverflow post suggests, the most performance efficient way to show/hide a user control is by dynamically loading it in when required.

    if (jobs.Count > 0)
    {
         MyPlaceholder.Controls.Add(Page.LoadControl("/Controls/Listings/JobsList.ascx"));
    }
    

    As you can see in my example above, I'm loading my user control to a place holder in the page.

  • Even though my programming weapon of choice is .NET C#, there are times (unfortunate times!) where I need to dabble in a bit if PHP. Being a .NET developer means I do not have the setup to run PHP based sites such as Apache and MySQL.

    In the past I have tried to create an Apache configured server but I could never get it running 100% - possibly because I didn't have the patience or could justify the additional time required for setup when I could be working on a PHP site once in a blue moon...

    Last year, I came across a program called EasyPHP that allowed me to install a local instance of Apache and MySQL altogether in just one installation. It made it really to get up and running without all the setup and configuration hassle.

    Once installed you can create numerous websites and MySQL instances in a version of your own choosing. Wicked! I never been so excited about PHP in my life!

    I have only scratched the surface on the features EasyPHP provides and whenever I did need to use it, there has always been great improvements. Take a look at their site for more information:http://www.easyphp.org.

    So if you're a Windows man who needs to carry out PHP odds and ends, can't recommend EasyPHP enough.

  • A few weeks ago my Dad gave me my first mechanical keyboard. Knowing that I have a major fondness for anything that "lights up", he got me the "Ducky DK9008 Shine 2".

    The manufacturer wasn't kidding when they called their keyboard range "Shine 2". Soon as the keyboard is plugged in, things come to life and you are blinded by the most immensly bright blue light. Images on the internet will not truly justify how bright these LED's are! Thankfully, you have full control over the level of brightness and lighting modes.

    I'd be lying if I said that I've heard of the "Ducky" range of hardware peripherals until this point. Alas, I haven't. If the internet reviews are anything to go by, "Ducky" is well known in the mechanical keyboard market, providing a wide range of high quality and customisable keyboards. Nice!

    What's even better is the fact that I have the flagship model! I dread to think how much this thing costs...

    One thing I noticed after unboxing is the sheer weight. It's definitely one of the bulkiest keyboards I've ever handled. But this piece of hardware exudes quality and workmanship. Well this is something you'd expect from a top of the range keyboard that is on the higher end of the price spectrum.

    There has always been a misconception that mechanical keyboards are known for being stiff and produce a loud clacking noise. This couldn't be further from the truth with DK9008 Shine 2. This particular model uses the Cherry MX Brown switches, which produce a sharp response whether you are the kind of person that is a "heavy hitter" or who has the "lighter touch". Either way, the keys feel light to press with minimum effort and produce a nice satisfying "click".

    I've tried this keyboard for both standard typing and gaming. It's a great all rounder.

    One things for sure. Once you go mechanical you will never want to go back to the traditional membrane switch keyboard.

    For more info on the Ducky DK9008 Shine 2, take a look at their website: http://www.duckychannel.com.tw/en/DK9008_shine2.html

    And yes. This blog post was typed up using the Ducky DK9008 and I forsee all future posts will be typed up in the same manner. :-)

  • Published on
    -
    1 min read

    Goodbye BlogEngine. Hello Kentico!

    Kentico LogoFor many years, I've been a happy BlogEngine user. However, recently my website was starting to expand in a way that wasn't flexible enough for the BlogEngine platform. Don't get me wrong, BlogEngine is a great blogging platform and it is without a doubt one of the best out on the market. But the capabilities and features Kentico provides made moving over to another platform an easy decision.

    The future of my site needed something that would give me free reign and control on making full customisations myself in a solid framework, and Kentico seemed to fit this requirement.

    Having worked with the Kentico platform for quite a few years now, I was impressed by how easy or complex I could make a site. Most importantly, the page perfomance of my site has got quite a boost. For a site that doesn't look like is doing much at face value, it is behind the scenes.

    What was the migration process like?

    Migrating all my BlogEngine content into Kentico did take some time, but the Kentico Import tool really does take the hassle out of getting key blog post information into the CMS. Just don't be expect tags and categories to be imported in the process. Migrating these facets is a manual job.

    In addition, I decided to overhaul the friendly URL's used for my blog posts in keeping with the URL structure provided by BlogEngine. Even to this day, I'm not sold on the way Kentico generates it's friendly URL's for blog posts. For example:

    /Blog/February-2013/My-Blog-Post.aspx
    

    When it should be the following format:

    /Blog/2013/02/03/My-Blog-Post.aspx
    

    Luckily, it was pretty easy to write a Custom Eventhandler to add additional custom URL paths whenever I update or insert a new post (will add a post in the near future on how to do this).

    I still have some additional features to add to this site (and dare I say fixes!) so watch this space...