lonnieezell / monarch

A back-to-basics framework for the modern web.
MIT License
16 stars 0 forks source link

Remove bootstrap-css #7

Closed eydun closed 4 months ago

eydun commented 4 months ago

NB: Feel free to discard this pull-request.

To simplify, it might be an idea not to use any specific css-framework, and only semantic html-markup, together with a classless css-framework such as Pico CSS: https://picocss.com.

lonnieezell commented 4 months ago

Thanks for the PR. Not going to incorporate it at the moment.

In the future, you are absolutely correct, though. Currently, the CSS is only there for the viewable pages I'm using as placeholders and playgrounds. This started as an experiment several years ago. I picked it back up a little while ago and started doing some refactoring, but wasn't taking it seriously as a project then, so the UI was a way for me to play with the layout and routing features.

Now that I'm actually taking it a little more seriously, there will be a time when it's split out into an app repo that pulls in the main framework. At that time, all CSS frameworks will be ripped out. I'll probably have it setup for two defaults: either bring-your-own-CSS or a Tailwind implementation, which works well with the component system being built out, and I feel has other benefits, especially when working in teams, even though the syntax gets annoyingly ugly lol. Or maybe CSS won't be involved at all. Not 100% sure yet. :)

lonnieezell commented 4 months ago

I do want to include a component library, though, based on HTMX and likely AlpineJS. Not a JS one, but a PHP backend component library, since that's the focus of this project. But all done with CSS vars and where it's easy to theme the UI, etc.

That will also require that I finish up the components to allow for "controlled components". Part of me thinks mimicing the the route control files where it's one method per HTTP verb could work for that. At the very least it would be nicely consistent. I haven't circled back around to that to discover if that would work well or not, though.

In case you haven't noticed, this has definitely been a "figure-it-out-as-I-go" project so far. It started with a vision of how I wanted to work, not how things should be implemented.

eydun commented 4 months ago

Thanks, I really like what you have built so far. There are many good PHP frameworks out there, but many of them suffer from being "over-engineered", taking the fun out of building fast and simple solutions.

Your component-system looks promising. Ajax and fragments are a must-have today, and HTMX solves that nicely with PHP. But sometimes you might need to do something more low-level, and if you not like hyperscript, then you might end up with HTMX + AlpineJS. But there is also another option, and that is this library: https://github.com/imacrayon/alpine-ajax, which gives you the option to perhaps omit HTMX, and have a pure AlpineJS-solution?

lonnieezell commented 4 months ago

Thanks, I wasn't aware of that plugin before. At a glance it looks nice but I feel it might be missing a couple things to give the full experience. I'll investigate more later.