Garden based application without dashboard
I've planned to write a small web application and although it is really small, I wanted it to be based on a framework. After looking at some small frameworks and their documentation, I thought it might be wiser to use a framework that I have at least some experience with - Garden!
And so I've created a folder applications/settings and created about.php, class.hooks.php which shall insert my CSS (but I think I will hard code that later on in some kind of master view), a by now empty configuration.php, a structure.php and even a stub.php
Next steps would be to a) upload the needed files, b) "install" the minimum Garden and c) activate my application. At least that's what I want to test before I start working on models, views, controller...
Yes, and here comes my question: which files do I have to transfer to my server? Those are the directories I think I'll need:
/cache (but not cache/Smarty)
/conf
/library/core
/library/database
- .htaccess
- bootstrap.php
- index.php
Which additional directories/files will I need to be able to use every function from /library/core?
And what would be needed to initilialize Garden? Does a manual config.php with the database credentials will be enough?
And what would be needed to "enable" my application so that my function Setup (which builds the structure) is called?
As always I'd like to look at examples. Does anyone know of such a minimal Garden app?
Best Answers
-
Linc Admin
The only things you don't need are addons, which include anything in /applications, /plugins, /themes, and /locales.
Yes, you can simply set up your config.php manually. There's nothing special about the setup wizard except for the calling of hooks like Setup().
The Setup() calling is in PluginManager->EnablePlugin(). The Dashboard provides the automated way of doing this, so if you're forgoing Dashboard you'd need your own invocation of it.
Personally, I've always at least included Dashboard. It's easier to strip down and restyle than to rebuild its core functions.
7 -
Linc Admin
With no controllers & views from native apps, you should be OK without /js. Vendors is a little dicier. For instance, the Markdown parser is part of Gdn_Format. Smarty is used by Gdn_Theme. Your mileage will vary widely depending on what you're trying.
7
Answers
The only things you don't need are addons, which include anything in /applications, /plugins, /themes, and /locales.
Yes, you can simply set up your config.php manually. There's nothing special about the setup wizard except for the calling of hooks like Setup().
The Setup() calling is in PluginManager->EnablePlugin(). The Dashboard provides the automated way of doing this, so if you're forgoing Dashboard you'd need your own invocation of it.
Personally, I've always at least included Dashboard. It's easier to strip down and restyle than to rebuild its core functions.
Thanks for the quick answer!
What about /library/vendors and /js? Both have a lot of files that I suspect would not be needed. By now I haven't uploaded them to my server and I think I will try going forward without them. Do you know of any pitfalls when having them not at hand?
And in order to initiate my application I could simply create a setup.php that calls PluginManager->EnablePlugin(MyApplication, right? Cool - I'll try that
With no controllers & views from native apps, you should be OK without /js. Vendors is a little dicier. For instance, the Markdown parser is part of Gdn_Format. Smarty is used by Gdn_Theme. Your mileage will vary widely depending on what you're trying.
Okay, I see!
Plan is to create a real simple tool and I think I'll only need the following features:
No AJAX, no fancy formattings. By now I think I will need less than 5 very simple views. I know that using Garden for something like that might be overkill, but I hope to get a deeper insight of the framework.