Remoting / Messaging And Data Management In Flex?
Jun 8, 2009Can anyone explain me the difference of all and also an another question does Zend AMF support all these.
View 1 RepliesCan anyone explain me the difference of all and also an another question does Zend AMF support all these.
View 1 Repliesthe difference of all and also an another question does Zend AMF support all these.
View 2 RepliesI have a flex UI which communicates with server using spring blazeds. I have a very typical requirement of Live data streaming on a panel in UI. Requirement is like this, We have an object say, Person and server keeps pushing its data on blazeds message destination where UI panel consumer has subscribed and hence user can see this live data in a panel. User can open multiple panels in same browser to view data for different Persons at the same time (e.g id=1,2,3 respectively). There can be multiple UI users who may be viewing the same data for person id=1 at a given time, lets say.
Basically I want to separate data between UI panels. UI panel opened for person id=1 must not display data of that for person id=2. I am doing this using headers-selectors, but apparently I found out that the differentiation to select and display what data happens on UI which is causing performance issues. I learned that using subtopics may improve performance. But, before proceeding for it, I want to know, will UI browser end up in receiving data irrespective of subtopic assigned to data and then consumer will decide to accept it or not?
Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script. I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter. It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
Or is there another way I can pass the tablename variable to the php file before I call any functions?
I am looking to subclass RemoteObject. Instead of:
<mx:RemoteObject ... >
<mx:method ... />
<mx:method ... />
[code].....
Code:
var nc:NetConnection=new NetConnection();
nc.connect("http://localhost/amfphp/gateway.php");
var res:Responder=new Responder(onResult,onError);
[Code]....
The code is working good and brings back the info from mysql via amfphp, but I would like the "goBtn" to bring the info when pressed.
I have an action script Object that contains an array collection of other object, both objects are reflects of the Java Objects which are the database tables represented as beans, i am using blazeds spring hibernate... the regular configurations for flex RIA with java backend server language, all other objects work perfectly, but this time i needed to get this data from the client side and i do, but when i get into the Set represented as array collection in client side i get this error! both classes work for other situations, mapping is ok for these classes, i suspect that i need to convert the array collection on the server side.
View 1 RepliesI'm building a Flex application, which is going to perform many server requests (let's say, that almost all interactions require an update from server). At the moment I'm using remote procedure calls for it. But I was wondering if using a socket would be better. In other terms, is maybe better to keep the connection alive rather then performing many calls in sequence? For my demo app I only have 1 client. Is the number of clients connecting to the server a factor for this choice?
View 1 RepliesI've used the Flex HTTPService to connect to a backend blazeDS service without any problems at all. The question I have is, can I also use HTTPService to send a HTTP POST message to a server (with basic authentication)?
Specifically I'd like to be able to interface Flex with Notifo [URL] and to interface with it you just need to send a http POST with authentication and some key:value strings for the message content. (I've done it from java and from the command line with curl and it all seemed pretty easy to set but I'm just not sure how to go about trying this with Flex).
How would this be done via the HTTPService (if at all) ?
Can anyone see how the mxml/as class would look like and what would be in the services-config file and what adapters need to be used etc etc ??
I have attached a service-adapter to a spring message-destination as follows:
<flex:message-destination
id="secured-chat"
send-security-constraint="trusted"
[code]....
I am very new to remoting in flex. I am using flex 4.5 and talking to a web application built by someone else on the team using AMF. They have used Zend_AMF to serialize and unserialize the data.One of the main issues I am facing at the moment is that I will need to talk to a lot of services (about 60 or so).From examples on remoting I have seen online and from adobe, it seems that I need to define a remoting object for EACH service:
<mx:RemoteObject id="testservice" fault="testservice_faultHandler(event)" showBusyCursor="true" destination="account"/>
With so many services, I think I might have to define about 60 of those, which I don't think is very elegant.At the same time, I have been playing with Pinta to test out the AMF endpoint. Pinta seems to be able to allow one to define an arbitary amount of services, methods and parameters without any of these limitations. Digging through the source, I find that they have actually drilled down deep into the remoting and are handling a lot of low level stuff.
Is it possible (and if so recommended) to use Flex remoting (mx.rpc)classes in an actionscript only project?
I'm creating an application with login and registration to a php back end using AMFphp.
As an option I was wondering if it made sense to take advantage of the mx.rpc flex classes.
Is there a way to monitor the loading progress (percent progress bar style) when using Flex remoting?I'm trying out Flash Builder 4 with it's new data services features, but I can't find any pgrogress event stuff somewhere. This article by Robert Taylor URL... indicates that it might not be possible...
View 1 RepliesMy current coding for remote object declaration is messed up I wanna separate the remote object and the interface
Current Code :
<s:RemoteObject id="ro"
destination="customerService"
[code].....
Im trying to connect a Flash client to BlazeDS. There has been some success with this from others using the vanilla BlazeDS setup. However I'm using the new Spring BlazeDS Integration from springsource and running aground. The flash client actually seems to be working in that I can see the correct data in the body of the returned object, but for some reason unknown it fails casting as an IMessage. It fails in PollingChannel.as on this line with the subject line error
var messageList:Array = msg.body as Array;
for each (var message:IMessage in messageList) <--
On application load I register a whole bunch of classes like so
registerClassAlias( "flex.messaging.messages.RemotingMessage", RemotingMessage );
registerClassAlias("mx.messaging.messages.IMessage", IMessage);
etc..
my code is basically
var channelSet:mx.messaging.ChannelSet = new mx.messaging.ChannelSet();
var channel:mx.messaging.channels.AMFChannel = new AMFChannel("my-amf", "http://localhost:8400/SpringA/messagebroker/amf");
channelSet.addChannel(channel);
[code]....
I have a flex client which works 100% with same destination/channel.
Should i keep Remoting Methods outside a class in a seperate AS file or is it possible to call Remoting inside a class.
View 1 RepliesIs the same possible in ColdFusion? Currently I am using .Net/Fluorine to return objects to the client. Whilst in testing I like to pass strings representing the select statement and the custom object I wish to have returned from my service. Fluorine has a class ASObject to which you can set the var 'typeName'; which works great.
I am hoping that this is possible in Coldfusion. Does anyone know whether you can set the type of the returned object in a similar way. This is especially helpful with large collections as the flash player will convert them to a local object of the same name thus saving interating over the collection to convert the objects to a particular custom object.
[Code]...
I have an Application consisting of a Java Server part and a Flash/Flex client, both communicate via BlazeDS. In order to have the same typed Objects on both sites, I use the GAS3 code generator (used by flex-mojos).But now I am facing the problem of handling nullable Integers. The problem is that I have an Object (A) which contains a foreign key ID which is reference an optional Object B. - But I only send the ID to the flex client.On the Java site it is easy:
class A {
private Integer bFk;
getter/setter
}
But on the flex client side, bFk is of type int. And a Flash int can not be null. So the remoting mechanism converts the Java null Integer to 0. After sending it back to the server, the Java bFk becomes 0 even on the Java side. - That is not acceptable, because I need to separate 0 and nullMy first workround is using not a Integer on the Java side, but an new Class NullAbleID, which works a bit like a wrapper/adapter, that wrap an internal int where -1 represent null (I can use -1 for null, because real id will be negative). But when I would using this it means I have to replace all Java Integer ids, by this NullAbleID class.
In my attempt to learn flex remoting I came across thisflexService.getRules.addEventListener(ResultEvent.RESULT, loadRules);here flexService is a remote java object . me that when esultEvent.RESULT will occur. On studying about ResultEvent in AS document it states as The event that indicates an RPC operation has successfully returned a resultSo keeping that in mind my guess is ResultEvent will be fired when flexService.getRules method will successfully return a list of object,where flexService is object of remote class FlexService having getRules function which returns list of object, Can any one please tell how exactly it works
View 2 RepliesThere is a client - server basic application. The client uses a simple remoting to comunicate with the server side. The server side could be powered on WebORB, BlazeDS or any other product. The client side is using the FLEX framework. That is it about a technologies stack. Now, let's forget about the server side and just have a look on the following client side
[Code]...
I'm using flash.display.Loader to load this example SWF as a use-case for loading SWFs that uses flex charting components in an application I'm working on.
[Code]...
I have a NetStream set up and it's supposed to listen for DRMAuthenticateEvent.DRM_Authenticate. When I give it an encrypted file (encrypted using software from drm-x.com), no DRMAuthenticateEvenet seems to be dispatched. The code looks like this:
[Code]...
I have both proxy and drm authentication types in there because drm was not working for me so I decided to try proxy. Am I doing something wrong? I got this stuff off of the Adobe reference pages, is there an easier/smarter way of going about DRM in Flex?
I was recently profiling my application that uses Degrafa States in the skins and noticed that doing so uses more memory than I expected. Between the SetProperty and State, they were using about 10% of the total used application memory.
Would it be better to use css for the state changes and a new skin for each state? or Are there some simple tips to reducing the memory footprint of degrafa?
I am a flex programmer but i had nothing to do for handle manage memory in my projects. I think lack of memory management is reason for loading lag of swf file. Can any one help me to how to handle manage memory in flex/ as3 codes.
View 1 RepliesI am new to Flex. I am just wondering how to manage session and cookies for logging in, logging off in Flex? I am using Flex HttpService and Java servlet.
View 1 RepliesI am planning to build a giant management system in Flex 4.0, and I just wanted to know what are some pros and cons of using 4.0 (or 4.2) over 3.5? Lighter components? Faster pipelines? What are some things I can look forward to when using Flex 4.0?
View 2 RepliesI'm having a flex "design studio" for T-shirts, and I have made so that when a given itemId is passed in the URL (using #item=3), the corresponding item should be directly loaded.
[Code]...
Is there any content management system (such as Joomla or Drupal) for Flash/ FLex websites?
View 1 RepliesIs there any content management system (such as Joomla or Drupal) for Flash/ FLex websites?
View 2 RepliesI'm developing a game which will feature a 'light' instant messaging system; 'light' in the sense that I want all logged-in players to receive a "new message!" notification if another player sends him/her a message. It doesn't have to be 'instant' like with a chat service, so I'm thinking about having the game check for 'new messages' every 20 seconds.Now, I'd prefer to use what I already know, which is using AS3 to call PHP pages, querying a database and receive a response in the form of XML which can be used in AS3.
So, my question is this: How feasible / stupid would it be to such a 'light' IM feature using this method: I call "checkForWaitingMessages.php" from my Flash game every 20th second, passing along the player's login id. The PHP page checks if there are any 'waiting messages' in my database under that player id, then returns all 'waiting messages' in XML form, which I use Actionscript to display to the player. This happens every 20 seconds.My main concerns are: - How much of a strain does it put on a nomal hosting service that I request an XML document every 20th second? - What if there are 100 players logged in, making it 100 requests every 20th second? What about a 1000? Is this all in the realm of trivialities, or will this become to cumbersome to realistically implement?