Fork me on GitHub
#untangled
<
2017-03-28
>
eric.shao03:03:40

@wilkerlucio @tony.kay It turns to work after I changed the name from 'login/login-complete to ‘fetch/items-loaded. Is the ‘login/login-complete a built-in-route? BTW: the cache is really an annoying problem. I’ve enable “Disable cache (while DevTools is open)”,hope it work.

wilkerlucio09:03:44

@eric.shao the untangled template has a mutation named login/login-complete, but not the framework, you can check the file https://github.com/untangled-web/untangled-template/blob/develop/src/client/untangled_template/ui/login.cljs#L18-L23

eric.shao10:03:22

@wilkerlucio Thank you for your help! I am just using the untangled-template.😀

fatihict16:03:01

What are the components passed in to a module with the new untangled system for? Can I include dependencies for modules that way or does it have a different purpose?

tony.kay17:03:43

@fatihict There are two things going on: One is composition of parsers, so an external library provider can "hook in" to your server Om API processing in a clean way. The other is the stuart-sierra style component injection, to make components available in your server and the env of your parser

tony.kay17:03:22

e.g. if one module returns nil from a mutation or read handler, then the next one in the chain is tried

tony.kay17:03:20

Untangled is trying to make it possible to have libraries that can provide more than just raw UI. For example, the fact that we've defined the client-side Om Next mechanisms (mutate and read) enables things like the forms support in untangled-ui.

tony.kay17:03:53

in raw Om Next, you cannot make assumptions about the database format, so supporting stateful form management would be a hard "plug-in" library to just make for the general public

tony.kay17:03:46

So, we're trying to do similar things on the server: I want to use an image library tool (which we also have in untangled-ui)...how do the images get saved, retrieved, etc? How do I make UI components that have pre-built reads/mutations that allow easy re-use in a full-stack sense?

tony.kay17:03:30

Om Next makes such things possible in general due to the abstract nature of reads/mutations...but a library provider would just have to document what those things are supposed to do...they would not really be able to provide implementations because there are too many unknowns about how you have implemented everything.

tony.kay17:03:56

Did you use multimethods? What db are you using on the client? etc.

tony.kay17:03:21

By making a few concrete decisions and providing implementations for them, we (I hope) open the door for a wider range of reusable libraries that provide more value.

fatihict17:03:30

@tony.kay Thanks for taking the time to explain it, that helps a lot 🙂. The more I learn about Untangled the more I appreciate it. I hope I'll get good enough soon to also contribute code to the project 😀

claudiu19:03:19

For the untangled.router (looking at devguide examples). Is there any way to set the active route on entry ? I’m probably missing something elementary.

tony.kay21:03:11

So, each "router" is a component that can switch among the children

tony.kay21:03:47

The "routing tree" is a concept/data structure that allows you to combine instructions to one or more "routers" for a given screen to appear from your overall app

tony.kay21:03:47

The route-to mutation triggers a routing tree instruction by name. The update-routing-links is a function you can use to compose into your own mutations, for when you want to combine UI changes with other operations, such as data loading

tony.kay21:03:21

"on entry"...I'm guess you mean according to URL loaded when page loaded? Yeah, in started-callback on the client, just look at the URL and trigger a route-to mutation.