Garden Preview Part I
Garden Preview Part I: Overview
Garden Preview Part II: Filesystem
Garden Preview Part III: Anatomy of a Request
Garden Preview Part IV: Views
Garden Preview Part V: Data
Garden Preview Part VI: Models & Forms
Garden Preview Part VII: Ajax
Garden Preview Part VIII: Plugins
Garden Preview Part IX: Roles & Permissions
Garden Preview Part X: User Registration
Garden Preview Part XI: Structure

Almost two years ago I started thinking about rewriting the Lussumo Framework, the framework upon which Vanilla is built. After a year of heavy contemplation, I finally started development on the new version, which I have come to call “Garden”.
My concept for the Garden framework is not to be competition for the likes of The Zend Framework, CakePHP, or even CodeIgniter (to name a few of the other great PHP frameworks), but something both a little less and a little more. My idea was to create a framework that didn’t solve every problem, but just most of the common problems we face when developing simple web applications. I wanted to build a framework that had user and permission management built right in. I wanted to build a framework with which you could easily create new applications and throw them alongside any others – and all users, roles, permissions, preferences, plugins, and themes could play nice together.
I can safely say that I have accomplished that task.
Recently I had an active member of the Lussumo Community contact me and ask if his plugins for Vanilla 1 would work with Vanilla 2. It was hard to give him the answer that, no, none of the (over 400) plugins for Vanilla 1 would work with Vanilla 2. I had to explain to him that developing in Garden will be easier, faster, and take far less code than it used to. His questions made me realize that I need to step up and explain Garden to all of the great Lussumo Developers out there.
In this part of the Garden preview, I am going to give a brief overview of some of the main goals of Garden. In the parts to follow, I will go into great detail of each part of the framework, explaining the theories behind them and how they can be used by developers to build new applications, plugins and themes.
Extending Garden
In Vanilla 1 there were a number of ways that developers could add to the application. I called these Add-ons and they fell into the categories of: extensions, themes, styles, and languages.
When I started thinking about how to add to Garden, I realized that I was missing a key ingredient: applications. Vanilla is just one application, and I wanted to be able to use Garden to do more than just Vanilla. I also realized that almost no-one ever worked with themes (Hell, I started to do one and found it too difficult), so I’ve taken the concept of themes, simplified it and munged it together with styles. Finally, I realized that the lay-person doesn’t really know what an extension is, but everyone knows what a plugin is.
So, in Garden, add-ons will fall into the following categories: applications, plugins, and themes. If you’re wondering what happened to languages, you’ll read about that in a little bit.
Speed
Probably the biggest criticism of Vanilla 1 was that it slows down under heavy load. I absolutely refuse to give up on object-oriented programming in PHP, so I’ve been exclusively working with the latest releases of PHP; taking advantage of it’s speed with OO programming. I’ve also done a ton of research on code optimization for PHP. Rest assured, Garden is very fast. But application speed isn’t where the conversation should end.
I’ve also worked very hard to produce libraries that are fast and easy to work with. I wanted it to take fewer lines of code to accomplish both difficult and common tasks. For example, I’ve completely rewritten the database libraries so that building queries is easier, and it integrates with the MVC code so that models are instantly created simply by referring to the tables they represent. This means that data validation can be automated based on the properties of columns in database tables – just one of the many places that Garden will speed up your development time.
Models, Views, and Controllers
When I was writing Vanilla 1, I didn’t know what an MVC pattern was. Little did I know that I was re-inventing the wheel at the time. Vanilla 1 used a bloated, red-headed step-child of the MVC design pattern. Garden is still based on the MVC design pattern, but it is done with far less code and in a much more elegant way. When I began re-thinking the page delivery model for Garden, I decided to go out there and research what the competition was doing. I read books on design patterns, read blog entries about everything under the sun by developers from all around the world. I looked into every framework I could get my hands on.
I ended up being a little wowed by the simplicity of CakePHP and CodeIgniter’s approaches to MVC. In the end I’ve borrowed ideas from both and added a few of my own. The result is views that can be delivered in-page or via ajax popups. Dynamic content delivered in a myriad of ways. Fully integrated protection from exploits and CSRF attacks. Master/container views that allow theme authors to quickly and easily put Garden applications right into their own applications. Simple models that can be generated on the fly. And custom routing so that pointing users to different parts of your applications is dead simple.
Membership, Roles & Permissions
While I had done some very different things with roles & permissions in Vanilla 1, I had also painted myself into a corner that made expansion difficult. In Garden, adding new permissions is dead easy, and users can be assigned to more than just one role. There are many different ways to set up registration and add new users. Four out-of-the box options are: simple (apply and you’re in), captcha, administrative approval, and by invitation.
Localization
While I believe that localization was one of the things I got right in Vanilla 1, it didn’t have any follow through. The result of this lack of follow-through is that Vanilla 1 is still released with just one language available. Another problem is that whenever the application changed, or new extensions were added, there would be the need for new translations to be in place – but no way of notifying the translation authors that these translations were needed.
In Garden, the localization files are roughly the same. One difference is that the folder name for a set of localization files is based on the already known and followed internationalization codes used everywhere on the internet. So, for example, the locale folder I’ve been working with is labeled “en-CA” for “Canadian English”. The major difference is that localization will no longer be represented on the add-ons site. Instead, the Lussumo community will be in charge of localization.
One of the many applications I am building with Garden (alongside Vanilla, of course) is a localization application that monitors any translation that is made by Garden and records it in a database. Any member of the community can then work on any set of locale definitions they want to. It will be a wiki-like handling of localization. Whenever a full set of translations is finished and approved by a group of members, it will be added to the appropriate application or plugin and be included in the downloadable application package.
So Much More
With literally years of deep pontification transformed into code, there is so much to tell you. I still haven’t even touched upon Garden’s error-handling, out-of-the-box friendly urls, new licensing model (still open source and free), database engine integrations, cache management, jQuery! I haven’t even mentioned menu organization, plugin management, enforced plugin and application requirements, automated setup and installation. And I have only hinted at the other applications that are coming along with garden besides Vanilla. I never even told you about the hosted solution I’ll be offering when Garden and Vanilla are released!
The long and short of it is that the hard work is done. Aside from cleanup and debugging, the Garden framework is up and running and I am now into application, plugin, and theme development. My hope is to have an entirely new lussumo.com launched within the first quarter of the new year. In the meantime, keep checking back here for more in-depth previews of Garden.
So…when are you accepting people to beta test?
Wow. Just wow.
I’ll be looking forward to it although I want to hear more about your mention of jQuery – specifically how I can avoid using it and instead use my more preferred javascript frameworks.
@Rich Paul: once I’ve got the beta of Vanilla working I’ll be making the codebase public and inviting people to use the application. Ballpark estimate I’d say January.
@Fyorl – I’ve used jquery as the standard for everything in Garden, but you don’t have to use it if you don’t want. You’ll be able to add js to the head of pages just like you could with Vanilla 1.
I’m so sick of all of the brokeness of vanilla 1, I’m extremely frustrated with some of the extensions. I’m excited that none of the extensions will work in the new version but I hope you have a import script for all of my data. I’m also worried about the countless content that will be unusable if attachment 2 doesnt load. I hope you out of the box have a better upload system because attachment 2 is not cutting it. I love vanilla but sometimes I’m really frustrated I went with choosing it because of the extension problems
@MichaelPierce – Extensions have definitely been a sore spot with Vanilla 1. Vanilla 2 will see a number of addons that are developed by the core team and released with the standard Vanilla 2 package. I am also planning on starting a code-review for addons whereby add-ons that pass the code-review (and testing) will be considered “verified for use” by Lussumo. If an addon hasn’t been verified, you’ll be taking your chances.
Finally, yes, there will be a migration script and, yes, Garden has an upload component built right in
Very cool Mark, glad to see it’s all progressing very well. Can’t wait to see the applications developed with it!
I might even try my hand at it but lack of time is the only thing preventing me at this point
well, that’s perfect. i’ll be waiting for garden to launch on it my incredible projects :Ь
Great news, especially about migration along with the certified review board
I can’t wait to see this. As an effort to learn PHP in the past, I dug into the code base for Vanilla and learned a lot. Like you, I had no idea of MVC at the time, but none-the-less, it was still a great learning experience.
If you are going to do some sort of beta testing program for Garden, I would love to be a part of that!
@Jeff – There will be alpha and beta testing. The alpha testing will happen on my servers where I will be getting users to help me find bugs by using the application(s). During the beta testing phase, I’ll be making the source public (via SVN) and allowing developers to download, install, and use the code on their own servers.
None of that will be happening until I have Vanilla 2 completed. I don’t have a rock-solid timeline, but I am aiming for January.
Keep checking this blog as I’ll be announcing everything from here.
“Finally, yes, there will be a migration script and, yes, Garden has an upload component built right in”
What about migration from Wordpress to Garden?
@toivo – I’m only planning on writing a migration script from Vanilla 1’s db to Vanilla 2’s db for the release. Furthermore, Vanilla 2 won’t mean the end of Vanilla 1. I won’t be doing any more development on Vanilla 1, but I will continue to add patches for any bugs or security issues that crop up.
I have an idea for a general purpose migration application at some point – but that is just on the drawing board at the moment – no plans to officially start it any time soon. Too many other things to deal with in the immediate future.
I’m sure that if there is a need, the community will make a wp migrator, and the vanilla 1 migrator can be used as a guideline…
Oh great–I thought I would be able to play with building a MythTV box, but now Garden is going to distract me…
Mark, well i need to tell you that out there in the world are some developers. You are one of those that are still hidden and i think will remain so. To uch understatement is in your software, what makes it so lovely. Vanilla, Garden, etc. i can feel some ZEN inside that, and that is i think why people turn their back on bigger, more capable solutions, developed maybe for years and pretty hattrick… well, they are not surrounded by the ZEN i can find in your software, it’s clean, practial, easy and open to features. Thanx.
Thanks, phreak!
I sure hope I don’t stay too “hidden”, though. The entire plan for Garden depends upon making a living from the hosted solution I’ll be offering so that I can devote myself to the software full-time.
@ Mark
Can you talk more about the directory structure, if i want to package more than one Application build on Garden for my clients.
Will there be a way to enable disable applications from a central gui? just like we can enable disable extensions.
Can applications talk to one another, can a media manager application talk to vanilla application, using some communication api.
Can you mention the additional extensions/applications that the core team will build so i don’t think about building them and avoid overlaps.
@toivo
You mean from bbpress to vanilla, or are you asking all posts in wordpress becomes discussions and so on.
@MySchizoBuddy – I’m going to get into all of that in the posts to come, but the short answers are:
“Can you talk more about the directory structure, if i want to package more than one Application build on Garden for my clients.”
You’ll see in my post next week.
“Will there be a way to enable disable applications from a central gui? just like we can enable disable extensions.”
Yes.
“Can applications talk to one another, can a media manager application talk to vanilla application, using some communication api.”
Well, that’s a pretty broad question. They can reference each other’s libraries, and they can use each other’s controllers and models, and they can even share themes. I’ve even been creating interfaces that classes should follow so that one application can know how to interact with another application’s classes based on the interface they implement. I’m even working right now on doing things like letting one application add elements to another application’s forms and in-page controls.
“Can you mention the additional extensions/applications that the core team will build so i don’t think about building them and avoid overlaps.”
I’ll be announcing them before the code goes public, so no worries there.
can we say no to dokuwiki based documentation
@myschizobuddy – Accepting that I have enough time before launch, the documentation will be done with another new Garden-based app. If I can’t swing that, I may end up switching to mediawiki until I can.
Feel free to add me to the alpha test list, i’ll put in some effort on testing since my forum is definitely going to need to move to vanilla 2, seriously though think about that migration script having some sort of attachements 2 integrator because having to manually go through thousands of posts of attachments to relink would not be that fun hehe
How hard/easy will it be to make apps with client side done in Adobe Flex with Garden on the server.
@MySchizoBuddy – I’ve never used Adobe Flex before, so I have no idea what would be involved.
[...] Click here to read the Garden Preview Part I [...]
@toivo
You mean a) from bbpress to vanilla, or b) are you asking all posts in wordpress becomes discussions and so on.
I think that option b would be nice.
@mark
Does garden have services support like xmlrpc?
There’s no xmlrpc right now. I wouldn’t be opposed to adding it, either. I’d like to consider a full API, as well – but I can’t do everything I want for launch. I’m hoping that people like yourself will be interested in helping/adding things like that after I make the code public…
so you didn’t use ACL for permissions
No. I went with something more like RBAC.
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III [...]
[...] working on a new forum software project that he intends to raise the bar with even higher. Garden is a multi-application PHP based software that will improve upon the success of Vanilla. Speed [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III Click here to read the Garden Preview Part IV [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III Click here to read the Garden Preview Part IV Click here to read the Garden Preview Part V [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III Click here to read the Garden Preview Part IV Click here to read the Garden Preview Part V Click here to read the Garden Preview Part VI [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III Click here to read the Garden Preview Part IV Click here to read the Garden Preview Part V Click here to read the Garden Preview Part VI Click here to read the Garden Preview Part VII [...]
[...] Click here to read the Garden Preview Part I Click here to read the Garden Preview Part II Click here to read the Garden Preview Part III Click here to read the Garden Preview Part IV Click here to read the Garden Preview Part V Click here to read the Garden Preview Part VI Click here to read the Garden Preview Part VII Click here to read the Garden Preview Part VIII [...]
[...] Garden Preview Part I: Overview Garden Preview Part II: Filesystem Garden Preview Part III: Anatomy of a Request Garden Preview Part IV: Views Garden Preview Part V: Data Garden Preview Part VI: Models & Forms Garden Preview Part VII: Ajax Garden Preview Part VIII: Plugins Garden Preview Part IX: Roles & Permissions Garden Preview Part X: User Registration Garden Preview Part XI: Structure [...]
[...] Garden Preview Part I: Overview Garden Preview Part II: Filesystem Garden Preview Part III: Anatomy of a Request Garden Preview Part IV: Views Garden Preview Part V: Data Garden Preview Part VI: Models & Forms Garden Preview Part VII: Ajax Garden Preview Part VIII: Plugins Garden Preview Part IX: Roles & Permissions Garden Preview Part X: User Registration Garden Preview Part XI: Structure Garden Preview Part XII: Internationalization & Localization [...]
[...] Garden Preview Part I: Overview Garden Preview Part II: Filesystem Garden Preview Part III: Anatomy of a Request Garden Preview Part IV: Views Garden Preview Part V: Data Garden Preview Part VI: Models & Forms Garden Preview Part VII: Ajax Garden Preview Part VIII: Plugins Garden Preview Part IX: Roles & Permissions Garden Preview Part X: User Registration Garden Preview Part XI: Structure Garden Preview Part XII: Internationalization & Localization Garden Preview Parth XIII: Syndication [...]
[...] taking a look at Mark O’Sullivan’s Garden framework, I have decided to put a hold on continuing development on Amorphys. The framework pretty much does [...]
[...] Garden Preview Part I: Overview Garden Preview Part II: Filesystem Garden Preview Part III: Anatomy of a Request Garden Preview Part IV: Views Garden Preview Part V: Data Garden Preview Part VI: Models & Forms Garden Preview Part VII: Ajax Garden Preview Part VIII: Plugins Garden Preview Part IX: Roles & Permissions Garden Preview Part X: User Registration Garden Preview Part XI: Structure Garden Preview Part XII: Internationalization & Localization Garden Preview Parth XIII: Syndication Garden Preview Parth XIV: Errors & Debugging [...]