V
V
Vasily Mazhekin2019-05-14 05:18:57
git
Vasily Mazhekin, 2019-05-14 05:18:57

Frontend and backend in different repositories or in one?

Help with the choice. Several developers (5-6) are working on the project. Backend in python, frontend in angular. How to store sources together or separately in different repositories? What are the pros and cons of each method? Share your experience, how do you store the back and front for your development, give a couple of arguments for your choice?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
E
Eugene Wolf, 2019-05-14
@mazhekin

How to store sources together or separately in different repositories? What are the pros and cons of each method?
It seems to me that the question here is not so much in "pros and cons" as in common sense. It's not entirely clear to me what "python backend, angular frontend" ultimately means. These are two independent projects that can work autonomously from each other and "communicate", for example, through APIs, the development of which occurs in parallel and independently of each other, while any parts of the projects do not intersect with each other (for example, pieces of HTML / CSS / JS/etc code is not copied to the backend part)? If so, then it is extremely logical to separate this into two separate repositories, because. These are essentially two different projects that are very indirectly related to each other. If your projects have a stronger connection with each other or the degree of contamination of the source code is higher than what I described earlier, then this is one project .and split it into many repositories, I personally don’t see any point (otherwise we’ll get to “let’s store the HTML code in one repository, CSS in another, JS in the third, etc.).
PS Usually, such things are explained full-time team leader, not colleagues on the forum :)

S
Stalker_RED, 2019-05-14
@Stalker_RED

It is possible this way and that.
For small projects, it's more convenient to have everything in one place.

M
mrisid, 2019-05-14
@mrisid

For small projects, you can throw everything in 1 folder, but then you can get confused in BackEnd and FrontEnd, so I would advise sorting, I don’t know about you, but my eye is happy when you don’t have to confuse where is BackEnd and where is FrontEnd, if you still work alone then you don’t have to worry, but as a group you will sometimes confuse where everything is and what’s what, if you have a lot of files, it’s better, of course, sort it, if there aren’t enough files, there’s nothing to worry about :)

O
OnYourLips, 2019-05-14
@OnYourLips

One project - one repository.
Backend and frontend can be both in the same project (for example, if the frontend is made on twig / jinja), or in different ones (in the case of SPA, for example). Therefore, in the first case, the code goes to one repo, and in the second - to several.
So there is no single general answer, but in each case the choice is very simple.
In your case, it's definitely the second option.

W
WapSter, 2019-05-14
@wapster92

If angular is used, it is already understood that it communicates with the server via api, two different ones are better. If the projects are not large, then, as mentioned above, it is possible in one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question