C # client application vs web application

I mainly develop applications for C # web applications, but recently someone from our engineering group wants to recreate this rather simple C # based application on a C # web application. Well, I found out that the whole application does this by creating a network folder structure (a parent directory with some subdirectories inside it).

Then I talked about the advantages of making this web application that all it does is create a network folder structure. Well, he mentioned that he does not want to create a client application, and, say, 50 users install this client application. He wanted it to be in one central place. So I thought that you canโ€™t just create one application in C # and drop it on the network, and it has several people who open and use it?

Is it possible? I am not a client developer, so I think that this is logically possible, but then I thought that if this is a network application, then one user opening this application will block other users? I personally don't like the idea of โ€‹โ€‹a web application for this application (which makes it a website), as it really makes no sense for me to be a web application.

Thoughts / Ideas?

Additional Information (EDIT)

Well, I think I should include more information. Folders are created using some database data. Thus, it cannot be a batch file or script. The end user must select an entry from the drop-down list, and this value will become the value of the name of the parent folder.

+4
source share
8 answers

Do you consider using ClickOnce to deploy your current application as an alternative to building web applications? This will make installation easier.

Another option is to simply place this application on a network share and let the user run from the share.

+7
source

What will you do if you find a mistake?

What do you do when you have new features?

With a web application, you do not need to redeploy all of your (known) clients, but continue to deploy in one central location.

+2
source

I had some experience working with problems of .Net applications from the Share network, although I am sure that there are solutions. (I just didnโ€™t need to look for these solutions.) Basically, these were problems with permissions, and it seemed to me that I would need to change the security policy to make it work, and this seemed to be a hack, so I just learned how to better evaluate the requirements and avoid this.

However, when I read the question, I wonder if .net is the right tool for the job? It seems to me that this is more of a problem that is easier to handle in a batch file script.

I hate writing scripts and batch files because it's just not that much fun and I would rather use .Net for almost everyone, but there is such a thing as the right tool for the job. (I try to avoid .net becoming my hammer, because not all problems are nails.)

Added based on additional information.

Does it matter. Then the script would still be feasible, but if it were me, I would make the client application just because it was simpler, but I would go around not wanting to install it for several clients like this.

Hack warning - this works, but I will probably be beaten to offer such a hack.

Since .Net client applications usually do not require installers and can be copied using xcopy deployment, I did this in your situation:

  • Burn application as a console application
  • Put all the files necessary for working in a network share in a folder.
  • Write a batch file that
    • creates a folder on the client PC (overwriting any existing content)
    • copies the contents of the folder on the server to the client PC.
    • runs an executable file.

This makes installation and updating the easiest way. Eaiser than ClickOnce (which is good, but would be too large for such an application)

Example batch file:

C:\ cd \ md MyApp copy \\SomeServer\SomeShare\*.* myapp cd myapp call myApp.exe 
+1
source

For this kind of thing, it would be better to write a simple Powershell script that can do the job.

+1
source

I would recommend using a web application. Besides the benefits of oded. Here is some of them.

Deploying software for 50 users will not be difficult for IT support, but releasing a new web application for 50 users will be much easier. Also, if they have been updating the OS for 50 years, then your application should be thoroughly tested before deployment. This is another additional wprk that your IT support requires.

When updating your client application, it should be launched again for all users. In addition, the update should check for any personalization, and then save it and do too much work. In a web application, you can update the server.

Also with .net features you can easily manage security.

+1
source

Yes - your friend is crazy ...

Instead of just dropping it on the network, as you suggested, he wants to install a web server on his computer, then install the application on a web server, and then call it locally?

Keep your friend away from the C # compiler, or whatever else comes to this ... They are not for the likes of him ...

0
source

Will you use WinForms or WPF? I think that if you do WPF, you just make your WPF Browser Application , which, I think, looks like a hybrid of the two.

0
source

In my opinion, if all he does is create Dir structures, you can use AutoIt v3 . Using AutoIt v3, you can compile the .exe file without any external libraries / installation.

Using a script is as simple as using DirCreate or similar to do what you want. I think if it was just a simple script, it could even be 10 liners.

Creates a directory / folder.
DirCreate ("path")

Parameters: path The path of the created directory.

Return value Success: return 1.
Failure: returns 0 if an error occurred while creating the directory. Notes

This function will also create all parent directories specified in the "path" if they do not already exist.

Using C # just for this is redundant. You create this script, compile it on .exe to add a network resource, and users will start it themselves (or do it through a login script or gpo). Several people can run a script from a shared resource without affecting anything.

Of course, you could use C #, and it will work for several people to start it, but a much simpler, cleaner way to do this is through scripts in AutoIt v3 or even VBS if you trust it more.

Edit:
I just saw that you are editing that it is connected to the database. AutoIt is able to use the database (depending on what, too), but I think it is a little more complicated than DirCreate :-) In any case, I am PRO WinForms, a console application in C #, and then a web application.

Several people can run it immediately from a shared resource, and there is no problem with this.

0
source

Source: https://habr.com/ru/post/1302129/


All Articles