Welcome Guest, Not a member yet? Register   Sign In
Software layers, explained, with examples
#1

[eluser]sceleski[/eluser]
How do you separate Model to Business Logic Layer and Data Access Layer?

I read many theories but can't find actual examples (files and code) for better understanding. I'm familiar with principles of BLL and DAL but I'm not sure how to implement it properly.
#2

[eluser]morgs[/eluser]
"How do you separate Model to Business Logic Layer and Data Access Layer?"

This is only the structure of your system. CodeIgniter already has this structure in place for you!

In my application:

Business Logic Layer => In My Controllers (/application/controllers)
- You can also make use of Custom Helpers (/application/helpers). Also see what these helpers offer you: (/system/helpers)

Data Access Layer => My Custom Libraries (Libraries: /application/libraries)
- You can also use models to populate your views

Regards,
Morgs
#3

[eluser]sceleski[/eluser]
Thanks for sharing that with me morgs.

So, your approach is to store all logic inside the Controller? That sound like "fat controller skinny model" method, except it seems that you rather store DAL in Library instead Model?

My belief is that Model should be responsible for communicating with storage (db) and Libraries should behave as a Service Layer between Controller and Model. Do you also separate that?




Theme © iAndrew 2016 - Forum software by © MyBB