CodeIgniter Forums
Upgrade CI3 to CI4, ORM, other... - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Upgrade CI3 to CI4, ORM, other... (/showthread.php?tid=74334)



Upgrade CI3 to CI4, ORM, other... - writ3it - 09-11-2019

Hello,

It's my first post. So, hello everyone! Smile

1) I am working with some large, complicated app. I am going to do some refactoring and maybe it's good time for upgrade CI. What are biggest differences between 3 and 4?

2) While refactoring I am going to use ORM and some DDD to make my work easier. (Yes, it's not perfect solution but for me it is the best.) Could You recommend me some ORM for CI 4 (and 3?). I read about GasORM but it's compatible with CI2. I can use Doctrine/Elqoquent/CakephpORM but I prefer more Codeigniter-way library (if it possible).

3) Is Codeigniter4 stable? There are no bugs (within reason) f.e. at sessions?

4) There is some library (codeigniter-way) for automating crud (scaffolding)?

5) I always wonder, why CI uses system directory instead of vendor?

I am full of admiration for you that you develop and is getting better! Thanks for all


RE: Upgrade CI3 to CI4, ORM, other... - php_rocs - 09-11-2019

@writ3it,

Answer to Question 1: https://codeigniter4.github.io/userguide/installation/upgrade_4xx.html

Answer to Question 3: CI 4 is in CodeIgniter 4.0.0-rc.1 released (the current Codeigniter website is CI4)

Answer to Question 4: see answer to question 1 (read the new features of CI 4)

Welcome to the CI family!!


RE: Upgrade CI3 to CI4, ORM, other... - writ3it - 09-13-2019

@php_rocs

Thank you! Of course I forgot to read docs Smile

I see that data layer is more advanced now. Looks much better.


RE: Upgrade CI3 to CI4, ORM, other... - ciadmin - 09-13-2019

Answer to #5 ... CI4 uses both the system and the vendor folders.
If you do a manual install, you end up with system/ for CI and vendor/ for dependencies.
If you do a composer install, then CI's system folder is inside vendor/, along with the other dependencies.

Re #2 ... there isn't an ORM specific to or known to work better with CI4.
However, we expect that many of the benefits that developers look to an "ORM" for will be addressed by the new Model and Entity classes.


RE: Upgrade CI3 to CI4, ORM, other... - vincent78 - 09-13-2019

Answer to #2: Using an ORM is the perfect solution if the ORM is a good one

What is a good ORM? it is an ORM that relies on the principle:
"It's not the ORM that drives the design of the database but the opposite"

For example, in some ORMs, you can't have a many-to-many association, instead, you have to create an extra Entity, which is very bad because the resulting database is not the one that you want.

A good ORM only offers advantages:
  • the design of the database is the one that you want
  • you can make some raw SQL queries
  • and obviously, you benefit from the power of the ORM: it automatically creates objects from the database

This is why I've created an ORM for CI 3.1.10 and you can find it on GitHub: https://github.com/vmoulin78/concorde
and the website is: https://www.concorde-project.org