Archive for 'Design'
What is REST?
There has been quite a lot of discussion on mailing lists that I am on about what it means to be RESTful. It has occurred to me that the reason for many of these discussions is that people only hear tidbits about REST and therefore draw wrong conclusions about it. Here is my understanding: Representation [...]
Posted: March 26th, 2009 under Design.
Comments: 3
How does Architecture fit with TDD
The question a lot of people (especially software architects) ask when adopting TDD is how does Architecture fit in the whole Test Driven Design paradigm. Traditionally, any new functionality is vetted by a software architect who completely designs it (on paper) and sometimes adds the foundation to the code base. The developers in the team [...]
Posted: December 16th, 2008 under Design, Testing.
Comments: none
Living in the code
Someone shared an observation with me today regarding the way ThoughtWorkers talk when referring to classes. Apparently, we say “this guy” a lot; as in “this guy has the responsibility for that action”. After thinking about it, I guess that’s what happens when you live in the code. (Or, just a habit that one person started [...]
Posted: November 20th, 2008 under Design.
Comments: 1
Recursive Trees
I like recursive algorithms, and I like trees (I mean the data structure, not the perennial wooden plant - of course I like them too). So today, I was very glad when I had the chance to implement one on my current project. The main construct of the tree is the node. Generally, the node is comprised of [...]
Posted: October 15th, 2008 under Design.
Comments: 5
Lists: Filter, Map and Reduce
There are 3 very handy list functions which make dealing with lists a breeze: Map, Filter and Reduce. I have come to the belief that not everyone understands their power, so I will attempt to explain it. Filter The filter function (fairly aptly named) aims to filter out (remove) items from the list which are [...]
Posted: August 16th, 2008 under Design.
Comments: 3
Maybe null
My colleague Andy posted today about Returning null considered Dishonest and while I agree with his sentiments, I disagree with his solution. Andy’s premise is that you should never expect or return a null object as “Returning null is dishonest. It requires others to check that we’ve upheld our side of the bargain“. His solution is to [...]
Posted: August 11th, 2008 under Design.
Comments: 7
JQuery is your friend
Lately, I have had the opportunity to add some pretty funky usability behaviour on websites thanks to JQuery and some UI Plugins. If you haven’t used JQuery before – start now. It is really simple to add some really cool behaviour. Need to find all the checkboxes on your page? Then $(‘input[type="checkbox"]‘) returns the list of [...]
Posted: August 10th, 2008 under Design.
Comments: 1
Picking the right domain to model
When designing your code, it is important to model the business domain. However, how do you know you have modeled the right domain? Sometimes you need to look beyond the domain objects, and see what you are actually implementing. On my latest project, we started modeling what we thought were the correct business objects. Essentially, the project [...]
Posted: August 9th, 2008 under Design.
Tags: domain, modeling
Comments: none