A controller can have fields/atributes/properties in mvc architecture? -


a controller can have fields/artributes/properties in mvc architecture? after reading article http://www.tomdalling.com/blog/software-design/model-view-controller-explained/ have idea receives inputs of user in application , bridge models , views controller in mvc? normal class can have fields , methods other classes? if yes serve atributes or fields? (in general mvc architecture, not speaking specific framework asp.net mvc or spring mvc etc. )

if asking class looks like, should take @ 1 mvc framework.

@controller @requestmapping("/hello") public class hellocontroller{     @requestmapping(method = requestmethod.get)    public string printhello(modelmap model) {       model.addattribute("message", "hello spring mvc framework!");        return "hello";    }  } 

basically, normal class logic. piece of code of taken here, can take @ whole thing:

http://www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -