visual studio - In Windows Azure, what file should I put storage information in for ASP.NET MVC? -
i'm toying windows azure creating asp.net mvc project, i've checked waptk (windows azure platform training kit), google, , here answers question, couldn't find answer. in asp.net mvc project, in file create containers cloud storage? (in waptk, there's hands-on lab uses webforms , puts storage containers in _default partial class.)
in asp.net mvc project, in file create containers cloud storage? (in waptk, there's hands-on lab uses webforms , puts storage containers in _default partial class.)
generally i'd recommend set container access (including create) in nicely encapsulated class - preferably hiding behind interface easy testability.
i'd recommend:
- put class , it's interface in class library (not in asp.net project)
- put config details in csdef/cscfg files
- if plan use fixed list of containers, either:
- create these ahead of installing app - e.g. simple command line app
- or create these call in init of global.asax
- if plan dynamically create containers (e.g. different users or actions) create these controller/service code required - e.g. when user signs or when action first performed.
- if actions might occur several times , don't know if container there or not, find way (e.g. in-memory hashtable or in-sql persistent table) ensure don't need continually call createifnotexist - remember each call createifnotexist slow app down , cost money.
- for "normal" access operations read/write/delete, these typically controller code - or service code sitting behind controller
if in doubt, think of bit "how partition logic if creating folders on local disk - or on shared network drive"
hope helps bit.
stuart
Comments
Post a Comment