This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-25
Channels
- # beginners (20)
- # boot (25)
- # cider (1)
- # cljs-dev (7)
- # cljsjs (1)
- # cljsrn (1)
- # clojure (79)
- # clojure-austin (2)
- # clojure-berlin (13)
- # clojure-dusseldorf (1)
- # clojure-germany (7)
- # clojure-russia (10)
- # clojure-serbia (1)
- # clojure-spec (18)
- # clojure-uk (4)
- # clojured (1)
- # clojurescript (90)
- # cursive (10)
- # datomic (7)
- # emacs (14)
- # hoplon (6)
- # luminus (16)
- # lumo (4)
- # numerical-computing (2)
- # om (25)
- # om-next (1)
- # onyx (11)
- # pedestal (10)
- # protorepl (1)
- # reagent (11)
- # remote-jobs (1)
- # ring (1)
- # rum (38)
- # spacemacs (5)
- # test-check (7)
- # untangled (122)
- # vim (1)
- # yada (8)
yes, as long as you are in the :action
thunk
and you shouldn’t transact in a mutation
umm, my guess is that they meant in your ui
once you are in a mutation you kinda need to swap
@qqq you job from this point forward is to advocate for the screen casts to newbies that ask questions that they answer 😉
@tony.kay: we can run your videos through a speech->text system, build an index of keywords, and whenever someone asks a question, link them to the youtube video w/ correct timestamp
@adambros : so you a "sane" setup: ui.cljs should have om/transact! but no swap!, while mutations.cljs should have swap! but no om/transact! ?
transact is about abstract transactions...mutations are the impl of those abstractions, so of course they do swap
for anyone else curious: if you want a basic minimal server: https://github.com/untangled-web/getting-started-video/tree/basic-server
(reset! c.m.core/app (uc/mount @c.m.core/app ui/Root "app")))
<-- I know that this line got executed (console logs before/after)
however, nothing is installed in my div with id="app"
how do I debug this?
why is this not rendering? https://gist.github.com/anonymous/ac3792c567783d798d574440bb6d078c (entire project)
(it pulls in a bunch of *.jars, which I don't want as it slows down deployment / jvm startup on GAE)
server-side: sort-of. You want the parser, though you could implement something yourself or just copy in that code.
========== where in https://github.com/untangled-web/getting-started-video/tree/basic-server/src/server/app is the line where we fire up a http handler to handle "/api" GET requests?
@tony.kay: regarding dependencies on server side; assuming I am willing to put in the work, would it be possible to parser queries into AST on the client side, send the raw AST over as edn, and rip out the om dependency on the server side?
is there any fundamental reason why queries must be parsed where the data is , or can we parse the queries statically without seeing the data?
you still have to process the AST, which is what the parser already does. You'd be MUCH better off copying the parser out of Om Next
I actually don't; but the fact the omcljs pulls in google closure into my server side feels icky
then as long as you don't load the namespaces that use that stuff in your app, no problem
@tony.ka: alright, one more question for tonight while you're here (perhaps more tomorrow):
where in the example code are you registering the api.clj to "localhost/api" rest handler ?
what's the function name for starting untangled server? (I have to force everyting to runinsid gae, so I need to take apart / reassemble parts of this)
it is baked in, though you can augment it with a prefix...or use the new server modular support and build your own. You'd also have to reconfigure the networking on the client side
sure, but where in https://github.com/untangled-web/getting-started-video/tree/basic-server/src/server/app is the Untangled Server started?
you'd normally write a main to do deployment startup. In the example, it only has a dev mode.
@adambros is documenting that, but it already exists. It lets you define the server however you want
can you point me at the github page for "new modular support" ? is it a tag? (I can't find it vai google)
1) https://github.com/untangled-web/untangled-template is a template we "git clone", not a "lein template new ..." right? 2) assuming (1) is true, can we pease put a license on the template, say Public Domain? 🙂
FYI, I just pushed a branch on the cookbook that has an example: 1. That uses the new form support 2. To make a step-by-step survey (wizard) 3. Uses an SQL database for storage and query https://github.com/untangled-web/untangled-cookbook/tree/feature/sql-wizard/recipes/form-wizard
it gets passed a (make-web-server), so if I just "invert that", I should be able to "push untagled server into ring" rather than "untangled-server starts it's own webserver"
untangled/server/impl/components/handler.clj is most of where "the plubming" happens, with the /api path
========== I must be doing something terribly wrong. After going from "pure clojure.jar" to "untangled.jar + om.jar", my GAE deploy time went from < 30 seconds to 9-minutes 18 seconds.
I got it working locally with the template. I don't have it working locally with the dev_appserver.sh
🙂 cool. Pretty much convinced that untangled is the way to go. Trying now to get it all setup with appengine & datastore.
Just to clarify, your goal is: client side = cljs / untangled server side = clj / untangled / running on Google App Engine, actual data store of the [kw id] value triples via datastore correct?
@tony.kay: I'm having a trouble seeing Om.Next ends and UnTangled starts. Do you have a talk comparing/contrasting the two?
Untangled is on top of Om Next. It provides the bits you need to glue it all together.
I'm not sure how to answer it. Om Next is most of what you're interacting with. Untangled adds in a number of things: InitialAppState is Untangled
database format is the default Om Next format. I'm not sure how teasing apart each thing is necessarily helpful
If I'm asking weird questions, it's most likely because I have an incorrect mental model.
and in some ways, it is more focused and opinionated. This is a trade-off: the focus/opinion lets us solve lots of things for you that you would otherwise spend weeks polishing yourself
it also reduces some of the sheer learning curve by reducing the number of knobs you have to deal with down to the ones most people care about.
The model Om Next has you deal with is one where you build "parser emitters" to do basically everything from retrieve data locally to making decisions about remote communication. It's very flexible, but you'll end up needing to make lots and lots of decisions about the "how". For example, how do you lazy load something? You have to think through state manipualations and parser bits and pieces. Untangled solves those problems for you and gives you tools (like the data-fetch namespace) to handle those cases without having to think about the details.
My opinion (having worked through building all of this) is that all of that "glue" on top of Om next you'd have to build can takes man-months of effort and head-scratching.
hmm, for purely educational purposes, I should probably build a few apps without untangled just to see what om/next is missing
you're right, I should probably make some kind of video showing the guts so you can see what you're getting. Mostly, it is glue around the data model and networking.
well, and the i18n, and the support viewer, etc. But most of those things are very small.
just for personal learning, I like to break everything into small pieces, understand them, then put them back together
You should watch my whiteboard talk https://www.youtube.com/watch?v=IlNrmKYA7Ig
the one nice thing about taking apart software vs taking about TVs is taht if you can't put it back together, you just to git clone again 🙂
Note all the stuff I end up talking about the reconciler, parsers, remote parsing, etc. Untangled eliminates having to deal with all of that.
You never have to write "read functions". You never have to worry about "remote read decisions" at a parser level. Then there's the merge story, tempid remapping,etc.
My apologies to whoever I've been talking with about modular server support. It is not actually in a release yet 😊
I just realized that we did an internal release on that feature, and didn't ever release it. So, will do so now