-
Notifications
You must be signed in to change notification settings - Fork 32
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
Comments
|
@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. |
Closed via #822 |
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
The text was updated successfully, but these errors were encountered: