View Single Post
 
Old December 4th, 2010, 07:44 PM
metajack metajack is offline
Wrox Author
Points: 702, Level: 10
Points: 702, Level: 10 Points: 702, Level: 10 Points: 702, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2010
Posts: 178
Thanks: 0
Thanked 16 Times in 15 Posts
Default

Quote:
Really, is this necessary? Flash itself is giving problems to people. If not now, maybe from the next version that will be installed. How about creating something cross-platform, maybe even mobile applications. Flash is not simply available nor people willing to install it at all.
There is a simple misunderstanding here. Flash is not required at all. I have built several companies worth of technology using XMPP without using any Flash at all.

The flash plugin exists to help newcomers circumvent a very specific and common problem, which is that the cross-origin security policies of browsers make it extremely hard to get started since you would need to know how to run a web server and how to set up reverse proxies. (This is explained in the book as well in one of the last chapters on advanced techniques).

Another alternative, which I was unfortunately aware of before I finished the book, is the Cross Origin Resource Sharing (CORS) support that is built into modern browsers. This lets cross-origin requests happen with just a few header changes in the connection manager.

Strophe still needs support for CORS on IE7/8 (6 unfortunately is not possible), but for other browsers this already works now. ejabberd, Tigase, and punjab all support CORS out of the box now I believe, and Openfire is likely not far behind.

Note that almost all the traffic on this message board (and to my personal email account) is related to cross-domain errors. Even with all these helpful ways around the issue, it is still preventing most people from getting started. I fear it would be even worse if I hadn't made the flxhr plugin for the readers of the book.