I have a desktop and web application connected to same database.
Which is the most preferred method to make them communicate with each other?
You should use SOA and then both your desktop app and web app should communicate with the Service.
And the Service will be responsible for communicating with the database.
Related
I have WPF application and i have to implement it with some other application on same PC.
It is request that my app must be accesed with api or service, and also to hide GUI totaly.
So i need advice on api or service for my application, should i create windows service of WCF application, so other application (JAVA application) can call my app and get returned string.
Any suggestion on this case is more then welcome!
If you want to have WPF application, you can host a WCF service within your WPF application. Read for example: Running a WCF listener in a WPF application
I would do both - a WCF service hosted within a windows service, you can throw away WPF completely.
The WCF's BasicHTTPBinding works well with Java's javax.xml.ws.Service.
I have one windows service application and one ASP.NET web application, both created by C#. Both applications get data from the database(SQL server).
Once I update database from web application, how could I inform service application to reload data from database?
Right now our solution is to use service controller to restart windows service application. Is there any low cost solution, like communication between service application and web application?
By the way, my boss hate polling method...
If wcf is a choice, can anyone post some materials?
Thanks a lot!
you can implement workflow services that runs as a windows service. That service must have an activy that can be called over net.tcp request and processes your request. I'm using this solution and works fine.
Other way is the service use the database to check if it's necessary to perform the reload.
You can take advantage of Service Broker
In a nutshell: using the SqlDependency class you can wire up an event in C# that will fire whenever a table gets updated. At that point in time, you can re-load the new data.
Can I Call a function of windows application from wcf service function,The main purpose of the whole application is: Windows service will detect some event and will show something on windows form application for recognizing the event by the user. Windows service and windows form application should communicate with each other by WCF service.
Thanks in Advance.
Normally web-services are developed to be called by the clients.
To send messages to client, which is the Windows Forms application in your case can be done
Long Polling or
WCF TCP/IP bindings.
I have some console applications that communicate using WCF over TCP. Is it possible/easy to port a console application to Windows Azure, or must the application be hosted in IIS/asp .net?
Since you do not really log into a Windows Azure machine and see the screen as you could do with a local server in your network I guess you should only develop server side components or IIS Hosted services and web applications exactly as you said.
you could get the Windows Azure SDK: Windows Azure SDK and explorer the available templates and alternatives locally in your machine.
A console application can be started from a role - web or worker - and communication to that app can be via the InputEndpoint (HTTP, HTTPS or TCP).
I worked on a project that spawned a console app from a worker role, the role fed workloads read from storage queues direct to a WCF service hosted in the console application - using tcp.
I found that you can use startup tasks in the config file for Azure. That works.
Well i want to know how many architecture approaches we can use in asp.net web application. i was asked about it. i told him that i use a appcode for dal and bal and the presentation layer. but he was not convince. basically i want to ask what web application architecture an asp.net web application guru would use keeping in mind the different metrics ( i am talking minus web services or any SOA thing)
Classic 2 tiers app
Is the one you described: You have the client (the browser) connecting to the server (can be configured as several servers) running an ASP app with your AppCode classes acceding the database in the local network (or same machine)
n-tiers app
You can use WCF to delived n-tiers app where the client connect to the server and the server connect to WCF services running on the same server or in several other servers
Note: This is the short story and the naming is subject to debate.