1

I'm just trying to dive into CodeIgniter + RedBean ORM.

Been glancing through some examples and think it's good enough to get started.

However, it seems like using RedBean eliminates the need to use CodeIgniter models? Looks like you can do most of the DB-related things right from the Controllers.

Is this true? (and at a higher level, is it true for most of the ORMs?)

4

1 に答える 1

1

It's true but not because of RedBean. You can use CodeIgniter without model if you want but it's good to keep it separate.

CodeIgniter has a fairly loose approach to MVC since Models are not required. If you don't need the added separation, or find that maintaining models requires more complexity than you want, you can ignore them and build your application minimally using Controllers and Views. CodeIgniter also enables you to incorporate your own existing scripts, or even develop core libraries for the system, enabling you to work in a way that makes the most sense to you.

You can use queries from inside your controller directly.

Model-View-Controller

于 2012-04-24T05:55:03.363 に答える