Posts

MVVM Project update and some ICollectionView weirdness

MVVM Project Update Aside from the fact that it took me 10 minutes to find a way to log into my blogger account and post this...my MVVM side project is going pretty well. For those of you who want a sneak peak, go here .  It even works to some degree (seriously!).  Of course, it's a tool that is only relevant to developers such as myself, but hey, it's something. It is (going to be) a source control monitoring program that will give you nice little tray popups for any new commits on any repos you are monitoring.  Right now, it is only functional with SVN, but it will be readily extensible.  And the tray popups aren't there yet, either...but you can view history and even diff changes in the main window. ICollectionView Problem One tidbit I wanted to share here was something I learned about the ICollectionView.  This interface is extremely handy to watch collection changes initiated by a user in your viewmodel and I've used it a bunch of other places...but...

MVVM Series: Introduction

My head hurts just thinking about MVVM... There's quite a lot of rhetoric out there about what MVVM is and how to best implement it.  And the hard part is that a lot of it is correct, even though seemingly at odds at times.  To add to the confusion, I put forth my own opinion that, as with all true engineering efforts, you need to use your brain and do what works best for you, your team, and your products. This the heart of MVVM to me - MVVM is simply a pattern that can be used to make your software of a higher quality and more reusable and resilient to layer/requirement changes.  Use it as best suits your needs.  Forget about what you may hear or read about the 'rules' or 'laws' or MVVM - there are none.  It's a pattern.  Nothing more.  Some people say that you should have no code-behind, ever.  Some say you can.  The correct information is that there are no rules about code-behind or anything else, because it is...just...a...pattern, n...

MVVM Training extension

MVVM Training extension Just wanted to add my own kudos for this extension.  Whatever works for you, works well.  Hopefully this extension works well for some people.

Getting back on the saddle...my own MVVM framework

Let's face it. I've been lazy. It's been nearly two years since I posted any technical wonders (yes, that is tongue-in-cheek) I've stumbled across, which is a shame because there have been many.  Since my last post, I had moved on to Silverlight 3 (at the time) and worked to about 80% completion on an online radiological image viewer. If completed, it would have been the first in the world (as far as I could tell) to enable a physician to view radiology-grade (meaning uncompressed with no degradation) images in a web browser. Alas, I found a new job before I could finish it, and have since moved on to pure WPF using MVVM, Prism, and the Cinch framwork with MEF, with some unfortunate Winform upkeep and 3rd party integration (in C/C++). So, why post now after so long?  Well, the reason is in part because of the continuing responses to a couple of my posts, mainly the altered Levenshtein algorithm post.  I enjoy helping when I can. Another reason is that new job...

Moving on to Silverlight...

As much fun as it has been to code almost exlusively in ASP.NET with jQuery, I'm moving on to Silverlight 4.  I've actually be working almost exclusively in Silverlight for the past 2 - 3 months, and I love it!  We are using the MVVM design pattern with Prism.  MVVM and Prism (or another IOC) with Silverlight/WPF are an absolute must for complex business apps.  I don't think I have ever absorbed new technology like I have with Silverlight.  Delicious. Anyways, my next several posts will be focusing on Silverlight, with many MVVM-focused posts, and some other stuff as they come (learning and mastering SQL is a lifelong process apparently...) like: Stackpanel with Image size gotcha Mouse event commanding in Silverlight Creating custom attached properties and binding them to your viewmodel Popup and childwindows in Silverlight w/ MVVM - my own take on this subject A good case for temp tables over table variables in MSSQL Lots of fun stuff here, and more t...

The hidden workings of __doPostBack - Full or Partial Postback?

In experimenting with how I could manually create a partial postback, I ran into some odd behavior.  I was using the old '__doPostBack('target', 'argument')' javascript call to perform the post back and that was all well and good, but I noticed that my page was doing a full post back instead of a partial each time. After digging around for a bit (where would software development be w/o Google search?), I found this tidbit here (I'm always grateful when others have spent a few hours finding little programming nuggets to share - less time searching for me): __doPostBack starts by trying to retrieve an element in the client DOM with the corresponding ClientID to the UniqueID you pass as the first argument to __doPostBack. (it translates the UniqueID to a ClientID by replacing the "$"s in the UniqueID with "_"s) If it finds a corresponding client element, it searches up the DOM for a parent that has the same id as an updatepanel (it kee...

Unobtrusively change/wrap the onclick event handler in jQuery

In designing a user control that does quite a bit of UI manipulation to an ASP.NET page on the client-side of things, I ran into a bit of trouble in using a 'wrapper' onclick handler for a GridView row onclick event.  I will be putting this user control on many pages and did not want to couple the control to the page, or at least I wanted to minimize that coupling as much as possible. Ultimately, I was left with two choices:  manually change the server-side injected javascript for the row's onclick event on every page, or find a way to do it in the user control.  The user control uses the jQuery library, so I was in luck.  When I say I want it to be unobtrusive, I mean I want to execute whatever code the row's event handler has been coded to execute, but under the inspection of my user control (i.e. - to only do so conditionally). My user control injects a new column into the GridView when a certain mode is introduced, which column is purely independent of the re...