bhuvan114 / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

Support Silverlight #119

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Silverlight can't reference these assemblies.

Original issue reported on code.google.com by redmoo...@gmail.com on 9 Apr 2008 at 5:39

GoogleCodeExporter commented 8 years ago
silverlight does not allow you to do a LOT of stuff. From my knowledge, one of 
the most important thing is cross 
domain HTTP requests. So as long as that is not fixed, there is no way for our 
assemblies to be functional in 
silverlight. Is that no longer correct?

Original comment by fman...@gmail.com on 9 Apr 2008 at 7:08

GoogleCodeExporter commented 8 years ago
I just verified that silverlight 2 beta 1 still does not allow crossdomain 
calls, so there is no way that gdata 
assemblies can be used (HTTP Request is just not supported). 

Original comment by fman...@gmail.com on 9 Apr 2008 at 11:40

GoogleCodeExporter commented 8 years ago
But I tried the crossdomian calls of silverlight 2 beta1,it can work!
for example:http://myspace.silverlight.cn/heavenwing/fanfou/
I use crossdomain calls to get informations from www.fanfou.com
I import these code of gdata, then build, I get these errrors:
===========
The type or namespace name 'CollectionBase' could not be found (are you missing 
a
using directive or an assembly reference?)  \GExtension\extcollections.cs
The type or namespace name 'ExpandableObjectConverter' could not be found (are 
you
missing a using directive or an assembly reference?)    \GData\atomsource.cs
===========
these errors  because of Silverlight only support limited namespaces.

Original comment by redmoo...@gmail.com on 10 Apr 2008 at 1:14

GoogleCodeExporter commented 8 years ago
Can you point me to the documentation that shows me how to do crossdomain in 
silverlight (I installed the sdk 
and could not find it...). But if base things like CollectionBase is not 
supported, i am not very hopeful.

Original comment by fman...@gmail.com on 10 Apr 2008 at 1:25

GoogleCodeExporter commented 8 years ago
my code of crossdomain calls is
http://www.codeplex.com/eatwpf/SourceControl/FileView.aspx?itemId=148874&changeS
etId=7358
you can download entire code form http://www.codeplex.com/eatwpf

In order to cut size of silverlight runtime, it remove some non-generic 
Collection
namespaces;so you should migrate GDataAPI to .NET 2.0, and use generic 
collection at
the first step

Original comment by redmoo...@gmail.com on 10 Apr 2008 at 1:42

GoogleCodeExporter commented 8 years ago
Moreover I will implementation a silverlight client of picasa at
http://code.google.com/p/silverlight-picasa/
Now ,I only create web service wrapper of picasa api, and silverlight call this 
web
service to get informations.

Original comment by redmoo...@gmail.com on 10 Apr 2008 at 1:48

GoogleCodeExporter commented 8 years ago
From the Silverlight documentaiton and a lot of posts across the web, 
Silverlight Webclient does not support 
cross domain calls (download of images, yes, other stuff no). It also does not 
support setting of headers, so we 
could not do authenticated requests. 

This makes this a very very low priority (mean, it won't happen until 
Silverlight changes this) item. 

Original comment by fman...@gmail.com on 10 Apr 2008 at 1:04

GoogleCodeExporter commented 8 years ago
Hoping this is updated, since it looks like starting with Silverlight 2.0, you 
can 
indeed do cross-domain calls:

http://msdn.microsoft.com/en-us/library/cc189008(VS.95).aspx

http://msdn.microsoft.com/en-us/library/cc645032(v=VS.95).aspx

Original comment by will.joh...@gmail.com on 3 Jun 2010 at 5:52

GoogleCodeExporter commented 8 years ago
I've tried to take the source of Google Data API for .NET and port it myself to 
Silverlight (SL). At this moment is still much too difficult to go around it 
without refactoring major parts of the API. Some of the more important 
obstacles I noticed and that should be fixed way before you hit the 
cross-domain calls problem:

1. Non-generic collection use is still widespread. This should actually be 
changed to .NET 2.0 generic collections also for efficiency improvements, and I 
saw no obvious reason why it couldn't be done.

2. AsymmetricAlgorithm is used by the core client and it isn't supported by the 
Silverlight framework. Maybe it could be replaced by other security algorithms 
which are indeed available in SL Cryptography namespace, but this remains to be 
seen.

3. XML DOM classes are used for handling API parsing (e.g. XmlNode, 
XmlDocument). These are also not supported by Silverlight, and they are 
actually a bit of a legacy even in .NET as well. In principle these could be 
ported to the more recent System.Xml.Linq variants like XNode, XDocument, which 
are indeed supported in SL.

4. WebRequest classes are indeed supported by Silverlight, but their API is 
slightly more restricted than regular .NET. Some of the use of requests would 
require modification to work with SL, but I did not see any blocking issues to 
the port.

5. GZipStream class is not available in Silverlight. This could be replaced by 
the open-source alternative SharpZipLib, which already has an available 
Silverlight port: http://slsharpziplib.codeplex.com/

6. Silverlight does not come with ASCII Encoding implementation. I'm not sure 
if this is absolutely essential for Google Data API. Most communications should 
go through Unicode since it's default for .NET string anyway. If it's really 
necessary, it can still in principle be implemented relatively fast following 
the technical specifications for ASCII.

These were the main issues I encountered so far. I also would like to 
re-emphasize the relevance of porting this API to Silverlight in the context of 
Web development, since it's the main backbone for creating and running 
cross-platform web frontends using the .NET framework.

Original comment by goncaloc...@gmail.com on 11 Nov 2010 at 1:31