Revamp

I’ve decided to start working on a custom-built platform for this website, if only for education (and, let’s face it, some degree of entertainment). WordPress works just fine but it feels vaguely alien to me, as I am a .NET developer at heart. I’ve started compiling a list of technologies that I’d like to include / use for this process and I thought this would be a good place to list them, if only as a declaration of intent:

    ASP.NET MVC
    NoSQL (RavenDB?)
    HTML5
    Knockout.js
    GitHub (will be open-source)
Last night, I went ahead and ordered a new license of Windows 7 for my Macbook Pro (I had transferred the only license I had to my home server some time ago), set up Visual Studio 2010 w/ Resharper, and am looking at a 4 hour-long bus ride up to Boston this afternoon. I plan on getting a few things started.. hopefully, I’ll keep this blog updated as I go.

October 21st, 2011 in Revamp | No Comments »

Visual Studio 2010 Snippets for MVVM

A couple of weeks ago, I looked up how to create your own snippets in Visual Studio 2010 and was pleasantly surprised at how easy it was. I had grown tired of typing out / copy & pasting code in my WPF / MVVM project for observable properties and RelayCommands (which already cuts out a lot of redundant code) and so created two rudimentary snippets.

The first, whose trigger is oprop, is for observable properties. These are simply properties that have a private backing field and call OnPropertyChanged in the setter. Example:

1
2
private int _prop;
public int Prop { get { return _prop; } set { _prop = value; OnPropertyChanged(“Prop”); } }

The second, whose trigger is cmd, is for RelayCommands. I took a few stylistic liberties with this one, so it may not be as much use to you as it is to me. Example:

1
2
3
4
5
private RelayCommand _nameCommand;
public ICommand NameCommand
{
get { return _ nameCommand ?? (_nameCommand = new RelayCommand(param => Name())); }
}

I went ahead and zipped up the two .snippet files, but WordPress strictly prohibits uploading such things so I’ve added “.txt” to the extension. To use them, download the file, rename to “snippets.zip,” uncompress the file, and then add the two separate files to your snippets directory. Feel free to open the snippets themselves and tweak to your liking.

EDIT: WordPress added an additional “.zip” extension to the file- how bizarre. Directions are the same though- just rename to “snippets.zip” post-download.

snippets.zip


November 27th, 2010 in WPF | No Comments »

A Very WordPress Weekend

For the needs of many businesses, a static website is suitable, albeit not exactly engrossing. For a full-time software engineer / web developer, though, the expectations are slightly different- you’d better have a nice website, and it’d better work. I’ve had a mostly static site up for several months now (it dipped into MySQL for a couple of things) and I just recently decided that it wasn’t sufficient. I liked the design but wanted to do more. My first requirement was for it to have a blog.

After a few weeks of mulling over the idea of using Ruby on Rails (an exciting framework but with a foreign feel to me) to power the website, I sat down this afternoon and started doing some research. Unless I wanted my website to be lame and largely broken, hand-rolling my own blog or CMS platform with RoR was out of the question. I found a few pre-existing frameworks that seemed to do the job, but ended up frustrated at some vague console exceptions that I really didn’t feel like researching. At one very low point in the early afternoon, I even considered scrapping everything even remotely familiar to me and reading into Django, but a cup of coffee brought me back to my senses and I made a pragmatic, albeit slightly disappointing, decision.

I went with WordPress. Don’t get me wrong, it’s a stable system that has not only stood the test of time, but has also served as an invaluable tool in my myriad side projects. It’s just that it’s a little boring. And it feels absolutely gigantic, maybe because it seems that backwards compatibility constraints bring along with them great pools of unwanted overloads and method calls. But it works, and works well.

And I don’t have that much free time to play with. I’m still curious about RoR (and, yes, Django also, along with a thousand other open source frameworks) but, for now anyway, I’m sticking with what I know. And what I know is WordPress.

All that said, I’ve done a fair bit of refactoring today and have likely created some bugs that have yet to rear their heads. My apologies for these ahead of time.


November 27th, 2010 in General | No Comments »