I'm learning vue.js now on laracasts.com and there jeffrey way shows 2 way to display data on web page. One is to display data from Laravel foreach and second is to display data with vue.js. I have one question: is there any difference by performance to display data with Laravel or display data with vue.js?
Asked
Active
Viewed 167 times
1 Answers
2
As for preformance you can take a look of this question:
- Performance benchmark: PHP Generated content VS. javascript and DOM over AJAX
- Speed of PHP vs JavaScript?
But using Javascript to display data, you have less coupler between Controller and View layers. That way if your Views get more complexity this independence can help you a lot or if you want to make your page more dynamic using AJAX. Theres others options in frontend like Angular.js and Ember.js make you to use MVC in your View layer. The other hand if your view is basic you can use PHP.

Community
- 1
- 1

Jose Rojas
- 3,490
- 3
- 26
- 40