untangled

NEW CHANNEL: #fulcro
tony.kay 2016-10-17T04:52:49.002592Z

If anyone is interested, we’ve started working on Untangled Components. A library of reusable components. Right now it mostly contains some half-baked ideas, but I’m in the midst of adding some nifty CRUD form support (with remote integration) that already makes form stuff pretty dreamy. My first sample is running in a devcard on the project. Here is the PR (which will get added to as I go): https://github.com/untangled-web/untangled-components/pull/2

tony.kay 2016-10-17T04:53:58.002594Z

Given that it doesn’t define the UI for you (just all of the madness around controlling the form interactions), I’m strongly tempted to make it part of core untangled client.

2016-10-17T08:53:15.002597Z

That’s pretty cool and the right direction for RAD

2016-10-17T08:56:03.002598Z

Thanks a lot @tony.kay! We hope, we can start in the end of this year our first untangled project….u guys are doing an amazing job.

2016-10-17T13:14:49.002601Z

@tony.kay looks awesome! I really like the idea of composable form elements, given how often we use them. @paul4nandez also built a filtered-list component in insight that you might want to take a look at. It has been very handy for searches

2016-10-17T14:43:07.002604Z

@tony.kay hi there, is there a place with untangled boilerplates? I’d love to migrate some apps I have with angular, but I’m finding it hard to start. Specifically would love a oauth2 universal app boilerplate

fatihict 2016-10-17T14:45:25.002605Z

I get a 404 when I try to access this URL: http://untangled-web.github.io/.. I think that used to work. I can still access the site with this URL: http://untangled-web.github.io/untangled/

2016-10-17T14:48:54.002607Z

@fatihict Only the later is a valid site, I don’t believe we have any redirects in place, or if we even can given its hosted by github

2016-10-17T14:49:02.002608Z

but that’s an area I know very little about!

fatihict 2016-10-17T14:49:20.002609Z

Cool

mitchelkuijpers 2016-10-17T15:03:38.002610Z

@tony.kay I absolutely love the new untangled.client.data-fetch/load combined with the target option. But on thing I am missing is to get some context in the post mutation (for example the :target or the given params). Is that by design or is that just something you never seem to need?

tony.kay 2016-10-17T15:10:55.002612Z

@mitchelkuijpers if you look in the new form stuff I just mentioned, I have a FIXME to add post mutation parameters to U.C. 😄

mitchelkuijpers 2016-10-17T15:11:13.002613Z

Whohoo

tony.kay 2016-10-17T15:11:15.002614Z

it is certainly needed...just have not needed it personally yet. Fortunately, it is easy to add

tony.kay 2016-10-17T15:11:17.002615Z

probably later today

mitchelkuijpers 2016-10-17T15:11:44.002616Z

Btw, now that I got you here

mitchelkuijpers 2016-10-17T15:12:07.002617Z

I will be giving a Untangled presentation at the Amsterdam clojure meetup group

tony.kay 2016-10-17T15:12:32.002618Z

@mping no oauth one yet. On the horizon. http://github.com/awkay/untangled-template-workspace is as far as I've gotten on a good template.

tony.kay 2016-10-17T15:12:48.002620Z

which is pretty far, but no auth yet

tony.kay 2016-10-17T15:13:03.002621Z

we're using oauth, so it is definitely going to be part of what we show how to do

tony.kay 2016-10-17T15:13:16.002622Z

@mitchelkuijpers That's great! Anything I can help with?

mitchelkuijpers 2016-10-17T15:13:49.002624Z

Yeah I will probably rip of some of your presentations

tony.kay 2016-10-17T15:14:00.002625Z

glad to provide my slides if I haven't already

tony.kay 2016-10-17T15:14:07.002626Z

they're all on google docs

mitchelkuijpers 2016-10-17T15:14:14.002627Z

Ah cool I will look for them

mitchelkuijpers 2016-10-17T15:14:31.002628Z

I want to do some live coding. To show the power of untangled 😄

tony.kay 2016-10-17T15:14:43.002629Z

nice

mitchelkuijpers 2016-10-17T15:14:50.002630Z

There was pretty much no one who knew untangled which was interesting

tony.kay 2016-10-17T15:14:50.002631Z

just a min, I'll send you a share

mitchelkuijpers 2016-10-17T15:15:29.002632Z

I’ll probaby put them on the untangled tutorial

mitchelkuijpers 2016-10-17T15:15:36.002633Z

should be a good test 😉

mitchelkuijpers 2016-10-17T15:18:36.002634Z

I think I am going for a short presentation and then get to work (they will learn more from the tutorial then from a presentation)

tony.kay 2016-10-17T15:19:20.002635Z

sure. good rule though is to keep it to simple things that everyone can follow easily....which is a little hard with Om to start because of the dramatically different model

mitchelkuijpers 2016-10-17T15:19:37.002636Z

Yeah I might start with a small database

mitchelkuijpers 2016-10-17T15:19:57.002637Z

Will be a bit of a challenge

tony.kay 2016-10-17T15:20:33.002638Z

There's a lot of minutia to get in the way of the fact that it's actually simple 🙂 E.g. query syntax

tony.kay 2016-10-17T15:20:41.002639Z

tree composition

tony.kay 2016-10-17T15:20:52.002640Z

etc.

tony.kay 2016-10-17T15:21:13.002641Z

good luck! I'll be excited to see the result. Record it if you can (at least with QT screen recording)

mitchelkuijpers 2016-10-17T15:21:21.002642Z

Thank you it will be recorded

mitchelkuijpers 2016-10-17T15:21:32.002643Z

there will even be a live recording 😉

mitchelkuijpers 2016-10-17T15:21:37.002644Z

I’ll keep you posted

gardnervickers 2016-10-17T15:26:47.002645Z

Hey folks, does anyone have any advice for setting up the Untangled Server to always serve the Untangled App for every request? I tried putting an entry in :extra-routes for [true :index] but that’s not working correctly.

2016-10-17T15:30:43.002647Z

@tony.kay starred, maybe I can contribute, although I’m not that well versed in clj

2016-10-17T15:31:00.002648Z

I have a couple of apps running with friend/oauth, shouldn’t be hard to port it

2016-10-17T15:32:21.002649Z

although the way I’m doing it is with a completely protected url under oauth (say, /authenticated/…), its "server-side" oauth

adambros 2016-10-17T16:08:49.002650Z

@gardnervickers you should try something like [“” {true :index}]

gardnervickers 2016-10-17T16:09:29.002651Z

@adambros Thanks, I had made a false assumption about the bidi syntax.

tony.kay 2016-10-17T16:09:36.002652Z

@adambros are extra routes in front of /api?

adambros 2016-10-17T16:09:54.002653Z

@tony.kay yes

adambros 2016-10-17T16:10:11.002654Z

also in front of /index

tony.kay 2016-10-17T16:10:18.002656Z

@mping That'd be great. Like I said, we've already done quite a bit of work there...just need to get it into something on the OSS codebase

tony.kay 2016-10-17T16:10:35.002657Z

@adambros won't your suggestion break api then?

adambros 2016-10-17T16:10:51.002658Z

ah yeah it would

tony.kay 2016-10-17T16:11:12.002659Z

might be something we should change....extra routes should not be in front of API service

adambros 2016-10-17T16:11:22.002660Z

you might be able to get away with a regex

tony.kay 2016-10-17T16:11:38.002661Z

a prehook might be better for @gardnervickers problem

adambros 2016-10-17T16:11:53.002662Z

[“” {#”^[/api]” :handler}] ish

tony.kay 2016-10-17T16:11:53.002663Z

but a regex, if supported well, would also work

tony.kay 2016-10-17T16:11:59.002664Z

sure

tony.kay 2016-10-17T16:12:08.002665Z

I don't know bidi well 🙂

adambros 2016-10-17T16:14:45.002666Z

@gardnervickers what is your use case for wanting everything to :index?

tony.kay 2016-10-17T16:14:53.002667Z

routing

tony.kay 2016-10-17T16:14:57.002668Z

html5

adambros 2016-10-17T16:15:01.002669Z

?

adambros 2016-10-17T16:15:12.002670Z

oh like a single page app?

tony.kay 2016-10-17T16:15:22.002671Z

Yep...think about hitting refresh in browser

tony.kay 2016-10-17T16:15:27.002672Z

(reload)

adambros 2016-10-17T16:15:33.002673Z

isnt this what hash fragment routes are for?

tony.kay 2016-10-17T16:15:40.002674Z

the URI says boo/bah/blah

tony.kay 2016-10-17T16:15:50.002675Z

and your server says NOPE

gardnervickers 2016-10-17T16:15:54.002676Z

@tony.kay exactly

tony.kay 2016-10-17T16:16:40.002677Z

@adambros If you're using fragments, you're ok, but if you're using URI paths, it isn't

adambros 2016-10-17T16:17:26.002678Z

well anyway i think extra-routes should at least be “in front of” /index

adambros 2016-10-17T16:17:46.002679Z

i could see someone wanting to change the location of /api as well

tony.kay 2016-10-17T16:17:56.002681Z

it's probably ok for it to be in front front as long as regex works

gardnervickers 2016-10-17T16:18:02.002682Z

Hash fragments probably make more sense for our app anyway. Thanks

👍 1
adambros 2016-10-17T16:22:52.002684Z

as a note this regex seems to do it: #"^(?!api$).*”

2016-10-17T18:12:49.002688Z

(defn- auth-middleware [ring-handler]
  (-> ring-handler

      (wrap-bidi-routes ["/" {#"^history.*" {:get redirect-to-index}
                              #"^(?!api|static|generated|history).*$" {:get index-page}}])

2016-10-17T18:12:59.002689Z

(defrecord Authentication [handler]

  component/Lifecycle
  (start [this]
    (add-ring-middleware! handler auth-middleware)
    this)
  (stop [this] this))

2016-10-17T18:13:30.002690Z

(defn make-system []
  (make-untangled-server
....
   :components {
                :auth-hook (auth/make-authentication)
....
      )

2016-10-17T18:44:57.002691Z

I am trying to start a server from untangled-template-workspace, and failing. I get the user prompt, but when I type (go), I get a compiler exception saying ago is not found. any idea what I am doing wrong?

tony.kay 2016-10-17T19:07:36.002692Z

@jdunruh could be I forgot to put you in the correct namespace....`(user/go)` ?

tony.kay 2016-10-17T19:09:54.002693Z

Hm. works for me.

tony.kay 2016-10-17T19:09:59.002694Z

λ lein run -m clojure.main
16-10-17 19:09:20 Tony-Kays-MacBook-Pro.local INFO [template.api.read:7] - Loading API definitions for template.api.read
Clojure 1.8.0
user=> (go)
16-10-17 19:09:27 Tony-Kays-MacBook-Pro.local INFO [untangled.server.impl.components.handler:180] - Creating web server handler.
16-10-17 19:09:27 Tony-Kays-MacBook-Pro.local INFO [untangled.server.impl.components.web-server:18] - Web server started successfully. With options: {:port 3000}
#<SystemMap>

2016-10-17T19:10:45.002695Z

nope can’t find user/go either. I don’t see username space in the server sources for this project.

tony.kay 2016-10-17T19:10:55.002696Z

in dev folder

tony.kay 2016-10-17T19:11:03.002697Z

dev/server

tony.kay 2016-10-17T19:11:21.002698Z

don't want those in production...so only on source path when in developer mode

tony.kay 2016-10-17T19:11:31.002699Z

if you're not using lein, perhaps you forgot that source path

2016-10-17T19:16:58.002700Z

I’m using intellij, the docs say to use a clojure.main repl, which is what I did. I switch to a lein configuration and it found go. the client is failing to load a resource which is the javascript for the client. there must be a configuration problem I will investigate.

2016-10-17T19:18:31.002701Z

I am converting application I started with om.next. I have this a client working with file server, and I’m trying to convert the server as well as updating the file structure to look more like your standard set up.space So far like what I see.

2016-10-17T19:21:25.002702Z

I just me at index-dev instead of index. It appears to be working now. Thanks