Results 1 to 7 of 7

Thread: [RESOLVED] backgroundworker

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Resolved [RESOLVED] backgroundworker

    Hi,
    There is a fully working .net windows application which uses the background worker process in the form.

    Using my new silverlight 4 application, I now would like to make it use the functionalities as the application in the winform i.e. background worker, etc...

    Question:
    As I am using the wcf to retrieve data and pass to the silverlight page, how/where do I use the background worker process? Do I use it in the service or in the silverlight page?

    Alternatively, should I just have a timer in the silverlight page which calls the wcf every second or so to update the silverlight page with data?

    Thanks
    Last edited by arkiboys; Dec 29th, 2010 at 07:14 AM.

  2. #2
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: backgroundworker

    The background worker goes in the Silverlight page, because that background worker prevents the page from beeing blocked.
    You shouldn't use a timer, use events (from the backgroundworker) to udate the data.
    Alternativly you could use a async call to the WCF service
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: backgroundworker

    I think I should use a timer so that the wcf method gets called every few seconds.
    Don't you think?
    Thanks

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: backgroundworker

    Why would you call the WCF service every few seconds? Sounds like you need a duplex binding
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: backgroundworker

    Processing is needed to be doone every few seconds.
    May be it is best to have a windows service which can be started. And have a timer in the windows service which does the processing every few seconds.
    What do you think?
    Thanks

  6. #6
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: backgroundworker

    There is almost no good reason for polling. Where does the service gets its data from?
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2007
    Posts
    694

    Re: backgroundworker

    Solved by having a windows service to do the processing and the WCF to pull th edata out of the windows service into the client.
    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width