4

we have an APP, that uses many local resources, such as windows printing API, windows registry, some Active X to connect to POS devices(to pay money & get receipt, the price is sent from APP), Barcode printer to print labels, RFID devices to read & write some data. The application is written with .Net framework 3.5, and uses some new features of .Net framework (e.g.: WCF). The forms in app are very heavy forms(7 of them are essential), in each form, there are over 100 Textboxes, combos, radio buttons, panels & many other controls, that according to need of user are shown or hidden, disabled or enabled, filled & cleared, many many times.

After the user does the work, prints most be sent to previously selected printer automatically, labels most be printed by barcode printer, RFID & POS devices are called if neede.

The problem is that now we need a web base version of this. the reason is that there are an administration department who needs to be aware of any transactions online (there is a dashboard software). In the WIN APP version, we use WCF to send & receive new data (something like replication happens).

According to my searches, there are 3(even 4), way to accomplish this goal, as below.

  1. Using WPF technology

  2. Using Clickonce

  3. Using Pure html + Active X(meaning asp.net, very heavy javascript & Write Active X)

  4. Hosting windows forms controls in IE

WPF’s XBAP is good, but: It needs to download all dll’s to local machine & then start the application. This also happens every time a new version is uploaded to server. The sizes of dll’s are about 5meg. Also there is a risk that a user can disassemble the dll’s. Also we need to sign the assemblies in order to be able to use win API’s, and the user need to add the site to its secure site.

The main disadvantage is that WPF is not actually in Web architecture, I mean, dll’s do calculations on client side & the server is only responsible for saving entities (& does some validations). refer to https://stackoverflow.com/tags/web-applications/info

Clickonce: No idea at all, we can deploy App(the WPF version or windows forms version) as a clickonce app, but the server is only responsible for updating new versions of software.

Pure web & HTML + Active X: This is the time consuming work, everything seems to be ok, but actually we need to be JQuery & AJAX masters & I think most of time is spent on debugging javascript. Also only IE can run the App @ all, because of Active X controls in page.

Winform in IE: Not a good choice at all, but we can do this, the output is works only in IE, also the rendered UI, is in very bad style.

There is also another way, may be a hack, when we develop with pure web, we can write some WCF services to do the hardware part(commiunicating with hardware, local resources & other things) & install them on clients(run for example with cassini). So when we need for example to work with hardware & local resources(POS, RFID, Registry & others), we can call them from our site with the web service call(that points to local host).

Which of these are good choice & what? Is there any other solution? any idea can help.

many thanks.

Community
  • 1
  • 1
ahmad molaie
  • 1,512
  • 2
  • 21
  • 41
  • 2
    Silverlight would probably be a good choice given the web requirement. – BentOnCoding Jun 10 '11 at 19:40
  • Are the devices - POS, bar-code printer, RFID, etc. attached directly to the client PC? – n8wrl Jun 10 '11 at 20:05
  • I think that the devices are connect directly to clients. – masoud ramezani Jun 11 '11 at 10:20
  • yes, the devices are connected directly to clients. – ahmad molaie Jun 11 '11 at 14:58
  • 3
    I highly recommend againts using ActiveX controls on the web. Encode them in a silverlight app. We have the nightmare of refactoring away activeX controls because 4 years down the line they wanted cross browser support. – Raynos Jun 11 '11 at 20:10
  • Yes, Cross browser support is also a big concern. there is a paragerpgh in RFP about this! we are testing the silverlight now, and i say the result here. – ahmad molaie Jun 12 '11 at 08:24
  • 2
    using SilverLight and jquery in client side may be good Solution – DeveloperX Jun 13 '11 at 06:49
  • we test the silver light, **i like only one thing about silver light. not requiring to install .net framework. it needs only himself**. but one thing that is important to me is that it seems to have very deep works & releases ahead with breaking changes that is not good @all. i myself like something like .Net framework 2.0, who at least has no breaking changes over the 2 or 3 years! & when coming to next release(3 & 3.5), they use the same runtime. – ahmad molaie Jun 20 '11 at 08:59
  • @Ahmadmolaie don't use .NET 2, use .NET 4. There are only breaking changes if your using deprecated code. Deprecated code is deprecated for a reason, it's inefficient / insecure / etc. .NET 4.0 however is significantly more future proof. – Raynos Jun 20 '11 at 09:21

2 Answers2

1

I'm not sure I understand all of your requirements correctly. It looks to me that all you need is a service component that tracks the transactions. Rather than rewriting everything as WPF/SL, why not modify your current application (you didn't mention the technology used nor if you can modify it) to log any transaction to a service endpoint.

The service endpoint records the transactions in a database (e.g., WCF over https, storing data in SQL Server). From there you can either expose the information as part of the dashboard software you mentioned, or you can create your own reporting application using something like ASP.NET MVC.

Philipp Schmid
  • 5,778
  • 5
  • 44
  • 66
  • i mention the technology, but again:we use .net framework3.5, Report viewer, WCF & WPF, also there are some active x's for connecting to POS devices, Other things like Barcode Printer & balances are connected through COM Port, there are many old Eltron barcode printers(TLP 2642, 2742) that work only with COM port. the final note is that the problem is not writing service components or not, it is to connect to local devices from a web app & using them. – ahmad molaie Jun 20 '11 at 08:39
  • The Dashboard software also is not important here, that is for another company & team. it was my description for why we need to switch from a distributed, Async App who uses WCF for send & receive data & updates to a web base one. – ahmad molaie Jun 20 '11 at 08:48
1

Cleanest solution may be to go WPF for the presentation tier (silverlight will require an additional step to access the local machine) and click-once (just because you are considering click-once doesnt mean your server is now just a distribution mechanism, also correct me if im wrong but you can also include the .Net runtime as part of the click-once distribution package)

Also just because its WPF doesnt mean all your business logic needs to be downloaded with the client, id collect your business logic server side, at least the sensitive stuff and call it via wcf -with security of your choice-.

EDIT

Some useful links

Community
  • 1
  • 1
almog.ori
  • 7,839
  • 1
  • 35
  • 49
  • I absolutely agree with you, but may be in another phase of project we do the separation of sensitive stuff from UI. you now! that's because we dont have enough time. – ahmad molaie Jun 20 '11 at 15:12