c# - Architecture of an ASP.NET MVC application -
c# - Architecture of an ASP.NET MVC application -
i'm in process of doing analysis of potentially big web site, , have number of questions.
the web site going written in asp.net mvc 3 razor view engine. in examples find controllers straight utilize underlying database (using domain/repository pattern), there's no wcf service in between. first question is: architecture suitable big site lot of traffic? it's possible load balance site, approach? or should create site utilize wcf services interact data?
question 2: adopt cqs principles, means want separate querying commanding part. means querying part have different model (optimized views) commanding part (optimized business intend , containing properties needed completing command) - both deed on same database. think idea?
thanks advice!
for scalability, helps separate back-end code front-end code. if set ui code in mvc project , much processing code possible in 1 or more separate wcf , business logic projects, not code clearer able scale layers/tiers independently of each other.
cqrs great high-traffic websites. think cqrs, combined base of operations library ddd, low-traffic sites because makes business logic easier implement. separation of info read-optimized model , write-optimized model makes sense architectural point of view because makes changes easier (maybe more work, it's easier create changes without breaking something).
however, if both deed on same database, create sure read model consists exclusively of views can modify entities needed without breaking read code. has advantage you'll need write less code, write model still consist of full-fledged entity model rather event store.
edit reply questions:
what utilize wcf info service read model. technology (specific .net 4.0) builds odata (= rest + atom linq support) web service on top of info model, such entity framework edmx.
so, build read model in sql server (views), build entity framework model that, build wcf info service on top of that, in read-only mode. sounds lot more complicated is, takes few minutes. don't need create yet model, expose edmx read-only. see http://msdn.microsoft.com/en-us/library/cc668794.aspx.
the command service one-way regular wcf service, read service wcf info service, , mvc application consumes them both.
c# asp.net-mvc asp.net-mvc-3 architecture cqrs
Comments
Post a Comment