Poll: Use namespaces? You do not have permission to vote in this poll. |
|||
yes | 89 | 89.00% | |
no | 7 | 7.00% | |
maybe | 4 | 4.00% | |
Total | 100 vote(s) | 100% |
* You voted for this item. | [Show Results] |
Use more PHP standards (namespaces) |
(04-14-2015, 06:37 AM)sv3tli0 Wrote: Not just namespaces .. Traits , interfaces and others must be added to CI. Couldn't explain it better. I think this is a must, and CodeIgniter should move towards modern best practices in PHP.
(04-19-2015, 03:04 PM)Razican Wrote:(04-14-2015, 06:37 AM)sv3tli0 Wrote: Not just namespaces .. Traits , interfaces and others must be added to CI. I agree, too. Keeping the syntax as $this->... is 2005 era PHP.
I Think the new CI version MUST uses PSR too. The class names are a mess.
PHP is Life!!! See My Portfolio
Unfortunately Ucfirst is not the rule to PSR.
When I have spoken about the mess, I was referring about this. In controller you can use WelcomeTeste, Welcome_Teste or Welcome_teste, but not use the same way in model we need use Welcome_teste_model. To me this is a mess.
PHP is Life!!! See My Portfolio
While CI does not follow any of the PSRs, the current rules are much closer to PSR-1/PSR-4 than the previous rules.
More importantly, there's nothing stopping you from setting up Composer and loading your own PSR-1/PSR-2 classes to use in your application. (04-14-2015, 09:23 AM)mwhitney Wrote: Short-term backwards compatibility is how any platform maintains its existing user base, whether it is an OS, a programming language, an API, or a framework. Even if it requires an extra compatibility layer, it is usually worth the extra effort to provide an easier upgrade path for existing users. Yes. Why should we rewrite our application in every year or every 3 year? It would be awesome if my CI application will work after 10 or 20 years! I don't know it is possible or not. Maybe impossible. But backwards compatibility is important for some projects. We can write both code like below on CI3 now (using Compser): Code: $this->load->model('Product_model'); their applications to just load models. This is just an example of BC break. I hope not to force rewrite and CI keep BC as possible. Keeping API is one of the pros of CI, I think.
for sure i can tell you that if the next version of CodeIgniter forces me to rewrite my application, then i'll rewrite it on Laravel...
backwards compatibility is one of the main reasons why i still developing with CI and i love it.. |