Skip to content
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

JSON-powered UI for TaxBrain #435

Closed
talumbau opened this issue Dec 16, 2016 · 3 comments
Closed

JSON-powered UI for TaxBrain #435

talumbau opened this issue Dec 16, 2016 · 3 comments
Labels

Comments

@talumbau
Copy link
Member

The current TaxBrain interface (www.ospc.org/taxbrain) uses the standard Django Model/Form abstraction to present an interface to the user. Each parameter lives on a Django Model, and we use the built-in abstraction of a ModelForm to present the form to the user and then receive the user's input to create an instance of a Model. This is a fairly heavyweight approach, in the sense that as additional parameters are added to Tax-Calculator (or are removed from Tax-Calculator), we have to modify the Model class in TaxBrain, which involves a database migration. It further involves editing the Python file specifying the model, and the HTML temples for rendering the form.

This issue is for the discussion of a replacement of this interface. The idea would be that the entire UI could be specified in some text format (preferably JSON) and then rendered in Javascript directly from this text specification. The rendering would happen dynamically, so that a UI change would simply involve changing the text specification (which would likely live in Tax-Calculator, or perhaps some other package).

This idea seems feasible, but I haven't found a large number of libraries that do this. One option that seems to capture the requirements is Angular Formly

I'm wondering if either @zrisher or @brendancol could take a read through the documentation of Angular Formly (linked above) and give their opinion on whether you think this library would work for TaxBrain. Thanks!

cc @MattHJensen

@zrisher
Copy link
Contributor

zrisher commented Dec 22, 2016

@talumbau @MattHJensen

  • I would love to abstract away taxcalc usage details from the server-side code of this repo. I think it will simplify a ton of stuff and make this easier to maintain.
  • I'm a huge fan of Angular and think it's an excellent candidate for this type of problem.
  • Angular-formly looks like it has a big community, is well maintained, and aims to make specifying forms with arbitrary configuration straight forward.
  • I wouldn't be able to devote much time to this until Feb at the earliest. Happy to help out with architectural questions, but otherwise that may limit the usefulness of my support for this idea.

@zrisher
Copy link
Contributor

zrisher commented Jan 28, 2017

@talumbau @MattHJensen Been doing some research in javascript front end frameworks. The current best overall options seem to be Angular 2 (/4 soon) and Vue. I actually discovered Vue just going through the most popular repos on Github, but the comparison with other frameworks was a nice sell on it.

IMHO, Angular is the way to go if you're building an app that communicates with many different processes maintained by different people. That's where variable typing really shines, and I think their choice of TypeScript was heavily motivated by that core requirement.

Vue attracted me with its simplicity and speed, and I haven't been disappointed when developing with it so far. I think it would be an excellent candidate for this problem, and if it's only being used for the taxbrain page we wouldn't need its standard dependencies vue-router and vuex.

I'm available to work on this, whatever tool we decide to use, in mid Feb.

@hdoupe
Copy link
Collaborator

hdoupe commented Mar 13, 2018

Closed via #822

@hdoupe hdoupe closed this as completed Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants