March 25th, 2008 Rusty
I recently dove head first into Asp.Net MVC on a new project. I found the development workflow to be much faster than web forms and the MVC convention much more pleasing than the Asp.Net page life cycle.
Then I wanted to encapsulate a chart as a reusable control in my view. It needed view data that is different from the data needed by the rest of the page. I found myself adding the required data to the top level, strongly typed view-data class that I’d created for the page. I worked hard to provide mechanisms for loading only the data that I needed. My view data class was nothing more than an aggregator of other class data with formatting rules. Therefore, I wasn’t too disappointed with my solution though I felt there should be a better way to manage this without calling business logic from your view (component). Of course, you can call aything you like from Asp.Net MVC code behind, you just shouldn’t. This is the primary reason I liked Monorail’s nVelocity view engine. You were not at liberty to build c# in your view. Html was hardly distorted by procedural code. But I digress.
I just read a post by Miek Bosche about using Asp.Net MVC Component Controller. This fills the gap between passing the data you need in your page’s viewdata and messing up your architecture in the code behind of your component.
On the other hand, it does move some of the nuts and bolts to the back end of the train. There’s definitely the possiblilty that data access could gokaboom when your view has already begun processing. This violates my sense of values with MVC and I am interested in an alternative. For now, I think I’ll keep on extending tha page’s view data to incorporate everything the view needs, including components.
IMHO, once the RenderView has been called, there should be no possibility of further data aquisition or business logic. The view data should be prepared except for presentation specific details. I’m going so far in my view data to format my values so that the only thing left to do is color and size them. For example, all currency is formatted as such with large numbers represented in abbreviated forms. The view just <% = ViewData.Ticker.MarketCap %>. I really like that, it appeals to my sense for separations of concerns and provides the opportunity to test the details that have nothing to do with html.
Of course, ComponentControllers also provide the ability to test this and you could apply a convention that your ComponentController receives all the data it needs and then performs its preaparation logic on raw data. I just don’t like that it happens in the view.
Posted in Programming | No Comments »
March 13th, 2008 Rusty
I was just now surprised and delighted to see that BlogDesk has a nifty feature that MS LiveWriter does not (at least to my knowledge).
You can manipulate images and upload them from your BlogDesk interface.
Here are some examples:
Instant Image

Shadow (understands transparency)

Resize with
Paper Tear

grayscale

Thumbnailing is also supported.
I suppose I should go look to see what LiveWriter support…
p.s. set up your wordpress targeted blogdesk image upload to use “blog interface”
Posted in Blogging | 1 Comment »
March 13th, 2008 Rusty
Today, I was working from home, and I needed internet access and the ability to focus (at the same time). IOW, I could not work in my home.
My son woke up, this morning, feeling under the weather so I took care of him until my wife returned after her doctor appt. I got a just a bit done before my MacBook battery died. I’d forgotten to bring my power adapter home from work yesterday. I headed to the Apple store, purchased a new power adapter (why are they $80?) and headed to my favorite free wiki spot in Atlanta, Apres Diem.

I usually have Chimay Blue. In fact, I usually have two. They are not cheap but I get so much done when I sit there that I feel the value is exceptional.
If I go to a coffee shop, I always order a fancy coffee drink.
The point is that I usually give some business to the establishment that provides the access.
Now that I think of it, I may have actually been using the neighbor’s connection as the Apres Diem connection was up and down the last time I was there. My computer remembers its last instructions, after all.
That makes an article I found even more rediculous. It is possible to be cited for Hijacking free Wifi. In my opinion, you can’t hijack something that another person offers to give you <abbr title=”Free of Charge”>FOC</abbr>. However, cops will be cops and they get bored so…
Try to support free wifi by making a purchase every now and again. If you regularly sit outside a place in your car and use their free wifi, you might get in trouble.
I wonder if you can get arrested for eating samples at the grocery store without making a purchase or for filling up your bicycle tires at a gas station. I wonder if the poeple who wrote and passed the law related to using unsecured networks had anything worth while to live for at all.
Posted in Blogging | No Comments »
March 13th, 2008 Rusty
rihanna - umbrella
…don’t watch the whole thing. When you stop laughing, the joke is over
Posted in Blogging | No Comments »
March 11th, 2008 Rusty
I am developing for Windows using VMWare on a MacBook Pro. I use Msdn for access to all the O/S and Server products that I might be targeting as well as the Visual Studio IDE.
Having a dozen versions of Vista available wasn’t exactly helpful in choosing which to install. In the past, lower versions of an MS OS were just crippled or reduced functionality versions of the same core. Therefore, for my development work, I wanted something business appropriate. Vista Enterprise sounds like big business so I installed that rather than Vista Business.
Then I started receiving messages that "Vista Activation Error - 0×8007232B, DNS name does not exist". As it turns out, Vista Enterprise is designed to be activated using "kms licensing" against an internal enterprise licensing server. Well, I didn’t have one of those.
Fortunately, its easy to convert to a Mak based license. Obtain your mak-based product key from your Msdn product keys page (note that "Key Type" should equal "MAK") or contact Microsoft for your key.
Right click on "Computer" and choose properties.
Scroll down and you should see "Change Product Key".
click that
You’ll then have the opportunity to manually paste a key that will connect to the Borg Microsoft mothership.
Posted in Blogging | No Comments »