Design Patterns in Practice

by Woodrowg 22. May 2009 08:42

I have not been a person that like banding around with techno terms and trying to confuse people. I would not even call myself a geek, I like computers but I have a Fiancée and a life away from the screens (Yes I find two is a minimum as a developer). I have been working in development from almost 10 years now and I have work on many projects in many languages, during this time I have collected a number of experiences and some, like design patterns become part of the Toolkit. What is a toolkit you ask, in my definition a tool is bits of information that is

a.) Worth remembering
b.) You will need again in the future
c.) Will help you be a better person (or at least programmer)

This is not my concept I read it in Steven Kings “On Writing” and was happy to find a concept that was so truly universal. My toolkit contains the tools that I have gathered over the years that have been learned via bad experiences, good experiences and looking at the work of those gifted with greatness. I take each tool out to use sometimes, clean it off a bit and put it back in the kit.

A design pattern is in simplistic terms, a standard solution to a common architectural problem in software development. In essence however we see patterns every day, a red sign means danger. That is a pattern that is so ingrained that you don’t even need to read the text on the sign to know that there is something to be careful of. If you wanted to create a sign to warn people, chances are it would be red! There is no need for you to come up with a pink one, and if you did, in the long term it might have been the wrong decision. 

I like patterns as they are nothing to do with computer languages or frameworks as such and therefore you don’t have to get into a Java .Net debate. You can happily sit with a programmer of another language drinking beer and discussing patterns till the cows come home. Should you ever been in the unfortunate position to have maintain something for someone else, if they have used design patterns you will get to terms with the code a lot more quickly.

This is worth looking at for more info. I’m not Wikipedia you know ;-)
http://en.wikipedia.org/wiki/Design_Patterns_(book).

Good article:

http://www.developerfusion.com/article/8307/aspnet-patterns-every-developer-should-know/

For those of you who know about it, sorry for covering old ground.
For those that have just got a masters degree in information technology, “You take the red pill and you stay in Wonderland and I show you how deep the rabbit-hole goes!”

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Adventures with Code

Issues with APP_Resources

by Woodrowg 15. May 2009 05:34

It was about midnight as I finally completed the last open issues before the first round of customer acceptance testing. With a click of a button the I put my faith in Publish website, with a good feeling that I would be in bed before the cat came home.

ALAS this was not to be. The website wouldn't start, it hung and seemed to be dying a horrid death. After turning off the error pages which in my tired state to about 20 mins to realize would help, I was faced with this

The resource class for this page was not found.

strange I thought, and publisher again. Same issue. Started looking around the web and found something about changes to the file can cause problems and that it needed to recompile. OK try a clean build. Same issue.

OK think, I opened my FTP client and navigated to the site and the lights came on. Strange the whole App_LocalResources Folder was missing. After 'bingin' around I found some references to this.  

Seems that the .RESX files are not being copied as part of the build and to change this you must change the build type to content.

http://forums.asp.net/t/1245742.aspx for example.

I guess its just one of those things but sometimes these little gotchas get you when you least expect it.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Adventures with Code

ASP.NET MVC and LIST PAGES

by Woodrowg 8. May 2009 03:56

Hi another quick note! If you are using the ASP.NET MVC function to create list pages DON'T. Ok maybe don't is an over kill but THINK befor you act!. I have just spent about an 3 hours refactoring my list pages as I wanted to hide and show information based on values that were in the parent object. Tried to do a quick hack as i wanted to get the alpha version ready, which was to set a flag inside of the item loop. So that was working ( I thought) untill of course there was no item in the list ( DOH ).

The better solution was to pass the Parent item over as the model of the page and then do the foreach loop on the collection itself. Which means i have full access to all the lovely properties of the parent and can do so sexy UI customization based on it.

 

 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , ,

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Gary, the last of the unbloged is finaly giving up and will try as often as posible to add anything interesting he finds to this site. especially stuff like ASP.net MVC and things to make people smile