Are there any obvious flaws to this OO architectural model which I intend to implement using javascript? It is similar to the MVP model but instead the role of the model is broken down into three modules:the cache (stores data instead of rerequesting from server)the model (manages requests for raw data, retrieving it from the cache if available or the server)the modifier (handles requests which require data which makes changes to the data on the server)For a diagram showing how data flows through this model:viewsets up & manages the UI possibly requiring the requesting of data from the presentersets up controls to alter what is displayed, possibly requiring the requesting of data from the presentercachecontains a record of some fetched data in data objectshas a .store() method for storing data in the cachehas a .retrieve() method for retrieving data from the cacheaccess for storage and retrieval is available to the model and the modifier (acting as a faster intermediate location for the sharing of information than the server)presenterhandles requests for formatted data from viewrequests data from Model (passing a callback for completion) formats data for presentation and calls view callbacksmodelhandles requests for data from presenterrequests data from cache (cache.retrieve())if data not in cache, requests it from server and then stores it in cache (cache.store())data passed back to presenter via callbacksmodifierhandles requests from view for modifications to dataspecify post, put and delete request typesonly support specific types of request which may be handled separately (eg settings)stores new data in cache (cache.store())pushes data to the servercalls callback about the success of data storageThis is quite big project and there will be a number of others working on it so it would be good to get it right from the off.edit 1The cache.store() and cache.retrieve() methods both only receive the information required to refer to the data in the cache, but do not specify how it is stored. The cache methods use this information to respond with or store the correct data, but the internal structure in which the data is stored is kept secret.
Javascript Architectural Model
javascript;architecture;mvc;modules;mvp