CodeIgniter Forums
communication between codeigniter apps - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: communication between codeigniter apps (/showthread.php?tid=7274)

Pages: 1 2 3


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
Hey guys!

I'm working on a maillist application and I wonder how you'd solve the communication between frontend or backend system. For example I'd like provide an API for adding subscribers or sending out emails from the maillist queue from the frontend. I used to solve it with a simple stand-alone include, but it seems to be against the 'codeigniter' way of coding, especially since I'd like to make it an open source project. So the question is what do you think the best method is for solving this kind of problems?

Thanks in advance!


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Jamie Rumbelow[/eluser]
I would use a database to store all the information - either that or for small bits of info flash session data.


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
I don't think you understand the question here. I'd like to tell my users to add a function call to their applications not a 200 line application.. Smile


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]BorisK[/eluser]
I would create a library with all the API functions and let users use it. To minimize code duplication I'd set up symbolic links.


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
[quote author="BorisK" date="1207100621"]I would create a library with all the API functions and let users use it. To minimize code duplication I'd set up symbolic links.[/quote]
Now this sounds a lot better, but I don't think I know what a symbolic link is. Could you give me a hint on what it looks like?


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]BorisK[/eluser]
Symbolic link is a shortcut to a file.

Let's say you have three separate installations of CI on your server. You would not copy your library three times and maintain it in all three places because it's repetitive and boring work prone to errors. What you'd want is to maintain your library in one place and have other three "shortcuts" just point to it. Once you update the real file, all shortcuts point to the updated file.


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
I see, but it means my users would have to take care of that, right? It sure isn't that bad, but I wonder if there're better ways. I have another problem with making a library, specificly that I'd like to keep the config file in one piece which would mean I'd have to hardcode the location of the config file. Or at least I suppose so. I have an other solution like making a module for these functionalities and let my users call that through curl or however they want to. Would that make sense?


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
Thinking of that for a bit, maybe a simple controller would do that just as well. But my users would still need to know the exact location and they'd have to be able to call other websites through some kind of mechanism. (Although it shouldn't be that big of a restriction in 2008).


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]Thoer[/eluser]
BTW, can you create a symbolic link file through a simple FTP connection?


communication between codeigniter apps - El Forum - 04-01-2008

[eluser]BorisK[/eluser]
[quote author="Thoer" date="1207102933"]BTW, can you create a symbolic link file through a simple FTP connection?[/quote]

No.