Thursday, July 31, 2008
Wednesday, July 30, 2008
Tuesday, July 29, 2008
Monday, July 28, 2008
Friday, July 25, 2008
Thursday, July 24, 2008
I am highly abstract, but generically planned.
A superclass can localize your common behavior,
but there is plenty of room for you to command.
a. Template Method
~/riddle by me
Wednesday, July 23, 2008
I was very pleased with the code of my MVC application, but the presentation was so 1990's. With all of this new technology I thought the presentation deserved something snappy. That is when I found Flexigrid.
As I mentioned in my last blog entry, I started to use jQuery. To my joy, Flexigrid is a jQuery plugin! Flexigrid uses jQuery to asynchronously populate the contents of the grid using either XML or JSON input.
The following is an example of what the grid looks like. It contains features to sort, page, search, move columns, resize, etc…
The User Interface portion was pretty straightforward to put together. You just need to define your columns, the data source, and some additional parameters (such as: search terms, size, etc…).
I wanted to use this opportunity to try out some new features of .NET 3.5, so I wanted to incorporate LINQ and JSON serialization.
To do this, I needed to setup some classes that the Flexigrid will recognize once serialized. Here is what I came up with.
Now is the part where the fun begins. I had already retrieved the content I needed from the Middle Tier. I use LINQ to query the generic list to obtain the correct page subset and then use a helper extension method to serialize the contents to JSON.
Here are some helper extension methods that I used to complete the above code snippets.
I would prefer if the developer of the product had a better system of tracking bugs and maintaining a forum, but in the meantime what is setup is sufficient.
I can be your design of choice.
I can organize your requests
or back them out, it's your choice.
Each object has it's parameters
That tells them how to act.
I am made of generic components;
Each one defines their internal pact.
~/riddle by me
Tuesday, July 22, 2008
Monday, July 21, 2008
jQuery was able to simplify some of the things I would have had to write nasty looking View code otherwise.
For example, I wanted to alternate every other row in a table with a different color. To do this in the View I initially created a counter variable and did a mod 2 to apply the CSS class. Once I integrated jQuery I was able to remove that messy code throughout my entire View and just replace it with…
After I got a little familiar with jQuery I branched out and used it to create an accordion navigation menu with little effort.
There are several other helpful areas in my ASP.NET MVC application that I found jQuery to be very convenient, efficient, and resulted in a cleaner code base.
If you haven’t used jQuery before I highly recommend you check it out.
The future of ASP.NET AJAX can be found in the Roadmap document hosted on the CodePlex website.
The preview 1 release contains somewhat complete versions of the following features
- Client-side template rendering
- Declarative instantiation of behaviors and controls
- DataView control
- Markup extensions
Feel free to download the preview yourself and kick the tires.
For those of you who like a visual representation of your commonly used types and namespaces, then you are in luck! Microsoft has conveniently created a nice poster highlighting Microsoft Framework 3.5.
Feel free to download the full copy from their website.
Friday, July 18, 2008
Thursday, July 17, 2008
Wednesday, July 16, 2008
Tuesday, July 15, 2008
Tuesday, July 08, 2008
Monday, July 07, 2008
Thursday, July 03, 2008
Wednesday, July 02, 2008
if you want to play with me.
I am inferred and created by the compiler;
before you know it I will flee.
Intellisense can pick me up and see me;
I am only readable inside.
I am useful when using LINQ;
where will you use me? You decide.
a. Anonymous Types
~/riddle by me