https://twitter.com/mihaelkonjevic/status/712639497289203712
yay!!!!!
I’m planning on doing a demo for my co-workers
enjoying it a lot so far
yay!!!!! :simple_smile:
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
yes, it's a pain I feel too. I'm not sure what is the solution though
i was thinking of writing a script that generates some scaffolds
but not sure how to start with that
I was thinking about a template for leiningen
but I don't want to handle that kind of complexity
other option is something like yeoman generators
yeah, I was thinking of something that I can run interactively on the shell
or cider
for example:
(generate-component {:name “Person” :type “Form” :fields [“first-name” last-name”] :namespace “person”})
or maybe not even specify the type
nor fields
just something that generates the controller, component and system with an h1 tag
enough to get started and avoid having to manually create all those files
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
yeah
I think I'll make a macro that will generate those
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
yeah, I agree
router is also extracted and released as a separate lib
@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
https://github.com/gadfly361/reagent-figwheel/blob/master/README.md
@gadfly361: that would be awesome!
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
I think the basic wiring for each compoent, the system and a core.cljs
that starts the app
I’m not too fond of having dedicated controllers
and components
folders, but for scaffolding, it makes total sense.
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.
I use folders for bigger apps
but for scaffold, I think that would be overkill
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
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
how do you group similar files? In one app I had components, controllers and entities folders
I normally group them by what they do
not by type
so by "topic"
for example, I would put a the navbar under a navbar
folder
and in there, it would hold a navbar_ctrl
and navbar_comp
and a navbar_system
but right now, starting off with keechma, I find it easier to follow the structure in the examples
baby steps :simple_smile:
:simple_smile:
yeah, especially because I don't think there's always one to one mapping between controllers and components
yeah, exactly, I found that out last night.
it is a plus
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.
would this be a good candidate? https://github.com/keechma/keechma-counter
maybe we could remove multiple actions and have just one button
yeah
it doesn’t have an example with edb tho
I’ve personally been learning from this https://github.com/keechma/keechma-place-my-order
I think the counter is a good size for a starting point. The place my order example might scare people away.
@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?
sounds reasonable, I’m just trying to picture a scenario where someone would not use keehcma without edb
but it does make sense to have 2 separate profiles, gives users the possibility to opt-in
also a good starting point to learn, it just occurred to me that this could be something like nodeschool for learning keechma
different templates take you through different levels of learning how to develop with keechma
Ohh thats an interesting idea!
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.
edb might be an overkill for the starter pack
it implies you handle some "data"
but it's also true you're going to use it in 99% of apps
so we're talking 4 files: core, 1 controller, 1 component, edb
that doesn't sound too bad
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.
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
when you extract edb from the keechma, it's not mentioned anywhere in the code. it's clearly (more) separated from the rest
+ it requires that you understand how to set it up with schema
I'm somewhat conflicted about edb
that is understandable, I think you are right, it should be separate, it does add some overhead to learning
I still struggle with it a bit