Category Archives: Tech

CSS Optimization with Google Chrome Developer Tools

After spending a little time searching for CSS Optimization solutions, I was pleasantly surprised to learn that one was bundled in Google Chrome’s Developer Tools.

I like to start web projects with boilerplates or bootstraps like Twitter’s, and then I spend hours cleaning-up the unused selectors.

Now, I just:

  1. Navigate to the site in Google Chrome
  2. Hit ‘F12′ to access the developer tools
  3. Select the Audit tab
  4. With ‘Web Page Performance’ checked, hit the ‘Run’ button
  5. A list of unused selectors FOR THAT PAGE is available.

    UnusedCssRules

I did run across solutions that would automatically produce a clean version of the stylesheet for you, like Mincss, but I’d much rather do it manually so that I can see what I’m removing.

A simple definition and example of a POCO object in .NET

It shouldn’t be so difficult to find an article on POCO that actually explains what it is and gives an example. So to make the world a better place, here ya go:

(From Wikipedia)
Plain Old CLR Object or POCO is a play on the term POJO, from the Java EE programming world, and is used by developers targeting the Common Language Runtime of the .NET Framework.

Similar to the Java context, the term is used to contrast a simple object with one that is designed to be used with a complicated, special object frameworks such as an ORM component. Another way to put it is that POCOs are objects unencumbered with inheritance or attributes needed for specific frameworks.

So what does this mean?

A POCO object is one that doesn’t rely on a framework to exist. For example, a WebForm object relies on the Web.UI.Page object which relies on an entire ASP.NET framework and therefore is not a POCO object.

What different does this make?

Well, if I’m writing a WCF Service that I want to return an object, it wouldn’t do much good to return an object that relies on a framework (or contains abstract methods or properties that point to nothing outside of the original environment) that the consumer may not have access to. But, if I create a simple object, such as one that contains mostly properties and a little business logic, I can easily return this from a WCF Service and use it in pretty much any application I want (Web, Desktop, Windows Service, Silverlight, other WCF services, …).

This is my understanding and I welcome further input.

A simple definition and example of a POCO object in .NET

It shouldn’t be so difficult to find an article on POCO that actually explains what it is and gives an example. So to make the world a better place, here ya go:

(From Wikipedia)
Plain Old CLR Object or POCO is a play on the term POJO, from the Java EE programming world, and is used by developers targeting the Common Language Runtime of the .NET Framework.

Similar to the Java context, the term is used to contrast a simple object with one that is designed to be used with a complicated, special object frameworks such as an ORM component. Another way to put it is that POCOs are objects unencumbered with inheritance or attributes needed for specific frameworks.

So what does this mean?

A POCO object is one that doesn’t rely on a framework to exist. For example, a WebForm object relies on the Web.UI.Page object which relies on an entire ASP.NET framework and therefore is not a POCO object.

What different does this make?

Well, if I’m writing a WCF Service that I want to return an object, it wouldn’t do much good to return an object that relies on a framework (or contains abstract methods or properties that point to nothing outside of the original environment) that the consumer may not have access to. But, if I create a simple object, such as one that contains mostly properties and a little business logic, I can easily return this from a WCF Service and use it in pretty much any application I want (Web, Desktop, Windows Service, Silverlight, other WCF services, …).

This is my understanding and I welcome further input.