Clay Framework API and Convention Changes

I spent last night changing APIs in modules and applications. I removed the need for APIs to have component segments, moved application APIs to a central folder (within the application), and changed the api() function to support the changes. APIs in Clay are universal and called with a single function – api(), currently part of the IAM module. The api() function is the backbone of Clay, so it will likely be moved out of IAM and into the core initialization process.

I changed the primary component segment and action in applications from base_main to main_view. I think that is a little less confusing and is a better represenation of how components are broken up into segments, if needed. I primarily wanted to find a replacement for ‘base’, but as I tried different alternatives I decided ‘main’ didn’t make a very good action. With ‘main’ free, I decided to promote it to the segment.

I’m very happy with the progress I’ve made this week, although I would like to be a little further along. I plan to tweak the APIs on the module side a little more, but the application side should be sufficient for now. Creole integration isn’t complete yet, the Panels (blocks) application is still using the sql() function. There may be 1 or 2 others. I marked a TODO comment in all of the files still using sql() , but I was making the API changes at the time and didn’t pay a lot of attention to which ones they were. Luckily, Eclipse will list everywhere I have a TODO comment :)

I’ve enjoyed working on Clay so far, even though I don’t have a lot of apps to play with yet. The 0.5 milestone is mostly about the framework. The 0.6 milestone brings module APIs to the table that will be needed to support applications. The 0.7 milestone begins the shift toward a focus on applications and, well, I haven’t written the rest of the roadmap yet, but the trend will likely continue. :) Tonight I plan to work on the javascript/css loader and templates. If I can keep this pace, we’ll have a beta release in March.

Tags: , , , ,

Leave a Comment