I have a textbook case of polymorphism: my web server is going to return a shape which could be a circle (center point + radius), rectangle (upper left/lower right), polygon (arbitrary list of points), etc. What's the best way to handle this from a model standpoint?
I'm using an ajax proxy. One solution is to define a model object which is the union of all fields and includes a string that identifies the shape type. It would work ... but I was hoping ExtJS offered a better solution. (I just don't see how to choose a different model based on the server's response.)