How to communicate a local application with a web page opened in the browser?

4

I have a commercial web application that runs basic operations of a restaurant. In short, a waiter accesses the 'orders' page and requests a new 'product'. These products are categorized by departments, and each department has a printer (thermal / dot matrix) where the requested order will be printed!

As browsers do not allow me to change the printer to be used by parameters, the waiter would have to choose the printer manually, which is completely unfeasible!

Yesterday, discussing here in the OS, I was asked to create an application, which installed locally on my client, could serve as an interface for that impression. But I have no idea how to do this?

What I need is the following: When the user sends the request for a new product to the server (via AJAX), if the returned JSON is successful, my page 'warns' the local application (or something similar) that selects the printer responsible, and send the coupons!

But how do I make this communication? Is there any protocol?

I need at least one direction, because by now, I do not even know where to start!

Web application developed in ASP.NET MVC 4 with C # and SQLServer .. The local application has not yet been written, and although we are open to solutions in any technology, preference is for C #,

    
asked by anonymous 29.10.2014 / 17:14

1 answer

1

There is a way to do something similar . With a WindowsForms application you can make a simple form that will contain a webBrowser component and you can use C # itself to configure the printer, run some other application, or go directly to this application.

So you keep all the business logic in the web application and handles the printer part locally.

Here is a link that can help you get an idea of what I said:

link

    
29.10.2014 / 17:22