Skip to main content
Replace short link to image with image.
Source Link
user40980
user40980

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.:

enter image description here

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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 1

The 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.

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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 1

The 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.

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:

enter image description here

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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 1

The 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.

Tweeted twitter.com/#!/StackProgrammer/status/364126377538502656
added 335 characters in body
Source Link

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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 1

The 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.

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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.

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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 1

The 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.

Source Link

Javascript Architectural Model

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, see https://www.lucidchart.com/documents/view/4a0f-7940-518540ff-8cc7-02050a0087f6.

view

  • sets up & manages the UI possibly requiring the requesting of data from the presenter
  • sets up controls to alter what is displayed, possibly requiring the requesting of data from the presenter

cache

  • contains a record of some fetched data in data objects
  • has a .store() method for storing data in the cache
  • has a .retrieve() method for retrieving data from the cache
  • access 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)

presenter

  • handles requests for formatted data from view
  • requests data from Model (passing a callback for completion) formats data for presentation and calls view callbacks

model

  • handles requests for data from presenter
  • requests 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 callbacks

modifier

  • handles requests from view for modifications to data
  • specify post, put and delete request types
  • only support specific types of request which may be handled separately (eg settings)
  • stores new data in cache (cache.store())
  • pushes data to the server
  • calls callback about the success of data storage

This 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.