I agree that using a status field is initially more simple, and that simple is good. However, consider a situation where you have many methods in a class. The behaviour of these methods needs to change depending on the status, e.g. some methods should raise exceptions for for some users at some statuses. What tends to happen is that you end up with lots of if/and/or statements littered throughout your code. That's not clean at all. Using class inheritance mapped to status (Template pattern) can result in code that is more maintainable and less buggy.
On Sep 30, 3:25 pm, Gwyn Howell <gwyn.how...@appogee.co.uk> wrote: > why not just build a status field into your class, then use properties to > check the status before setting/getting data or calling methods? much > cleaner than changing the class -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.