handles more legwork for you - Discussion ---
We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

More Robust Skeleton --- handles more legwork for you

Our group for cloud9living (www.cloud9living.com) is doing a rewrite in Phalcon. The sample application skeleton provided didn't accomodate all the features we wanted.

I've posted our implementation here: https://github.com/alanbarber111/cloud-phalcon-skeleton Would love some community feedback/opinions. Pretty new to Phalcon, but think you'll find it helpful.

From Github:

Why should I use it?

  • Better module loading system (through etc/modules/Module_Name.xml) --- no need to use the phaclon Module.php
  • Multiple websites linked to the database
  • Separate design directories for each website. The directories can also be setup to "fall back" from an override package to the default package (great for things like holiday skins, etc)
  • Cloud-dev-tools for quickly creating models in the appropriate module
  • Separate views/layouts from the rest of your code
  • Autoload external libraries into one namespace
  • Built in support for memcached sessions (using the memcached class from the phalcon incubator)
  • Built in support for Redis sessions / cache (using phalcon incubator)
  • Overriden front controller and init process (gutted Phalcon defaults)
  • The ability to register event observers and module front names in the module configuration files.
  • Built in support for a url rewriter / redirect (Just insert rows into core_url_rewrite)
  • Caching service created on bootup, easy access with debugging
  • Global access to entire application
  • Option to "run" application or just boot it up (good for CLI stuff)
  • Global registry via the Cloud static class
  • Abstracted module class so you can create modules more quickly
  • Exception and error handling, with logging
  • Provides configuration options for development, staging, and production
  • Trait classes for models, singletons, and flexible data objects (from the magento Varien_Object)


15.1k

Hey Alan!

Looks pretty cool! I'll have a play later on. The only thing I've noticed after a brief look that I'm not a fan of, are those layout constants. Having to specify a new constant every time the front end guys make a new layout (and then remember to remove it ) just feels like unnecessary complication.

Hey Nazwa,

Good point. The layout can still be freely changed in the controll with this->view->setLayout. I just wanted to have a default set in the Layout singleton. I'll update it to just reflect a DEFAULT_LAYOUT.

Hey Alan, The project is super nice ! i have made some improvments and suggestions but i could'nt find way to communicate with you?

Hey Mohammed ! Thanks for the kind comments.

I actually just pushed up a completely new version (we gutted the whole thing, I think you'll find the new one much more robust). I would still love to hear your feedback. Message me on github if you'd like.

Added my email to github mohammed.