RSS

Category Archives: Design

Prefer JSON over XML for Data Structures

If you are going to exchange data structures between programs you have many choices.  Of these, JSON is the best choice in general, and specifically a better choice than XML, and this post explains why. Read the rest of this entry »

Advertisements
 
Leave a comment

Posted by on June 1, 2016 in Design

 

Tags: , ,

Two Kinds of Exceptions

An exception is a message from the system to the user about something that the program can not handle. There are a couple of main categories of exceptions: environmental and program logic. They warrant quite different treatment. Read the rest of this entry »

 
Leave a comment

Posted by on March 14, 2016 in Coding, Design, Poor Error Msg, practice

 

Tags: , , , ,

Incremental Development

I happened across this excellent and perfect depiction of incremental development.  The image addresses on of the key flaws in thinking that lead some agile projects to fail.  So let’s discuss a bit. Read the rest of this entry »

 
1 Comment

Posted by on February 19, 2016 in Coding, Design

 

Tags: , , , ,

Don’t use URL-Encoding in REST path tokens

Standard are nice, but sometimes a misguided implementation attempting to protect people completely invalidates the benefit. Read the rest of this entry »

 
Leave a comment

Posted by on November 23, 2015 in Coding, Design

 

Tags: , , ,

Don’t Fear the Lowly Static Method

When people first learn object oriented programming (is there any other way) they seem to want to abandon all non-member methods (such as static methods) as being anti-object-oriented. This is foolish. There are times for objects, and times for static methods. Read the rest of this entry »

 
Leave a comment

Posted by on October 29, 2015 in Coding, Design

 

Tags: , ,

Specifying Business Hours

Long ago I worked on a project where we needed to specify the hours that a business was going to be open, and to account for all the various difficulties around holidays and other special days. This is what we came up with and it still stands today. Read the rest of this entry »

 
Leave a comment

Posted by on September 21, 2015 in Coding, Design

 

Tags: , , , , ,

Create-On-Update Pattern for AngularJS Applications

This is a suggestion for how to design the JSON/REST protocol between the Angular application and the server, to handle creation of items easily and conveniently.  Use a special ID value to indicate that the object does not exist on the server, and update like normal.  The server detects this and creates it on demand. Read the rest of this entry »

 
Leave a comment

Posted by on June 11, 2015 in Coding, Design

 

Tags: , , ,