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

A diagram #3

Open
mohsen1 opened this issue Mar 2, 2015 · 1 comment
Open

A diagram #3

mohsen1 opened this issue Mar 2, 2015 · 1 comment

Comments

@mohsen1
Copy link
Member

mohsen1 commented Mar 2, 2015

screen shot 2015-03-02 at 1 11 43 pm

In this diagram I made a case for how we can structure the core library.

  • Template fragments are little pieces of Handlebar HTML files that are specifically named and have required fields. We can have fragments for fields, validations and so on. Users obviously can override those templates.
  • JSON Schema is the base schema for generating the form
  • Customizer object is the object that extends JSON Schema (or maybe with a whole different syntax. Doesn't really have to follow JSON Schema structure). This object can contain custom validators and other things that JSON Schema can't have
  • Full Schema is a single object that contain everything assembler needs to assemble a form
  • Assembler is the core piece here. It's doing the templating and event bindings
  • Form HTML is obviously the final result that have two components
  • Event dispatcher that handles events inside the form and expose it as an API for the user (a user in this case can be angular directive )
  • Data I/O a set of setter/getter functions for transferring data. The data can be an instance of standard FormData
@bvaughn
Copy link
Member

bvaughn commented Mar 11, 2015

Sorry for the belated response. Here's sort of how I'm thinking about things (having worked through a little bit of sample code in a test branch.

Disclaimer: I'm not very good with diagrams. ;)

Sequence Diagram

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants