michaellperry / Assisticant

MIT License
36 stars 19 forks source link

Documentation doesn't mention computed #38

Open qwertie opened 3 years ago

qwertie commented 3 years ago

And I am baffled by that: https://assisticant.net/documentation.html

michaellperry commented 3 years ago

Good to see you again.

The documentation is admittedly incomplete. There are more APIs besides Computed that I still have not written guides for.

I focused on the classes that people use most often. This helped me put together a small cohesive story and get it in front of people. Then I started putting together the Pluralsight course. I based my level of effort in expanding the documentation on the amount of feedback I got through the course and other channels. Since I wasn't getting much traction on Assisticant, I focused my attention on other initiatives.

Computed is a pretty important part of the library. If I do return to update the documentation, it will be the first place I start. The site is created using Jekyll and hosted on GitHub Pages. The repository is open.

With .NET Maui, there might be renewed interest in this space. If so, I might finally bring Assisticant to .NET Core and .NET 5/6. That will be a good time to refresh the docs.

qwertie commented 3 years ago

I see. Sadly I'm not actually using Assisticant because React is all the rage, I'm just sort of trying to use it to win an argument about state management. Btw did you ever work out how to do 'partial' updates in which you avoid refreshing a component C that reads a dependent/computed value D when D is recomputed but does not change? I just noticed that MobX advertises this optimization.

michaellperry commented 3 years ago

I'm also using React. It doesn't even try to map dependencies, so I know how much more work it is doing behind the scenes. But the fact is that it hardly matters. On the plus side, I think that the functional projection programming model is a big improvement over MVVM, so I'm not complaining.

I can see how to implement the partial update scenario. I would have to abandon the simplification of tearing down dependencies when a dependent goes out-of-date. Instead, I would have to track a status per dependency. That would tell me if the dependent is out-of-date because of this dependency, or if there is another reason.

To me, it's a time-space tradeoff. I'm not yet convinced that the amount of time it would save the average application user would be worth the space of tracking state for all dependencies. But of course, I could provide a different Computed class to give app developers a choice. Kind of like Knockout's pureComputed, but for a different reason. I would just prefer not to expand the API in a way that requires the developer to know too much about implementation details.

MobX looks pretty cool. I might give it a shot. React state has always been clunky, and hooks are confusing. But then again, I appreciate the immutable mindset, even when it takes a bit more effort to maintain it.

qwertie commented 2 years ago

I'm considering Assisticant now for computed state in an app's backend (no UI). But I don't see what Assisticant offers over Update Controls.... and I think Update Controls has better documentation. But I'd rather use a NuGet package, and the link to the source code of Update Controls is broken, which are certainly points in favor of Assisticant. Apart from that, has Assisticant improved?

Btw I've been using MobX and it has been working great. The documentation isn't great, but for an Update Controls fan like me it's a good fit.

michaellperry commented 2 years ago

The benefits of Assisticant over Update Controls are:

I basically used the name change as an excuse to drop some cruft. And I admit that the documentation at assisticant.net is still just the first pass. I was hoping that I would see more demand and questions, which would help me turn answers into documentation for everybody. But without that demand, I put my time elsewhere.

I still haven't had an opportunity to use MobX on a project. In the .NET space, it looks like things are moving in a similar direction to MobX. Blazor and MAUI are looking pretty close. I wonder if people have the appetite for declaring their Observables and Computeds so explicitly given this style. If that's the direction the market is going, it might make sense to support people where they are.

michaellperry commented 2 years ago

BTW, if you'd like to help me out by writing up a page on Computed, you can follow the example from Validation. I'd appreciate even an outline.