Deciding the frontend framework #55
Replies: 2 comments
-
@pavish Your recommendation of Django templates + Svelte sounds good to me. I have not used Svelte before, but I did some reading on it, and it seems like a solid option. I agree that HTMX/Django Unicorn, and other "sprinkling of JavaScript" approaches are not a good fit for Mathesar because of the amount of rapid interactivity that we would like in the product. I'm curious about some of the higher performing libraries from your references like HyperApp, AppRun, etc. but I don't think it's worth investigating them further. Svelte seems fine and I think your experience with Svelte will help us get up and running faster, which is good. |
Beta Was this translation helpful? Give feedback.
-
@pavish I like your recommendation. I also think the idea of building a UI component library is a good one. |
Beta Was this translation helpful? Give feedback.
-
This discussion is for analysing and choosing the frontend framework/libraries for Mathesar. The priority is on choosing the approach that best suits our roadmap and feature list.
We are looking for framework/libraries for rendering our application code, and are not going to be analyzing libraries for charting, custom selectors etc., in this discussion thread.
Our use case includes developing the app itself, custom ui components for spreadsheet like views, calendar, kanban views, custom date pickers etc.,
We are looking for frameworks/libraries/approaches that satisfy the following:
We are also looking for good testing support, but we would be probably be using testing tools like cypress, which are development agnostic and can apply to any approach. This is yet to be discussed.
We are not going to be discussing about tooling in this thread, since it's dependent upon the framework/library of choice.
The initial analysis covers libraries based on popularity, recommendations, HN threads & internal considerations. Some of them are server rendered, and some are client rendered. Chances are that we may require combining two frameworks to suit our needs, like it's done by most modern applications.
We will not be going into detail about each framework in the thread. We will add links to their respective sites and references. The following contains only the pros and cons of each of the above mentioned framework/libraries.
The points mentioned below are my own views and this discussion thread is to help obtain different set of views and opinions from the rest of my team and the developer community in general.
Table of contents
My personal opinion
React
Website: https://reactjs.org
Pros
Cons
Svelte
Website: https://svelte.dev
Pros
Cons
Vue
Website: https://vuejs.org
Pros
Cons
Django templates
Website: https://docs.djangoproject.com/en/3.2/topics/templates/
Pros
Cons
Hotwire: Turbo + Stimulus
Website: https://hotwire.dev
Pros
Cons
Sockpuppet
Website: https://sockpuppet.argpar.se
Pros
Cons
HTMX
Website: https://htmx.org
Pros
Cons
Django Unicorn
Website: https://www.django-unicorn.com
Pros
Cons
My personal opinion
Svelte + Django templates
Based on the above analysis and considering that we need to be building custom UI components for most of the usecases of Mathesar, it is imperative that we will need a client library.
The idea is to use Django templates to serve static files for faster initial load and then take over the control from the client after page load.
How?
Isn't this what the HTML over wire approaches do?
Why Svelte?
What about lack of stable component libraries for Svelte?
This thread is open for different set of views and opinions, and factors that we may have failed to consider. Also, please feel free to add more frameworks/libraries in the thread, that can also be analyzed.
Beta Was this translation helpful? Give feedback.
All reactions