• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing variables of one applciation from another application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing variables of one applciation from another application


  • Subject: Re: Accessing variables of one applciation from another application
  • From: "Jerry W. Walker" <email@hidden>
  • Date: Wed, 20 Dec 2006 07:12:19 -0500

Hi, Srinivas,

The four options that come immediately   to mind are:

  * direct actions

  * shared database

  * shared file

  * Web Services

For direct actions, you could provide a couple direct action methods. The first would provide the count of the array as an integer. The second would provide an indexed value on each call, so you just iterate your way through the array. Slow and definitely not recommended for large arrays, but would be a quick solution for small arrays.

For a shared database, you could share anything from a single table to the entire EOModel between the two apps. Application A writes values into a table, Application B reads them from the table. It would probably be easiest if B cleaned out the table when the values were read.

For a shared file, you could use several approaches. You might create a CSV file (Comma Separated Values) with the array's values and write them out one array element per line of the file. You could also serialize the array (See the java.io.Serializable Interface) so that Application A serializes it to the file and Application B instantiates it from the file.

For Web Services, you can make Application A a Web Services server and Application B a Web Services client. For help with this approach, see Apple's Web Services documentation at:

http://developer.apple.com/documentation/WebObjects/Web_Services/ index.html

I'm sure that with a little thought, others on the list might come up with other approaches, but these are the first that come to mind. If you decide to use direct actions or Web Services, be sure to consider security, because you're opening the array's values to anyone on the web unless you explicitly secure the interface.

There are security concerns with the shared database and shared file approaches as well, but they tend to be lesser concerns because the simple use of either of those approaches tends to restrict access to the availability of the database or the file system respectively and access to each of those tends to be a good deal more limited.

Regards,
Jerry

On Dec 20, 2006, at 4:01 AM, Srinivas Adusumalli wrote:

Hello Everyone,

I have a situation where i have to access the variables in one application from another application.

For Ex: Lets say we have two Webobjects applications A and B , can i access variables in the Applicaiton calss of B from A.

I know that we can invoke a direct action in application B from application A , IF it is a string value that has to be accessed then somehow it wud have been possible but embeddign it in the response but i need to access an NSArray in application B which will contain lot of objects from A. Is this possible?

Thanks & Regards,
Srinivas



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Accessing variables of one applciation from another application (From: Srinivas Adusumalli <email@hidden>)

  • Prev by Date: Accessing variables of one applciation from another application
  • Next by Date: How do I change default button in JSConfirmPanel?
  • Previous by thread: Accessing variables of one applciation from another application
  • Next by thread: How do I change default button in JSConfirmPanel?
  • Index(es):
    • Date
    • Thread