Component suggestions for forms-and-tables-heavy line-of-business app

Had this issue open since last year. I recently updated it with new comments.

Actually, Eric worked on the CRF application prior to me, so UCSC has been supporting autoforms for a year or two now, in one way or another. I donā€™t know this for a fact, but it seems that Ericā€™s declaring autoforms complete happened about the same time he left the CRF project for other opportunities.

So, like I saidā€¦ weā€™ve been writing acceptance tests in preparation for an underlying implementation change; and are keeping a close eye on Sideburns/ReactBlaze/etc. The exact implementation doesnā€™t matter too much to us, just so long as it conforms to the Spacebars APIs that was basically specified at Meteor 1.0. Once we make that migration, I suspect weā€™ll look at mapping the autoforms functions to the underlying React functions, and removing the templating interface.

As for radios/checkboxes/selects, weā€™ve gotten most all of that under QA with our Nightwatch scripts using css selectors. I used to be kind of uncomfortable with them, but am becoming much more confident with the QA tests. Whatā€™s giving us headaches now are nested objects.

1 Like

@aadams Iā€™ve posted a reply on the issue tracker :slight_smile: Letā€™s see if we can solve that problem there.

1 Like

It is very reassuring to know that there are so many tests running against autoform! Do you consider PRā€™ing them to the official autoform repo?

Nested objects have their quirks, especially with their validation, but as long as they are not arrays, they can be tamed. I canā€™t say the same or arrays, especially with [Object] which contain boolean-radio's. Iā€™ve had so many bug reports from clients reporting that they lose their state as soon as new lines are added to the array. And it is not a consistent bug so a reproduction is really hard to produce for an official bug report aaah :frowning:

3 Likes

More likely, weā€™re going to create a package that has a dozen form schema definitions, and a dozen acceptance test commands (which each get their own file, as per Nightwatch design). The new testing MVD includes a meteor test command which exposes test assets after build, which means that Nightwatch will be able to scan and pick them up.

Put another way, instead of internal unit tests, we want to create a package of a dozen forms that export testing helper functions that say ā€˜this form should look like this, and have these elements after its renderedā€™.

Unfortunately, weā€™re dealing with Arrays alsoā€¦ :sigh:

instead of internal unit tests, we want to create a package of a dozen forms that export testing helper functions that say ā€˜this form should look like this, and have these elements after its renderedā€™.

Even better! Unit tests would probably not work for every app anyway, so a battle-tested examples of form definitions and accompanying test would be pretty helpful.

Unfortunately, weā€™re dealing with Arrays alsoā€¦ :sigh:

Best of luck!

Since I moved to React land, I too wanted some sort of smart form that would handle validation, errors, etc., so I made one. :smile:

https://atmospherejs.com/ffxsam/react-smartform

Itā€™s still very preliminary, and I have a lot of plans for it. I still have to add textarea, select, etc., as well as adding callbacks to input fields for all kinds of custom functionality (verifying data in the db). Still, itā€™s good enough to the point where Iā€™m using it and adding stuff on when I have the time.

I probably wonā€™t make it generate fully complete HTML forms like autoform does. I want to keep it in pieces to give more control to the developer.

2 Likes

@serkandurusoy: OHHHHH NOā€¦ why are all you good people leaving Blaze? :cry:

I mean: Why switch to react when all we want is to program a business app. Is ReactNative really such an important selling point over the great Blaze? In other words: doesnā€™t Blaze and the aldeed:stuff combined with a responsive css framwork (making it mobile-compatible) do a great job - even on mobile?

@ffxsam thanks for sharing that. The thing is, this is kind of my point. React is not built for meteor, therefore as soon as I bring in react, I kind of lose a lot of the goodness that meteor offers. Starting with code duplication. Besides, what good is react if I canā€™t actually use the react ecosystem seamlessly? In other words, why should I then use Meteor if I go React?

Anyway, Iā€™m still searching for the right toolsets and really donā€™t want to dive in blindly, just hoping for the better.

