web v0.4.2
migrator: v0.2.3
Routing is a little odd at first, but I think I will enjoy it eventually. It's weird having implicit routes.
I love having the routes in pages be their own classes, i.e. link "Edit", to: Topics::Edit.route(topic). The relationship between routes and controller#action is a part of rails that I think a lot of beginners don't grok for a while.
My mental model for what goes in a form, query, and model is pretty confused. I love the idea of separation. It's one of the first parts of rails to get messy, but I need a lot of help understanding where to put what. This could very well be me having to unlearn rails.
My current mental model is:
- Form seems to be where you create/update a record
- Query seems to be where you fetch/find a record, but also how you delete one?
- Model is where you define meta information, table name, associations, maybe synthesized properties like
full_nameon a User fromfirst_name/last_name
Having the page define it's instance variables is great. It's like an extra check against having too much crap in your views.
Similarly, having to define everything when you render a page will help with a ton of nil bugs, which seems like it was a lot of the motivation for the framework.
I like the Pages, although I think Page may not be the appropriate name. I'm thinking about partials and having a Page within a Page seems incorrect. Pages to me contain HTML, not other pages, <iframe> notwithstanding ;). View seems to be a better metaphor for this, for my money.
I have actually been wanting to try to use ruby for all my views for a couple weeks now, so it was fun to use pure crystal to do all the views. You might check out the Rumble library from the Keynote gem: http://www.rubydoc.info/gems/keynote/Keynote/Rumble
You seem to have essentially created this but maybe there's some insights there for you. I like how you've done certain things better, like how I don't have to wrap everything so the block always returns a single element. And it's far better than creating elements with rails tag helpers.
I think I like how the views have no extra whitespace. It may be annoying in some places but, having been in the situation where I have to do wacky CSS hacks to get rid of that whitespace, I appreciate the tradeoff. We'll see when I start doing some styling.
I like how Rails uses class methods for things like find/where/etc. I assume that's coming and you just haven't put the wrapper class methods in yet.
Migrations are 👍. I'd love more methods like index: true, or add_reference Post as a shortcut. Again I'm sure you are planning this kind of thing. Optional classes (field description : String?) for non-required attribute is clever.
CLI is nice and clean. Using a . for a task separator (e.x. db.migrate) feels good and fresh.