As I see it, there have historically been several barriers to entry for using the Zoop Framework:
- Zoop has poor documentation
- First time setup is hard (dependencies, etc)
- Zoop has an overly complex skeleton app
So how can we fix this?
Documentation
We've come a long way. Most new code has adequate inline documentation. Unfortunately the Users Manual and From A to Zoop haven't kept up. We could definitely step up the pace here.
Complicated setup, initial launch
I've removed any unnecessary core dependencies from the Lunar branch. XML-RPC is now only required if it's actually used. This means there are currently no core PEAR library dependencies in Lunar. This is awesome.
Components used to declare dependencies if there was a remote possibility that they would use another component. I've reordered configuration load in Lunar, so component and app configuration is available in the component constructor. This allows components like Formz or Auth to conditionally require components depending on the current configuration. This also helps to reduce core dependencies: A skeleton app currently requires: core, spyc, app, session, validate, gui, convert, and zone.
This can be optimized further. Components can now be added at any point in the runtime, allowing lazier loading and catering to more specific needs. For example, the Validate component might be required only when a GuiControl is created, or the Convert component might only be added when using a controller output format other than HTML.
Lunar has also learned some new tricks. It has a 'check environment' phase in which components ensure that files, classes and folders exist, and are writable as required. Components can add tests and display simple errors to the user, allowing them to quickly identify and fix environment problems. This is a vast improvement over the backtraces and confusing notices generated by trying to write to a folder that doesn't exist.
Environment checking results are cached once they return success, so, for example, the Gui component doesn't have to try to create compile and cache directories on every page load. While a small improvement, this is performance improvement nonetheless.
Overly complex skeleton app
I propose branching the skeleton into two apps. First, a skeleton, which is exactly that: a barebones skeleton. To fill the need for sample code and something fun to play with, we should add a 'noob' app. I see this app including a zone or page for each cool Zoop feature, with some easily accessible examples and clearly documented code. This is for the first time user, and should work without much configuration.
The Lunar branch of the skeleton app has been pared down to the essentials. It now consists only of a default zone, a zone template file, three basic templates (header, footer, welcome), and required theme resources.
The app directory structure has been simplified in Lunar as well. Zones are now located in a zones directory, and can be organized hierarchically rather than by throwing the entire url into the filename. So instead of:
app/zone_default.php app/zone_admin.php app/zone_admin_users.php app/zone_admin_groups.php
we have:
app/zones/default.php app/zones/admin.php app/zones/admin/users.php app/zones/admin/groups.php
The zones directory in the app corresponds to the controllers, and directories have been added for model and view as well. GuiControls and templates hang out in subfolders of view, for example. The directory structure is more hierarchical, rather than flat as it was in the past. This makes it easier to grok at a glance.
More on Lunar
For more on what's happening in the Lunar branch, see A look at what's coming in Zoop Framework 2.0
noob app
I'm thinking a great way to demo some of the new functionality in Formz, CrudZone and the REST API facilities would be to build a sort of media cataloging application, like a DVD/Blu-Ray/CD/video game catalog. In terms of utility, Zoop 2.0 provides exactly what such an app would need. And, perhaps most importantly, it wouldn't be much work to put together.
that would be a great demo
I think it would be good to have several demo apps like this. If you look in the app section of the SVN repo, there's one called budget. A media catalog demo app could be a good addition to that section.
barebones and noob
I love the idea of a barebones skeleton. It really doesn't need to be big. For the noob skeleton, I wonder if we could structure it such that items can be copied to the barebones app as they are needed. For example, the barebones doesn't use formz, but I'm going to be using them. So I look in the noob skeleton, and I see that there is a config file there for formz. Mostly, it's the defaults, commented out, so I copy that over, and customize it for my app. Does that make sense?
One other thing I saw in http://zoopframework.com/blogs/justin/a-look-at-whats-coming-in-zoop-fra... is:
global $gui; $gui->generate($this->canonicalizeTemplate('welcome.tpl'));I think there is a strong case for:
$this->generate('welcome.tpl');Because the general case will always be, use a canonical template. The exception will be, I want to specify exactly where to find the template.
function generate($template, $view = NULL) { global $gui; if(!$view) $view = $gui;//I don't really like that this global is in a conditional, it's weird. $view->generate($this->canonicalizeTemplate($template)); }$this->generate()
I've been thinking that exact same thing... Just about every time I type
$this->canonicalizeTemplate()I agree with you completely though. I might name the function guiGenerate instead though, as
$this->generate()doesn't clearly indicate what it's doing.take it a step further
In my experimental branch of zoop I take it a step further. If in a page function you don't call display on a gui object it basically just calls
for you.
If you display gui on your own it won't do it again and you can call a method on the zone to suppress it. 99% of the time though it just does what you want. You can even set it up to have different sets of stationary for different types of pages. For instance you can have a main layout template that every other template gets included in but then have a plain one that you can use for popups windows etc. Or one that generates a PDF instead of HTML. It all happens in the skeleton though so it's always configurable by the user and I could create different skeletons for different situations.
If you want to check out my simplified zone implementation check it out here:
http://code.google.com/p/zoop/source/browse/trunk/framework/zone/Zone.ph...
If you want to check out my basic skeleton with automatic template display and layout support it's here:
http://code.google.com/p/zoop/source/browse/#svn/trunk/stationary/basic
Here are the two class that do the auto template display and layout support
http://code.google.com/p/zoop/source/browse/trunk/stationary/basic/exten...
http://code.google.com/p/zoop/source/browse/trunk/stationary/basic/exten...
If anyone wants more information about this or any other features in my branch just let me know.
- Rick
Cheat Sheet and Noob App
As I told Justin earlier, it would be nice for a Zoop Noob like me to have a cheat sheet like the one on cakePHP: http://cakephp.org/files/Resources/CakePHP-1.2-Cheatsheet.pdf. Also; I will attempt to create a Noob app if there are no objections; since I am a true Noob and will probably use only the bare essentials. Once I finish the app, I can write an article on it and post it.
Exactly what I need...
I'm a true Zoop Noob, just discovered yesterday ;) And that's look awsome, but really lacks documentation, a cheat sheet could help !..
VCP-310 braindumps || 312-50
VCP-310 braindumps || 312-50 braindumps || 70-620 braindumps || 350-030 braindumps || 70-432 braindumps || 642-642 braindumps || 70-686 braindumps || 220-301 braindumps ||
Its not the case that reader must be completely agreed with author's views about article. So this is what happened with me, anyways its a good effort, I appreciate it. Thanks