keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
mihaelkonjevic 2016-03-23T13:58:58.000010Z

https://twitter.com/mihaelkonjevic/status/712639497289203712

roberto 2016-03-23T14:11:26.000012Z

yay!!!!!

roberto 2016-03-23T14:11:53.000013Z

I’m planning on doing a demo for my co-workers

roberto 2016-03-23T14:11:59.000014Z

enjoying it a lot so far

mihaelkonjevic 2016-03-23T14:12:08.000015Z

yay!!!!! :simple_smile:

roberto 2016-03-23T14:13:13.000016Z

the only sort of sore spot is that you need about 3 pieces before you start seeing something on the screen. I’m fine with it, but I can see how some of my co-workers would find that a bit intimidating

mihaelkonjevic 2016-03-23T14:13:43.000017Z

yes, it's a pain I feel too. I'm not sure what is the solution though

roberto 2016-03-23T14:13:49.000018Z

i was thinking of writing a script that generates some scaffolds

roberto 2016-03-23T14:13:55.000019Z

but not sure how to start with that

mihaelkonjevic 2016-03-23T14:14:15.000020Z

I was thinking about a template for leiningen

mihaelkonjevic 2016-03-23T14:14:24.000021Z

but I don't want to handle that kind of complexity

mihaelkonjevic 2016-03-23T14:14:35.000022Z

other option is something like yeoman generators

roberto 2016-03-23T14:14:49.000023Z

yeah, I was thinking of something that I can run interactively on the shell

roberto 2016-03-23T14:14:54.000024Z

or cider

roberto 2016-03-23T14:16:27.000025Z

for example:

(generate-component {:name “Person” :type “Form” :fields [“first-name” last-name”] :namespace “person”})

roberto 2016-03-23T14:16:54.000026Z

or maybe not even specify the type nor fields

roberto 2016-03-23T14:17:16.000027Z

just something that generates the controller, component and system with an h1 tag

roberto 2016-03-23T14:17:37.000028Z

enough to get started and avoid having to manually create all those files

roberto 2016-03-23T14:24:23.000029Z

also, from the example, this looked to me like something that can probably be included in the edb instead of having to write this for every project https://github.com/keechma/keechma-place-my-order/blob/66cd3138897f72f9e683dae2e562610c55cd8984/client/src/client/edb.cljs#L9-L44

mihaelkonjevic 2016-03-23T14:41:31.000031Z

yeah

mihaelkonjevic 2016-03-23T14:41:40.000032Z

I think I'll make a macro that will generate those

mihaelkonjevic 2016-03-23T14:43:14.000034Z

but I think that the macro should be in keechma because it assumes that entity db is stored under the :entity-db key of the map

roberto 2016-03-23T14:56:56.000035Z

yeah, I agree

mihaelkonjevic 2016-03-23T14:57:57.000036Z

router is also extracted and released as a separate lib

mihaelkonjevic 2016-03-23T14:58:02.000037Z

https://clojars.org/keechma/router

gadfly361 2016-03-23T17:37:10.000039Z

@mihaelkonjevic @roberto maybe we could add a +keechma profile to reagent-figwheel (which is an existing leiningen template). It wouldnt handle scaffolding, but it would be a basic, working starting point for keechma. Anyways, just a thought

👍 1
mihaelkonjevic 2016-03-23T17:39:08.000042Z

@gadfly361: that would be awesome!

gadfly361 2016-03-23T17:41:52.000043Z

Sweet! If you have any ideas about what youd want the minimal starting app to look like, let me know and i can work on adding the profile

roberto 2016-03-23T19:07:08.000044Z

I think the basic wiring for each compoent, the system and a core.cljs that starts the app

roberto 2016-03-23T19:36:46.000045Z

I’m not too fond of having dedicated controllers and components folders, but for scaffolding, it makes total sense.

gadfly361 2016-03-23T19:51:39.000046Z

My default for a template is to have as few layers as possible to keep it feeling 'light' and approachable - so im in favor of not having dedicated folders. That said, when i actually make an application, i use folders ... so it is kinda hypocritical lol. In short, i can be swayed in either direction.

mihaelkonjevic 2016-03-23T19:53:04.000047Z

I use folders for bigger apps

mihaelkonjevic 2016-03-23T19:53:31.000048Z

but for scaffold, I think that would be overkill

roberto 2016-03-23T19:54:17.000049Z

i think the folders helps new comers. I’m not fond of those, but when a newcomer sees a controllers folder and a components folder, they can understand that

roberto 2016-03-23T19:54:49.000050Z

I personally would get rid of those as soon as I’m comfortable with the library, but it has always been helpful when I’m learning something new

mihaelkonjevic 2016-03-23T19:54:55.000051Z

how do you group similar files? In one app I had components, controllers and entities folders

roberto 2016-03-23T19:55:05.000052Z

