@ainsama1 It’s impossible to help without knowing anything about your project.
is it better to separate frontend and backend and they only interact via json or to do it in traditional way where we render an html in our View?
Define “better”. Again, we don’t know anything about your project’s requirements so can’t say if one approach has benefits over the other or not.
My only advice would be: don’t separate your back-end and front-end unless you have a compelling reason not to, otherwise you’re doubling your workload just to adhere to some paradigm that may—or may not have—worked for another person’s project with different requirements, budget, team size, etc.
Well, we dont have a project yet. But planning to practice together as a team and we want to know which way is better to practice on. We have in our mind that Ecommerce Web and Mobile app is worth practicing. Thats why we came up to separate the front-end progamming of Webapp to its back-end so we can use it also in Mobile. We havent started yet and just researching first what are the best practices to follow.
@ainsama1 Neither way is “better”, they’re just two different approaches to building web-based applications.
You can build a “traditional” server-rendered application and still also build an API for other clients (such as mobile applications) to consume. I’d stick to tried-and-tested methods of building web applications if you were thinking of building something related to e-commerce. You can still be all means use JavaScript to add enhancements to the web app.