asp.net mvc - Is MVC Framework ill-equipped for rich page design? -


just prefix question, i've decided take @ moving our works old legacy systems (40+ programs vb6, vba, vb.net c#.net) 2 separate systems using same dal (barcoding terminals , 1 web based system) spend day fixing crummy or non existant business logic in 15 year old vba programs. i've built entity framework model complete fluent validation , couldn't happier after using bit.

the small team familiar webforms (but not very) last few days i've explored mvc razor. loving mvc framework until tried start trying add more functions onto same page , seemed arbitrarily hard replicate our recent system put in webform. before, eager load customer , it's child entities , bind single page customer access (which wanted), works okay , isn't slow. single page edit account details/contacts/emails/phones/jobs.

all examples i've done , seen in mvc handle single update, single edit etc surely can't separate out every single action new view/page? can pass rich model through view in mvc, pain trying update different child entities.

this exact design mvc wasn't designed maybe, okay, i'm willing adapt if mvc better platform going forward, how meant handle adding complexity in? methods i've seen:

  1. lots of partial views? passing child info them (or id , lazy loading it)?
  2. i've seen methods wrap multiple <forms> around , handle actions way.
  3. separate pretty every task out

if solution more lightweight , easier maintain i'll go research whatever need wanted @ earlier stage see if i'm wasting time. pointers correct questions should asking appreciated.

asp.net mvc neither more or less better equipped deal complex pages other technology out there.

certainly, mvc requires more low-level work web forms app, no direct binding support, in cases thing , provides more flexibility in how page rendered.

one of whole ideas of mvc give more control on things, control leads requiring more knowledge , more effort on part in non-trivial cases. mvc provides number of tooling functions speed trivial work (like creating standard table based crud) when have complex models, have of work yourself.

this not mvc "ill suited" it, control , flexibility has trade off more responsibility on part.

in case, create view model fields want. then, create form edit fields. in controller, need unflatten view model , create or update necessary records in database. it's not difficult, it's more work webforms databinding.

you more advanced tools (commercial) mvc, such telerik's tools, have developed more of databinding interface, mvc not drag-n-drop technology, , requires hook things , write various logic done.

if need drag-n-drop, databound functionality, no.. mvc not correct technology. webforms requires accept many compromises well, , ties hands in many ways.

you use partial views, seldom use them. prefer instead use editor/displaytemplates these take care of naming form fields correctly, collections , complex objects. partialviews tend have lots of gotchas if aren't careful. pretty use them fancy includes, or when using ajax.

i'm not sure meay "wrap multiple <forms> around everything`. cannot nest forms in html, it's not legal. if mean place form around each row of table, isn't valid html either in cases (it's not legal put form in between table , tr).

it if had specific problem ask about, vague objections don't solve issue.


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -