Welcome Guest, Not a member yet? Register   Sign In
[split] CRUD? <CodeIgniter 4 Proposed Roadmap>
#1

(This post was last modified: 07-24-2016, 06:13 AM by ciadmin.)

(08-05-2015, 08:33 AM)kilishan Wrote: After much consideration of the community's desires and opinions, and what we feel is best for the future, the CI Council has come to some decisions about the future of your favorite framework. Be warned, there are big changes ahead, but we believe they can be done in a way that not only prepares us for the future, but still feels like CodeIgniter - simple, fast, flexible.

Here's a broad overview of what the future holds. Please remember that this is simply the initial plan. Any and all details are subject to change once development is underway.

...

In which version you guys planning to includ CRUD ?
Reply
#2

Basic CRUD has been built in to CodeIgniter's model ... https://bcit-ci.github.io/CodeIgniter4/d...model.html
Reply
#3

Oh Wow! That is fantastic! On first read it looks like it is going to be a superb addition! Really excited about this feature, absolutely brilliant.
Reply
#4

there is so much good news on that page!!! thanks everyone CI 4 is looking great already.
Reply
#5

I have one question tho, are they all Std Objects now? I can now see that you have to create a data array to insert data, which isn't really OOP is it? Wouldn't it be better to have PoPo's somewhere with actual classes? Like `$user = new User(); $user->username = 'test'` etc. I know that you can cast the result as an Object, and you can insert one as well with an object, but it doesn't seem to be the default. Is there a place where we can store our Objects like 'User' etc?
Reply
#6

(07-24-2016, 06:17 AM)ciadmin Wrote: Basic CRUD has been built in to CodeIgniter's model ... https://bcit-ci.github.io/CodeIgniter4/d...model.html

I am expecting Like Yii Framework
Reply
#7

(This post was last modified: 08-02-2016, 09:09 AM by kilishan.)

(08-02-2016, 05:01 AM)Jordy Wrote: I have one question tho, are they all Std Objects now? I can now see that you have to create a data array to insert data, which isn't really OOP is it? Wouldn't it be better to have PoPo's somewhere with actual classes? Like `$user = new User(); $user->username = 'test'` etc. I know that you can cast the result as an Object, and you can insert one as well with an object, but it doesn't seem to be the default. Is there a place where we can store our Objects like 'User' etc?

It works much like it always has, where you can get the results back as an array, an object, or a custom class, like User. If you're looking for an ActiveRecord-style object, sorry, but that won't be included. In each of your model's, though, you can define the class to return results as in the $returnType setting. So, we keep the flexibility and explicitness that CI has always been known for. If you want Laravel-like ActiveRecord ORM, or Collections returned, or Doctrine-style DataMapper, you'll have to build that layer yourself, or import their library into yours. But it has always been part of CI's history to not force you into any one manner, and allow you to work like you want. We're trying to live up that.

That being said, it's always possible to pull in Doctrine, or Eloquent, or PHPActiveRecord, or whatever, and use that and skip our database layer altogether to get exactly what you're wanting.

(08-02-2016, 07:07 AM)patel.ganesh28 Wrote: I am expecting Like Yii Framework

Not familiar with how Yii handles it but if you're looking for an ORM, you're out of luck. That's been discussed many times and isn't going to ship with CI. Sorry.
Reply
#8

Ahh that's actually really usefull, that you can set the returnType like that, and thank you for letting me know that it's possible to use things such as Eloquent. I was not aware of the fact that it was that easy to implement, thanks for your comment!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB