untangled

NEW CHANNEL: #fulcro
eric.shao 2017-03-28T03:13:40.582022Z

@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.

wilkerlucio 2017-03-28T09:21:44.696459Z

@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.shao 2017-03-28T10:12:22.365611Z

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

fatihict 2017-03-28T16:02:01.462424Z

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.kay 2017-03-28T17:11:43.961338Z

@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.kay 2017-03-28T17:12:22.975014Z

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

tony.kay 2017-03-28T17:14:20.016612Z

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.kay 2017-03-28T17:14:53.028339Z

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.kay 2017-03-28T17:15:46.046728Z

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.kay 2017-03-28T17:17:30.083532Z

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.kay 2017-03-28T17:17:56.092697Z

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

tony.kay 2017-03-28T17:19:21.123006Z

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.

fatihict 2017-03-28T17:25:30.252739Z

@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 😀

claudiu 2017-03-28T19:09:19.474811Z

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.kay 2017-03-28T21:36:11.276906Z

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

tony.kay 2017-03-28T21:36:47.286489Z

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.kay 2017-03-28T21:37:47.302349Z

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.kay 2017-03-28T21:38:21.310845Z

"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.

tony.kay 2017-03-28T21:38:32.313938Z

@claudiu ^^^