Does it make sense to do CRUD without ajax in yii2?

Found the review on habré where people udivlyatsya that someone makes ajax request CURD and review was 2012, and scored 9 likes, XS rofl was or not, but doubts have crept in
April 4th 20 at 00:37
1 answer
April 4th 20 at 00:39
To answer this question we need to understand a few nuances:

1. 2012. For 8 years in programming, a lot has changed. I believe that we need to be trained every six months and to learn new techniques and to apply them in their projects.

2. Recently from jQuery actively refuse. They are replaced by frontend Frameworks: Vue, Angular, React , etc.

In 2020, most of all, the project is divided into two applications: the frontend (UI) and backend (API).

For frontend choose framework on js, and the backend choose, most often, framework on php.

the frontend communicates with the backend via the API.

3. The hybrid has not been canceled. There are apps that combine the backend and frontend In one app. In such projects, the js I try to use the smallest.

Poyuzat this website and you will see that not many functions are implemented in "ajax". If these sections will be a lot, then you must use division 2 application, paragraph 2. In a CRUD application, especially AJAX will be minimal.

My opinion:
1. If you don't know js well, then use it minimally in their projects, and even more so if it's jQuery.
2. Use CRUD without AJAX. It will be possible so that on a single page to several forms. Don't be put off by this. Just think about refactoring.
3. “AJAX,” use in cases when you really need action without reloading the page: likes, add to cart, add to bookmark and so on. Such actions must be justified and reasonable.

Think about how you can implement it in one file for all CRUD actions. For example, I have implemented filtering without reloading the page on all index pages. But we need to know how to construct the Framework and be able to use it.

Find more questions by tags Yii