Jump to content



Photo

Perfer method to allow external sites to access info


  • Please log in to reply
9 replies to this topic

#1 James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 10 June 2014 - 22:36

I am in the process of creating an app that will allow external sites some access to our app.   Think process similar to a Twitter feed where Your site can have a small piece of data that is live from our site.

 

I have been working on a C# Web Service, but I am having issues with getting access to that info with JavaScript so I thought I would ask this question to see if there is a better path/pattern.

 

Thanks kindly




#2 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 11
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 11 June 2014 - 15:26

JSON, maybe? There are reader/writer classes available for almost any language.



#3 +Seahorsepip

Seahorsepip

    http://seapip.com

  • Tech Issues Solved: 16
  • Joined: 23-January 11
  • Location: Netherlands
  • OS: Windows 8.1 Pro
  • Phone: Nexus 5

Posted 11 June 2014 - 22:40

Indeed json is good else you can always go with xml though json is way more lightweight.

#4 Kami-

Kami-

    ♫ d(-_-)b ♫

  • Tech Issues Solved: 2
  • Joined: 28-July 08
  • Location: SandBox

Posted 12 June 2014 - 12:05

Have you tried looking at Microsofts WebAPI solution, very similar set-up to MVC, it returns json by default which neatly ties up into javascript endpoints (& converts back into nicely structured objects if you so wish at the C# end).



#5 OP James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 12 June 2014 - 12:58

Thanks for the info everyone.  I have been trying some things, without success (but that's a different horror story)  I thought it would be valuable to ask this generic to see if there was another pattern that I didn't know.

 

Thanks again and have a fun day



#6 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 11
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 12 June 2014 - 16:18

Have you tried looking at Microsofts WebAPI solution, very similar set-up to MVC, it returns json by default which neatly ties up into javascript endpoints (& converts back into nicely structured objects if you so wish at the C# end).

 

That was why I suggested JSON... It's supported in the base class library both under Win32 and WinRT :)



#7 OP James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 12 June 2014 - 21:22

That was why I suggested JSON... It's supported in the base class library both under Win32 and WinRT :)

 

The problen with WebAPI is that it seems to be .NET 4.5, and my site provider only has 4.0.   I'm looking into a JSON proxy solution.

 

Funny thing is, what I need to do is very simple; pass in a string and get back a url.  Who'd think something so simple would be so difficult?



#8 Eric

Eric

    Neowinian Senior

  • Tech Issues Solved: 11
  • Joined: 02-August 06
  • Location: Greenville, SC

Posted 12 June 2014 - 21:44

You could always use JSON .NET... It's open-source so you should be able to compile it for almost any version. It's also relatively simple to write parsers for it since it only has a two structures and a few data types.



#9 Kami-

Kami-

    ♫ d(-_-)b ♫

  • Tech Issues Solved: 2
  • Joined: 28-July 08
  • Location: SandBox

Posted 13 June 2014 - 11:29

The problen with WebAPI is that it seems to be .NET 4.5, and my site provider only has 4.0.   I'm looking into a JSON proxy solution.

 

Funny thing is, what I need to do is very simple; pass in a string and get back a url.  Who'd think something so simple would be so difficult?

 

I'm using it on a server that only has .Net4.0 & it's by far the most simple solution for passing our back-end data to our AngularJS front-end (& vice versa).



#10 OP James Rose

James Rose

    Software Developer

  • Tech Issues Solved: 1
  • Joined: 20-January 04
  • Location: New York City

Posted 13 June 2014 - 14:52

You could always use JSON .NET... It's open-source so you should be able to compile it for almost any version. It's also relatively simple to write parsers for it since it only has a two structures and a few data types.

 

Thanks for the info





Click here to login or here to register to remove this ad, it's free!