Page 1 of 1

Embedding applications

Posted: Fri Oct 30, 2009 4:27 pm
by alex.barylski
Have you ever used a web site (SitePoint maybe?) where they appear to be embedding a third party application into the execution pipeline of their own code?

How do you think this is done? Are they:

1. Using an IFRAME
2. Invoking the application via internal HTTP request, stripping <head> tags and setting required session variables?

Other than the easiest approach, that would require hacking the third party template to include your own menus, etc...what other techniques are available?

Using an IFRAME would embed the app but require the user to re-authenticate. Embedding it directly using an include (as opposed to HTTP request) could possibly cause a variety of errors, collisions, etc but would be the easiest way to share SESSION's and such.

Have you ever had to solve this problem, how did you accomplish it? What caveats did you encounter, etc?

Cheers,
Alex

Re: Embedding applications

Posted: Sun Nov 01, 2009 1:58 am
by josh
I try to write an object or function I can call with certain paramaters, as an API into the embedded app that returns HTML. I use output buffering to strip the html, or comment it out, or whatever necessary.

This is really where a modular MVC application would excel. For instance Joomla lets each module have its own entry point, so a whole MVC app like Magento could just bootstrap as a module in it. You would have to write a theme of course that did not have the <html> and <head > tags and such