I've been a little sick lately, so i haven't focused on as much development as I'd hoped. I have done some work on Clay, but not a lot to ClayCMS. You can see the latest changes on the project's GitHub page.
I expanded the applications' ability to specifiy which templates to use within their class methods (Component Actions). Before it was done by setting the object property $template to a string of the template name:
$this->template = 'toolbar';
would use the template toolbar.tpl in the application's /templates folder.
You can also use subfolders in the template name:
$this->template = 'includes/toolbar';
would use the template toolbar.tpl in the application's /templates/includes folder.
The new addition (you can still use the string for an in-application template), allows you to set the template using an array. This array allows you to specify a template from another application or from a theme:
$this->template = array('application' => 'blog', 'template' => 'toolbar');
$this->template = array('theme' => 'simplestyle_4', 'template' => 'toolbar');
In both cases above it would use the toolbar.tpl template in the /templates folder of whatever the first key is set to.
I also expanded the application object's template method, allowing a 2nd parameter to override the template origin, template name, and override/supplement data provided in template variables.
$this->template($dashboard, array('application' => 'system', 'template' => 'toolbar', 'data' => array('message' => 'This is overridden from the page template'));
The way this works is $dashboard is an array created from using $this->action() on an application object. The 2nd part, another array, adds to or overrides parts of the array provided by $dashboard. The 'data' array defines a variable $message that can be used in the system/templates/toolbar.tpl template. In the example I made it come from a page template, but any template has access to $this->template() and can include other templates.
I also created a new API to replace the Pager I made a few weeks ago (the one at the bottom of this page). The old Pager used an application object, while new the Pager uses a static application library (class) that is called as an API. It doesn't create any new objects, like the old one did, and seems to be a little more efficient. Application objects aren't resource hogs anyway, but every little optimization helps.
I updated TinyMCE in the Clay repo to the latest version.
Finally, I worked a little on a code highlighter, so I can show highlighted code in blog posts. I may make it into a TinyMCE plugin, but I haven't decided exactly which route to take yet. I am leaning toward a lighter solution than TinyMCE, perhaps something using HTML5. If I move to a different WYSIWYG editor, I will create an option so you can choose which editor to use. I have managed to get a little work done while being sick, but I'm hoping I'll feel better soon so I can focus on something a little more complex...like the ClayCMS privilege system, blocks, hooks, etc.
I pushed the MT theme today to GitHub. You can browse the theme on GitHub here:
Keep in mind that is the current tree, so if I push a change you wont see it with that URL.
I'm working on a theme for developers to use as a starter theme. It's going to replace the older Empty theme, which is out dated at the moment. Empty will be renamed and restyled to use the new CSS requirements in ClayCMS (though they are still evolving).
The developer theme will have a page template that is fairly void, just showing the theme output methods. It will also have a separate page that is the beginning of our theme documentation. I'm building it for Valter to use to get to know the theme system better, but decided I may as well make it a standard feature :)
Side note: documenting code usually shows where there is room for improvement, this is another case of that. I've added a few theme system features to the TODO list since I started documenting the theme.
I've pushed the latest code of ClayCMS to the Clay repository, along with everything that was once in the clay-installer repository.
CLAYCMS IS ALPHA CODE
Disclaimer: ClayCMS should not be used on a production server! It is considered Alpha (pre-Beta) code and has a lot of work left.
If you want to check it out, head over to the Clay Repository at GitHub.com. If you want to help let me know or fork it and send some pull requests!
Now that I have some help with the project, I will be opening the development and plans a lot more.
Tonight I've deleted a few of the repositories on GitHub for Clay [http://github.com/clay]. I decided the way I was doing it before was going to be too complicated to maintain. Now we have the clay-framework and clay repositories. We also still have mycfsite and mycfplatform, which will be examples of using the Clay Framework and serve as SDKs.
The clay-framework repository will be used for development of just the framework.
The clay repository will be used for the development of platforms using Clay Framework and will include the Installer, most stable packages, and additional libraries not included with the Clay Framework.
I've been wandering around the Internet looking for Open Source projects to invite to OContext. It's a project and initiative I've started, based on the same idea as my recent blog about Data Strategy and Context. The project is currently hosted on Google Code: OContext.
The project intends to create an open standard for data context in web services. The context is the words that describe the data, so it can easily be recognized and treated properly on any system it is transferrred to or requested from.
If anyone is interested in joining this initiative, email me at david.dyess AT gmail.com. Just put OContext in the subject so it'll get my attention.
I forgot to list this last night, but I have some experimental code for it already. The Activities app is a stream app that will use Hooks to build a list of users' activities on the site. It will probably start out as an all-in-one list for the site, that can be broken down into individual users. It's the same kind of functionality Facebook started with, except they fed their's too many steroids. Eventually it will use a contacts system to allow users to network. Pretty typical for social networking functionality.
It's when the REST server comes into play that this app gets more exciting :) More to come on that line of thinking later.
Here are some apps and features I hope to be adding to ClayCMS over the next few of months (or at least working on):
- Hooks - Most likely part of the Apps application, Hooks will use the Services API to allow apps to share, display, or pull in features of other apps. The Filter app's use of Services will likely be a basis for this application.
- Forms app - currently there is an API named ClayDO (Clay Data Objects) that I have built a code-level form generator with. It uses the various form elements as objects and allows me to build entire forms from within an application's code. That Form API is a ClayDO object-type, but in the future I plan to extend it into an app that can be used to build forms from the user interface and Hook them into other apps.
- Objects app - potentially a replacement to ClayDO in the future, it's purpose is to have ClayDO's object relational mapping at the application level for more intuitive use of the UI and APIs.
- REST - REST is a way to move or manipulate data between systems using simple requests. I plan to build a REST Server and Client into Clay that will allow you to tranfer information between sites and services. The Client will be able to use REST services offerred from other sites, while the Server allows you to open up data to be used in new ways. [This is part of the reason I want to start a Data Context initiative between open source projects - to allow sites built on different software to easily talk to eachother.]
- Blocks app - I've worked on this quite a bit already, but I have some work to do to keep it in line with my performance goals for ClayCMS. Blocks will be similar to Xaraya's Blocks, but not nearly as complex. They will be more along the lines of mini-apps, more than likely.
- Pages app - This should be higher up the list, as it will likely come sooner than some of the others. The Pages app will allow you to use a WYSIWYG editor to put whatever content on a full page that you want. It will also have a few prepared pages, such as a contact form, that will fill in some missing functionality until more apps come along. I have considered using the Pages app as a type of navigation tool, allowing you to use Blocks and other Applications within a page (maybe even with shortened URL support). It will be simple at first and I'll build on it from there.
- Social app - I've worked on this one some. It is intended to offer social tools for other apps to use, such as Facebook comments, content sharing features, post to x social network, and other social networking features.
I've upgraded to the newest version of ClayCMS tonight. Yay! :)
There are many improvements over the prior version, although most of them are not apparent from the outside. You may notice the blog entries are formatted better, that's thanks to the new HTML filter, which allows me to display HTML that is considered safe. I no longer have to strip out all HTML in fear of something malicious being sent through. I also have the new Dashboard bar, which is my favorite feature of this CMS by far. You have to be logged in to experience it, but it makes things a lot easier. :)
Performance has been improved and a lot of the code has been optimized. To help with performance, I've added the pager, which means I don't have to display all 100+ blog posts as once (see bottom of this page). I've also cut the PHP memory usage down by almost 20%, which isn't a lot, but ClayCMS doesn't use a lot of memory anyway. Most of the Dashboard uses Ajax form submission, which also cuts down on resource usage through minimized output and processing.
I'm hoping the next upgrade will have Blog comments and the privilege system stabilized so I can allow user registration.
Finally, this site is now using the Clay Autoboot package, which allows me to run multiple web sites from the same code base. :)
I've been putting together some initial proposals for an initiative I plan to share with several projects around the Open Source community. The overall idea stems from my ambition over ten years ago to build a social web hosting service. I worked on it heavily for a few years and ended up stopping direct development and began developing the Clay Framework (in hope of building the service on the lighter-weight framework). My new ambition is quite different, but in a lot of ways an evolved version of my original goal.
I haven't found a good name for it yet. I am hoping the name can be a collaborative effort, but so far I've pinned some good keywords down. Data and Context, those two words are what it is all about. There are many different open source projects that build content management systems and ways to deploy web sites. They all use their own methods and have their own systems in place. All of them compete directly or indirectly with eachother, sometimes while maintaining working relationships with eachother. As far as I know, few of them interact with eachother on a data transport level.
Meanwhile, large social networks are flourishing, providing services that heavily benefit themselves overall. My strategy is to create an open standard that allows any web site to become part of a vast social network. I'm not going into details, just yet, but imagine that you have a blog that supports this open data context standard. Any web site or user across the web that also uses this context standard can be networked with you and your web site. All you have to do is interact with that person or site in some way, whether it is subscribing to their public activities, commenting on something they created or even replying to their comment. This strategy takes the overall concept of a social network and applies it across any web site that supports it. Of course the hard part is creating a standard context for data to move from web site to web site, while also allowing the users and web sites to filter and share data as desired. I do have some ideas to provide barriers for misuse and to differentiate which kinds of data are shared or even accepted.
I'm hoping to get many other Open Source projects involved and to create a standard that will allow us to create a vast social network. It's entirely possible, we just have to do it.