model view controller - web development - MVC and it's limitations -


mvc sets clear distinction between model, view , controller.

for model, adays, web frameworks provides ability map model directly database entities (orm), which, imho, end causing performance issues @ runtime due direct database i/o.

the thing is, if that's case, why model orm pupular , every web frameworks want support either organically or not.

to web site has huge amount of traffic, won't work. what's work around? connect directly database not wise solution here.

what's question?

is idea use direct db access webpages?

a: no.

is idea use orm's?

a: debatable : see how can design java web application without orm , without embedded sql

is idea use mvc model?

a: yes - has nothing "direct" database access - it's separating application logic model , display. (put simply).

and rationale not putting database logic inside webpages has nothing performance - it's security/maintainability etc etc. calling usp webpage more performant using orm, it's bad because performance gain negligible, , cons significant.

as workaround: if mean how hook database web application...?

the simplest way use entity frameworks or linq-sql model - there plenty of examples of in tutorials on web.

a better method imo, have separate services layer (which may wcf based), , have database access inside that, dto's transferring data web application has it's own viewmodel.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -