MACROMEDIA FLEX-GETTING STARTED WITH FLEX Bedienungsanleitung Seite 83

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 148
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 82
CHAPTER 5
Working with the Server
Most Flex applications
are going to work with a web server in
some shape or form. Thankfully, Flex makes this very easy to
do by providing a rich set of web service tools. In this chapter,
I’ll present two methods of accessing the server from a Flex
application, and the server code that is required to support
them.
You can access the server in a Flex application in five different
ways:
POST or GET
You can use a Flex application just as you would an HTML
form. Flex can bundle up the elements in a form and post
them to your web server application just as the browser
would. Your application won’t even know the difference.
Using HTTP services directly
In a manner similar to Ajax, you can make an HTTP re-
quest of the server, even supplying POST content, and re-
ceive the response asynchronously. That response can be
whatever flavor of data you want: text, XML, YAML,
JSON, whatever you like. For JSON data the as3corelib
library (http://code.google.com/p/as3corelib/) provides an
excellent JSON interpreter.
SOAP
Flex can access SOAP services directly using a set of Flex
classes designed specifically for that purpose.
67
Seitenansicht 82
1 2 ... 78 79 80 81 82 83 84 85 86 87 88 ... 147 148

Kommentare zu diesen Handbüchern

Keine Kommentare