Creating Advanced ASP.NET MVC Controls (Part 2, Finished Debugger)

Purpose

As mentioned in the previous post, in order to create good client side controls that interact well with the ASP.NET MVC system, we need to have a way to visualize data that the control either generates, or passes to the controllers. I found this difficult to acheive in IE as well as Firefox. I did not need/want all of the complexities of Firebug or IE’s Developer tools (which are great btw). I just wanted to see my data! The problem with the previous version of the debugger was that it was too dang simple! If I were to use it like this:

_('Test').clear()
    .write('(Simple)')
    .set(complexArray)
    .write('(Complex Array)')
    .set({ one: { a: 'Hospital', b: 4, c: {x:3,y:5}}, two: 'test'})
    .write('(Complex Object)')
    .set(function(arg) { alert('HI!' + arg); })
    .write('(function)')
    .set({ one: new Array('Happy', 'debugger', 'array'), two: 'test'})
    .write('(Complex Object)')
    .set(
        new Array(
            new Array(
                {a: 1, b: 2, c: 3},
                {a: 4, b: 5, c: 6},
                {a: 7, b: 8, c: 9}), 
            new Array(
                {a: 'one', b: 'two', c: 'three'}, 
                {a: 'four', b: 'five', c: 'six'}, 
                {a: 'seven', b: 'eight', c: 'nine'})))
    .write('(Complex Array)');

});

the debugger would simply not be good enough!

Read more →

Creating Advanced ASP.NET MVC Controls (Part 1, A Debugger)

Purpose

In previous posts, I started creating an html grid helper that was really just an experiment to see how one would accomplish such a thing. Here, I wanted to delve into a more generic approach to creating html controls for the ASP.NET MVC paradigm that would accomplish the following:

  1. be highly interactive on the client side, while
  2. minimizing the client-server interaction
Read more →

Upgrade to BlogEngine 1.5

Read more →

Proper Syntax Highlighter

The Beef I’ve found myself often looking back through old posts (the few I have) and being seriously fed up with the various and sundry cheesy syntax highlighting I had used for code. In that spirit I finally decided to get a proper one. The one I finally decided to use was SyntaxHighlighter written by Alex Gorbatchev. I liked it so much I actually went back to all my previous posts and “corrected” all of the cheesiness.
Read more →

JQuery MVC Form Helper

Simple Form Helper

As I continue to use JQuery and MVC I am completely impressed with how much you can do with very little. I know the new preview 4 came out with an AjaxForm helper. I could not resist, so I made my own and added it to the whole controls project I’ve been working on. (I have not forgot about the grid, but I’ve gotten a little bored of it for the time being although I do want to finish it…). So here is the idea:

  1. Have complete control over HOW the form is rendered
  2. Be VERY light (I attached the whole thing to the onSubmit attribute on the form)
  3. Make it fast (it took me like a half an hour or so)
Read more →