jeudi 21 avril 2016

Host web UI with executable application?

This may be a very stupid question but I have spent nearly 5 hours doing research on the web and found nothing to fully clarify my doubts. Finally I've decided to ask for the help of the community, I'm also sorry if the question is out of context but I just wanted some professional opinions.

Okay here it goes.

In few words I have been asked for a possible employer to develop certain executable application as part of a "Technical Test". Supposedly they're measuring my expertise working with WCF. I was given two days to develop such App and all the information about it is the following:

Deliverable:

                - An executable that

                                * When APP is ran, it should host a WCF service (SERVICE) as well as a

web UI (UI) accessible by web browsers.

                                * Through the UI, user should be able to add or delete messages stored in a

database (DB).

                                * The UI should also display the current list of messages stored in the DB.

                                * If changes are made to the DB, those changes should show up in the UI

without the need to reload the page.

                - All of the project source code.

               

Additional notes:

  • Use of existing libraries is allowed as long as they are clearly referenced

Now, I understand that you can host a WCF Web Service using a Console Application (among other options) and the Service will be alive as long as the application is running. I also know that any Web Application can access this service by just adding a Service Reference, creating a client of its type and calling its methods. My confusion begins when they ask me to put all together in one executable application:

When APP is ran, it should host a WCF service (SERVICE) as well as a web UI (UI) accessible by web browsers.

What is that supposed to mean?? How can I host a Web UI using an executable?? Am I supposed to develop something like IIS and at the same time somehow define the html and server side code on the APP?

I did some research and I found a class(HttpListener) that allows you to open an http port, listen and then send back some html thru it. A very simple class. If this is a solution I can't see how to implement it. Other than that I couldn't find anything else on the web.

I would appreciate any opinion on the matter, even if I'm not able to develop the solution in time I would like to know how to do it. And if I'm missing some important basic concept regarding WCF or Web Hosting please I would greatly appreciate some clarification. Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire