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
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.
That’s pretty cool and the right direction for RAD
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.
@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
@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
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/
@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
but that’s an area I know very little about!
Cool
@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?
@mitchelkuijpers if you look in the new form stuff I just mentioned, I have a FIXME to add post mutation parameters to U.C. 😄
Whohoo
it is certainly needed...just have not needed it personally yet. Fortunately, it is easy to add
probably later today
Btw, now that I got you here
I will be giving a Untangled presentation at the Amsterdam clojure meetup group
@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.
which is pretty far, but no auth yet
we're using oauth, so it is definitely going to be part of what we show how to do
@mitchelkuijpers That's great! Anything I can help with?
Yeah I will probably rip of some of your presentations
glad to provide my slides if I haven't already
they're all on google docs
Ah cool I will look for them
I want to do some live coding. To show the power of untangled 😄
nice
There was pretty much no one who knew untangled which was interesting
just a min, I'll send you a share
I’ll probaby put them on the untangled tutorial
should be a good test 😉
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)
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
Yeah I might start with a small database
Will be a bit of a challenge
There's a lot of minutia to get in the way of the fact that it's actually simple 🙂 E.g. query syntax
tree composition
etc.
good luck! I'll be excited to see the result. Record it if you can (at least with QT screen recording)
Thank you it will be recorded
there will even be a live recording 😉
I’ll keep you posted
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.
@tony.kay starred, maybe I can contribute, although I’m not that well versed in clj
I have a couple of apps running with friend/oauth, shouldn’t be hard to port it
although the way I’m doing it is with a completely protected url under oauth (say, /authenticated/…
), its "server-side" oauth
@gardnervickers you should try something like
[“” {true :index}]
@adambros Thanks, I had made a false assumption about the bidi syntax.
@adambros are extra routes in front of /api?
@tony.kay yes
also in front of /index
@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
@adambros won't your suggestion break api then?
ah yeah it would
might be something we should change....extra routes should not be in front of API service
you might be able to get away with a regex
a prehook might be better for @gardnervickers problem
[“” {#”^[/api]” :handler}]
ish
but a regex, if supported well, would also work
sure
I don't know bidi well 🙂
@gardnervickers what is your use case for wanting everything to :index
?
routing
html5
?
oh like a single page app?
Yep...think about hitting refresh in browser
(reload)
isnt this what hash fragment routes are for?
the URI says boo/bah/blah
and your server says NOPE
@tony.kay exactly
@adambros If you're using fragments, you're ok, but if you're using URI paths, it isn't
well anyway i think extra-routes should at least be “in front of” /index
i could see someone wanting to change the location of /api as well
it's probably ok for it to be in front front as long as regex works
Hash fragments probably make more sense for our app anyway. Thanks
as a note this regex seems to do it: #"^(?!api$).*”
(defn- auth-middleware [ring-handler]
(-> ring-handler
(wrap-bidi-routes ["/" {#"^history.*" {:get redirect-to-index}
#"^(?!api|static|generated|history).*$" {:get index-page}}])
(defrecord Authentication [handler]
component/Lifecycle
(start [this]
(add-ring-middleware! handler auth-middleware)
this)
(stop [this] this))
(defn make-system []
(make-untangled-server
....
:components {
:auth-hook (auth/make-authentication)
....
)
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?
@jdunruh could be I forgot to put you in the correct namespace....`(user/go)` ?
Hm. works for me.
λ 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>
nope can’t find user/go either. I don’t see username space in the server sources for this project.
in dev folder
dev/server
don't want those in production...so only on source path when in developer mode
if you're not using lein, perhaps you forgot that source path
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.
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.
I just me at index-dev instead of index. It appears to be working now. Thanks