none
Silverlight for a big database application !

    General discussion

  • Hi

    I want to start a new big project with Silverlight and Sqlserver , but I have a question and I hope if someone will answer me , they have some exprience about this issue.I want to know is silverlight suitable for big DataBase application ? 

    I am worry about using Wcf to send large quries and get the answer with Wcf so I am asking everyone to asure me or tell me it is not suitable for this case.

    Regards

    Tuesday, December 20, 2011 4:03 AM

All replies

  • Hi, we have developed 20 big business applications like CRM, ERP, Project Management etc. in Silverlight. Had a lot of experience. We are using SQL Server 2008 and it works fine with wcf and domain services.

    Tuesday, December 20, 2011 4:38 AM
  • the only thing you need to be aware of and plan for in how you develop the system is that you will want to only send back enough data to fill one screen at a time. kind of like rendering a web page.

    this does not mean that you can not have a grid that scrolls thru the data. just that you do not want to try and send back all the rows in one operation.

    the most common problem i have seen is folks geting upset when they try and return like 5,000 rows of data and get an error like a timeout or a wcf max-data-size error.

    if the user can only see 20 or 30 rows of a grid then why send them 5,000 rows ? 

    also if you use EF or LINQ  they have support for "Data Paging"   and the way it works with the grid the user just scrolls thru the data and never knows how many rows you send at one time.

     

    I like to think of web services sending a "Message" and that message has all the info for one "Action"

    so on the server say the action is "Post Order" then the message sent in has all the data to allow the server code to do that and the reply message is what i need to know on the client to show or handle the result of the operation.

    if you use that kind of thinking it should work just fine.

    And by the way from before silverlight i have a system that does hundereds of web service calls and works with a database that is over 80 gigs in size and processes like 20,000 new orders a day.  plus accounting and payrole and other stuff.

    some of the new stuff uses silverlight but a lot of it is classic win forms but all of it is based on web services.

     

    Tuesday, December 20, 2011 8:41 AM
  • Why send 5000 rows? To take advantage of the powerful stateful nature of the silverlight platform. Thinking of Silverlight as just a fancy web page misses one of the most important differentiators of Silverlight.

    Download the rows in the background, and chunk the calls if you like. By the time the user has looked through the first screen of rows you'll probably have all 5000 there ready to go. Having it all local enables lightning fast browsing, filtering or other manipulation of the data. Unless data staleness is an issue this provides a much better UX.

    Here "big" database is relative. If the data you'd like to pull locally exceeds the user's memory then you should look to server-side paging.

    p.s. WCF has simple adjustments for timeout and max message size. The defaults on message size are especially conservative, though I think they increased the default in .NET 4?

    Tuesday, December 20, 2011 11:05 AM
  • Why send 5000 rows? To take advantage of the powerful stateful nature of the silverlight platform. Thinking of Silverlight as just a fancy web page misses one of the most important differentiators of Silverlight.

    Download the rows in the background, and chunk the calls if you like. By the time the user has looked through the first screen of rows you'll probably have all 5000 there ready to go. Having it all local enables lightning fast browsing, filtering or other manipulation of the data. Unless data staleness is an issue this provides a much better UX.

    Here "big" database is relative. If the data you'd like to pull locally exceeds the user's memory then you should look to server-side paging.

    p.s. WCF has simple adjustments for timeout and max message size. The defaults on message size are especially conservative, though I think they increased the default in .NET 4?

    Shawn keep in mind this is just a number to refer to and not a hard limit.

    the point i was after was that folks often fail to keep in mind that you may be running the app over a public network that may not have super fast connection speed and even if it has a fast connection it's still not a good idea to flood the client with excess data.

    5,000 is not a "magic number"   just an example - ok lets make it 500,000 

    for most cases you can send a lot smaller set and still take full advanage of silverlight.

    and keep the app's memory use down and make it fast and slick and all that...

     

    Tuesday, December 20, 2011 12:45 PM
  • Thanks Everyone .

    Honestly when I want to use Wcf ria it increases our problems for example I should chage my ORM because Wcf ria doesn't support Linqtosql direcltly so it is the first problem and also I can not believe to comunication layer to transfer the data because when the data become huge I can not use silverlight especially when I want to make an application that customer need to use it on the Web using silverlight for applications when users should use on the Lan is better so please let me know how can I use lingtosql at first.

    Regards 

    Ali

    Friday, December 23, 2011 6:15 AM
  • then use linq to sql or whatever with wcf.

    silverlight can talk to an asmx service or a wcf service or to a tcp socket.

    RIA is an option NOT a requirement.

    WCF  is not RIA

    RIA services is an extension to WCF

    I have seen RIA work from some things and not work for some... 

    Friday, December 23, 2011 8:54 AM
  • If you are building a production quality business application, then check out Csla.

    http://www.lhotka.net/cslanet/

    and

    http://www.lhotka.net/cslalight/

    It will save you a whole lot of the headache around business rules, common validation, and data transfer over the wire.

    S

    Friday, December 23, 2011 12:01 PM