I've opened a similar question on Zend (Using ZF2 components without entire MVC process) but I wonder if it is possible to use fuelphp without using the MVC elements? It takes a long time to load so could you use forms or access control for example without using the whole mvc system?
1 Answers
Most of v1 is somewhat tightly coupled with the fuel core, so you could use parts of it but you would still have to make sure the autoloader is set up and any parts of fuel that the target code needs. This should not be a major problem with v1 but it is simply not designed to be used like this so YMMV.
What might be a better move is to take a look at the v2 packages as the code is better separated and the packages have minimal dependencies on each other. None of the v2 code relies on the MVC structure apart from the core installer package.
As of the time of writing not all are finished or even started but there might be something in there that you will find useful. We are also going to be releasing a first alpha version of v2 in the new year so there should be lots more code popping up over the next month and a half.
That being said there are loads of packages out there on packigist so there's nothing stopping you using anything from there, totally outside of the MVC pattern.

- 852
- 6
- 16
-
Cheers Uru - thanks for the info. Will that mean that v2 doesn't load the whole core each time? It was a criticism recently of v1 which stopped us (unfortunately) using it. Are there any examples of which modules could be decoupled or code examples on how to do it? Don't worry if not - I'm just interested. Will v2 be wildly different from v1? If we build in v1 will it migrate? Thanks. – Antony Nov 16 '14 at 21:05
-
v2 is a total rewrite, we are improving everything that was wrong with v1 and making the code more testable. Internally v2 has a totally different structure but has a very familiar interface. The plan is that there will be a migration path from v1 to v2, in theory you should only have to rewrite core class extensions and nothing else. Take a look at the new welcome controller https://github.com/fuelphp/demo-component/blob/master/classes/Controller/Welcome.php – Emlyn Nov 17 '14 at 07:17