-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding guestbook-datomic #5
Comments
One thing that might be useful to add to the template in
Not sure how you template the project name. |
ah good call on adding a comment, I'll take a look |
So I'm getting a fun problem. My datomic keys are being converted to json incorrectly I believe?
So for example, a message list such as:
is converted to:
Which then is read out as:
I was expecting it to convert to json automatically. Am I calling this incorrectly? |
@yogthos Other than the above issue, I've got it mostly working. Would like to get this wrapped up today if possible. |
👍 |
Regarding the JSON conversion, you probably would want to use transit between the client and the server. As I recall the middleware uses the |
Hmm, it doesn't seem to be working well. In both cases I get message keys like:
Which get converted to:
The same as when I do:
Whereas I want:
Because
right? Perhaps I should be converting the output of the datomic db? Which currently gives:
transmit+json gives:
Also I could push what I currently have if you're puzzled about the issue I'm coming across? |
Ok @yogthos, worked out the issue. Had done the pull syntax incorrectly. I didn't realise you could get it to wrap elements in strings. More flexible than I expected. I've pushed an update, give it a look when you have some time and tell me if you want me to make some updates to it! |
Thanks, I'll try take a look shortly. I think you should be able to send Datomic results directly to the client as long as they're in EDN format. Once transit+json is deserialized, it should look like the original data on the other end. |
Is there a tutorial to go along with guestbook-datomic? |
There isn't a tutorial to go along with the sample project at the moment. This re-frame workshop might be helpful though. Luminus just sets up the basic scaffolding for re-frame, so how you structure the app beyond that is mostly up to you. |
@rberger What kinds of things would you like to see in a tutorial? |
@Folcon if you have a chance I'd suggest adding a small walkthrough in the readme for the guestbook-datomic project. Alternatively, you could add a Datomic section in the database doc page. I'd focus on Luminus specific aspects of getting Datomic up and running, and refer to the official docs for further details. |
Gah, sorry @yogthos, I keep meaning to respond when I have something and unfortunately at the moment most of my focus is on the frontend side of development. However the datomic code I have working is in production, so there's little chance of me not doing this, if only to ensure I document it for myself to read in the future ;)... It's just that I doubt I'll be going anywhere near it until at least January. My plan is to document useful stuff as I go when I next touch it so the intent is to put that here then. |
No rush, it's going to be pretty great to have docs based on actual real world experience though. :) I'm also open to improving the Datomic profile to make things smoother if you have any ideas there. |
Issue to coordinate adding a guestbook-datomic example.
The template for this example was created with the flags below.
The code is at https://github.com/folcon/examples.
The text was updated successfully, but these errors were encountered: