Open kcrwfrd opened 12 years ago
Couldn't hurt.
Is it usable as a 'plugin' yet? from the looks of the bootstrap I assume this is still a standalone app and wont work as a plugin, or library, that is integrated into another app.
Am I mistake?
It does work as a library now but I'm going to be redoing this thing in the future...A HUGE rebuild...So this all has been kinda exploratory in a sense. I wanted to see how the schema could be flexible in the models and extendable since using MongoDB gives us that on the database side. I wanted to see how I could re-route templates to look in special organized directories and then have a fallback system (for add-on themes etc.). I wanted to put together some boilerplate admin UI. I wanted to build a simple access system. All these things done and working...But I really need to clean things up a bit and redo the controllers. They got messy in the process. I combined them and that was just too confusing and messy. Then there's some other things I want to cleanup and drop/add, etc. So take from this what you will, but follow the repo and I'll have a big update later on and if you want to add it as a library feel free it shouldn't get in the way of your main app since everything is routed to /minerva/....
Tom, if feeling like playing project manager game, i'll be glad to participate in the project :-)
@tmaiaroto I would also like to contribute - I think a modular "drop in" CMS that, itself, accepts libraries solves a problem the PHP community has faced for ages. How to avoid wordpress!!!
Yea...I actually have all of (or most of) the pieces...I just need to kinda put them together and then refactor some things. I would love to get some test cases together as well...It would then be a real good base. I actually have some other code (a derivative of this CMS) that I use for the base of every one of my projects. Getting the good from that mixed in here - or rather the good from this CMS mixed in there would be my next step. I could leave direction on what to do...I'd be down for that if you all are interested.
...and yes, I really do want the CMS to kinda just be able to use any library. I mean that's also one of the goals of Lithium is that super flexibility. Lithium's autoloader and namespaces here really help us.
After all that is kinda glued together I might think about some sort of template system ... Maybe. I'm not a huge fan of that stuff but it may serve a really good purpose if using something like mustache. However, I'd always want the ability for people to just use straight up html/php and an extensive suite of helpers which Minerva should have.
But yea. I can put together a list and roadmap if it'll help.
Roadmap would be great - I think that a template system is a decent idea, however I think it should be done as a modular plugin for minerva.
Maybe a minerva package library is a good idea - a place to find lithium plugins that work will, or are designed specifically for, minerva?
I agree, as a plugin. All Lithium libraries should "work" but yes there will be some specially designed for minerva. The difference being those designed for minerva will have templates in the proper places and will have models which extend Minerva's core models to change the schema. Then since they extend the core models, they will automatically have links appear in the admin UI which will load up the admin templates in that library. So when you build a library and want it to integrate into Minerva's admin UI, you will simply need to make a model and some templates... Technically you could adapt any other library then by providing a model and those templates. IF there is no admin template for the CRUD, the default ones within Minerva core will be used....But unless you have defined on the $_schema property in the model some 'form' key values on each item/field in the array, there won't really be a complete form.
So either way if you have some library not designed for Minerva you will need to do some (minor) integration... Now, I could try to find a solution where you could apply a filter for that integration (outside the library) so you could do that without touching the library...
Of course finding some "gallery" library for example will likely be rare...The kind of library's you'll find are for facebook integration or OAuth or payment systems or whatever and they don't exactly have view templates.
There's always going to be a bit of developer work with the CMS. My goal was to never create another WordPress or Drupal. I feel that trying to make everything simple like that is exactly what kills those CMS'. So the goal of Minerva was to simply save time. Especially with the repeatable/mundane/common features.
Anyway, here was the idea for extending the "Page" model: https://github.com/tmaiaroto/minerva_blog/blob/master/minerva/models/Page.php
Notice how it's under a "minerva" folder so it doesn't collide with any other model that library may have (I think ignore the Page model under 'models' in that library...I didn't remove it OR it was intended for something else - again, cleanup).
...and to show you how the backend UI knows about this library's model... In the helper I'm using Libraries::locate() on a new type that I created called "minerva_model" ... https://github.com/tmaiaroto/minerva/blob/master/extensions/helper/MinervaHtml.php#L240
So if you're familiar with Drupal... There was this hook system. Methods that were called at certain points and you needed to use those for integration. In Lithium we have namespaces, this wonderful Libraries class, and filters. So not only is our integration a lot more maintainable/easier/cleaner but we also have the ability to do it from outside the library technically (of course the benefit being no modifications to the core code or the CMS or the plugin which was probably the #1 killer of most Drupal sites). So that's why I'm thinking certain libraries you find can be "adapted" to work with Minerva...Without touching it. But we'll see. Other libraries are, again, simply utility libraries and you're going to call the methods in there from all over your app. It would be nice to allow you to add to the list of "dependencies" though and make that a little nicer looking, etc. Possibly even auto clone from github I don't know.
Dependencies: https://github.com/tmaiaroto/minerva/blob/master/config/bootstrap/dependencies.php
Anyway, I'll get together a roadmap and task list.
Awesome! @tmaiaroto i said about someting like a roadmap because, well, you did everything so far so, sounds like you should in some way decide what should and could be done. I'll dig down on the extending page thing :-) Meanwhile, ive been working on a backend for db manipulation, based on django's admin interface, which IMO is the best thing in django. But it's still not complete and probably fails hard on QA but would love to integrate it here. About dependencies, some buzz has been around this cool thing https://github.com/composer/composer And there is someone doing a plugin based on that, which could be cool as hell (a pseudo node.js npm alike mayhaps).
@rapzo - composer is pretty nice and there IS someone working on a plugin. - https://github.com/joseym/li3_installer
I'm working on a means of setting up dependencies via the console and have them integrate with lithium automatically.
It's you! Nice!! I read something about it around here but hey, it was you. Nice piece of work you got there!! Forgot to follow it back then and forgot the name, sorry... I've been working too much hehe.
haha, no worries! I love the idea of package management for lithium and composer already gets us 95% there.
Any movement on this? I'd like to help where I'm needed but I'm not seeing anything new coming to the githubz
I'm thinking about scrapping my efforts on Minerva. Been working on this: https://github.com/tmaiaroto/li3_bootstrap
It's not a CMS per say...But it could be really. Essentially li3_bootstrap is a bare bones Lithium application that comes with a few things. Essentially a few helpers, utilities, menu system, and an admin layout using Twitter Bootstrap. The idea is to then snap in various pieces of functionality from there. So... Maybe Minerva ends up as a plugin for Lithium Bootstrap... I don't know. Right now I'm trying to put together a users library for li3_bootstrap that will work with users in MongoDB and deal with auth and simple access rules. This essentially is copied over from Minerva (and other projects) and isolates it from the base application. So, unlike Minerva, there is no dependency on MongoDB. I most likely will not create a user login system that uses MySQL (or really anything that uses MySQL) but someone else CAN and that's the point.
I'm using some things I've learned while building Minerva with regard to template rendering, etc. And class extension, etc. So you'd see some of the same tricks in order to achieve that kinda flexible system...But out of the box it won't be as robust as Minerva...Which is why I say it's not really a CMS. It's just an extension to the Lithium Framework really. A bootstrap.
However, it's important to note that li3_bootstrap is NOT a plugin. Maybe it can/should be, I don't know... But I figured the few bare bones classes and code would be fine as the main application due to how minimal it is and I would not expect anyone to really use it half way through a project. Though, it would be nice to have it in a library because then using classes from it would be fine with regard to namespaces (if you were to namespace your main app something else).
I don't know, but give that project a look...It's brand new and it's the direction I'll be heading. It will have its own console tools as well that will help with installing plugins (instead of or maybe in addition to Composer).
I wonder if prepending "li3_" to the project name to indicate that it's a lithium plugin might help develop the visibility of the project, as well as conform to the lithium plugin standard naming convention?
Thanks for sharing your work!