Tank: We’re supposed to start with these operation programs first. That’s major boring shit. Let’s do something a little more fun. How about… combat training.
Neo : Ju jitsu? I’m gonna learn Ju jitsu.
[Tank winks and loads the program]
Neo : Holy shit!
Tank : Hey Mikey, I think he likes it. How about some more?
Neo : Hell, yes. Hell yeah.
Well I can tell you that I prefer comabt training…
Operational programs consist of programming things like data objects, value objects, concrete data types. Major boring shit! Nothing interesting happening here.
Combat training this includes the dynamic portions of the code you write.
Let’s take an example:
You have a web page. On this web page you have a navigation menu and you have a content container. When a user clicks on a menu item some content will be displayed in the content container via an AJAX request to the server. The content is stored some how on the back-end (database, flat-files, or another server), we don’t really care for this example.
Now where is the combat training and where is the operational programs areas.
It might be better to isolate to two specific areas. Client-side and Server-side.
The concrete implementation of the content, the HTML output of the server. The actual data coming out of your back-end
The selection of the types of content to be sent to the client-side. You know images, text, google geolocations, whatever you can imagine.
jQuery manipulations, $(‘my_div’).hide(), something along those lines.
When the user selected a menu item did the correct AJAX request go to the server.
So whenever you are TDDing your code, remember you want combat training not operational programs.