Use or not controllers


#1

Hi, This is more a doctrinal question? Instead controllers, should I use a component which acts similarly? And can I do all in components? Can I use a lot of components or I should limit it’s number?


#2

i think , controller and component each has itself’s responsibility.
For example, if i need pre-handler the return data, i think do it in controller is more better, then send the data to component. as i thinking , component just receive data and modify it use the logic by itself.


#3

So, If I have a component that display a table and a row component that display a table row, is ok to prepare the data for display in table row component? Or it should be prepared in table component or even in the controller?


#4

extract additional data, such as metadata in controller . model data passed to table component .

if it make sense?