spring mvc - Difference between Request MVC and Component MVC -


i have heard jsf implementing component based mvc , spring mvc implementing request based mvc. know exact technical difference between these 2 types.

in request (action) based mvc, single front controller servlet delegate action models based on request url/params. work directly raw httpservletrequest , httpservletresponse objects in action model. you've write code gather, convert , validate request parameters , if necessary update model values before can ever invoke business action.

in component based mvc, single front controller gather, convert , validate request parameters , update model values need worry business action yourself. how controller needs gather/convert/validate/update values definied in single place, view. since that's not possible "plain" html, specific markup language required achieve goal. in case of jsf 2.0, that's xml (xhtml) based. use xml define ui components in turn contain information how controller should gather/convert/validate/update model values , generate/render necessary html representation.

advantages , disadvantages should clear @ point: request based mvc framework need write more (boilerplate) code achieve goal. end more fine grained control on process , html/css/js output. component based mvc framework don't need write code yourself. have less fine grained control on process , html/css/js output. if you'd things bit differently standard describes and/or implementation provides, you'll waste lot more time in component based mvc framework when you're not versed ins , outs.

manfred riem (jsf 2.x team member , ex java ee 8 mvc 1.0 spec lead) has outlined nicely during devoxx 14:

enter image description here

see also:


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -