Welcome, Guest. Please login or register.
Did you miss your activation email?
03/12/10, 09:37
Home Help Search Login Register
News:
Loading and saving data to different external resources (txt files, databases) using AS3

+  Flash-db
|-+  Server side Scripting and Database Support
| |-+  Flash Remoting with AMF (Moderators: Flash-db, Musicman, Jorge Solis, papachan, nothingGrinder)
| | |-+  flash remoting - sleight of hand?
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: flash remoting - sleight of hand?  (Read 33668 times)
julian
Server what's that
*
Posts: 8



View Profile Email
« on: 05/20/02, 08:36 »

- 1.24.2003, All comments posted here are way out of date.  Flash remoting is definitly a good concept - all these posts where made before Flash remoting was even released - and Before the PHP version:  http://www.flash-db.com/Board/index.php?board=4;action=display;threadid=3163;start=0

Hi,

On a brief examination flash remoting looks like a con to me. The reason I say this is it seems that web services can only be called if flash remoting is installed on the webserver. Surely this completely misses half the point of web services. i.e. that it's an open architectural model.  Also I've read something about a special protocol that has been written for flash remoting. Once again, this sounds a bit suspect. Surely a web service call should not be dependent on any specific protocol?

What I was really hoping was that flash MX would be able to create a an actionscript proxy class based on the WSDL document for any given web service. This proxy would then serialise your method call into a SOAP document and pass it to the web service and then deserialise the response.

I don't see why this would have been much more difficult than what they have done and yet it seems it would remove the need for any server side components, which in turn makes me wander if Macromedia are not trying to make something proprietary out of something which is by design open.

Does anyone agree/disagree? Can anyone correct me if I'm wrong or does anyone have any inside information on where they are going with this approach?

« Last Edit: 07/24/03, 20:22 by Flash-db » Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #1 on: 05/21/02, 16:54 »

- 1.24.2003, All comments posted by Flash-db are way out of date.  Flash remoting is definitly a good concept - all these posts where made before Flash remoting was even released - and Before the PHP version:  http://www.flash-db.com/Board/index.php?board=4;action=display;threadid=3163;start=0

Overall it was an interesting discussion at the time, so might be worth reading.



Hi Julian,

I completly agree!

It would be nice to hear some other arguments for this though.

I have read everything and anything on Flash remoting - and I still don't understand why it's such a big deal.  (You still have to connect to a Cold fusion proxy (/gateway)  script - So how is this any different then before - besides their little components that they created and claim make things easier).   Not to mention that their only pushing it for Cold fusion.  Like their's not 50+ other toolkit's out their that allow you to do the same thing, for much less and at the same time - much better.

I'll go into this more at a later time - I've been working on my own Flash (PHP/Soap) remoting project latly.

Overall "Flash Remoting" is just another Marketing term that their trying to claim and associate with Cold Fusion - Their's not much to it though.

« Last Edit: 07/24/03, 20:21 by Flash-db » Logged

-Jeff.
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #2 on: 05/22/02, 03:08 »

I'm glad I'm not imagining it. I'm really surprised that no one has tried to put together a tool that will generate actionscript proxy classes from a WSDL document. Perhaps there is some hidden difficulty I can't quite see. Perhaps some difficulty has been built in by Macromedia to stop people doing this (hush my cynicism).

I have also heard a rumour that Macromedia are doing a deal with IBM to integrate flash with Websphere application Server. Anyone know anything about this? I'm not sure whether I think that's a good thing or a bad thing.
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #3 on: 05/25/02, 18:09 »

Hi,

let's add even more: what is .net good for, or xml?
Referring to your google posting some time ago - everybody probably knew (or was able to find out) that one could call google with a simple q=...your_query_here... parameter.
Now the extended search (extra parameters) plus a description of details (do we write plus sign or AND in between search terms) fits on about three pages of text, and so does a search script using extra functions.
Web services, .net, bathroom soap, or whatever, have given us half a MB of code to go with that description....
As for xml: it gives us a framework to structure our variables (i.e. with the framework in place, chances are that we declare possibly repeating variables as such while planning the application and its data.
It also provides a means that we can verify whether our data files match our own specification. (another chance to make our code better)
On the con side of things, a badly designed data file still cannot be understood without a human translator (and, by consequence, a human-readable description (aka documentation) of those data files)
Data generated by flash or received by flash is usually not checked against a DTD, so the producer and the consumer may agree to use data that are, more or less, formally invalid.
So, what are the real benefits?

Honestly, I might even use xml myself in those few corners where it shows an advantage ... but I think most of it is just marketing hype.
Systems sell better (the sellers believe, or the buyers believe?) if they - support xml - support eps - support dotnet - are y2k compliant - add more blah here)
About two years ago, I made an attempt to move a quite demanding text formatting task to a specialized program (Adobe and Quark are known to make such programs) and a person familiar with that kind of stuff..
Unfortunately I did not find any such software that was ready to read xml.
The annual ritual of producing a 100+ pages catalog with troff remained in place, no extra work
A few months ago, I saw a nice message saying that "... Macromedia were dedicated to support this file format, but unfortunately this particular file could not be read...."
Solving the puzzles, plus extra time due to _extremely slow operation_ of some software in the process: a few days, only part of that could be billed to the customer
A few months after Jan 1, 2000 I realized that my computer (main board built 1998) was not exactly y2k compliant - after rebooting it woke up in the past rather than in the present. Time required to fix: about ten minutes
Why should I even bother about products supporting dotnet? the most likely result will be disappointment again

Logged
psychlonex
Server what's that
*
Posts: 39


Flash-db Rules

PsxFive
View Profile WWW Email
« Reply #4 on: 05/27/02, 08:32 »

Hey all -
It's been a while - I apologize for my lack of involvment arround here!

I've just started playing with the remoting stuff - installed the coldfusion trial. I'm working on some store management tools for my site.

What's been a huge, HUGE selling point for me is the process I'm using to do it -- I'm looking through the php files for queries I used in my previous php-based system. Then I copy the query, past it into an asr file and modify it to work. basically substituting the php variables with AS ones. And then that's about it! Write a function or 2 to handle it and I'm displaying the data! Of course, alot if this is doing it the easy way, with the components. But I've got a few that work with text fields and movie clips - the function isn't as smooth as they make it out to be with the components, but it's still easy. I imagine if I turned my series of mc's and text fields into a component and gave it all the functionality of the mm components it'd work the same.

Honestly, I don't even see where xml fits in(I don't understand the underlying technology). What i do see is that since .net and other ideas exist, that I as a flash designer will still have a job in the future. I couldn't care less what is on the other end giving me my data. If the flash remoting server can provide me with server-side AS, then I'm all for it. I know that companies will be using .net, coldfusion, asp, php , etc-- now I can interface into what they have going (hopefully quicker and easier!) vs hoping they had php or trying to sell them on it. I'm building my store tools without any changes to the database. Simply added the db server as a cf data source and done.

There is supposed to be a stand-alone remoting server released soon isn't there? I'm guessing it'll run on just about any server platform you can come up with.  

Now-- something I'm frustrated with :

Why doesn't my remoting work from a web server?? I have the cf running on a remote server. my app works in the dev env(test-movie) as well as publish-preview(browser). If I publish it, the projector as well as exe both work, as well as the html if I just open it. IfI try to serve it from anywhere, including the web-server built in to cf running on the same machine as the service, it fails. ??

I've no idea why this is happening.

I've tried to go back and un-ramble this post, but it's still a rambler. Ah well.

Psx
Logged
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #5 on: 05/27/02, 08:47 »

I think my objection to flash remoting may has been slightly misunderstood. I'm not really interested in how easy or otherwise it is to use. I object to it on a conceptual level precisely because it forces you to depend on some software or other at the server end. This also answers the question being asked about where XML fits in. Providing business logic (or any server side data manipulation logic) via a web service means that that service expects and returns an XML document. The significant thing about this is that it then becomes completely irrelevant whether the service itself is written in PHP or ASP or perl or C#.NET (and let's not mistakenly believe that web services are a Microsoft invention). What you end up with is a nice open architecture where remote systems can communicate with each other independently of their respective platforms and independent of any particular communication protocol. This is enabled by XML.

Flash remoting takes a step back in my opinion by requiring something other than a web service WSDL document (namely flash remoting server installation , wrapped up in the cold fusion server components) to call a web service. This server side component is technically not required and I think the business of designing a component to wrap SOAP serialisation and therefore web service calls could have been far for elegantly executed.

This is not the way XML based web services were designed to work and deep down I'm sure macromedia know that which is specifically why I think it's deliberate sleight of hand rather than just an honest lack of functionality.
Logged
psychlonex
Server what's that
*
Posts: 39


Flash-db Rules

PsxFive
View Profile WWW Email
« Reply #6 on: 05/27/02, 13:04 »

Julian -
I agree for the most part in that it is definitely an extra step, sort of like a middle-ware to the middle-ware.

Can you point us to a good explanation of soap?

Here's my grasp so far:
SOAP stands for Standard Object Access Protocol. What I get out of that is a standardized way of transferring data(xml formatted) - ie you have a c++ app on one end, and another app(c,java,asp,swf,etc) on the other, both transmitting and receiving xml data, wrapped in a soap tag(?)which definines the data structure, and translates the xml to that langauges native object.

Let me know if this is wrong!! I'm just getting into this stuff and would like to know how it works.

As far as the stand-alone remoting server goes, the only logic I see behind it is with the server-side action script and in that you can store/run processor intensive code on the server vs the client. The xml handling in flash has always been relatively slow so having the server handle it should be a nice improvement. Plus putting all of this stuff into the player would make the player installer larger in size.. one thing mm is big on keeping to a minumum.

Has anyone seen the post on the mm boards - someone talking about getting it to work with tomcat?
Not even sure what this means, but tomcat is an apache module correct? I'll dig up the post if anyone wants to see it.

Psx
Logged
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #7 on: 05/28/02, 03:06 »

Well, I'm no SOAP expert. But basically it's just a standardised web protocol for making method calls to objects. It is nothing over and above XML. It is just XML that has to adhere to a certain set of sensible rules. The clue is in the name which in fact stands for Simple Object Access protocol - so it's really for calling object methods rather than for transfering data (though inevitably calling object methods will involve transfering data).

The fact that I say I'm not a SOAP expert in a way is exactly my point. I shouldn't have to be a SOAP expert. I want flash to be the SOAP expert for me and take care of SOAP serialisation on my behalf (just like the microsoft wsdl.exe utility does for .NET).

As far as I know, Tomcat is just another flavour of Apache webserver so I would hope you could get flash remoting to work on it (if we must use it  Wink)
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #8 on: 05/28/02, 15:31 »

Hey psychlonex (Hope all is going well) - Please Post on your progress with SSAS and Cold fusion, That brings a good side to the argument - and it would be interesting to know how it's all going and what your opinions are in that area compared to what you have used in the past.

Ok what Flash remoting is:

Flash remoting uses a binary message format called 'AMF', Action Message Format, This is delivered over HTTP and is modeled after SOAP.  (So I guess it's a new standard that we have to worry about - another XML formatted message sent to their gateway which you have to pay for).  What this does is allows you to send a variety of information such as Record Sets, Integers, Strings, etc to and from Web services.  This information is sent from the Flash Client to the Cold Fusion Gateway (middle man) - where it is then converted from ActionScript to a different format that can be used with the Web Service.  It then goes out to the Web Service and returns the necessary information and returns it back to Flash.  (Wow this is some new and inovative features we have here - ha ha).  

So does this allow you to send Soap messages directly from the Flash Client - NO.

Does this remove a Middle man from the process - NO.

Does this allow you to directly communicate with a WSDL file - NO.

What does this allow you to do?
--------------------------------------------------
I was reading a while back somewhere that quite a few people where concerned that companies such as Microsoft, IBM, etc where essentially going to put up a Toll Booth / Tax on the internet for anyone wanting to use web services.  At first I thought - well why would anyone pay to use a Standard - aren't standards supposed to be just that a Standard that you can use however you want to.  

I think this is Macromedia's Toll Booth.  Everytime you want to use/create a web service using "Flash Remoting" you'll be paying a Fee (800$/server).  (I'm not sure if you can coin the word 'Flash remoting' as your own but cause of all the marketing Hype the association with Macromedia has been made).  I'm not sure how everyone could have missed this - But if they are successful they will succeed where Microsoft / IBM will fail.  I guess their trying to silently Slip this by everyone - And I think their being Successful so far.  

------------------------------------------------
WSDL - this is the most important and probably the best contribution that has been made to Web Services.  This is a simple file that describes the Web services methods and what to do with the request and response.  This will allow companies to easily distribute their web service as a well a Service - and will allow easy access for Clients to use that service, no matter what they (scripting language) they happen to be using.  So If I wanted to offer a Credit Card verification service - I would just distribute my WSDL file and require people to use an 'Access Key' or Login information.  Well this part will probably be good for all of use - and those of use who want to write and distribute pay for web services. Using this method If I wanted to I could create a service such as Passport for all registered Flash-db users (would be sort of a fun experiment)..

Back to Julien's question - Most Soap Toolkits are fairly automatic - you pass a couple variables from a Flash movie (method / path to WSDL file / and a couple of parameters) to a simple script (usually about 3 or 4 lines) - and it will do all the work for you.  I'm not sure how it could get much easier then this When you start adding in all those other middle men "flash remoting" That's sort of like adding a Middle Man for a Middle Man.  While this could potentially make things easier at first - In the long run will cause problems and limit you to quite simplistic and feature Poor applications.

The WSDL file along with Any Soap Toolkit - allows you to communicate with anything else - Then again - you can already communicate with virtually anything with all the different library's in PHP.  

Well that's enough for this thread - What does everyone think.


« Last Edit: 05/28/02, 21:38 by Flash-db » Logged

-Jeff.
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #9 on: 05/28/02, 16:15 »

Also - Let's not forget what a Web Service is:

"A web service is a Network accesible interface to application functionality, built using standard internet Technologies.  In other words, if an application can be accessed over a network using a combination of protocals like HTTP, XML, SMTP, etc - then it is a Web Service.  Despite all the media hype around web services, it really is that simple.

Web services are nothing new.  Rather, they represent the evolution of principles that have guided the internet for years."  (Programming Web services with SOAP - O'Reilly 2002).  - good book by the way.

So anytime you've wrote a script that does something with the Server - ie print "Hello $name";  - you've made a Web Service.  Soap helps to send and recieve information from your Web service to and from different applications.

---------------------------------------------
Why Macromedia "Flash Remoting" will not be around in the future (as it is now or possibly at all).

Most of us think only in terms of Web Browsering when we think of Flash (a basic Web Server and Client on the internet) - We don't see the SWF or other vector formats as being used as Clients for real applications.  For example - Hotel booking kiosks, Gas Station pump information, for Car dealership internal inventory systems, music store management systems, Accounting software, Cash register screens, Cell phone displays, Calculators (TI-92 with a flash interface), Bank Teller computers, the list goes on forever.

When most of us see these screens - we see some legacy green Text on an old computer monitor - Try getting your oil changed and look at the screen their using to grab your information.

These items will become more advanced and more distributed to smaller and smaller appliances - (coffee maker, dishwasher, radio, etc etc) as time goes on.

Each of these items need to have a server and an Operating System.  Well first of all why would a company pay 800$ to buy something like Cold fusion will have to be painstakingly converted over to work on this platform.  They won't.  

But quite a few of them would like to have a Vector graphics Screen so their customers can more easily use their Product. These screens will have to be capable of consuming/using Web services.  

As an Example - Say I'm a company called "GE".  I make dishwashers of the future (ok dumb example).  My Dishwashers are relatively smart, connected to some network, and have an Operating system.  The obvious choice for an Operating System is Linux - mostly because I can't afford to charge my customers for the cost it takes to license a proprietory OS - for every single Dishwasher.  For the same reason - I can't afford to buy a proprietory toolkit for connecting to remote services.  I still need to be able to send and recieve requests from my dishwasher to other dishwashers in the house - or to my users cell phone for example.  My dishwasher does not have much memory and does not have a large hard drive - I need something that is Fast can be complied anywhere and I can customize it as I want.

Well hopefully their was some point in that.

Another example - Linux installed on Playstation2.  Because Linux can be (is) installed on a Playstation2 - So can/has PHP, Apache, Perl, Soapx4, and any of the PHP Soap packages.  So if I wanted to send/recieve request's via Soap or any other format from/to my Playstation2 - the choice would be obvious. Now If I wanted to have some type of Flash Client to display those services from my Playstation - I would use the PHP/Perl Soap Toolkits.  As their's no way any company would buy a proprietory solution for every single Playstation2.  Sony knows this - that's why they make Hardware (where the profits are real and not leached from other sources) - That's why Sony use's linux.

Anways my point after all of this:  As the use of Flash becomes more distributed and used in area's that require some type of server / requests (other then on the traditional internet as we think of it) to be sent out and recieved to operate that client or application it resides on - The price for these toolkits will place a Limit that can not be overcome because of the Price. It's all economics.  

As the marketing Hype rolls on - We have to realize that their is no reason to Cut our  profits and transfer them to other companies when the solutions are and have always been right in front of our face.

(Wow Was that a rambler or what - Sorry about that - Just been thinking about this topic a bunch lately - Remember it's all just an Opinion).
« Last Edit: 05/29/02, 02:52 by Flash-db » Logged

-Jeff.
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #10 on: 05/29/02, 03:04 »

This is exactly my point. Where you have an open standard there is NO need for a toolkit.

I agree that macromedia are trying to make something proprietary when it just isn't. The problem with their strategy is that even now, with flash technology as it stands you don't actually have to use flash remoting to call a SOAP/XML webservice from a flash movie directly. And I'm not talking about calling the service via some kind of script (PHP, Perl whatever) because that entirely misses the point of web services i.e device/platform/language independence.

Given that web services can already be called directly using the Xml object in flash 5 (albeit not all that easily), how can they hope to sell people a server component which is both conceptually wrong and technically unnecessary?
Logged
Flash-db
Administrator
Systems Administrator
*****
Posts: 1867



View Profile WWW
« Reply #11 on: 05/29/02, 03:13 »

Good Point.

I sometimes get carried away with PHP/Perl/ASP middle man issue's - But I definitly agree with your point.

For example - Their are already ways to read WDDX files directly into flash and parse them - I'm not sure how hard it would be to do the same with other flavors of XML.
Logged

-Jeff.
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #12 on: 05/29/02, 03:21 »

Yes, undeniably it wouldn't be particularly straightforward. I just wish they had put their efforts into making it genuinely easier rather than trying to pull the wool over everyones eyes. If they really want to shake off the image of being just a graphics toy, they should have taken this opportunity to demonstrate that they really understand the requirements of business client applications.

Like catching your children smoking. You forgive them and you can see why they've done it, but it's a bit disappointing  Wink
Logged
aversion
Server what's that
*
Posts: 2



View Profile WWW Email
« Reply #13 on: 06/30/02, 18:54 »

sorry to drag up an old thread but i was directed here by musicman to read this excellent thread.

i have been using PHP as a designer ( i would not call myself a programmer) and i have had some success with it. Recently building a project management tool based on XHTML/PHP/MySQL. I have timesheet entries, task management, all that stuff, and i find that the more i do the easier it gets (duh). Anyway, i am pretty excited about my new discoveries and want to take this further.

the next step for me would be to port my application over to a  flash front end. I'm thinking this will give me a much more elegant and interactive interface, plus I can create beautiful graphed reports.

so, as a designer, meddling with PHP, not knowing further than wrapping HTML pages in PHP code, but wanting a system that will integrate well with flash, where do i go from here?

i have been initially seduced by MM's Flash Remoting, it seems so easy,  create components, create methods, call methods from actionscript and get results. Now I have been looking around the internet for some counterpoints and musicman directed me here.

reading through your arguments it certainly sounds like MM is trying to seduce designers such as myself who are a little afraid of delving into the world of scary acronyms, and they're doing a good job. I am still a little in the dark as to what would be the best way for me to proceed. I am a proponent of open source standards and would like to follow them if possible (I am planning to put the source to my application out).

given what i am trying to do being able to create components and methods that can be invoked from flash seems like a great idea, but apparently Flash Remoting isn't the easiest way to do this... is there an equivalent system using PHP functions? I see from this discussion that there is a standard for delivering webservices on any platform through XML, which I am familiar with but haven't really used. I have never been able to find a good use for it while i have a db running. And wouldn't it take longer if i'm writing my service functions in PHP converting that to XML, importing the XML into flash, parsing it... etc?

So, to sum up... how do i create a way of invoking methods that run on a server and query the db and return relevant data to the client's flash player using PHP?

thank you for patience and hubris Wink


(please bare in mind that i am a simple man given to delusions of programming but at heart remaining a designer with his thumb in a hot PHP pie.)

Undecided


Logged

isomniac
julian
Server what's that
*
Posts: 8



View Profile Email
« Reply #14 on: 07/01/02, 03:31 »

To be honest, the question you are asking is the one thing I don't really know the answer to i.e. how to create an object oriented (rather than scripted) server side element to a flash application. From what I've said already I think you'll be able to tell that I don't really approve of flash remoting. This is not to say that it won't work though - and to be honest, if, as you say you're not a programmer at heart, it will probably be the easiest option. The only thing to bear in mind is that you must "own" the web server and the web service if you do it this way because you have to have flash remoting installed on the server.

The (prefered though more complicated) alternative: a web service (basically an exposed method of a server side object) will be fully described by a WSDL (web service description language) file. This file will tell you everything you need to know to formulate a request XML document of the right format to communicate with this service. So you (or anyone else) would be doing a great service to the flash community if you could write a utility which would parse a WSDL file (which is in XML format) and use the information in it to generate an actionscript file which contained the definition of a proxy class which you could then use like a local actionscript object but which behind the scenes would package your requests up into the correct format XML document and call the service (using SendAndLoad or something I guess).

This is pure speculation and I suspect not for the faint hearted. If I were in your shoes I can see myself bravely embarking on this, reaslising I wasn't up to it, convincing myself that flash remoting wasn't that bad and going with the flow. This inevitable sequence of events is I'm sure what Macromedia are relying on, but I for one am just too lazy/half-competent to do anything about it.
Logged
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!