Distributed Winforms application [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am looking to change the current architecture of distributed winforms application developed using TCP messages and the client talks to database directly. I know this a bad design and I am entrusted to change this. I have been recruited for the same.
Bit of Overview:
Client uses Winforms applications
Client loads the initial data from database directly
Clients listens to the Server (Winforms application with TCP listener)
If an update is made in an any of the entity, client will update the database directly and sends the message to server, which in turn send the information to other clients. Then these clients would refresh the data from database
Technologies Used: VB.NET, Entity framework, Oracle Database and TCP Listener.
I need all your advise about what would be best solution/architecture for the same. I thinking about using WCF with duplex communications for messages.
Thank you in advance for your replies.

Use a simple WinForms (or WPF if you can) client, WCF server, EntityFramework for ORM and Oracle for DB.
The client calls the server. the server uses EF to call the DB. This 3 tier design is pretty common and basic. What's wrong with it?
PS: I would recommend against using duplex communication because it's over complicated and doesn't always work. What is your specific need for it?

Related

End To End Encrypted Chat Application using Windows Forms and . Net C#. Where do I start with encryption? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed last year.
Improve this question
I have an assignment at school to create a chat application. I have created this using SignalR to ensure real time communication. However, our teacher wanted also end to end encryption.
I have 2 projects: 1 server (which contains the hub) and the Client, which communicates directly with the database to load the messages on log-in. When a user is online, the user communicates directly through SignalR connections.
I need to find a way to make this communication secure (teacher suggested Diffie Hellman to exchange keys). It would really be appreciated if any of you guys could put me on the right road where to start or if you could suggest me some articles which could help.
Note: I am a Java Developer and am new to .Net Framework and C#.
If any of you is interested here is the github link to my project: https://github.com/joanjanku2000/chat-app/tree/jjanku/feature/chat-app
You need to read documentation first in order to choose the right encoding/decoding technique.
Read these :
https://learn.microsoft.com/en-us/dotnet/standard/security/cryptography-model
https://learn.microsoft.com/en-us/dotnet/standard/security/generating-keys-for-encryption-and-decryption
https://www.c-sharpcorner.com/article/encryption-and-decryption-using-a-symmetric-key-in-c-sharp/

a guide for WPF Networking [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I'm working on a small WPF Project. The data is being stored on Server machine. I want, that the clients can access that database by a WPF Software. The connection is only LAN. Any idea, how to develop my WPF APP further? Perhaps WCF? any book or any quelle that can help me specific with this topic?
thanks guys!
It depends on how your application will be used.
From a WPF application you can connect directly to your database and it is the easiest way but, not allways the best.
If your application will be used only on internal network, you can use SQL Connection, an ORM like Entity Framework etc.
But, if you want to use your application externally, I mean for exemple at home, you will need to open the TCP/IP Port on your Database Server in order to be able to connect from your application using SQLConnection. This is not difficult but will make your server vulnerable against hacker attacks. In this case, you can use a web service to publish on your server and consume it in order to communicate with your db. The disadvantage of this is the development time. Ofcourse developing a web service and consuming it will take more time to develop than connecting directly via an SQLConnection.
For me, you must choose the most optimised for your case.

Need to connect two instances of an application together C# [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Problem:
I have an instance of an application on one computer (C# VS 2015), it is connected to a database (SQL).
I have other instances of the same application on other computers.
All computers are connected, and all instances are working with the same database.
When the software writes into the database, the UI will change accordingly.
Question:
How to I refresh the UI of EVERY instance when any machine changes the database?
Example:
Clicking buttonA:
1. Create record in database.
2. Change buttonA background color to green.
3. Tell other computers to refresh their instances to show their buttonA as green too.
Hope this wasn't a stupid question, I appreciate all help!
This is not a stupid question, but rather a very common requirement. The best solution (in my opinion) would be to create a WCF service all clients talk to.
Only the service performs operations on the database and is designed as a two-way service. That way, once a client is connected, the service can instruct it to refresh itself if another client changed something. No client would change the database itself.
If that isn't possible, I'm afraid polling the database for changes is the only common option that works for any RDBMS. There may be other options for the RDBMS you're using.
How fast do you need to refresh? If you have some seconds, then I would suggest to use a polling approach: just query the database every x seconds, for all records updated after the previous poll.
The returned records are those to be refreshed in the UI. Indexing that datetime field would help to minimize the impact of frequent/multiple queries.
If you have a web based UI then something like SignalR would do this for you. I've used this before and it works great.

Client-server TypeScript app - which server kind? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I would like to start making a JS application that works with C#-based server. It will be a small website with some features that should be performed at the server-side (database + basic account authentication needed).
I wanted to use HTML5 + TypeScript to create a client.
I have some questions:
What is the best idea to make a server?
What kind of client-server communication should I choose?
What about hosting? Should I use Windows Azure or anything different?
What is the best idea to make a server?
Really broad question. No best. Advice : Using something that is API focused. If you want to keep it all in TypeScript (to decrease cognitive overload) you can use Node.js + Express http://expressjs.com/
What kind of client-server communication should I choose?
You have two broad categories. Server side rendering (where you modify the HTML returned from the server before it reaches the client) and Client side rendering (where you modify the HTML based on some client JavaScript, example with angular : https://www.youtube.com/watch?v=WdtVn_8K17E&hd=1). You will most likely use a combination of both.
What about hosting? Should I use Windows Azure or anything different?
Again really broad. Depends a bit on your server side tech. Both Azure and Amazon (EC2) are good first choices and basically provide you a hosted virtual machine in the cloud on which you can put whatever you want.

Best approach for Synchronization Mysql databases using C# [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a requirement as below.
Windows application in c# with My sql database.
MySql database in both local and server .
One centralized server with many client
Synchronizing the server database at each time when the new entry or update is
happen in local machine.
The server data also needs to be updated in local at regular intervals inorder to avoid conflicts
I need to know what is the best approach to follow to make this synchronization without any conflicts.
Thanks in advance
If your "local machines" are always connected to the server, you don't need a local database - you can connect directly to the server as one MySQL server can handle multiple clients...
If, however, your central server is not always available or your clients can go offline and should still be able to work and they synchronize data when they come back online, then what you need to build is an Occasionally Connected Application.
See if you can use any of the recommendations on that page. If I were you, I would start exploring Synchronization Services for ADO.NET (MySQL has a full ADO.NET provider)

Categories

Resources