Welcome Guest, Not a member yet? Register   Sign In
Best place to put the admin part
#11

[eluser]Colin Williams[/eluser]
Yeah, it's not against any law or standard to just revert back to plain old PHP to solve the config issue. Just have your config.php and database.php include() the same file.
#12

[eluser]internut[/eluser]
[quote author="Colin Williams" date="1217465358"]Yeah, it's not against any law or standard to just revert back to plain old PHP to solve the config issue. Just have your config.php and database.php include() the same file.[/quote]

So i can put those config settings in an outside file & call them into /configs/config.php & /configs/database.php

Am I on the right track?
#13

[eluser]Colin Williams[/eluser]
Yeah. I would put a folder somewhere called, maybe, "global_config" and put the config files you want to share there. Then, include those files in the appropriate places in your separate apps. Be sure to comment the files where you include() explaining what's going on and how it differs from standard CI config files.
#14

[eluser]internut[/eluser]
I think its just going to be best and make things all come together if i do:

/application/
/system/

in the application folder which i'm going to rename to "program":

/application/
....../controllers/
................... front_end_controller_files_here.php
................... /admin/
........................... /back_end_controller_files_here.php


...../views/
.......... front_end_views.php
........... /admin/
................... back_end_views.php

Above is pretty ugly but you get the point. Best way i'm finding to split a front & backend up while keeping one config (btw to call the admin folder controller files place /admin/ in your URI). Are most projects back-end only?

I've been doing front & back-end projects all my life it feels like.
#15

[eluser]jleequeen[/eluser]
@internut

I'm really struggling with this kind of thing. I have an application where I really have 3 different types of users instead of just frontend/backend or public/admin, i a public piece, a admin piece and also a registrant piece. These could be 3 separate subfolders for my controllers or could be separate applications. I chose not to do separate applications because the libraries/helpers and models need to be shared between all three different users. So I was looking at subfoldering my controllers like you explain above which would be nice and neat. But my problem lies in that while the public interface really shares nothing with the admin or registrant interfaces, The admin and registrant users share about 10 data entry screens and therein lies the problem. obviously if I subfolder the application like above, I cannot share those data entry screens easily. I wonder if anyone has a solution for this type of thing.

Some would say just have some shared controllers that are global, but that kinda breaks putting controllers into subfolders for each of the 3 types of users. There is a lot of functionality that is not shared between the admin and registrant, so I don't really want to combine the admin/registrant pieces just because they happen to need to share 10-15 data entry screens.

I really would like to avoid duplicating controller logic (especially validation) between the two pieces if possible. I know I could still use the same views (if they didn't need to be altered much) so duplication there is not really the problem. Any suggestions??
#16

[eluser]Mirage[/eluser]
[quote author="Colin Williams" date="1217466612"]Yeah. I would put a folder somewhere called, maybe, "global_config" and put the config files you want to share there. Then, include those files in the appropriate places in your separate apps. Be sure to comment the files where you include() explaining what's going on and how it differs from standard CI config files.[/quote]

And then there's always symbolics links as well ;-)

Cheers,
-m




Theme © iAndrew 2016 - Forum software by © MyBB