Starting a CakePHP community website / Website Framework
Posted on 27/1/06 by Felix Geisendörfer
The authors of this post have marked it as deprecated. This means the information displayed is most likely outdated, inaccurate, boring or a combination of all three.
Policy: We never delete deprecated posts, but they are not listed in our categories or show up in the search anymore.
Comments: You can continue to leave comments on this post, but please consult Google or our search first if you want to get an answer ; ).
So I've been thinking of two things recently. One of them was that it would be cool to have a CakePHP community website like Drupal has one, where people can ask questions, publish (ready to use) code. The other one is to create a Website Framework with CakePHP (more about this below).
I know cakephp basically supports all of this already but I feel like something more community based would be benifitial. Don't get me wrong, CakeForge and CakeSnippets are great but I think there is a gap between those that demands to be filled. Otherwise every one of us will implement Image Galleries, Content Managment, RSS, etc. over and over again and while it might be faster then it would be without CakePHP it's still wasted time for most of us. So here is where my 2nd thought kicks in, creating a CakePHP Website Framework.
CakePHP Website Framework
So if I use the term "Website Framework" I don't mean a CMS. I mean something that would be in between a PHP Framework and a CMS. Basically all it would do is to help "modularize" CakePHP controllers, models, components and vendor classes into modules that you would call Image Gallery, Page Manager, Localization Editor or Tagging / Comment Tool. This means it would be a very lightweight set of a couple controllers/modules that would support installation, upgrade and activation/deactivation of modules hosted on a central site. Of course this means the entire thing would need to follow certain standards, so some things like "User Managment, Right Managment, Sessions, etc." would need to follow clear rules and most likely be "standard modules" used by the other ones. But I think this would really be something to speed up development even more, and if you want to build a website you could choose from hundreds of modules to start with and be done very fast. Have a look a Drupal's Module Site for getting an idea of how much code should be reused.
I've already spent a little bit of time by thinking of how to approach the "Module Design". I think every module should be designed so you can overwrite any function of it with your own code, without having to hack the module itself. So all modules would be derived from one common class "Module". So whenever a module is used the Website Framework will look for a php file called like modules/gallery/custom-gallery.php and check if there is a class CustomGallery to use instead of Gallery itself. This way you'd have very costumizable modules attractive to Programmers and not suffering from the bloat of providing the customization to the end user (like Drupal does).
Right now I don't have the time for writing either the community site nor the website framework all by myself in CakePHP. Now while I'll propably be able to get the community thing going with my Drupal/CakePHP solution I'd be interested to hear about people's oppinion about the Website Framework and see if there is enough interest to start a common project. Every comment on this post will be appriciated!
Update: I've just talked to gwoo about my ideas and he told me about an upcoming feature for 1.0 called plugins. As I understood him they are going to be a folder based seperation for "controllers, models, components, view etc." into little "mini-apps". So thinking about this feature, my module design would propably base on these "plugins" since they are the first step of organzing all the MVC parts by their user-related functions.
He also suggested not calling the entire thing a "Website Framwork" but rather a WoS (Website Operation System), or based on my 2nd idea MMS (Website Managment System) using the name CakeMMMMMs. What do you think?
--Felix aka the_undefined
You can skip to the end and add a comment.
It's good to hear that you are interested in a community page, I think we should talk a little bit about it on #cakephp.
Regarding your second point: A module basically would be one "Zip Package" that contains all MVC files + a new class for the Module itself like GalleryModule. The WoS itself would create an admin secured page where you can add, remove or deactivate modules. It would be very similiar to a module in Drupal, the main difference beeing that the module is customized by the programmer and not by the end-user which takes out a lot of bloat.
To make this clearer: A module will always make up one single "part" of a website, be it a Gallery, a Guestbook, a Blog, or whatever. All of the module function will be possible to overwrite much like you do with app_controller or app_model right now.
The most important thing is that there need to be 2-3 "standard modules" included in the WoS that will take care of user authentication, right managment (propably ACL) and possibly Theming in order to ease working with multiple templates for the same things.
I hope this was a little bit more explanatory to you ; ).
--Felix aka the_undefined
Hello. Your ideas are good. The CakePHP site, I think, is mostly for cake in general, like the development of itself, so I think it might always be general, just for the sanity of the developers. I give lots of respect to them just for answering all the noob questions in the chatroom all day. More people need to be proficient in cake if more ways to receive help are made available.
A framework, which I interpret as some sort of CMS, is currently my goal with learning CakePHP. I currently use Drupal, but want something similar in CakePHP. Not exactly similiar though, for example, I want more control than a 3 column layout. In fact I don't want any of the layout determined on admin settings. I just want to be able to switch themes, and control which themes are available to the users, if any. I'm also trying to write my classes so they are compatable with amfphp. I basically want like you said, a user managment system, theme system, extra plugin compatable, and one admin section for everything. So far I have a primitive User registration script. I havn't figured out sessions and cookies yet, so you can't login yet. Theres lots of things that are important in user managment though, such as multiple types of validation, login validation, email validation, change email validation, password recovery, and so forth. It would be great if one user management system did it all. A really good system could be implemented into anything, this CMS, that Framework, this mailing list, etc, without any major changes.
One thing important to me is a way to have it work with multiple sites, like Drupal does. I would do it different than they do. Instead of a sites folder, with other folders in it named after the site, I have all settings in one file for each site. Then there would be no need for shady folder names, like sub.site.com.folder, which I havn't gotten 100% working yet. One config file is alot better than 3 folders, and 3 config files, which I currently have with Drupal. I currently have 3 domains with the same drupal site, same database but different prefixes, all different themes, certain modules enabled for some and not the other, etc.
I like the idea of CakeMMM for a name. I'd leave off the extra M's and the s. CakeMMM sounds like something Homer Simpson would say, so it's ok with me! I was gonna say MMMCake, but it doesn't look as good. Sounds like a good project!
that's kinda weird, I had exactly the same idea a couple of days ago ..
so I agree to everything written here and am willing to do what I can to push this project forward!
Just to summarize, I think CakeMMM needs 4 basic parts:
-a user managment
-a module system
-a theming system
-a common admin interface (for theming and acitvating/deactivating modules, other modules should be able to add some configuration options)
It might be useful to have some standart action names for controllers of the included modules, e.g. "activate" and "deactivate" or "administer" ..
now we're already three people who believe in CakeMMM, so we just gotta do it ;)
I'm pretty sure, as cake is still a rather young project but already getting lots of attention, that there will quite soon be a community around CakeMMM ...
Alright people! I think the next thing we will need is a place where we can discuss our ideas and create a reasonable outline for the project that will set up rules and things we want CakeMMM (offical working title as of now ^^!) to do and which we don't want it to do.
Then we need a Subversion Server for it, but I think we should be able to host the project on CakeForge since it's really a Cake related application.
But I think the most notable one is that this is shold not be the Cake Version of Drupal. It's a Developer System not a User one. Which means the system will be very spartanic itself and only handle the 4 points frando mentioned, but will allow a maximum of flexibilty.
So it will be able to do the same things Drupal does, but really based on modules and not on built-in stuff. So for example a "menu" would definitly be something left to a module and not be part of the core.
Another that idea I had was if it would make sense to have something like an "core abstraction layer" which would basically mean that stuff like theming, user managment and so on would work with "one common class" all modules of this kind extend, but would allow to have different user managment "modules" for different sites. So for example one should be able to modify the "Model" of the User-System in order to make it retrieve the Data via a REST or SOAP interface from another site for example. But I'm not sure about how practically that would be, but it's defnitly something worth to discuss.
So regarding the place to discuss: We could either set up a mail group, have an irc channel or use a wiki. What would you guys prefer?
Yes I agree, its not a CMS, but can be one, depending on the plugins used. I threw some of my ideas together while I was sitting in college today. I not an expert in this stuff, but maybe some of the ideas will be useful. http://pigeontech.com/files/CakeMMM.html
As for a place to develop, maybe a simple drupal site with forum module. I can create a subdomain if you are unable, but don't think I could handle user uploading or anything like that. I think the first step would be to get things in writing, or even drawings, so you know how things (like plugins) work together, what rules they have with each other, etc. Talk to ya later :)
Just installed a basic drupal page for us ..
have a look on http://xcite-online.de/cakeMMM/
just register and I give you all required privileges.
you could also think about which other modules we should activate.
Frando: That's awesome, we'll use it from now on as our offical center ; ).
automagically: Thx for taking the time to write down your thoughts. I looked at it and I agree with a lot of what you wrote. But I think it's a little bit to big already as of what modules you think should be in the package. For example Content would be an additional module and not part of CakeMMM itself. Disregarding the fact that we propably would be the first to programm something like this, and definitly publish it, it still shouldn't be part of the core.
But let's continue our idea collection on frando's site ; ).
I really liked these ideas.
I've been in need to that system like to CakeMMM, but a simpler way: I needed to put some other project's code in my app, because the author was joining our project, and we wanted to do this without merge the two codes... so I needed a way to make customizations to the strange code, but I didn't want to do it directly in it.
Felix, your way of view, thinking in a abstraction layer, is very interesting. Even more for a framework.
In my view, the pieces of code (and I tend to code everything this way) should be solid, and have an interface, just like that what you call abstraction layer, which is, in single words, a communication way to the outside.
This view can create a lot of reusable, modular and generic code.
Trying to make code this way, always claims to the best of the programming pratices, like OO; and adopting software engineering concepts, like planning, documenting, etc.
Finally, this gets open source (and I like more free software) movement stronger.
As result, we get good code, a community, sharing, learning, more good code, larger community, and so...
Besides all this blablabla, can I contribute to Cake community site and CakeMMM?
thanks for your comment. You are definitly welcome to contribute to CakeMMM. Today I want to get the first Wiki pages ready that will provide the first clear and public overview about the way CakeMMM is going to work. I'll be hanging out in #cakephp and #cakemmm all day today so we should meet there and talk a little bit. I've done quite ome thinking with frando the last days so I think it's about time to get stuff written down. I also want to turn in the request for project/svn hosting at CakeForge today.
See you in IRC or mail me at FelixGe [at] web [dot] de
--Felix aka the_undefined
it's shame there was no follow-up to this one.. at least I can't find it
i was going to add that Localization should be another basic feature of the MMM but...
do you know of any similar activity going on elsewhere?
andrezero: Yeah, it's a shame : /. But I've given up on building the perfect CMS for now and unfortunately wouldn't know any alternative either. I found that most companies need customized solutions these days anyway so it's not that much of a bummer for me. Not sure if there is any similar activity in the CakePHP community right now.
This one makes sence "One's first step in wisdom is to kuesstion everything - and one's last is to come to terms with everything."
i have set up enviornment for working with cakePHP Now any one will please help me to know where to start from..........
Buy Hydrocodone - Secure Online Ordering buy hydrocodone Hydrocodone buy - No Prescription hydrocodone abuse - [url=http://www.blogtalkradio.com/Buy__Hydrocodone]buy hydrocodone[/url].
This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.
1. Yes, I think it would be useful to have such a community page. I am willing to support such a project.
2. I am a little bit confused about the idea of the WoS project. I don't understand what the goal of this project should be. Is it a directory of modules? Or is it about writing reusable modules? Or about integrating a module infrastructure into Cake? Please clarify!