angel-dart / flutter

Widgets and helpers for developing Flutter clients for Angel applications.
5 stars 3 forks source link

Would be nice to see more examples #3

Open ghost opened 6 years ago

ghost commented 6 years ago

I am using a flutter webview. In order to make it load offline I need to put a dart web server inside flutter. Yes it's kind of funny to run a web server I side flutter to feed a webview but it's also very useful.

Anyway I was thinking about the big issue of how to do state updates and getting flutter widgets to update. It occurred to me that this area has been solved before for server side and event sourcing and cqrs system patterns. If angel had a pattern like this it could be used on servers flutter and dart web !!

thosakwe commented 6 years ago

Because Angel has a dependency on dart:mirrors, there is very little chance it will ever run in Flutter.

I'm wondering, though. I actually haven't used CQRS before, and I found Fowler's explanation of it a bit abstract and confusing. Do you have any recommendations I can read?

thosakwe commented 6 years ago

By the way, you can use package:angel_route everywhere, which often is enough for small servers (It might be smart for me to roll a small server in package:angel_route/io.dart that uses HttpServer, for use cases like this).

ghost commented 6 years ago

https://www.confluent.io/blog/event-sourcing-cqrs-stream-processing-apache-kafka-whats-connection/

A good practical explanation.

Why use it ? Many reasons.

The react flux pattern is an abstraction of CQRS. I am guessing many react Devs have never heard of CQRS. Under the hood it's how a database really works.

There is a great video called Turning the database inside out. I recommend it.

--

Regarding the use of mirrors, that's going to be a show stopper for me. I guess I might have to look at another dart server. All I need is to server static content and JSON RPC. Am guessing the mirrors will effect me with JSON serialisation ?

On Mon, 25 Jun 2018, 00:32 Tobe O, notifications@github.com wrote:

By the way, you can use package:angel_route everywhere, which often is enough for small servers. (It might be smart for me to roll a small server in package:angel_route/io.dart that uses HttpServer, for use cases like this).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/angel-dart/flutter/issues/3#issuecomment-399793016, or mute the thread https://github.com/notifications/unsubscribe-auth/ATuCwq5Y9fY_H3XRW8OTfoCyp6LbygFyks5uABNjgaJpZM4U1ThL .

thosakwe commented 5 years ago

I'm actually thinking of either revisiting this package, or archiving it. Originally, the plan was to have Angel-specific widgets, but really, other than AnimatedList, everything is pretty simple to roll on a per-project basis.

Turning this package into a set of helpers for embedding Angel into a Flutter app would also be possible, but again, every app is so unique that there might not be much point.

Thoughts?