February 2009 Entries
I've finished implementing support in ASP.NET MVC for processing requests and rendering views using categories. Only things left now is to add extension methods that simplify the process of using categories, as well as finish implementing discoverability (i.e. SiteMapProvider).
In the future, I wish to also deal with inline page code. I find it rather ugly, as well as having no page designer support. Although I do not use the page designer to design my page, I do tend to use it as a "quick preview," as well I tend to work with others who require page designer support. I've gone...
Last night I had an idea for a different approach for grouping related controllers into a category that made so much sense, I'm surprised I was able to imagine it. The idea of actions being grouped into a controller parallels a set of methods being grouped into a class. Taking it a step further, grouping a set of controllers into a category would parallel grouping a set of classes into an assembly. Under this approach, each category would be created as a separate project, referenced back into the main web application. This has a few advantages over...
I was working on a method for making controllers, as well as their categories and actions, discoverable, and noticed a few Descriptor types. On the surface, they appear to provide a few methods and properties that make it much simpler to query information about Controllers and Actions than using Reflection alone. Obtaining filters, attributes, and even lists of actions from a controller, or lists of parameters from an action, can be made with a simple method call, rather than the possible many lines of using confusing Reflection methods. However, this isn't exactly the case; the Descriptor types are abstract, their...
In order to support categories of controllers in ASP.NET MVC, one must create a new controller factory. The IControllerFactory interface defines two methods to implement, CreateController, which passes in the controller name pulled from the route data, as well as the RouteContext itself, and ReleaseController, which occurs at the end of the request, allowing the controller to be freed. One limitation of CreateController method is that it only gives the controller name, but not the category name. This isn't much of an issue, it's possible to obtain the category name by calling the GetRequiredString method from RequestContext.RouteData object (this is...
For some time, I have been desiring a method for grouping a set of related Controllers into categories. A search for such a category style scheme showed me that, in the web MVC world, such a concept is known as areas, and I found a few examples of people implementing such features on top of ASP.NET MVC. http://haacked.com/archive/2008/11/04/areas-in-aspnetmvc.aspx http://blog.codeville.net/2008/11/05/app-areas-in-aspnet-mvc-take-2/ Both of these are the same implementation, with the former having little flexibility and being very fragile, with the latter adding flexibility at the expense of complexity, while still being as fragile. To add...
Over the times, I've noticed and read from numerous people with their stories and entries about the various problems and situations occurring in their course of developing a piece of software. With all the development I've been doing in the recent weeks, I realized that I have a few interesting sources of information as well. In order to be quickly available, I decided to pull an already created website journal software. I plan to replace this with my own once I have the time to spend with it. Upon "upgrading" to my own software, there is no guarantee that...