Geeks With Blogs

  • neh123us T4 sould be your outsourcing strategy T4 - The Insource Code Monkey about 636 days ago
  • neh123us Had a need for Dynamic Views in MVC today. Wanted to use a Partial view on two different views with different ViewModels about 684 days ago

News Google

Nick Harrison Blog<Nick>.Next() January 2008 Entries
Why Developers should like Refactoring!
The refactoring book is really one of the best books that I have seen on programming. If you are new to programming, I highly recommend giving the book a read. Learning some of these refactors and thinking about them as you write code will help you write better code. Being familiar with the various refactors will help you quickly identify ways to improve code. The concept of code smells is pure genius. The concept of refactoring is very liberating ......

Posted On Wednesday, January 9, 2008 9:07 PM

Generic CopyTo Function
One of the requirements for the MVP pattern is to keep everything out of the UI (View) that does not have to be in the View. Data mapping is one of those things that we would like to move out of the UI. I tend to think of it along these lines, “If I wanted to expose this same functionality in a different UI what do I not want to have to rewrite?” If the View defines an interface exposing read write properties for all of the data needed, which it should, then the interface could be simply passed to ......

Posted On Wednesday, January 9, 2008 9:07 PM

Teasing apart Business Logic from Data Access Logic
In an earlier post, we started with logic similar to this: IDataReader dr; try { dr = DAL.GetSomeData(filter); while (dr.Read()) { if ( dr["field"] != System.DBNull.Value) { DateTime convertedDate = Convert.ToDateTime(dr["fiel... } if ( dr["nextField"] != System.DBNull.Value) { Double convertedDouble = Convert.ToDouble(dr["nextFi... } . . . . catch (Exception ex) { // Handle exception } finally { dr = null; } } And showed how to reduce the Complexity to something similar ......

Posted On Wednesday, January 9, 2008 9:05 PM

Reducing Software Complexity
In an earlier blog, we discussed the need to reduce complexity and some of the problems that complex code can cause. We even discussed a reliable quantifiable metric for evaluating complexity. For review, we want to use the CodeMetrics add-in to Reflector to track Cyclomatic Complexity and target methods that have a complexity greater than 10. One common source for elevated complexity is leaving artifacts from the data access in the business logic. We are probably all familiar with code that looks ......

Posted On Wednesday, January 9, 2008 9:03 PM

Your project might be in trouble if …
I recently worked on a project that failed. There is no other way to put it. The project failed! It’s a hard thing to admit. There are many reasons why bad things happen to good projects. There are many reasons why despite our best intentions, not every project is successful. There is always plenty of blame to go around. The business market changed. The technology changed. We could not find the right resources. Critical resources left. The project lost funding. The business lost interest… Many of ......

Posted On Wednesday, January 9, 2008 9:02 PM

Scared of Complex Technologies? Embrace Them!
Many people seem to be intimidated by some of the most exciting programming features in DotNet. Reflection comes to mind. I once did a little client training and on the first day was lectured about this “Reflection Crap.” We often fear what we don’t understand. We often avoid technologies that we don’t have to use and cling to more familiar technologies and techniques. It’s no fun admitting what we don’t know, and it is often faster to do something the old familiar way than it is to use new unfamiliar ......

Posted On Wednesday, January 9, 2008 9:01 PM

Reflecting on Software Metrics
At the risk of sounding pedantic, I like software metrics. They can prove to be invaluable in analyzing source code. To be clear, I am not proposing that developers be bonused based on metrics and their use in estimating and scheduling should be limited at best. I am however a fan of software metrics as benchmarks for evaluating design and understanding how software works. There is an add-in for reflector called CodeMetrics that allows you to easily calculate a wide range of code metrics from within ......

Posted On Wednesday, January 9, 2008 9:00 PM

Copyright © Nick Harrison | Powered by: | Join free