Skip to content

Instantly share code, notes, and snippets.

@simbo1905
Last active May 10, 2020 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simbo1905/f95e8bcab88e958e672c2678d748c339 to your computer and use it in GitHub Desktop.
Save simbo1905/f95e8bcab88e958e672c2678d748c339 to your computer and use it in GitHub Desktop.

Mixing two frameworks will typically require that you are an expert in both to be successful. This is because making them interact will add an additional level of complexity of having to interopate between the two frameworks. That often requires detailed knowledge of the internal workings of the frameworks that you would normally just "take for granted" such as session management and caching.

The point of using a framework is that it provides out-of-the-box "known good practice" in many low-level details so you can focus on your "business logic" not the "basic plumbing". The moment you "go against the framework" and try to do complex things like "make two frameworks coexist" you are basically throwing away the main benefit of using any framework. In short, using two is likely not better than using one. It is like to be more of a case that using two will be "three times the work".

While the actual result will depend on lots of factors I would expect that you would be better off if you picked the worst framework that can "get the job done" and just built your app than if you picked the two best frameworks and tried to combine them.

A good way to pick a new framework if you have a free choice is to look at https://realworld.io That is a community where the exact same realistic app is written in many different languages and frameworks for fun. You can pull several versions from github and run them then read the code to understand their approaches. As they are all implementing exactly the same application you can actually compare "apples with apples". Once you have picked one you can use its 'realworld' demo code as the start for your own application.

@CicherMK
Copy link

Very nice answer @simbo1905 , deeper and more elaborate than mine 😜. The only think, where you say “picked the worst framework that can "get the job done"” , I would say “the lightest framework” 😉

@simbo1905
Copy link
Author

I was saying that, IMHO, if you accidentally picked the fattest, slowest, ugliest framework and used it alone, then you might still be better off than accidentally picking the two most lightweight, fastest and elegant frameworks then try to get them to coexist in the same space.

In twenty years of my own experience, I believe that frameworks, no matter where in any software stack they sit, all tend to do roughly the same thing as their competitors. They all tend to have learnt new techniques from one another. Some frameworks become wildly popular only because they were released by a famous company who evidently "dialled up delivery" beyond what was known to be possible before. Yet in my experience, those always tend to be problematic as they have a lot of growing pain and only remain popular over newer frameworks as they are famous for being famous. In reality, such inventions that initially "dialled up delivery" tend to be rapidly overtaken by newer frameworks that distil what worked best and fix all the awkward mistakes in them. You can probably guess who I am thinking about but I can pick a couple of examples in each language in each decade.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment