AmpersandTarski / Ampersand

Build database applications faster than anyone else, and keep your data pollution free as a bonus.
http://ampersandtarski.github.io/
GNU General Public License v3.0
40 stars 8 forks source link

Feature request: data grid #1166

Open stefjoosten opened 3 years ago

stefjoosten commented 3 years ago

Problem

I frequently import data from Excel sheets into Ampersand. The next step is that I want to edit and display that data in an excel-like fashion. For now, I'm using <TABLE> but the result lacks the user experience of Excel. This problem occurs often in practice. If the Ampersand interface could somehow mimic spreadsheet features, that would greatly enhance the usability of prototype. We're talking about features such as sorting and filtering, compact overviews with lots of cells, moving rows and columns, editing in cells (restrained by the CRUD regime). I want to eliminate the need to go back to Excel because the data in the database represents my single truth

Analysis

The data grid functionality is generic. So I figured this has already been done and is readily available on the internet. And indeed, I found Handsontable, which offers a very convincing example. Getting started also looks easy and the data in the spreadsheet can be bound to allow editing in the spreadsheet.

Proposal

This thing needs some research because we want to use this functionality from existing data grid plugins. However, it must be entirely free and open source with no strings attached because we don't want to impose any (not even potentially) financial impact on using this. There are alternatives, such as SheetJS, ag-Grid, ExcelJS, and others. I have not looked into alternatives yet.

Michiel-s commented 3 years ago

Hi @stefjoosten, I recognize the need.. Keep in mind that almost all of these nice packages are not free to use. Non-commercial is often free (like with Handsontable), but you and I both use Ampersand for commercial purposes. Other packages (like ag-Grid) require developer licenses, limiting the number of applications. Because we build many applications with Ampersand, you quickly need the most expensive license. I don't think we should integrate such libraries in our core package. If you have a specific application that builds upon Ampersand (like e.g. RAP), you could buy a license specifically for that application and integrate. Ok with you to close this issue?

RieksJ commented 3 years ago

I, too, recognize the need. I also recall @Michiel-s arguing (I forgot where) that Ampersand is meant for prototyping. If we do want to (also) use Ampersand for commercial purposes, I suggest we think about a way to make the ampersand environment aware of this, in which case features that require a commercial license are disabled until explicitly enabled. Similar to how we can distinguish between development, testing and production instances. It would be a shame if the bulk of the Ampersand work (i.e. prototyping) would suffer from the quality of the tool being (mis?)used for commercial purposes.

Michiel-s commented 3 years ago

Ok.

For a few of these libs, you need to pay anyhow (commercial use or not). That is a no-go for us.

A closer look at the licenses is needed.

But a project where you require such grid functionality can integrate a lib. If generically enough, we can add it to the prototype framework later.

Let's close this issue for now.

stefjoosten commented 2 years ago

I ran into an urgent need for a data grid once again (I'm doing some urgent work for Ukrainian refugees). Looking into it, I found that ag-grid has the MIT license for everything but the ag-grid-enterprise package. It has a substantial community and it is one of the most downloaded datagrid packages of all datagrid plugins in Github (of which there are many). I'm not sure what happened since last year, but this license is definitely good enough for us to use it:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.