web 2.0

Open Data Protocol AKA OData

I have been hearing the term OData a lot lately but I had no idea what it really was. So I did a little searching and stumbled upon odata.org. OData or the Open Data Protocol is a new format for sharing data on the web using REST (Representational State Transfer). The text book definition of OData from the website is as follows: The Open Data Protocol (OData) is an open protocol for sharing data. It provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value. At the heart, OData is really just producing an ATOM or JSON payload. Since ATOM and JSON are universally known, OData is not tied in any way directly to the .NET family of languages. OData already has ... [More]

Getting Started with LINQ to XML

I recently announced the WeBlog project. WeBlog is a blogging platform which will support multiple data providers. Out of the box I plan on offering SQL Server and XML support. Most people like the XML option because it drastically reduces web hosting costs. The only problem with XML is that it can be painful to work with. In general, XML makes me want to pull my hair out! When building a blog you have a few basic entities that you need to deal with. Most typical blogs have posts, categories, tags, users and roles. Therefore I made an XML file to represent each of these items. However, for this tutorial I will focus on parsing the XML for categories. For a point of reference here is the XML structure that I am using to store category information:   <?xml version="1.0" encoding="utf-8"?> <categories> <category id="19770e74-9ec9-4cde-b2ab-e5051aaaf348" description="Posts about my adventures with WeBlog" par... [More]

Building a Dashboard Using The Microsoft Chart Controls

Most experienced developers will tell you that end users tend to "judge an application by its cover". In other words, they don't care how long you spent building an application or what techniques you employed to build it. They are only concerned with how it looks. I can recall a few times in my life where I spent many endless days and nights building an application just to meet a deadline and the first remark from the end-users was "can you change the color of that label" or "can you put our logo on the main page". They don't care that the application meets the specifications or that the project was on time and under budget, that was expected. They are more concerned with the way things look. In my current job, I built an ASP.NET MVC application to track server inventory. Overall the application is a huge improvement over the previous tracking tools. Which by the way, consisted of a few excel spreadsheets stored on a remote file share. Strangely enough, t... [More]

The Missing LINQ - Beware of Generated Code

LINQ (Language Integrated Query) to SQL is a great tool because it allows developers to concentrate on business problems instead of worrying about writing SQL. Unfortunately, generated code typically comes with a catch. My general rule of thumb is that "I never trust any tools that have a wizard or generate code". After all, every time you release code into production you are putting your reputation on the line. Therefore, don't you think it is important to know what your code is really doing under the covers? Since I started getting involved with Database Administration about 3 years ago I have become extremely conscious of the SQL that my code generates. After all, most database performance problems stem from the fact that developers test on empty databases and everything seems to work fine until millions of records trickle into the system. Then ugly problems like missing indexes, functions in the where clause and poorly written queries bubble to the surface. The occurrenc... [More]

LINQ for JavaScript Lovers

LINQ was a major advancement in programming. Traditionally when you wanted to find a few items in a object collection you would write a loop and inspect the properties of each object and then return the items that matched. This was cumbersome and often resulted in the developer writing a lot of functions to return objects based on different types of searches. LINQ solved this problem completely because now you can use a SQL like syntax to return objects from a collection. LINQ comes in many different flavors, there is LINQ to SQL, LINQ to XML and LINQ to entities. However, today I ran across a project called jLinq, which is LINQ for JSON!. JSON stands for JavaScript Object Notation. JSON is simply a way to serialize object(s) to a string so they can be marshaled and eventually consumed by the client. For example here is the JSON string representing a Person: { "firstName": "John", "lastName": "Smith", "address": { "streetAddress": "21 2nd Street", ... [More]