Web-Feet / coasterframework

Main code repository for Coaster CMS (coastercms.org), a full featured Laravel based, Content Management System
https://www.coastercms.org
GNU General Public License v3.0
31 stars 22 forks source link

Plugin structure?? #11

Open chadanuk opened 8 years ago

chadanuk commented 8 years ago

plugin folder in root of coastercms structure:

illuminate3 commented 7 years ago

I was playing around with the idea to make this into a modular based system ... problem is that you have the pageload class that is static and just will blow everything up.

chadanuk commented 7 years ago

Hi @illuminate3

Thanks for working on this!

I guess this depends on what type of module you're looking at building?

The reason we haven't done this yet ourselves is because we're weighing the benefits of building functionality in the CMS itself that we can keep from encountering some of the updating/security issues of wordpress against an easy plugin system.

However, we have successfully built additional features into Coaster quite simply including an events management system and also simple ecommerce that all revolve around the page system.

For example:

I hope that might help with working a way forwards. I guess the way to look at it is can it fit into the system wide content or pages and then the system structure is designed to make the theme build as flexible as possible to extend it at that point rather than have to override the page system.

Do you have an example of a module you would like to be able to add?

illuminate3 commented 7 years ago

Hmm, I was talking about breaking coaster up into modules.

I used https://github.com/caffeinated/modules to split coaster based on the main concepts like auth/authen, menus, gallery, doc/files, and such. Once you move the pages and blocks into a module this file https://github.com/Web-Feet/coasterframework/blob/master/src/Libraries/Traits/DataPreLoad.php causes all kinds of don't call function statically errors.

I view packages as "libraries" and coaster not really a library. I realize that's the laravel community pushed it but they were also hard core repository advocates until Jeffery starting saying it's ok not to do it that way ...

The reason why I wanted to break things up is that it would be easier to start building out more functionality. Like the Beacons which are sort of tied into templates at the moment. (no, I get that this is probably more a feature to be finished -- I'm just using it as an example).

As an end user, I'm loving coaster a lot. As a dev ... the learning curve does exist but the code is clean and after fiddling around I've learned a few new things. I just question if a package is really the best way to go.

chadanuk commented 7 years ago

@illuminate3 What you're trying to do makes sense and is a lot more possible now than it used to a few versions of Coaster ago.

We are working towards this end with each release. The plan with the trait is to eventually replace the static functions with protected functions and then create static instances of blocks and pages in their respective modules. We'll then also look at separating the ServiceProviders out a bit more (like with settings).

Feel free to submit a pull request if you try this and get it working before we do!

illuminate3 commented 7 years ago

My home machine went down the other day and all my work is on that. I had broken out all the modules and had to keep the pages and blocks in the package to keep things working. That one class is what got me stuck. I didn't want to raise an issue because it isn't one. However, I did find finally find this so thought it was ok to post here.

Once I get to my data I'll put up a repo. A pull request would really be suitable for what I did.

I did email your company website about 2 weeks ago about some other things. Or should I contact you directly?

I'm really like what you all have done with coaster. Also, it feels way more laravel'ish than oktober and way more professional than lavalite (??? lava something).

Thanks!

chadanuk commented 7 years ago

Apologies for not responding to your message, we've had some issues with emails recently so it may have been missed - Feel free to re-send your queries or DM us on twitter (twitter.com/coastercms).

Thanks for posting on the issue, we really want to try and get a community starting to build around coaster and at the moment this will probably be the best place to start that.

And it's great to hear that you really like Coaster. We're really pleased with it! Feeling more "laravel'ish" is quite a compliment!

Hope you get your data back ok and look forward to the pull request.

SarajevoNo1 commented 7 years ago

I love COASTER really much :))