views:

409

answers:

4

At the moment I'm working with a booking website that has a frame set.

Let's say, 40% is from it's own website, so can be easily altered into a frame less site.

However, the actually booking-flow is from another website (also maintained by us) and is meant to "live" on it's own, so that 3rd party websites can buy/use the booking-flow as well.

Now my boss wants to have it frame less, but I see problems with embedding the booking-flow properly, because I don't want to touch that at all.

What is the best way to deal with it?

  • Use an iframe for the booking-flow only
  • Solve it server-side to web request the booking-engine and alter links or something like that.
  • Use AJAX? but that will impact a lot of code I think.
  • Better solution?

Of course there is a time/money issue as well, but I'll take that for granted now.

A: 

Two further suggestions:

  1. Make the booking engine 'skinnable' so it doesn't require frames to use
  2. Add an API to the booking engine that can be used server-side (pretty much your second option above but more cleanly than scraping HTML)

The issue I see with a lot of iframe usage, and have been caught with myself, is knowing the size of the content it has to render. An iframe will not resize to it's content, you have to specify a fixed width and height.

roryf
You can set percentage sizes, which doesn't help much with the height, but can be very handy for the width.
Sohnee
+1  A: 

Quickest way is to use an IFrame if you are dealing with another site.

Its downside is it can be a trick to set its height to be the same as the content within it but if you can get around that, you should be in the clear.

FYI i have been successful in transforming a popup purchase process (heh PPP) into an IFrame for a pretty popular purchasing site :P

Ólafur Waage
A: 

I know there is sort of a taboo on using frames these days, but in this website, is there anything wrong with it? Does it cause you real trouble?

Since the booking website should remain as it is, i would either stick to the frames, or use an iframe.

Using server-side or ajax requests and then parsing the html is asking for trouble. What if the interface of the booking website changes even a little bit?

Have you tought of extending the booking website with webservices?

MarkO
it doesn't cause me real trouble, but it's needed for a new feature.
Mafti
A: 

A simple AJAX solution is out if the two sites exist on different domains or protocols (it seems likely that booking would be https), you'd be reduced to a proxy at that point anyway.

Modifying HTML output is going to give you a raft of bugs and again will require a proxy on the way back.

An iframe will do what you need, but it may be problematic returnign the flow to the main page again because of x-domain issues.

All things considered I would normally expect the secondary booking service to be a service and I'd interact with that on the server-side. It needs to have an API one way or another realistically, a web-service is going to be the cleanest way forward I imagine.

annakata
correct, but the booking-flow is a website which calls the "proper" booking-service (which calls another ..). can I just say it's legacy? ;)
Mafti
can you just call the proper-service (or lower) directly then?
annakata