Windows application in C #?

I am developing a Windows application in C # which, when first started, creates a local database ( SQLite ) and data (about 200MB or even more), this feeds as a data stream from a remote server based on criteria set by the user.

I was currently planning on accessing the database server directly from the application.

Questions:

  • Is it good to use the database server directly from the application as the server manages connections automatically and I save time when designing the TCP / IP interface.
  • What could be the second option? Providing a server or TCP / IP interface (shouldn't you write it down?).
  • How much can I use data compression?
+2


source to share


4 answers


With WCF, you can avoid the overhead of writing TCP / IP code and have a standalone server or web service hosted in IIS. Moreover, compression can be added without changing the code.



You need to try and no compression. Compression ratio is highly data dependent, and compression times can be an issue as well.

+3


source


Without going into details, I can say that you can use ASP.NET C # (you can choose any .NET language) and you can send and receive data using POST.

Why do you need compression? Are you only submitting results? If it's large, you can use the existing library. I've used sevenzipsharp in the past without too much trouble.



Edit: There might be a gzip option on the server output, so you might not need to use anything.

+1


source


It is usually best to use ADO.NET or LINQ to SQL (Entity Framework) to connect directly to your database, unless User is disconnected while using the application.

If you are going to disable the user, keep using SQLite, or you can use ADO.NET, which can save the XML data file and access it as a table from the user's computer without additional SQLite dependency.

I would not use compression because C # has no built-in library for it and would require an additional dependency.

Try using the .NET Framework without the additional DLL, and you have a more flexible application that is easier to install and maintain.

ADO / Entity Framework - http://msdn.microsoft.com/en-us/library/h43ks021.aspx

0


source


Assuming your intent is to pull a subset of the data on the server that depends on client requests for local storage, then for security and management reasons you should probably look to consume web services rather than expose your database directly to the internet.

There are many possibilities for creating services - WCF is the primary method for new .NET applications and is easy to implement on both the server and client side - in which case I would also probably look at ADO.NET Data Services as a quick access to rich set of services.

0


source







All Articles