petermichaux / maria

The MVC framework for JavaScript applications. The real MVC. The Smalltalk MVC. The Gang of Four MVC.
BSD 2-Clause "Simplified" License
764 stars 51 forks source link

SetModel rename? #16

Closed adamsilver closed 11 years ago

adamsilver commented 11 years ago

It may just be me but I think this entity could be named better. How about 'ModelList'?

For me it sounds like a setter.

petermichaux commented 11 years ago

I can understand the possible confusion. I suppose the capital S is an important indicator.

The rationale for the name SetModel...

Everything that is observable (i.e. in the model layer) ends with "Model". Everything in the view layer ends in "View", etc.

The SetModel is not a list or array. An item can only be added to a set once. Iteration order is not guaranteed (though that may change). So it really is like a mathematical set.

ES6 will have a Set so JavaScript developers will become accustomed to the idea of a set.