DEV Community

Discussion on: Architecture Thoughts?

Collapse
greenroommate profile image
Haris Secic

If you isolate stuff in V2 in separate folder/package in same repo whatever you could potentially have seameless transition on the backend (api for me is a backend as well as backend you mentioned). Example let's say java, you have everything in packages and you just add 1 more to the root called v2, then inside you add new stuff. As for the routes may frameworks would allow you to add additional v2 in front easily regardless that 1st version is still there. Then you can later just refactor by removing v1 parts But keeping maybe v2 and just add later more version. You get the point. As for frontend I guess second repo must be there. However this way you could have 2 frontends targeting different routes and single backend code supporting 2 versions either deployed separatly or together. If you even decide to merge old v1 it should merge really easy as you have just additional folder/package on root level that should git or whatever merge easily no manual work requires. Ugly thing is if you have constraints that you can't play with UrLs

Collapse
octavus88 profile image
Octavian Author

The issue is that because V2 needs to be a clone of V1 the namespacing bit won't work as this is an MVC framework and the number of files that would need to be moved in gigantic. And all 3 apps are the same.

Collapse
greenroommate profile image
Haris Secic

MVC in C# ( beacuee you said namespace I'm assuming it's .net stuff) may be impossible-ish becaus of Project structure which is both better and worse than packages. In Java you can have easy way out but it depends on your current code base. I mean copying all stuff to root package v2 and just keeping up with the changes from v1 should be realy easy in Spring, Microaut, or so. But I understand, some tech-stack just have different style and you always hit the wall whatever you pick. Hope you find a good solution

Thread Thread
octavus88 profile image
Octavian Author • Edited on

Yeah, it's actually Rails not C#. But thanks for your suggestion!