Announcing the Silk Framework
December 31st, 2008 by Ted KulpAs I’ve worked on CMSMS 2.0, I’ve run into a few recurring issues that I didn’t quite have an answer or reason for yet…
1. I wrote a lot of very generic pieces of code in order to make 2.0 easier to develop in the long run. I think I might’ve gone overboard a bit. I wasn’t ever sure why.
2. As a professional developer, I kept running into issues where I wanted to use some of that code for other stuff. And it was too difficult to just pull out the piece I needed and didn’t do it.
When talking to my friend, Greg (who, incidentally, helped push me to launch CMSMS as a project), I was telling him about some of the things that 2.0 could do. I said something along the lines of, “Really, except for some routing and a few other little things, 2.0 could be a full development framework for other applications.” And, in my typical way, I thought about this for a few days… and didn’t do much else.
So, I’ve decided to use my week off from work to put together the basics of a PHP5 based web application framework. This framework will then become the base of CMSMS 2.0 (it’s less work than it sounds — trust me) as well as any other application you might want to develop. It’s a generic framework that builds on some of the key ideas we’ve had in CMSMS all along — it just makes those tools easier to setup for whatever you’d like to develop.
Who is this aimed towards?
Professional PHP5 developers, plain and simple. If you know what a framework is and why you’d need one, then you’re probably the correct candidate for this project. If this just flies over your head, then it’s probably safe to skip to the next post in your news reader.
What’s the name mean?
It’s smooth. It’s strong. It’s a nice foundational material… Really? It’s a short name that fits well when you put it in every class name and it’ll also make for a nice logo someday. Calguy said “smooth” and it just went from there.
What are the requirements?
PHP 5.2+ on any compatible web server. A database of some sorts — MySQL will be tested heavily. PostgreSQL and SQLite should also work fine. Development and documentation will be targetting developers on Unix based systems… Windows users might have to do a little bit of investigative work to develop with the system.
What do I get?
- ADODB5 – The standard in database abstraction. Silk uses it throughout.
- The Silk ORM – Built on top of ADODB and uses the ActiveRecord pattern. Cuts down lines of code and makes basic database access very simple and OO.
- Smarty – Uses the power of smarty throughout. Smarty templates are used for all templates and layouts, as well as smarty plugins created for all form and navigation elements.
- Magic MVC – Using file naming conventions, new actions, controllers and views can be added with very minimal work. Everything is customizable afterwards.
- jQuery – We’ve standardized on the jQuery javascript framework. Used throughout, we’ve included some javascript helpers to make Ajax simple to use.
- Events system – Stateless event handling system based on the one from CMSMS 1.x — without the database. (coming soon)
- Unit testing – Ability to have unit tests on models, views and controllers. (coming soon)
- Users, groups, permissions – Have a basic system for handling these 3 things that fall into almost every web application. CMSMS 2.0 will use the same system, so applications will be able to share login information directly with CMSMS. (coming soon)
- OpenID – Logins will support the OpenID protocol and standard using the php-openid library. (coming soon)
License?
Silk is licensed using the MIT open source license. It’s both GPL compatible (for release with CMSMS) and also able to be used in commercial/proprietary applications without question. This will allow people to use Silk for practically anything.
How do I get involved?
Silk isn’t really “there” yet. It’s still in the early phases of development, though, it’s been moving pretty fast and working out above expectations. The source code is hosting on github: http://github.com/tedkulp/silk. If you’d like to make contributions or play with the code, fork a copy and play away. If you feel that something is patch worthy, send me a pull request and I’ll take a look.
In the near future, I will post some HOWTO’s and API docs to silkframework.com. After I feel that things are stabilized a bit, I’ll write up a HOWTO on how to write a simple application using Silk that hints the major points and gets people on their way.
How does this affect 2.0?
Only a bit. The admin will be rewritten to use the new MVC system, events will have to be changed a bit, and well as a few other changes. But we’re still moving forward without having to throw away a lot of code. This is still a positive step forward with only a few small steps back.
—
Thanks, folks! Let me know if you have any questions or would like to get involved.














