Posts from ‘C#’
If you don’t know much about prototypal inheritence, no worries. For starters, check out Douglas Crockford’s super-short germinal article on the subject. Then, watch Crockford wax prototypical in this excellent (albeit somewhat boring) Yahoo presentation. Then, if you’re still hungry for more, read the Wikipedia article about Prototype-based programming here. And, finally, if you’re a fan of example-based learning, go ahead and watch this excellent Google video on Advanced JavaScript techniques.
Since we’re taking a quasi-TDD approach to this project of ours, we should create our tests as an extension of the design work that we’ve slaved over thus far, and not as a response to the site functionality that we’ve already created (that’s why we haven’t created anything yet, or, at least, that’s my excuse!).
So, yesterday, I posted what I believed to be a fairly banal post about the benefits and the possible dangers of using the new dynamic type in C# 4.0. Ultimately, when I encounter something new like generic types, I try my best to approach the foreign object (pun intended) with a touch of negative capability.
If you’re comfortable with javascript, python, ruby, or any other dynamic programming language for that matter, the new dynamic type in C# 4.0 shouldn’t be too much trouble to understand. In fact, I think I can sum it all up in three lines of code (well, not really).
To finish off my Partial Modal Popup series, I promised a demo. Without further ado, I’ve included the demo here for your downloading pleasure. Enjoy. And please let me know if you have any issues.
In my previous post, we built a modal popup that grabbed its contents from a good old-fashioned MVC partial. In this post, we’ll go a step further. We’ll handle a form submission in our modal popup, and, when necessary, we’ll update the modal popup with validation messages sent back to us by the server. It doesn’t look like much, but it’s a technique that takes a little tender love and care.
Want to render a partial as a string in Asp.Net MVC? Join the f’ing club.
I had a lot of trouble getting any of my more complex partials to render as strings. Thus far, this is a modification of a great post I found, and it’s the only solution that has proven to be flexible. I’m super-flexible, so I require the same kind of elasticity in my computer programs.
We’ve already created two T4MVC extensions. Thanks to David’s support, I shall soonly be submitting these changes to MvcContrib for possible inclusion. If you’d like to quickly catch up on this project, I’ll start this post by adding a summary of the extensions we’ve made thus far (click on the links if you want to learn more). After that, I’ll dive into something new.
To start, check out my first post about T4MVC, here. Our current T4MVC journey (i.e. “Creating explicit ActionLinks”) will be a wee bit more intensive than our previous magical journey (i.e. “Explicitly Rendering Partials”), so my first T4MVC post is a good place to start.
Yesterday, I introduced Zippy. Today, I gave Zippy some serious wings. After taking a look at Justin Etheredge’s Project Formerly Named Bundler (i.e. PFNB), I was inspired to add some Bundler-like functionality to Zippy. As I said in my last post, Zippy is definitely not a full-fledged, complete, fly-off-the-shelf bundling framework like PFNB, but it’s definitely a tool that could be used by anyone who might need a little more control over their, uh, bundling. Truly.

