Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter's Future
#11

[eluser]Michael Wales[/eluser]
Yes, they are built for PHP4 but there is very little difference between the two versions. PHP5 has stronger OOP support, and CodeIgniter takes advantage of that support via the Base5 file.

The only major change you would see is the declaration of properties/methods as private, protected and public. Sure, that would keep people from using and abusing the framework but I find that to be developer error, not the framework's problem. It would be a nicety if CI kept me from using private functions within a class, but if I insist on doing so - I better be willing to face the consequences.

There has yet to be any significant proof that developing for PHP5 will give you any sort of performance benefit. Therefore, the only reason to develop for PHP5 is to take advantage of PHP5's new features (which CI does) or simply because PHP4 is no longer supported.

Unfortunately, PHP4 is still widely supported (hell, it's still the most popular version in production environments) and can be found on literally thousands of hosts.

So, as has been said many, many times before. EllisLab (the commercial company that makes a living off of this stuff), doesn't really believe it's fiscally responsible to alienate thousands of users just to sprinkle a private, protected, and public throughout the source just yet.
#12

[eluser]simshaun[/eluser]
I've hinted at this twice now, but I guess I need to plainly state it.

I did not say drop support for it totally right now.
I say drop support for it when PHP4 fades out (as it is doing.)

As to having the majority of hosts using PHP4, well I haven't been on many that have.
About 90% of the ones I've used both personally and at work are PHP5.
I think you aren't getting your moneys worth if they force you to use PHP4.

I believe that sometime in the future (who knows, could be 2 years from now).. PHP5 will be the new PHP4, as PHP6 is already in beta. (http://snaps.php.net/)
#13

[eluser]Popcorn[/eluser]
The problem is simshaun, a lot of companies rely on PHP 4 to have their application working. From a non programmers view, if it works fine then don't touch it. Companies will see rewriting their application and installing PHP 5 as an expense they can live without.
#14

[eluser]simshaun[/eluser]
[quote author="Popcorn" date="1231303359"]The problem is simshaun, a lot of companies rely on PHP 4 to have their application working. From a non programmers view, if it works fine then don't touch it. Companies will see rewriting their application and installing PHP 5 as an expense they can live without.[/quote]

I'm not sure if this applies to what I've said.
Who says they have upgrade and make it all PHP5 if they are stuck on PHP4? Like you said, "if it works fine, then don't touch it."

Dropping support for PHP4 in the future should have no affect on them if their app already works as intended. The only reason I'd like to see PHP4 go is so CI can improve and push ahead of all other frameworks.

The only way I see your argument applying is if there is a major bug found in their release of CI which needs fixed.
#15

[eluser]Michael Wales[/eluser]
Eventually, yes, CI will drop PHP4 support but I don't imagine it being that amazing and drastic. Kind of like how CI doesn't support PHP3...
#16

[eluser]simshaun[/eluser]
It might be amazing and drastic if by that time PHP6 is out of beta and CI can be PHP5/PHP6.
#17

[eluser]xwero[/eluser]
I think another reason to keep he framework compatible with php4 is that a php5 only CI will drown in the php5 only framework sea. The other frameworks are ahead of CI because they already use cool features like autoloading, interfaces, destructors, SPL, adding class instances as function parameters and manipulate them globally, ...

CI still has to adopt these things and make it possible to update from a previous version. Or should a php5 only version be a new start? I think if that is the strategy the update should wait until php5.3 is available, this will be the version closest to php6.
#18

[eluser]Rick Jolly[/eluser]
[quote author="Michael Wales" date="1231302746"]The only major change you would see is the declaration of properties/methods as private, protected and public.[/quote]
Not the only change. The CI Loader class is a necessary hack for php 4. With php 5, the loader could be replaced with true autoloading. Doesn't anyone else get tired of $this->load->library('Somelib');?
#19

[eluser]xwero[/eluser]
Rick Jolly, check this out.
#20

[eluser]Rick Jolly[/eluser]
xwero, interesting improvement. Thanks.

Still ideally we wouldn't have to work around php 4 limitations:
Code:
// CI way
$this->load->model('Mymodel');
$this->Mymodel->do_something();

// work-around:
Models('Mymodel')->do_something();

// standard php 5 when using an __autoload() function:
Mymodel::instance()->do_something();
Also, when using autoload, we could also better control when we'd rather not use a singleton class.




Theme © iAndrew 2016 - Forum software by © MyBB