@thebarty thank you for the compliment, I guess and well, Iā€™m not going anywhere, yet! @tmeasday shared an interesting opinion over at this thread.

My problem is, I need the stability since these line of business apps are developed for businesses who see their software investments as long term assets and donā€™t want to switch technologies unless there is some really serious business value. Therefore I need the peace of mind that what I deliver now will continue to get support, bugfixes and some enhancements, all the while allowing me to do general meteor update on the code.

Therefore, if react is whatā€™s going to get me that, I have to go that route. But if blaze is to satisfy those conditions, then Iā€™m undoubtedly all for blaze!

And finally, if Iā€™m going to go with React, I need to pick the brains of the more experienced react developers to make sure Iā€™m betting on the best possible component libraries that fit my requirements.

2 Likes

Iā€™m not quite sure what you mean. React is just a layer over Meteor, in a similar way that Blaze is. Iā€™ll grant you that Blaze is much more tightly adapted to Meteorā€™s infrastructure with regards to reactivity, but Iā€™m curious about what kinds of ā€œgoodnessā€ you feel youā€™re missing with Meteor+React.

The big difference is that React Native is generating truly native code, whereas Meteor is using Cordova which is essentially a wrapper.

1 Like

what kinds of ā€œgoodnessā€ you feel youā€™re missing with Meteor+React.

Blaze is obviously built from ground up to be part of meteorā€™s reactive lifecycle. React offers it - officially - with a mixin, still lacking the ability to sprinkle reactive sources around. No automatic starting and cleaning of computations.

I know you and a few other brilliant developers are working to solve that problem, but I cannot rely on that.

Enterprises need the peace of mind of having official integrations. As far as official goes, react still feels like a square in a round hole.

2 Likes

No, I totally get that. It does still feel like React is kind of shoe-horned into Meteor with glue and tape. :slight_smile: Iā€™m sure (I hope) MDG is working on that, though.

2 Likes

Yep, I have no doubt when they finish up, theyā€™ll have delivered a great integration. But when they do, when they doā€¦

1 Like

To some extent, yeah. Your reactive business logic is limited to getMeteorData, but of course render will re-render based on changes to the data returned by getMeteorData. And there are some glaring bugs as well.

For me, Meteor+React didnā€™t really stick until I started using @luisherranzā€™s MeteorFlux packages (meteorflux:dispatcher, meteorflux:reactive-state (Flux pattern), meteorflux:appstate (Redux pattern)). Now everything can communicate and function the way I want it to, without having to do insane things like pass callbacks four levels deep as props.

Oh yes, and then there are the mixed opinions revolving around whether or not meteor requires or indeed should not get flux patterns.

It is really very tiring and frustrating to have to do research, evaluate things and form opinions everyday, instead of getting things done. On top of that, finally feeling one day like the master of meteor universe and the next like a complete newbie just does not help :wink:

4 Likes

Oh I feel like an idiot with this stuff on a daily basis. :wink: Donā€™t sweat it. Weā€™re all constantly learning, which is difficult considering how quick tech changes these days!

1 Like

Yep, I wish it did not change for a change :wink:

Itā€™s been a couple of months since this conversation and Iā€™m wondering how people have been finding React for line of business apps? This sort of work with lots of forms and tables is very much our bread-and-butter stuff and weā€™re really torn on whether to start our Meteor adventure with React or stick with Blaze for now and see what happens after 1.3.

@awatson1978 you mentioned a project migration to React, has that started and has it gone well?

@serkandurusoy did you find a solution that gave you some or all of the features from Autoform in React?

In the end, Iā€™ve decided that blaze is ā€œeasierā€ for a line of business
app where the main two ā€œcomponentsā€ are ā€œtablesā€ and ā€œformsā€ and there
are lots of those, and not much of anything else. Tabular and autoform
make it almost too easy. Oh and I also find that a good pattern for
adding/editing/viewing is to do it within a modal and not leave the
"list" page for those actions.

3 Likes