Welcome Guest, Not a member yet? Register   Sign In
CI for MySQL PHP migration project?

(This post was last modified: 01-17-2020, 04:13 PM by JNapolitanoIT.)

I see you have received some great help here. The advice from jreklund is absolutely invaluable. To wit, I wanted to add something to this thread for you. When it comes down to code generation for your project, to simplify everything you may want to check out Lonnie Ezell's Vulcan CLI toolkit. It has been a life-saver for me. It will generate Controllers, Entities, Models and Migrations for you with a few simple commands. And even though it is in its development stages, it is still super stable and works very well (although the last time I used it a few weeks ago the Entity Classes it generated needed me to do some minor refactoring to match the newer Entity classes functionality).

For example you can easily create a database model with:

php spark make:model

This will allow you to configure the database table associated with this model and generate a database model inside of app\Models. If you use entities to model your tables data, you can use the following command:

php spark make:entity

From here, you can use the following command to make a controller, complete with CRUD utility functions and everything. You can easily associate your newly created/generated database models with the controllers when configuring them in the command line.

php spark make:controller

As for Grocery CRUD; You can read the Grocery CRUD thread here. But in a nutshell Grocery CRUD, in the days of CodeIgniter 2/3 was pretty decent at first glance. It helped beginners incorporate views and pre-built models and such into a project and get CRUD started straight away. However, the truth is that it hasn't aged well and it is not at all practical or well developed. Perhaps in the future it will be rewritten and better optimized and better organized.

You can query your database and present your data in a far simpler way with CodeIgniters Query Builder and by following a basic MVC pattern (present your data within your views, let your models handle your business logic and let your controllers act as intermediaries). This can easily be achieved when you build reusable code modules that do all of your heavy lifting. Then, pull in only the classes and services that you need from these modules, into portions of the application that require them. These modules can be located practically anywhere on your server and be used in multiple applications, just as long as they are registered in the autoloader(s). Simpler to implement, extend, test and modify than anything Grocery CRUD brings to the table.

I hope this helps. Good luck with your migration Smile
A reader lives a thousand lives before he dies. The man who never reads lives only one.
George R.R. Martin


Messages In This Thread
CI for MySQL PHP migration project? - by Loomes - 01-14-2020, 12:21 PM
RE: CI for MySQL PHP migration project? - by JNapolitanoIT - 01-17-2020, 03:35 PM

Theme © iAndrew 2016 - Forum software by © MyBB