Whilst we haven’t completely finished yet (we’ve still got plenty on our to do list!) the reformsoft website has been re-launched this evening. We came up with the design in the end. Well, Jase co-ordinated it and I developed it. It’s far from complete anyway. We haven’t got much time as we’re working on many projects at the moment. Enjoy.
May, 2009
6
May 09
Taking It To Another Level
Before I planned to get married my original plan was to graduate from university and then move straight onto my masters degree. Simply put, priorities change. I don’t regret not going to my masters degree straight away, and in fact things have worked out much better. In the last few months myself and Amanda have been discussing the possibility of me studying my masters degree part-time as it only requires six hours study per week. I say “only” in the lightest sense though, six hours when you’re married, working, and spending large amounts of time on personal projects is actually quite a lot of time. We don’t have kids therefore it’s viable.
So, the news is that I will be starting my masters degree starting this November and the only way I was able to afford this was sponsorship from my company which I’m extremely thankful for. There’s a lot of inner-educational talks about how much masters really help you so I decided to make sure I carefully studied the topics covered. For the masters degree in Software Development many of the courses actually relate directly back to my job so it’s beneficial not only for me, but for those whom I work for.
The study works on a modular basis, I will study one module every six months requiring roughly three tutor marked assessments and one exam. The six hours study is gained back by changing my weekly timetable and stopping certain commitments I have on weekends which will free up enough time for study. It looks like I’m actually starting with a database development course which is handy as that’s what I tend to work with most days (and nights!).
Anyway, I’m back in Guernsey now after being in Jersey today and I’m having the final, conclusive meeting tomorrow. Oh also, I’m studying it with the Open University as I have previous experience with them and it works well for overseas support.
1
May 09
Working With ASP.NET MVC
Since the release of ASP.NET MVC I think the whole world has suddenly realised that the Microsoft team are actually doing something good, despite taking years to catch up with other MVC frameworks such as the Zend Framework. The good thing is that I’ve been keeping a close eye on what the team have been doing, and despite my knowledge not being great in the area I’ve noticed that throughout Scott Gutherie’s blog the decisions made do seem to be very good.
When I first started with ASP.NET I thought it was a nightmare, the fact that you had “web controls” which required forms on the page with runat=”server” attributed on all HTML elements. I hated this. I started off in the company I currently work for wondering what on earth we were using, but the fact was that ASP.NET had evolved into “web forms”. There are many reasons I don’t like it especially with the ViewState property being enabled by default on all controls meaning if you check the response from the server when a web page is generated you’ll notice a load of encoded data sat near the header. On some of the pages we worked on the ViewState drowned out the actual HTML completely.
ASP.NET MVC gets rid of all of this. No more ViewState, less use of forms et cetera. As lovely as it is though the majority of guides, articles or tutorials simply don’t cover large-scale applications. Our applications are gigantic, some of them I’ve never had to deal with and simply wouldn’t be able to by myself because they’re so large. Applications as large as this need testing which is one of the major points of MVC. So, here’s some problems with ASP.NET MVC that I have.
Nested Controllers, Views and Models
So imagine your application is simply so large that you have roughly one hundred folders and some of which go to about five to six levels deep. This is done to separate out area of the application. The application is one major application made up of many smaller applications essentially. Should you create separate projects for each which are somehow controlled from a single web application, or combine the lot? Is we combine all of them, how do we deal with nested folders? ASP.NET MVC deals with controllers, views and models on a folder by folder basis. So our mapped routes looks like {controller}/{action}/{id} but if we have folder structures such as myapp/mysubapp/adeeperfolder/thepageaction/theid then things start to get tricky, especially if this happens time and time again. Haacked covers areas in MVC, but again, this may not cover all cases especially for those of a gigantic application. There are custom routes available to work with, but how many would we need? Quite a lot to be honest.
So what’s the solution? Well, if we had a URL such as app/myapp/mysubapp/myaction/param then could we not take everything before myaction/param and map it automatically as the path to the controller? I believe this actually breaks the separation of MVC, but for us it seems the most logical approach. I do ponder on this.
No More Controls!
Okay, whilst beforehand I would’ve cursed at controls they do aid in speedy development. So what now? We have to manually create reports in the view. I’m not saying I have a problem with this, but as my boss said, this moves back to the “Active Server Pages” days. We’re so used to saying “yes we can provide this report, and it’ll only take us two minutes to do”. It may not be the right way, but it produces a result which someone may need right now.
The idea is that every view represents just that, a different view of something. If you’re editing results returned into a table then the “edit” button would take you to a different view. Are you supposed to be able to edit within the table i.e. turn the row into a row filled with textboxes that you can edit, then have an update button the same row? I’m guessing now. But this does mean that the amount of views and associated controllers increases substantially. If you have thousands upon thousands of pages already, surely they will multiply?
No Going Back
The other major concern is that it’s simply such a big step that it’s a case of “out with the old and in with the new”. You can’t mix and match, and you couldn’t move back again. It’s just too big of a job, and required too many man hours. The amount of time already that I’ve spent in investigating, gathering requirements, and solving problems is already too great to be throwing the idea out altogether.
XSLT?
Seeing as though we no longer have controls what happens with things that we commonly use such as XSLT for generating complex pages? Has that died a horrible death altogether? Again, I’d love to know.
Data Access
The major issue I’m really having is accessing data correctly. Seeing as though I have no prior experience I’ve realised it’s extremely important to have a data access layer, but there are many tools available such as LINQ. LINQ won’t do what we want because it’s slower than other technologies and we’d simply only use it for stored procedures. Simply, strongly-typed stored procedures are required. Also the ability to insert/update/delete based on exposed functions through objects. Again, with such a complex schema this isn’t a simple task.
I’m not sure what everyone else’s opinion is on the use of ASP.NET MVC but those are just a few of the issues I’ve run into so far.