Posts

Showing posts from 2009

Make Generic Type

I been working with .Net for a number of years now, and the more I work with, the more genric my code is getting. Building a generic object parser has been something I have spent a lot of time on. Back in the days of data sets, moving data from a dataset to an object model representing data model has been a constant pain point. You would think they would have this problem nailed by now. But this is still the place you spend a lot of time. If it's not trying to build some kind of generic parser to make life easier, then it's trying to figure out how the latest Mirosoft or open source parser/mapper/ORM works, and 90% of that time is spent trying to figure out why it's not working in your specific case. One of the constrant road block i have encountered during my many attempts to build a custom parser has been to create a generic list of type T. Mapping simple object types is easy using reflection. But once you get to a child element you need to create a generic list of type T...

MVC

I've been working on a few projects now using MVC 1.1 and I have kind of mixed feelings about it. ASP.Net was and is an excellent framework for building complex application on the web. However, MVC is also an excellent framework for lighter weight web apps. On the surface, it appears as though we've taken a few steps back from asp.Net, and at first it did feel a lot like ASP. ( ie no code behind and custom controls built to return string HTML) And if not thought through this can become spaghetti.. fast. However, the concept of MVC sits very well with SOA /Ajax/REST Here is a nice article on REST and MVC http://blog.wekeroad.com/2007/12/06/aspnet-mvc-using-restful-architecture/ The problem lies with developers. MVC is architecturally great, but when utilized in the wrong can appear sloppy and crap. The beauty of traditional ASP.Net was that it separated the UI from code, and promoted a different way of thinking. However, MVC does not bring with it the rigid structure asp...

Multi Tab Session Management

Image
The last two major projects I have worked on in the last two years, have been major business application written in asp.net. Since the upgrade to the shinny new IE7, user have been able to open sites in multiple tabs, and since about 2 weeks into mass adoption on IE7 and the understanding of how tabs work, everyone has instantaneously become dependant on running in multiple tab . Here lieth the problem. The applications are all written using the same framework, which relies heavily on session state to store page state information. Without session state, the application craps itself, literally. The design of IE7 tab (and before you go complaining about crappy MS, firefox is designed the same way) any additional tabs opened in the same window share the same session. This equates to vital session information such are the current record id to be overwritten by the new tabs selection. Major boo boo for application state. to make things worse, the framework requires the same session inform...

System Configuration. How far should we go?

I recently started a project which required the re-design of the system to enable a highly configurable architecture. The system itself is already built on a framework which enabled a whole bunch of cool functionality and patterns. One of these functionalities was a business rule meta data collection object which provided meta data about fields. This function provides meta data down to the UI (for rendering required field/field visibility etc), and also consistent automated validation of business rules. The benefit of this approach is the business rules are set in 1 place. No need for any logic to be processed in the UI making the UI like a dumb renderer , in that this layer renders stuff, and that's it. This also means unit testing can have a much higher impact as we can test our business logic. So with this design in mind I started building a configuration structure which allowed the setup of this meta data. There by allowed business rules to be set via this database configur...

SharePoint Calendar reminder service - Part 3

Ok, now I know it has been a long time since my last post. It seems as though everyone has survived, breath abated. I've been trying to make this sharepoint thing work, but it always seems to better me! Until finally I gave up. The email service is now happily running as a windows service. Luckily, when I started writing it, I actually was thinking windows service, so the move from SharePoint to windows service was relatively painless. I finaly got the service stable and memory consultion at a much more reasonable level within sharepoint, but for some reason, my computer kept switching off?? to top it off, each time my computer turned off, I had to re-install my solution. Something was marking it as corrupt or something, and the service would no longer fire. I tried looking up every log I could find, but there was nothing useful written anywhere which could explain the sudden loss of power to my machine. As much as I refused to believe it, it was my service which was causing the pr...