So, as most of you know, I have an ASP.Net MVC framework: BarelyMVC. What some of you may not realize is that the big way I "test" both the design and actual implementation of BarelMVC though is by upgrading this blog to use the latest version. Recently, BarelyMVC has seen some very drastic breaking changes that are finally starting to calm down. Technically, I could keep my blog working how it is as most changes aren't truly breaking. However, the changes I've made have been to make things infinitely easier. To migrate this blog over to use the new way though is nearly a rewrite excluding the data-model.
So, what's so awesome about creating my own framework and using it in my blog in semi-real-time?
- Something inconvenient comes along. Instead of googling for workarounds, you can fix the core problem then and there
- See an example of unexpected behavior. See above
- My blog is basically a live example of the features of BarelyMVC and how to write code with it idiomatically
Now what sucks of course:
- Breaking changes are common in pre-1.0 releases. Sometimes it can be as drastic as requiring major rewriting of my blog (such as the recent changes)
- You have no support forum. You are your support
- Performance can be fun. You have no one to blame but yourself if your site is slow
- Managing constantly changing binaries in source control sucks
All that said, I'm finally to the point with BarelyMVC that it's actually getting close to v1.0 status. The API has come from "hey use bare ASP.Net stuff for most stuff" to "heres a one line function to do that WITH static typing". Big improvements since I've decided my blog will nearly have to be rewritten are these:
- Route and POST Form models. Fill in classes from route parameters and form values to access them in a statically typed manner
- The view engine now includes unit tests and is much less "shakey" (along with a few features and bug fixes)
- FSCAuth got a "ProbablyLoggedIn" property for use in views. For instance, I'll use it here to display things such as delete links for comments. This prevents having to round-trip to the database for stuff that is only aesthetic and not really a secret
- Individual methods possible now for each route(rather than one big
Get). (note: still no attribute magic and still statically typed)
- Simplistic constraints on SimplePattern's route parameters (such as must be alphanumeric)
So basically, in the end, my blog's code quality will improve by approximately 20000%. Some examples that have already happened:
- Significantly less code duplication
- I can use ONE model for both MongoDB's database and the Form values posted from the edit page. No more
So in essence, it's taking much longer than I expected to make it all happen, but when it's done it'll be awesome.