C# program approach for remote clients

Associate
Joined
16 Oct 2003
Posts
1,520
A client of mine has just opened a second office and are also wanting me to develop software for them to manage customers and various other records (they're a recruitment agency). The software will end up being used in 4-5 different offices in 12-18 months time.

I am fairly proficient at C# development in conjunction with SQL Server and have written some good stuff with it. Basically there will be gridviews listing potentially hundreds of records at a time, with the option to double-click any one and open it for detailed viewing/editing, and sometimes uploading rtf's/pdf's to the associated record.

I have done next to no ASP, apart from basic dragging and dropping to see what it can do, and creating very slow and bloated apps as a result. With C# and ASP integrating so well, how can I use as much C# as possible to create a solution that will work well over the web, ie. save bandwidth?
Also, a more specific question - are DataSets out of the question for web apps, because of the resources they require, ie. should I use DataReaders?
 
HTMLHugo said:
whats the score with the saving of bandwith ?

It's over the web. Surely I have to make cutbacks in functionality to cater for the fact that people are not on a gigabit lan and are now dealing with kilobits?
 
Ok, I'll bear that in mind. In my desktop apps I have a Media Player 11-type search function where in all list views there is a search box which filters the list as soon as a key is pressed. Works very well with even thousands of records, because it's mostly processing power at the client end because of the DataSet feature. Will have to consider workarounds for that.

What about the program as a whole? If I have a Windows Form with a DataGridView listing hundreds of records at a time, is this going to be much slower than the ASP.NET equivalent when pulling data over the web? If anyone here has used Microsoft Money, it looks almost exactly what I'm after, with an application-based interface but webpage-like pages when navigating within the program:
money06.jpg


What language or combination of languages would be used to achieve this?
 
NathanE said:
I would use web services with asynchronous calls. You can maintain the client/server design, but still have a very rich client side GUI not restricted by crappy HTML and CSS. I'd personally avoid using DataSets too and adopt service-oriented architecture (SOA). Web services + SOA is just so powerful and once you've tried it you won't ever go back :)

Web services aren't the fastest thing in the world (XML overheads) but it doesn't really matter as long as you can come up with good ways to present the GUI. Use virtualised ListView's, caches, asynchronous calls. You can really make your application something special this way, rather than just being "yet another .NET database app' using the bog standard controls".

If you're needing to display thousands of rows of data then something is wrong with your design. Either fundamentally or just with the GUI. Offer search facilities to the user. And only ever download records from the server that actually need to be displayed. Never download all the records assuming the user will view them all.

Good post :) Will take note of your last paragraph, it's for a recruitment agency so I guess the default view for say 'Applicants' could be only those who aren't currently employed, with other tabs to show 'employed' and 'all' (the latter I am assuming won't be used much).

I'm going off to do a good bit of reading on this now, but could you still throw some ideas my way relating to "virtualised ListView's, caches, asynchronous calls"? I am being shouted at to get this application up & running quickly and I want to get up to speed with these new ideas.
 
Actually I just tested an application I built about a year ago, installed SQL Express at the server I will be running the new program from, and ran the app from here over a VPN and it runs verrrry impressive indeed :) :) That program was not efficient at all in its Fill() commands, simply selecting every field in every row in the database and firing it down, including note/memo fields etc. To pull down a table of 500 records with ~15 columns took about 2 seconds. The code I will be implementing now will be so much more optimised so I can improve that to no end. Not quick, but that's without web services or anything.

So now I know I can give at least satisfactory performance with my solution to start off with, but I'm still wanting to take it a step further. The asynchronous calls interest me since there isn't a lot of modification required to existing code. I found a good article on CodeProject here . The following is code from a previous project where a few Fill() commands are called to populate a DataGridView and a few search dropdowns. On a slower connection, the form does not display until each of the Fill() commands have been completed. How would I modify even one of these commands to run it on an asynchronous thread?

Code:
private void formMachineList_Load(object sender, EventArgs e)
{
this.manufacturerTableAdapter.FillManufacturerList(this.myDataSet.Manufacturer);
this.machineCategoryTableAdapter.Fill(this.myDataSet.MachineCategory);
this.customerTableAdapter.FillCustomerList(this.myDataSet.Customer);
}
 
Back
Top Bottom