|
| 1 | +## April 14 ([discuss](https://github.com/SimplrJS/simplr-forms/pull/4)) |
| 2 | + |
| 3 | +### Attendees |
| 4 | + |
| 5 | +* [Dovydas](https://twitter.com/dovydasnav) (QuatroDev) |
| 6 | +* [Martynas](https://twitter.com/MartiogalaLT) (QuatroDev) |
| 7 | +* [Giedrius](https://twitter.com/giedrucis) (QuatroDev) |
| 8 | +* [Aurimas](https://twitter.com/waikys) (QuatroDev) |
| 9 | + |
| 10 | +### simplr-forms-core is done for pre-alpha |
| 11 | + |
| 12 | +During the week, we worked on `simplr-forms-core` to have a solid foundation for `simplr-forms-dom` and `simplr-forms-native`. |
| 13 | + |
| 14 | +Most of the coding was done by Dovydas and Martynas, with valuable and fast reviews by Giedrius. |
| 15 | +Feels good to work with such an amazing team. |
| 16 | + |
| 17 | +Also, Aurimas joined our efforts by preparing react-native app for development of `simplr-forms-native`. Thanks, Aurimas! |
| 18 | + |
| 19 | +We will start working on both `dom` and `native` packages soon. |
| 20 | + |
| 21 | +### So... What happened during the week? |
| 22 | + |
| 23 | +We can confidently say that we have a solid first appearances of `core`, which consists of: |
| 24 | +* [`form-stores-handler`][1] - a general manager for all forms data stores |
| 25 | +* [`form-store`][2] - a data store for one particular form |
| 26 | +* [`base-form`][3] - a base component for a form to register to store and provide context for children, register with `form-stores-handler`, etc. |
| 27 | +* [`base-field`][4] - a base component for field that is aware of the parent form, registers and registers to and from form store, incorporates React lifecycle events, etc. |
| 28 | + |
| 29 | +These 4 pretty much cover the base of the whole library. |
| 30 | + |
| 31 | +Of course, there is more to it. |
| 32 | + |
| 33 | +[`form-stores-handler`][1] and [`base-form`][3] extend [`ActionEmitter`][5] for you to be able to `addListener` |
| 34 | +for actions and know when the store is created, updates it's state or even more specific [actions][6], |
| 35 | +e.g. [value][7] or [props][8] are updated. |
| 36 | + |
| 37 | +This enables another amazing thing: now we can externalize validation! |
| 38 | + |
| 39 | +> Shoutout to Giedrius for publishing [`ActionEmitter`][5] right on time. |
| 40 | +> And for us all to debugging it in a single day :smile: |
| 41 | +
|
| 42 | +### Externalized validation |
| 43 | + |
| 44 | +We understand that most developers use whatever they get out-of-the-box, |
| 45 | +especially if what they get is an easy-to-consume and also an optimal solution. |
| 46 | + |
| 47 | +But sometimes usage of project-specific validation library is a must. |
| 48 | + |
| 49 | +For example, there are quite a few industries with very specific data structures and their validations. |
| 50 | +Medicine, aviation, insurance, finance... And that's just a few on the tip of the tongue. |
| 51 | + |
| 52 | +Therefore, externalizing validation is an amazing step forward to using `simplr-forms` |
| 53 | +no matter what data validation requirements you have. |
| 54 | + |
| 55 | +### Testing |
| 56 | + |
| 57 | +A library without tests these days is a scary and unstable bomb with a timer that shows gibberish on it's timer, |
| 58 | +i.e. you don't know when it is gonna hit you. |
| 59 | + |
| 60 | +Therefore, we already have 44 tests in 4 test suites. |
| 61 | + |
| 62 | +And we will write as much more as we need to ensure everything will progress forward |
| 63 | +and this library becomes de-facto a standard, a no brainer when anyone thinks about React and forms. |
| 64 | + |
| 65 | +### What's next? |
| 66 | + |
| 67 | +Releasing pre-alpha of `simplr-forms-core` and starting development of `simplr-forms-dom` and (maybe) `simplr-forms-native`. |
| 68 | + |
| 69 | +Also, `simplr-validation` is coming into the light as we evaluate all of the peaces for it. |
| 70 | + |
| 71 | +And now... It's coding time again! :tada: |
| 72 | + |
| 73 | +------------ |
| 74 | + |
| 75 | +The feedback and questions are more than welcome! |
| 76 | + |
| 77 | +------------ |
| 78 | + |
| 79 | +Please feel free to discuss these notes in the [corresponding pull request](https://github.com/SimplrJS/simplr-forms/pull/4). |
| 80 | + |
| 81 | +[1]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/stores/form-stores-handler.ts |
| 82 | +[2]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/stores/form-store.ts |
| 83 | +[3]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/abstractions/base-form.ts |
| 84 | +[4]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/abstractions/base-field.ts |
| 85 | +[5]: https://github.com/SimplrJS/action-emitter |
| 86 | +[6]: https://github.com/SimplrJS/simplr-forms/tree/dev/packages/simplr-forms-core/src/actions |
| 87 | +[7]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/actions/form-store-actions.ts#L3-L9 |
| 88 | +[8]: https://github.com/SimplrJS/simplr-forms/blob/dev/packages/simplr-forms-core/src/actions/form-store-actions.ts#L11-L17 |
0 commit comments