-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace the React front-end with Razor pages #678
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
loic-sharma
added a commit
that referenced
this pull request
Sep 6, 2021
Improves the mirroring implementation: 1. Push all mirroring logic into the `MirrorService`. This will make it easier to reuse mirroring logic in the upcoming Razor Pages rewrite: #678 2. Add unit and integration tests on the mirroring functionality 3. Fixed bugs caught by tests
this is great news. it will allow .net developers to contribute to UI as well. |
loic-sharma
force-pushed
the
loshar/razor
branch
from
September 12, 2021 04:13
9cbb21e
to
335ca5a
Compare
loic-sharma
commented
Sep 12, 2021
loic-sharma
commented
Sep 12, 2021
loic-sharma
commented
Sep 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This replaces BaGet's React front-end with Razor Pages to reduce complexity and improve developer productivity.
Addresses #344 and fixes UI issues in #276.
Why?
React and other Single Page Application (SPA) frameworks are great if you need a rich client experience. Unfortunately, these frameworks do have significant costs to developer productivity and maintainability. For mid-sized applications like BaGet, these costs outweigh the benefits of using a SPA framework.
Developer productivity
BaGet's old frontend used technologies like React, TypeScript, webpack, NPM, Jest, etc... A .NET developer needs to learn and install all of these to contribute. Let's be honest, it's overwhelming.
ASP.NET Core provides tooling to bridge .NET and the SPA framework, which makes it easy for .NET developers to build and run the app. However, this tooling is sluggish in the following scenarios:
The separation between the frontend and backend also adds complexity as all data displayed in the frontend must be fetched from a backend API. BaGet needed some clever tricks so that the API that powered the React frontend also implemented the NuGet protocol.
Finally, the frontend/backend separation also makes authentication significantly more complex, which is unfortunate since private feeds is one of BaGet's most requested features.
Maintainability
The JavaScript ecosystem moves fast and keeping up is really, really hard. It is not uncommon for a vulnerability to be reported in a dependency that has been abandoned, forcing you to migrate to a new dependency. Rewrites are unavoidable in JavaScript.
The new stack
This pull request moves to a boring but pragmatic stack:
I call this the LARP stack 😎