Hey guys, so long ago I started using fuelphp as my first framework.
I have my project now running on FuelPHP 1.0, since then I have gained more knowledge of PHP, programming and use of frameworks.
Now I am at a stage where I need to re-factor a large part of our database and how things work with our web app.
My question: Should I continue using the current setup I have and do the refactoring of code or should I start from new version of FuelPHP instead with the re-factored code and clean everything out in the process.
Is the new version of FuelPHP (1.0 vs 1.7X) worth while the efforts?
Yes, absolutely. There is a world of difference between the two version.
We don't believe in a version number race, we only change major version numbers where there is a major change. In other frameworks, the current 1.8/develop would maybe be called version 4.
At the same time, one of the main focal points of the Fuel framework is backward compatibility and long term support. Fuel is used a lot a corporate context, where 5-7 year development cycles are not uncommon.
So while an updgrade from 1.0 to 1.7 would mean some code changes (read all changelogs before you start), it will look and feel the same. Even in version 2, currently under development and with a completely different core architecture, a controller is instantly recognisable as a Fuel controller.
Whether or not it is worth the efforts is something you can only decide. That greatly depends on the about of refactoring needed.
If it is structural refactoring (new way of using controllers, introduce modules, working with presenters, going from views to themes or to a template engine) I would personally start from scratch, and copy the business logic of the current application over (which would still be valid).
If it's a functional evolution that doesn't have an impact on structure, maybe upgrading to the current version is a better option.
I have started fresh as I think this will be the best option
Another question, if I do everything correct in terms of design (extending where I need to instead of touching the packages or core) how backwards compatible will version 2 of fuelphp be, is it going to be an easy upgrade or will I need to move code base once again if I choose to upgrade to version 2 once it comes out
In terms of code, it's a complete rewrite, so if you're planning on a lot of core extensions, you might be in for a lot of rework. Question is though, why do you need to extend core classes? We build Fuel apps on a daily basis, and the apps that really need core extensions are few and far between.
And don't forget, as soon as there is an official v2 release, we will release a final LTS version of v1, which will remain supported (for bug fixes and security issues). We fully recognise that application may have a 3-5 year release cycle, and there is not always a business case to rework the code to a new framework version. So you don't have to.
Also, v2 has a completely modular design, so you can v2 components like Session, Auth, Fieldset, Validation, Orm, Upload, etc in a v1 app without problems. In fact, some already do and it's the way we test them in the field.
We will not upgrade our existing applications. When v2 is out in beta, we will switch for new applications. Existing applications will continue to run on v1, as said before, I don't see the business case for switching.
Is the FuelPHP Version 2 close to the beta yet? I am curious if I should start building from FuelPHP Version 2 or just continue from the 1.8/develop on Fuel github and upgrade as version 2 comes out in beta.
The core has been "alpha" ready for some time, and is reasonable stable after the last major change (= the introduction of Component). It still needs a lot of unit tests and optimisation. We're now working on the two packages most in use: Orm and Auth. Both are being rewritten from scratch.
The way we see it, is that unless you require specific features present in v2 that are not in v1, there is no need to upgrade existing applications, as there is often simply no business case for it (it will take you time, and after the upgrade you still have exactly the same application and functionality).
Because we will release a final LTS version of v1 when we switch to v2, the primary reason for framework upgrades, i.e. the loss of support on the version in use, is not valid for Fuel. We will continue to support the LTS version (in terms of fixing bugs and security issues) for quite some time.