Welcome Guest, Not a member yet? Register   Sign In
bad design to put html in controller?
#2

[eluser]xerobytez[/eluser]
Yes it can be considered bad practice, you want to go for complete separation of data, logic and views. Data being your models, logic being your controllers and views being what gets sent to your users browsers. I would place the table html in a view file and then load the table view so it returns the result, then you can take this and use it in your main page. Will be cleaner and your controller won't seem cluttered with HTML.


Messages In This Thread
bad design to put html in controller? - by El Forum - 09-19-2012, 12:49 PM
bad design to put html in controller? - by El Forum - 09-19-2012, 02:45 PM
bad design to put html in controller? - by El Forum - 09-19-2012, 03:48 PM
bad design to put html in controller? - by El Forum - 09-20-2012, 05:19 AM
bad design to put html in controller? - by El Forum - 09-20-2012, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB