aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Ajax and Flash Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Ajax and Flash" Watch "Ajax and Flash" New topic
Author

Ajax and Flash

Fran�ois De Grandi
Greenhorn

Joined: Oct 27, 2003
Posts: 4
What would be the advantages of processing data with Ajax to and from a Flash embedded object in the HTML page, instead of using Flex or Lazlo technologies ?


FDG
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
I think it would be much simpler..


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by Neerav Narielwala:
I think it would be much simpler..


where we consider your reply ? mean in above question


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Kris Hadlock
Author
Greenhorn

Joined: Nov 14, 2006
Posts: 26
FDG,

You could always use the send, load and sendandload methods in Flash to accomplish server-side integration as well. In terms of using Ajax, I wrote an article for InformIT about using the ExternalInterface to communicate with Ajax, you can check it out here.

The issue with these options is that you cannot transfer objects easily, rather you would need to serialize them as XML or JSON. With that said, you can still accomplish some powerful data transfers with the options listed above. It all depends on what you are looking to do.


<a href="http://www.krishadlock.com" target="_blank" rel="nofollow">www.krishadlock.com</a><br /><a href="http://www.krishadlock.com/blog" target="_blank" rel="nofollow">www.krishadlock.com/blog</a><br /><a href="http://www.studiosedition.com" target="_blank" rel="nofollow">www.studiosedition.com</a><br /><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&path=ASIN/0672329123&tag=krishadlock-20&camp=1789&creative=9325" target="_blank" rel="nofollow">Ajax for Web Application Developers</a>
Fran�ois De Grandi
Greenhorn

Joined: Oct 27, 2003
Posts: 4
Kris,

Thank you very much for the precious hints about JSON. I have tapped into your articles, and I will now explore the options of using JS Objects in that manner.

The only link that I do not see clearly yet is the Server Side of the process :

- I am building a WebApp with Ruby on Rails, which stores data for estimating House Remodeling Costs (Measurements, Unit prices etc.) : the user inputs the measurements of the rooms (e.g. building elements) she needs to remodel, ideally with a visual interface (that's the reason for the use of Flash), and the App (Server and/or Client) calculates the resulting costs (Unit prices are fed via another 'back-office-modelUpdating interface)

- now how do I generate/serialize JSON data on the Server side to send back to be de-serialized on the Client side ? I suppose I can write parsing code for my Ruby-ServerObjects (which are connected to the MySql database) : I just need some hints about pitfalls to avoid and Best Practice essentials in that matter

Thank you again,

FDG
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ajax and Flash