S
S
Sergey2018-06-25 06:52:20
JavaScript
Sergey, 2018-06-25 06:52:20

Adding to a finished vuejs project. What should be taken into account?

There is a ready-made project with a considerable number of functions. The site is written in php.
The project uses the MVC model.
jquery, bootstrap, and various jquery-based plugins.
Project structure:
classes/
controller/
module/
template/
views/
index.php
The project uses 35 models and a little more controllers. Almost every controller has at least 4 views.
The project uses many many forms and filters.
There are also 6 types of users, each has its own restrictions and access to sections.
The task is to organize a project using vuejs.
Since I have little experience with vuejs, I plan on not making a single page application for the entire project. And make a model for each vuejs controller and display all the views in it.
I'm also thinking of deleting the jquery library, bootstrap.js
I'm wondering what problems I might run into.
Elementary, I do not quite understand how to organize the output of the main menu. It is different for each type of user.
Load it using vuejs and components?
As I understand it in controllers, in most cases I should return information in json format? I am planning to send requests using axios.
I'm looking forward to more advice, maybe some of you have already ported large projects to vuejs.
Is it possible to get a link to books, articles or examples.
How to organize the url on the site?
For example, now many sections are displayed like this: refund/viewlist?s=$1&c=$2&page=$3
where refund is a controller and viewlist is a view. Almost every page has a options.
What if the user does not have javascript enabled. In general, in what cases does this happen?
You should warn everyone about this or make a project with the calculation for such people.
Is every view a vuejs component?
Is the current framework (MVC) suitable for this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Larin, 2018-06-25
@seregali

vue js can be added to almost any project.
To begin with, I recommend reading the documentation , it is translated into Russian, simple and understandable.
Then try to make a simple application on vuejs, the same todo-list for example.
The feature of vuejs is that it lives in its own sandbox. Allocate a separate div for it, your vue will live there, without affecting the rest of the site.
All aspects like building a url can be shifted to the back.
If the user has javascript disabled, then nothing. But I've never experienced anything like this.

P
PxlFxr, 2018-07-05
@PxlFxr

The advantage is that you can rewrite the project on vuejs in parts. For example, start for one type of views. At the end of the page, we connect vue, followed by our script with components. I would advise you to start using .vue files right away, very convenient. But here it will already be necessary to build the frontend through node.js

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question