December 31st, 2008 at 9:04 am
Hello,
…
This is very exciting… CMSMS 2.0…Let me know if I can help at all… Not a strong php programmer but I am very strong in jQuery … which I’m slap happy that is the js frame work CMSMS is taking
You and the rest of the dev team are doing great work… Hope you all have a happy new years.
jeremyBASS
December 31st, 2008 at 10:06 am
PHP5 based web application framework for the base of CMSMS 2.0 is good idea dnd it promises a solid future.
But before thinking create other applications, it will ensure that CMSMS user requests
Is that this version 2 will add features :
- Content Versioning
- Workflow/Content Approval
- Content “block” types
- Multilingual content
- Full page caching option
and perhaps:
logic hooks, quick create module and extends
December 31st, 2008 at 10:15 am
Thanks a lot for the hard work and dedication to the community, Silk sounds like the best in CMSs for the era.
Wishing You & Your Family A Happy,
Prosperous & Successful 2009
Kevin M.
December 31st, 2008 at 11:02 am
amazing! To create a better CMSMS you create a framework!? I bow deeply to you and can only anticipate a first look at cmsms 2.0 as i fall squarely in the “this just flies over your head”-category…
December 31st, 2008 at 11:32 am
Thanks for let us know about this new direction in CMSMS. I hope I will be someday able to use it. May 2009 be nice year for you and other people, who work to make our CMS dream a reality.
December 31st, 2008 at 7:55 pm
Nice! This sounds like a really smart direction to take.
January 1st, 2009 at 12:47 am
Another Framework?
How out utilizing the Yii framework from yiiframework.com
Or CakePHP – Mambo is moving over to this framework….
Please consider it as
1. I really don’t think we need another framework.
2. We can focus on the CMS part of the code instead of the framework
Thanks,
Edward
January 1st, 2009 at 7:24 am
Hello,
does this mean, CMSMS 2 will only work on PHP5.2+ and not on PHP4.3+ anymore ?
Greetings from germany and a happy new year
Michael
January 1st, 2009 at 9:38 am
@Edward – I tried most of them already. Cake is probably the closest, but still has a ton of issues… mainly related to it’s ORM’s complete lack of OO. They’re holding on to PHP4 when it’s not necessary and there are a lot of flaws because of it.
When I started 2.0, I went through a bunch of frameworks in hoping that I didn’t have to write this stuff from scratch. Granted, there were less choices then. But, I’m still not impressed.
Really, it’s because I wrote all this stuff already. It’s in the 2.0 codebase and has been for a year and a half. It’s decent code and going to waste.
I look at it this way… CMSMS came out when there were a ton of CMS choices already. And it’s still persevered because of certain design decisions.
@Michael – That was the plan all along.
January 1st, 2009 at 2:43 pm
Hi!
Been using CMSMS for years, thanks! One of my clients is pushing me to use http://silverstripe.org/ What do you think of it, in general? My experience is still very low within it.
They are using Sapphire framework (http://www.spbnet.ru/eng/company.html) is it any use for us in here? Did you Ted checked that and maybe Silverstripe also (to have ideas and don’t do-ideas)?
Happy New Year,
– MJo
January 1st, 2009 at 5:04 pm
@Ted: Thank you for the info and thank you very very much for CMSMS
Greetings,
Michael
January 2nd, 2009 at 9:01 am
@Ted: First of all, a very happy new year.
Great to hear you are heading for a framework. I just tried some because I needed some functionality which I couldn’t fit into CMSMS. Finally I choose codeignitor and today I wanted to start coding.
After reading your post I decided to wait a while
Do you have any idea when you will release silkframework?
Success and happy coding,
Rob
January 2nd, 2009 at 9:55 am
@Rob: It should be in some sort of working shape within the month. But I’m sure the documentation will be a bit lacking for a bit until I get a chance to do some writing, but otherwise, it should work for a large amount of projects.
January 5th, 2009 at 9:03 am
Sounds good. I am pleased with the license choise of MIT.
January 5th, 2009 at 12:12 pm
Why another Framwork? would you re invent the wheel?
take a look at : http://www.symfony-project.org/
January 6th, 2009 at 7:12 am
@David: Again, this code was already written. I’m just extracting it and adding a routing engine. Symfony doesn’t have anything close to ActiveRecord and deals heavily with code generation — which is nasty and totally not necessary for a dynamic language.
I have no desire to throw out 2 years worth of code — I’m just trying to make it accessible for things outside of CMSMS.
January 7th, 2009 at 7:52 pm
Sticking to a framework or code just because you don’t want to ‘throw’ out ‘old’ code is not the best reason to hold onto something that may (or may not) have already been improved upon.
If its really good and really better than say the zend framework or cake,symphony… and the more than 20 others out there, then I would say yes, but why reinvent the wheel when something like zend frameworks (a library not a framework) is already available? and you can simply build a framework on a solid library like that instead of us having to learn a whole new system.
Having said ll of that, if its good/better then by all means bring it on
I am keeping an eye on http://www.digitaluscms.com but its slow going with them..
January 8th, 2009 at 3:32 am
@Ted,
I’ve had a look at github and saw a nice branche including jquery etc.
But I’m afraid you have to add a bit more information about how to get started to get people involved.
cheers,
Rob
January 9th, 2009 at 11:21 am
Hi, from the last 2 years I design my websites with php, then I decide to use a CMS, after looking for the best I found CMSMS, the plug-in integration was the final factor to take my decision. A month ago I started to design my own plug-in, it take me some time because there is some things that I don’t understand how to use it but finally I did it.
Today I read about the PHP framework, I hear about frameworks but I never use any then I decide to learn more about that and I found this post that you should take a look:
http://www.sitepoint.com/blogs/2008/08/29/rasmus-lerdorf-php-frameworks-think-again/
I think you want to save us a lot of time of coding but it is the correct way to do that?
Greetings,
Paul
January 9th, 2009 at 4:42 pm
Digg it up
http://digg.com/programming/New_php_framework_Silk
January 10th, 2009 at 12:59 am
@MJo
An easy way to decide on using open source tools is to take a look at the forums (as that is where you will end up when you run into difficulties)
January 10th, 2009 at 10:10 am
Just remember to make CMS MS 2 capable of running multiple websites under different domains (based on one copy of course)!
January 11th, 2009 at 7:12 am
@Ted
I know you care a lot about clean design decision. You wrote CakePHP ORM isn’t good because it lacks OO. I tried many OO on top of RDBM. Sure, coding is more fun but it makes everything slower and create awful SQL queries. Its more limited and complex queries are even more difficult then plain SQL.
I’m using CMSMS for many small websites with cheap shared hosting. It often had memory and speed issuses. I hope besides a clean design and more features u care about speed too
January 11th, 2009 at 7:28 am
@Werner: I do. The majority of the issues I’ve seen with memory on PHP come from loading too much code. Unless you’re using a opcode cache, PHP expends a ton of memory just loading and parsing code.
The ORM allows me to do 2 things.
1. Not have the same SQL query 10 times throughout the code base. Most SQL queries get put down to one line of code. The code is clean, and doesn’t create complex queries. The database is always accessible if needed.
2. Using an OO approach allows me to write code once in the model domain instead of in the view or controller domain. Again, code reduction and simplification.
To be perfectly honest, though, I’m kind of tired of the 8 (or even 16) meg memory debate. PHP put those guidelines in there 6-7 years ago and hardware has come a long way. We’re not writing for 10 year old servers anymore with 256 megs of RAM. Why hold back better code because of outdated guidelines?
Trust me, I did some tests on 2.0 before I split the code out for Silk… and it’s plenty fast and memory efficient. I feel more so than the 1.x code base — because of all the better design decisions made this time around.
January 11th, 2009 at 5:45 pm
Great job Ted!
Don’t let people discourage you. I really admire your determination in building such a great software. You are a perfectionist, and it shows. You have almost single-handedly built a CMS which competes head-to-head with enterprise-class CMSs. This would not have been possible without passion for this project and the liberty to choose whatever you feel is best. Other frameworks are just slow, do not have the requiered features or are not specific enough. I think it is a great idea to do your own framework, especially if you feel that it will make development faster (and, obviously, it will – you wrote it and you know it inside out).
January 16th, 2009 at 1:26 pm
I have used your work for multiple projects over drupal for a while now.
I am very pleased with the community and the CMS. I completely understand the addition of Silk as it adds a MAJOR benefit to CMS and, if it gets a following, to the community.
PHP5.2+ is the only way to go,looking forward.
I have found that an ORM can do 99% of the work most applications need, with minimal penalty.
I look forward to the next release and SILK.
One last thing, did you get a chance to look at kohanaphp.com in your evals?
January 20th, 2009 at 4:43 am
I’ve used CMSMS on a number of projects and I really like it. I hope that Silk goes well for you.
A number of times I have been stuck for exactly the functionality I need and have either bolted external apps on to CMSMS or started from scratch with CakePhp when I might have prefered to add to CMSMS.
Having a framework seem like it would make it easier to develop functionality that meshes cleanly with a CMSMS site? Things like single logins etc. is what I am thinking.
Anyway, good luck with the project. Us amateurs are praying for extensive documentation and I think this factor will do a lot to determine your success.
February 12th, 2009 at 6:33 am
Thnx guys!
I luv CMSMS!!!
Best CMS ever!
Can somebody tell me when v2 releases???
normal multilanguage support is needed.
CMSMS 4EVER!!!!
February 14th, 2009 at 7:50 am
Troy, I agree. Multiple language + multiple websites from one base installation is what I need too…
February 16th, 2009 at 1:30 am
What about frameworks like Kohana and CodeIgniter? Did you consider these? I love CodeIgniter ^_^
February 23rd, 2009 at 4:30 am
Was just wishing over dinner that I had at my disposal a full featured framework with an extensible CMS and (with luck!) here it is!
So much of what we all do is either bending a CMS to do new things or re-inventing the wheel with a strong framework to add CMSish functionality – inevitably the CMS doesn’t do the custom stuff you want (workflow anyone?) or you spend a huge chunk of your life coding admin screens and post handlers.
Having a framework with a cleanly implemented CMS from day one as its flagship application would be a real boon – just as long as it truly is a distinct framework not a massively distorted CMS.
I say go for it – and thanks for picking jQuery
March 10th, 2009 at 9:33 am
I certainly hope you guys are having a 3rd party perform a security audit on the code. I know several open source projects that have used these guys: http://www.gdssecurity.com/
March 22nd, 2009 at 8:47 pm
Ted – any updates on the progress of Silk?
How about CMSMS 2.0?
Thanks for a great product!