RSS Feeds

Hi,
Currently I am involved in an windows application which performs synchronization of data to and from client(sql ce) and server database(sql server 2005).
Can anyone suggest me or provide me a sample code by means of which I can create RSS feeds as well as download(or read feeds) for my mobile application.

Thanks in advance
 
Hi,
I need to develop a data subcription layer by means of which I can create RSS feeds and send it to the clients(mobile devices) ,where the users will subscribe to the feeds and can download them.

Can you please suggest as to how can I proceed with it....

Thanks in advance
 

Ariel_Z

Active Member
Licensed User
Let me see if I get you right. Your basic design should look something like this:
1. Client app connects to server - asks for new RSS (maybe passing last update time?)
2. Server sends relevant records from a global RSS table (filled from where?)
Server is accessible via what? Internet?
3. Client displays this response.

Is this correct?
 
Hi,

Yes you are correct..my current application is that I am connecting to the web service from my client i.e mobile device and fetching the data from server database through internet and performing synchronization with the client db.Similarly I wanted to use RSS to fetch small amount of data(some updates) from server, as you mentioned from a global RSS table on server and make it available to the client.

Now to proceed with this requirement,I want to know as to:

1) how can I create/update the feeds and get them stored in a table at server side

2)and make it available to the client when he requests to it or

3)as well should be downloaded automatically when he has subscribed to it already and is connected to internet

4) Also in context to my base application i.e synchronization of data (database) can you suggest in what ways can these RSS be useful.

Waiting for your suggestions

Thanks in advance
 

Ariel_Z

Active Member
Licensed User
No problem... you will probably find it quite easy. The only thing I need to know is how experienced you are in programming: this way I know how detailed my explanations should be.

What I would suggest is as follows:
1. The program is composed of a client and a server.
2. The server holds a table of RSS records with the data you desire.
3. The server should (also) have the following functions: add_rss_record(...data...), save_rss_records_to_file(filename, lastUpdateTime) (this one saves the records added after a certain time)
4. The client should have: isConnected (returns true if the internet connection and a connection to the server is found), trigger_updates (triggers the server to save updates to file), get_file_RSS (transfers the rss file created after getting a signal from the server that the file is ready. This signal may be file date/time and so on.), last_rss_time_in_server - checks if there are updates. Check this every couple of minutes to see if there are new updates and decide if to get the rest of the data.

5. To accomplish this, you can use the SQLite library (see reference), and the http/ftp library (use the help to learn how to work with them. The http allows you to download the file asynchronously).
6. To learn how to work with libraries refer to this tutorial.
 
Hi,

If possible can you give me a detailed explaination to the above mentioned logic as I am a newbie to programming(only few months).I have few querries regarding the steps which you have given.

Regarding step 3) As you said at server side we need few functions to be added ...now what type of application is the server side..Windows application??

If I have understood it correctly let me elaborate on the steps:
1)add_rss_record(...data...)-> this function is to add the data in the database from the server application

2)save_rss_records_to_file->how abt this one?? fetch the rss data from database and store into xml file?? how to do that?
Also how can we make it different from other xml file..i.e how can we say it is RSS specific data...from the tags??


Regard step 4) how to trigger the server when the client is connected to internet..?Also how will I take care that as long as the application is running I want to make continuos check if any updates are available on server??


Finally can you please tell me in brief how will SQLite help me in this scenario..

Please give me a clear picture so that i can start with the designing of the application

Thanks in advance.
 

eww245

Member
Licensed User
Hi,
Currently I am involved in an windows application which performs synchronization of data to and from client(sql ce) and server database(sql server 2005).
Can anyone suggest me or provide me a sample code by means of which I can create RSS feeds as well as download(or read feeds) for my mobile application.

Thanks in advance

Hi, here is some code i've been using to gather an RSS feed from Yahoo Weather.

It is used on a PocketPc client.

webReq is a WebRequest object from HTTP.dll library
webResp is a WebResponse object from HTTP.dll library

location will be the ZipCode or Location code for which to get the data.
u is for the type, C or F
These are both from a command line parameter into the application.

Then using FileOpen and FileWrite to save the RSS file locally.

Afterwards the file is opened with read, an XMLReader object from the XML.dll library.
And then gathering the needed info with read.MoveToNextAttribute method.

Hope it helps.

B4X:
webReq.New1("http://weather.yahooapis.com/forecastrss?p="&location&"&u="&u&"&d")
webResp.New1
webResp.Value = webReq.GetResponse

    FileOpen(f,"tmp.xml",cWrite)
FileWrite(f,WebResp.GetString)
  FileClose(f)
     webresp.Close

read.Open(AppPath&"\tmp.xml")
 
Top