I normally group them by what they do

roberto 2016-03-23T19:55:08.000053Z

not by type

mihaelkonjevic 2016-03-23T19:55:23.000054Z

so by "topic"

roberto 2016-03-23T19:55:24.000055Z

for example, I would put a the navbar under a navbar folder

roberto 2016-03-23T19:55:39.000056Z

and in there, it would hold a navbar_ctrl and navbar_comp and a navbar_system

roberto 2016-03-23T19:56:11.000057Z

but right now, starting off with keechma, I find it easier to follow the structure in the examples

roberto 2016-03-23T19:56:14.000058Z

baby steps :simple_smile:

mihaelkonjevic 2016-03-23T19:56:19.000059Z

:simple_smile:

mihaelkonjevic 2016-03-23T19:56:45.000060Z

yeah, especially because I don't think there's always one to one mapping between controllers and components

roberto 2016-03-23T19:56:59.000061Z

yeah, exactly, I found that out last night.

roberto 2016-03-23T19:57:01.000062Z

it is a plus

gadfly361 2016-03-23T19:57:41.000063Z

Would either of you be willing to create a barebones keechma app that you think would be a good starting point to come out of the template? If so, i can templatize that app and shove it into reagent-figwheel.

mihaelkonjevic 2016-03-23T19:58:35.000064Z

would this be a good candidate? https://github.com/keechma/keechma-counter

mihaelkonjevic 2016-03-23T19:59:01.000066Z

maybe we could remove multiple actions and have just one button

roberto 2016-03-23T20:00:00.000067Z

yeah

roberto 2016-03-23T20:00:06.000068Z

it doesn’t have an example with edb tho

roberto 2016-03-23T20:00:18.000069Z

I’ve personally been learning from this https://github.com/keechma/keechma-place-my-order

gadfly361 2016-03-23T20:02:12.000071Z

I think the counter is a good size for a starting point. The place my order example might scare people away.

gadfly361 2016-03-23T20:05:16.000072Z

@roberto do you see a way to include edb, in a more hello-world kind of way? That would be best of both worlds. Also since edb is now its own lib .. would we want like a +keechma profile and then another that is +keechma-edb or something?

roberto 2016-03-23T20:05:54.000073Z

sounds reasonable, I’m just trying to picture a scenario where someone would not use keehcma without edb

roberto 2016-03-23T20:06:24.000075Z

but it does make sense to have 2 separate profiles, gives users the possibility to opt-in

roberto 2016-03-23T20:06:50.000076Z

also a good starting point to learn, it just occurred to me that this could be something like nodeschool for learning keechma

roberto 2016-03-23T20:07:06.000077Z

different templates take you through different levels of learning how to develop with keechma

gadfly361 2016-03-23T20:07:57.000078Z

Ohh thats an interesting idea!

gadfly361 2016-03-23T20:10:55.000079Z

I think the repo that has the tagged commits works well for that too - thinking of like the reagent phonecat example, where you can jump to any part in the tutorial. Regarding the 2 profiles, if you think 90+ % of keechma uses will use edb, then perhaps the single template (with edb) makes the most sense.

mihaelkonjevic 2016-03-23T20:10:59.000080Z

edb might be an overkill for the starter pack

mihaelkonjevic 2016-03-23T20:11:12.000081Z

it implies you handle some "data"

mihaelkonjevic 2016-03-23T20:11:47.000082Z

but it's also true you're going to use it in 99% of apps

mihaelkonjevic 2016-03-23T20:14:10.000083Z

so we're talking 4 files: core, 1 controller, 1 component, edb

mihaelkonjevic 2016-03-23T20:14:18.000084Z

that doesn't sound too bad

gadfly361 2016-03-23T20:14:18.000085Z

Since roberto brought up the learning aspect, how important is edb when you are first getting acquainted with keechma vs how much initial complexity does it add. If you can get started and learn without it ... and adding it say doubles the intial complexity, then i can see leaving it out as a good option. If it doesnt cause that much mentral strain or add a bigger barrier to entry then i can see including it.

roberto 2016-03-23T20:15:03.000086Z

4 files sounds good, I would go a bit further tho, and add a file for a header and maybe a footer, just to illustrate how to make multiple components

mihaelkonjevic 2016-03-23T20:15:13.000088Z

when you extract edb from the keechma, it's not mentioned anywhere in the code. it's clearly (more) separated from the rest

mihaelkonjevic 2016-03-23T20:15:58.000090Z

+ it requires that you understand how to set it up with schema

mihaelkonjevic 2016-03-23T20:16:19.000091Z

I'm somewhat conflicted about edb

roberto 2016-03-23T20:17:11.000092Z

that is understandable, I think you are right, it should be separate, it does add some overhead to learning

roberto 2016-03-23T20:17:24.000093Z

I still struggle with it a bit