Welcome Guest, Not a member yet? Register   Sign In
Building a site with CodeIgniter
#1

[eluser]ThomasOwens[/eluser]
I wish to build an entire site, consisting of several applications and a unified login, using CodeIgniter.

The only thing I saw that could help me is the Managing your Applications section of the User Guide. But it appears that even if you build multiple applications, you can only run one at a time through index.php.

How can I design an entire suite of distinct applications that can be unified under a single login, all controlled by CodeIgniter?
#2

[eluser]louis w[/eluser]
Check out Matchbox. Let's you use a HMVC pattern which allows for "modules" of your application.

http://ellislab.com/forums/viewthread/65749/
#3

[eluser]ThomasOwens[/eluser]
[quote author="louis w" date="1215053884"]Check out Matchbox. Let's you use a HMVC pattern which allows for "modules" of your application.

http://ellislab.com/forums/viewthread/65749/[/quote]

So this extension (or whatever it's called, I'm still learning about CI, so forgive me if I use the wrong word) will make what I want to do possible. But this functionality is not available in the core CodeIgniter installation?

And on the subject of extensions, is there an extension or module repository somewhere? I didn't see one.
#4

[eluser]Pascal Kriete[/eluser]
The keywords here are "through index.php". Index.php is the default entry point, but it does not have to be. For a different application you could use another file name, or a subfolder. As long as the cookie url is the same it will still work.

What a modular extension like matchbox will let you do is have several sections (also known as modules) in one application. So instead of application/controllers you have application/module/controllers. What approach you choose depends mostly on your needs.
#5

[eluser]wiredesignz[/eluser]
[quote author="louis w" date="1215053884"]Check out Matchbox. Let's you use a HMVC pattern which allows for "modules" of your application.

http://ellislab.com/forums/viewthread/65749/[/quote]

Just a note here to be accurate, Matchbox does not allow HMVC type extensions to CodeIgniter.

The Modular Extensions HMVC library set does. (Refer to my signature below)
#6

[eluser]ThomasOwens[/eluser]
[quote author="inparo" date="1215059389"]The keywords here are "through index.php". Index.php is the default entry point, but it does not have to be.[/quote]

So I can have multiple entry points, like blog.php for a blog section, with it's own models, views, and controllers and a forums.php for a message board section with its own models, views, and controllers and so on?
#7

[eluser]Pascal Kriete[/eluser]
Yes, all you would need to do it copy index.php, rename it to say forum.php. Then you create another copy of the applications folder, name it forum_app or something similar and change the application folder path in forum.php .
#8

[eluser]ThomasOwens[/eluser]
[quote author="inparo" date="1215060976"]Yes, all you would need to do it copy index.php, rename it to say forum.php. Then you create another copy of the applications folder, name it forum_app or something similar and change the application folder path in forum.php .[/quote]

I'm still left with two related questions. First, how would I handle sessions across apps? Second, where would I put my cross-app code, like my user-related code, that applies to every single app?
#9

[eluser]bhoover[/eluser]
Is there some sort of advantage to having multiple entry points? What's the problem with using the index.php with some sort of URL rewrite to not show index.php, and using separate controllers and view sections as your modules? Is there some sort of advantage to all the work it takes to split CI granularly like we're talking about?
#10

[eluser]ThomasOwens[/eluser]
The biggest advantage is reuse. I think that I should be able to take a module, distribute it with minimum configuration needed before it can be used by other people.

Another advantage is maintainability. If I have a site with forums, a blog, a wiki, a store, and 5 other apps, I want to be able to easily add and remove a new app without ever touching an existing app.




Theme © iAndrew 2016 - Forum software by © MyBB