[Flashcoders] json flash 8/9

2008-08-22 Thread Hans Wichman
Hi,

I'm currently involved in a project, where webservices are being accessed
from flash, through a 400kb microsoft javascript library.
The developer claims it is webservices through json, which is supposedly
done because of the big performance improvement.

All I see is a 400kb javascript overhead for something flash supports
natively and locks up my browser.

Anyway, another thing is they claim the content (created in flash 8) has to
be run in the flash 9 player since there are 'issues' with JSON in Flash 8.

So my questions to you folks are:
- does n1 know of a good reason to use webservices through json through
javascript in flash
- are there any known problems using this approach in flash 8

And some good sources on json in flash would be nice, ofcourse I've been
googling, but there are a LOT of hits.

regards,
JC
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread Eduardo Omine
On Fri, Aug 22, 2008 at 9:49 AM, Hans Wichman
[EMAIL PROTECTED] wrote:
 - does n1 know of a good reason to use webservices through json through
 javascript in flash

Some developers prefer JSON over XML. But there's no need to use a JS
library to connect Flash to server. With AS3 you load and send JSONs
with URLLoader. To decode and encode JSON objects use the as3corelib
library:
http://code.google.com/p/as3corelib/

Performance-wise, it is best to use AMF (binary format) if possible.
Working with JSON should be slower than XML because XML parsing is
native to AS3.

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread Hans Wichman
Hi,

thanks but I forgot to mention its AS2, will I need the additional libraries
there?
(they argue its as2 that has to run in fp9, go figure ;))

regards,
JC

On Fri, Aug 22, 2008 at 4:17 PM, Eduardo Omine [EMAIL PROTECTED]wrote:

 On Fri, Aug 22, 2008 at 9:49 AM, Hans Wichman
 [EMAIL PROTECTED] wrote:
  - does n1 know of a good reason to use webservices through json through
  javascript in flash

 Some developers prefer JSON over XML. But there's no need to use a JS
 library to connect Flash to server. With AS3 you load and send JSONs
 with URLLoader. To decode and encode JSON objects use the as3corelib
 library:
 http://code.google.com/p/as3corelib/

 Performance-wise, it is best to use AMF (binary format) if possible.
 Working with JSON should be slower than XML because XML parsing is
 native to AS3.

 --
 Eduardo Omine
 http://blog.omine.net/
 http://www.omine.net/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread ekameleon
Hello :)

You can use my opensource framework with this JSON class :

http://code.google.com/p/vegas/wiki/VegasTutorialsString_JSON
http://www.ekameleon.net/vegas/docs/vegas/string/json/JSONSerializer.html

To install VEGAS :

http://code.google.com/p/vegas/wiki/InstallVEGASwithSVN

PS : if you use only the AS3 version of VEGAS you can use the branche :
http://vegas.googlecode.com/svn/AS3/

Now... JSON is good but the eden format is BETTER !

eden is in the core library of VEGAS in AS3 (see the system.* package : )

See the official page project of eden :

http://code.google.com/p/edenrr/

See the features of eden :

http://code.google.com/p/edenrr/wiki/edenFeatures

In VEGAS you can use two class EdenLoader and JSONLoader (based on the
URLLoader class) who load a JSON or eden external file and parse it :

JSON : http://www.ekameleon.net/vegas/docs/andromeda/net/JSONLoader.html
eden  : http://www.ekameleon.net/vegas/docs/andromeda/net/EdenLoader.html

You can see an example of config file in eden in the examples of VEGAS :

http://vegas.googlecode.com/svn/AS3/trunk/bin/test/andromeda/net/deploy/data/config.eden

See the difference with the same JSON config file :

http://vegas.googlecode.com/svn/AS3/trunk/bin/test/andromeda/net/deploy/data/config.json

You can see too my Localization model and config model in the example of the
extension AndromedA :

http://vegas.googlecode.com/svn/AS3/trunk/bin/test/andromeda/config/
http://vegas.googlecode.com/svn/AS3/trunk/bin/test/andromeda/i18n/

If you want optimize your work flow.. you can use eden too with my a full
IoC application library in AndromedA, all examples in the repository :

http://vegas.googlecode.com/svn/AS3/trunk/bin/test/andromeda/ioc/factory/

With my IoC framework you can create a big application with external eden
configuration files, example :

http://vegas.googlecode.com/svn/AS3/trunk/bin/test/asgard/net/deploy/context/hello_world.eden

More information about it for the moment in french but the english tutorials
coming soon !

http://groups.google.com/group/vegasos/web/design-pattern-dinversion-de-contrle

EKA+ :)













2008/8/22 Eduardo Omine [EMAIL PROTECTED]

 On Fri, Aug 22, 2008 at 9:49 AM, Hans Wichman
 [EMAIL PROTECTED] wrote:
  - does n1 know of a good reason to use webservices through json through
  javascript in flash

 Some developers prefer JSON over XML. But there's no need to use a JS
 library to connect Flash to server. With AS3 you load and send JSONs
 with URLLoader. To decode and encode JSON objects use the as3corelib
 library:
 http://code.google.com/p/as3corelib/

 Performance-wise, it is best to use AMF (binary format) if possible.
 Working with JSON should be slower than XML because XML parsing is
 native to AS3.

 --
 Eduardo Omine
 http://blog.omine.net/
 http://www.omine.net/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread Eduardo Omine
With AS2 I'd recommend using Flash Remoting with AMF (binary format).
AMFPHP is the most well-known AMF solution, but there are AMF
solutions for Python and Java too (and probably other server
technologies).

http://www.amfphp.org/
http://pyamf.org/
http://sourceforge.net/projects/openamf/


And yes, you need an AS2 library to parse JSONs too.
http://www.5etdemi.com/blog/archives/2006/05/cinqetdemijson-a-better-json-parser-for-as2-suited-for-config-files/

-- 
Eduardo Omine
http://blog.omine.net/
http://www.omine.net/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] json flash 8/9

2008-08-22 Thread ekameleon
With VEGAS you can work in AS2 or AS3 :)

And for remoting :

http://www.ekameleon.net/vegas/docs/asgard/net/remoting/RemotingService.html

the class asgard.net.remoting.RemotingService work in AS2/AS3 and SSAS
(Server Side ActionScript for Flash Media Server)

EKA+ :)

2008/8/22 Eduardo Omine [EMAIL PROTECTED]

 With AS2 I'd recommend using Flash Remoting with AMF (binary format).
 AMFPHP is the most well-known AMF solution, but there are AMF
 solutions for Python and Java too (and probably other server
 technologies).

 http://www.amfphp.org/
 http://pyamf.org/
 http://sourceforge.net/projects/openamf/


 And yes, you need an AS2 library to parse JSONs too.

 http://www.5etdemi.com/blog/archives/2006/05/cinqetdemijson-a-better-json-parser-for-as2-suited-for-config-files/

 --
 Eduardo Omine
 http://blog.omine.net/
 http://www.omine.net/
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders