views:

30

answers:

1

HI All,

In our project we are using a File System to store the static content that is the xmls, xslts, images, gifs etc. and we are following a three tier architecture. The database layer will only contain the metadata while the file system is separate. So, my questions are as follow:

1) Where should we keep the File System Access logic in the presentation layer or the app layer? 2) If we keep the logic in the App tier and object cache the data in the App tier what will be the consequences of passing the data to the presentation layer(Do we need to go to the App Tier to check for the cached content whenever there is a request for the static content in the file system) 3) What will be the best approach to retrieve the Xml and Xslt files from the file system?

A: 

You should keep consistent with the 3 tier architecture. File system artifacts should be logically associated with what function they serve. This would translate into being deployed alongside the appropriate tier.

So, for example, if you have XSLT files that are used to transform data inside of the app tier for use in the app tier then store those files in your app tier. But if you have XSLT files that are used to transform XML into HTML this seems like presentation logic so those files should reside in the presentation tier.

In terms of where to cache, you would usually cache as close to where the data is needed in order to maximize performance. Of course, there can be other factors that could come into play. e.g. if cached data needs to be refreshed occasionally and it also needs to be synchronized among servers then perhaps a centralized cache would be better.

Tuzo