I've been using CodeIgniter for a few months and recently discovered Bonfire, which looks like a great foundation for CI projects, despite the current build using almost outdated resources like Bootstrap 2.
I really love the module system in Bonfire, it seems like a very efficient method for creating completely independent subsystems. However, I wonder how compatible these modules would be with a normal CodeIgniter installation. Obviously you can't just dump the modules folder in, CI wouldn't know what to do with it, but is there any way to restructure a BF module into a third party plugin or something that can be used in CI?
Similarly, would it be possible to extract files from a CI installation and package them as a BF module (obviously with some tweaking)?
I would imagine the answer to those questions would probably be "of course not", so I just want to make my understanding clear; if I decide to develop with Bonfire, I would essentially be stuck using it without being able to revert to vanilla CodeIgniter and I would only be able to share my modules with other Bonfire users. Correct?
Basically the very first difference is that bonfire works on HMVC (Hierarchical model–view–controller) which means every module will contain its own model view and controller.
Yes it can easily be integrate with the vanilla codeIgniter you mentioned because the framework basically following the codeIgniter rules and provided a CMS with great functions.
Some features like:
Built-In Admin Area
Modular Coding
Data Maintenance
For more details check the documentation
Related
I have experience with Joomla and have modified and wrote some simple Joomla extensions. I don't have experience using one of the popular PHP frameworks (such as CakePHP), but I was thinking about using the Joomla framework because I'm familiar with Joomla. How would I use the Joomla framework for a software project instead of using regular Joomla and writing the extensions needed for it to extend it's capabilities? Thanks!
The basic idea is that you:
Get a copy of either the whole framework or just the packages you need+dependencies (from github or composer) or use the older copy that is shipped with the CMS,
Bootstrap your application (JApplicationWeb or JApplicationCli).
Write your code using the MVC structure provided.
The big difference with writing a totally independent application is that you are doing just that, you need to build everything in the application whereas in the CMS there are already a lot of things in place. (The good part of that is that you can make new code with no legacy concerns.) For example, if you look at the JIssues project you'll see that they had to think about things like authentication. So as you would expect writing a simple application is simple, writing a complex one is complex.
You can see many examples of framework applications around, ranging from the ones found in the CLI folder of your CMS installation to JIssues, and of course the three web applications in the CMS are all examples of applications on the framework.
The Joomla Framework is intended (among other things) to be the platform upon which you can build a web-application. The framework is like the frame of one of those motorcycles they build on "American Choppers." It provides the backdrop so that you can hit the ground thinking about your app without worrying about User Authentication, database connection, and a thousand other things like those that get in the way of bringing your app to its potential audience.
If you're trying to extend Joomla, the current edition is what you should be using.
I'm putting together a dashboard for a backend to a CMS project made with Codeigniter. There is some navigation in a sidebar and I"m trying to figure out what I need to know making "modules". I have two types of users. Administrators and basic users. They share the same sidebar navigation. Admins can see all links in the navigation and basic users can only see some. I was trying to look at a few different CMS's to see how they do it and really like how PyroCMS does it with putting together their navigation. However, I"m trying to find out what really tells me what I should makes a module. I know it has its own controllers, models, views and etc. I'm trying to find out with research what I need to know to really know what should I make into a module. Are their questions I should I should be asking myself that will be able to tell me what has the possibility of being a module and what isn't.
CMS Admin_Controller Line 80
Module development with PyroCMS is the way to go if you're used to working in CodeIgniter.
Becoming acclimated will be intuitive as a CI programmer, create a new module (drop it in your *addons/shared_addons/modules* folder):
https://github.com/pyrocms/sample
And notice how the routing works:
http://docs.pyrocms.com/2.2/manual/developers/basics/modular-routing
Then take a looksee at MY_Model (system/cms/core) that PyroCMS includes. I wrote a few modules before realizing PyroCMS includes a basic model that will save you from writing a lot of extraneous code. Don't worry, you can still always choose extend CI_Model instead if you don't want to use MY_Model for a module.
The more you learn about the mechanics of PyroCMS, the more you realize it has no limits. Unless you're writing trivial apps or just like re-writing code, I wouldn't start any new project in CI because PyroCMS is the more sensible starting point.
If there is something more advanced that the documentation doesn't answer for you. Then SNOOP AROUND! All the core features are built as modules. Check out how they did it in one of the core modules (system/cms/modules/). And if you want to change something in the core, you can avoid make any changes to the core by overloading views.
Once you're confident with your ported CI App, I would check out Streams. Streams will dramatically increase the time it takes to write trivial CRUD modules. If you're as happy as I've been with Pyro, you won't mind shelling out the lettuce to buy PyroCMS Pro or Streams.
I'm starting to familiarize myself with using the module-based architecture for zend framework projects. My real reason behind being interested in the module architecture is to be able to take a module from one project and just drop it into another project. Maybe I'm not getting it right..
But what I'm noticing right off the bat is that controllers within each module cannot have the same name as any other controller in the main application (or in any other module, though I haven't tested this). This leads me to think that modules are not really independent self-contained units, so I wonder how this affects their ease of distribution from one project to another.
The other issue is what if I were to take a module and drop it into another project. Do I have to update the .zfproject.xml manually? and wouldn't that be a bit too cumbersome to be done manually?
Maybe I'm not clear on how modules should be used in zend, so I'd like to know when you decide it's best to use them, and when do you decide not to use them, or do you use them all the time, or do you never use them?
I always used module based architecture so far in my projects, because I like to separate concepts. For example I have always an ADMIN module whose classes and controllers dont mix with the rest of the application. Using modules you can reuse modules for other applications, for example if you create a BLOG module.
The names of your controllers will be something like Admin_IndexController for the admin module even if the file is named IndexController.php.
Another concept that is nice and help you reuse resources is the plugins. Use them for authentication or to check validity of the requests.
You need to setup namespaces for your modules so that they are easily moved into a new project without renaming.
If you are using Zend Tool then you will have to edit the zfproject.xml. I haven't spent a lot of time using this so I'm not sure if there is another way without manually editing.
I have recently started working on an eCommerce site for a company and they have selected Magento 1.4.0 to run their store. I have spent most of my PHP "career" working with various MVC frameworks (even Zend with Magento is supposed to be based on) but the complexity of Magento seems to be on another level with no seemingly good resources to look to for help.
Looking around the site I have seen suggestions for certain books to use as reference, but they all refer to Magento 1.2 or 1.3.
My goal is to develop for Magento in a way that I do not alter any of the base code so that the client can easily upgrade the version of Magento and just "drop in" my code and have it work. The current issue is how to properly use the layout/template breakdown correctly and how to add custom model/controller functionality to the application without hacking away at Magento's core code base.
how to properly use the layout/template breakdown correctly
What you need to know is the folder structure of the Magento & the use of its own MVC structure. This is a very very important part to get you started from the basic roots. Whatever version you use, the folder structure & the MVC structure followed by Magento will almost never change. Try to follow the Magento's own Knowledge Base & Wiki tutorials. If you want you can also follow some other sites as well.
how to add custom model/controller functionality to the application
without hacking away at Magento's core code base
You will need to use the custom module functionality to override the core code base of model / controller. It's a simple process of writing the main logic in a XML file, of what core class you want to override of Magento, in your module's "etc" folder. Try to understand the process first, from the Knowledge Base & Wiki tutorials, to get a firm grip on overriding core classes.
I hope this helps.
Ruby on Rails has a bunch of plugins which extend the normal scaffolding:
Lipsiadmin
Hobo
Streamlined
ActiveScaffold
Does the PHP community have anything similar? phpmyadmin is great, but it doesn't have any way to control the presentation of the data. You always get all of the data in its presentation format. These Rails frameworks are a little more user friendly.
Edit: My original question was not very clear. I'm not looking to compare PHP and Rails. I'm also not looking for an all purpose general framework. I'm looking for something just like the four pieces of software I listed above, but written in PHP. The admin software I listed above generates a crud interface for you based on your configuration. The configuration includes which tables you'd like to show, what operations you can do to the table, and who can see the information. The software does the rest, from writing the SQL to processing the request to generating the interface.
I would look at Zend, CakePHP, CodeIgniter or Kohana. See if they have an addon or plugin that can do it.
The problem with the four pieces of software you listed is that they extend Rails. When you say "PHP," there is nothing to extend in the same sense. (I really doubt you want a PHP module that does this.) You don't need a PHP addon, you need a [framework] addon.
Any of the frameworks I or Jonathan listed are similar to Rails. Kohana in particular has an addon module called Auto Modeler that may do what you need.
have you looked at pear: http://pear.php.net/
It's important to stress the difference between a language and a framework here. PHP is not itself a framework with modules. PHP is a language, like C or Python.
There are several website frameworks that have been written in PHP. The most popular would probably be Drupal though there are several that I've looked at over the last year that seem similarly capable:
CakePHP
CodeIgniter
Joomla!
Symfony
Zend
PhpMyAdmin is not a module or a framework. It is a separate, stand-alone web application for database administration, written in PHP. It won't be a component in any strategy for presentation of data on a website.
Symfony may be a "general framework", but it has scaffolding you can use as a complete application if your needs are simple. You define your model in a YML config file, and can then generate CRUD modules based on this model. The code generation is also customizable by editing other YML config files. All without writing any PHP code. But should the need arise, you have the option to extend the scaffolding with PHP and the complete framework.
See the Symfony docs on code generation.
A framework called ATK also claims a good code:functionality ratio ("An application in 10 lines of code").