XBAP, Click-Once or ASP.NET for barcode intranet application - asp.net

I'm working on a UI for a simple inventory system. The users will use a USB barcode scanner to retrieve an ID and then either retrieve information from the database about the scanned object or enter the new information. This will only be used within our corporate environment. I can't decide which is the best way to go with this. I would like to use this opportunity to take a crack at WPF.
I like the idea of having the users interact with a webpage but I don't like the idea of using the USB scanner as a keyboard wedge. I would rather use the service object so that I can capture the event. I thought about writing it as an XBAP running from our server but wasn't sure if it'd be able to interact with the scanner.
I want the flexibility to run this on any computer in the shop without having to install software locally and worry about different versions floating around. I would greatly appreciate some advice on this.

I would use ClickOnce Deployment.
I know you said you don't want to install anything locally, but it does take care of automatically updating the clients from a central location such as web server or file share. You can easily publish new builds right from Visual Studio. Each time the user starts the program locally it checks for updates and installs them, fairly transparently.
This would just be the UI and barcode interface, you could create a WCF service on the server for the actual work, i.e. database querying, business logic, etc.
We were in an almost identical situation in our shop, except it was a time-tracking application. We came up with a Windows Form application deployed via ClickOnce using a WCF service on the server. Its been working well and we don't need to go to each workstation to perform updates.

Related

Python QT on Azure

I'm using Python and QT (PySide) in a local application (which connect to a database on cloud Azure).
Now, my objective is moving this app on the web, in particular on Azure (I have an Azure subscription), simply transfering it on Azure, it's possible in some manner? I have not found examples on the web.
The important question is: is Python QT (app web) compatible with Azure?
Thanks
UPDATED ANSWER!
Yes, now you can. Well sort of. The mad mads at Digia have created something called "QT for Web Assembly" that can compile your whole app into something that runs embedded into a web page.
https://doc.qt.io/qtcreator/creator-setup-webassembly.html
You might have to rethink connecting directly to the database however, as thats simply not gonna fly with web-sockets (And honestly direct app to remote RDBMS has never been a smart move. Theres a LOT of things that can go wrong letting the internet connnect to your databaes). But you could at least keep the UI and rewrite the databaes layer to interogate something like a GraphQL (or whatever) front end to the data.
OLD ANSWER
I'm afraid your up for a nearly complete rewrite. QT is a desktop/mobile platform. It doesn't go anywhere near HTML/CSS except perhaps for displaying them in a webview component. Azure or AWS won't magically make it into a web application for you.
Your code as it stands needd to be rewritten in a web-first transactional manner. That is it takes a request, processes it, produces a result. To some extent websockets has changed this dynamic for a limited subset of use cases where interaction needs to be non transactional, and modern web app design hides much of the transactionality behind a web-services model, but 90% of web work is still very much transactional.
Database <---> Web server/Web app stack <--- Internet! --> Web browser
My suggestion is to pick up Django (or one of the other systems. If its just simple, Flask is another good alternative. Flask for simple apps, Django for the big stuff. Or use something else, you have choices here!, and start from scratch. Analyse your products function and start mapping out how to make this work as a database driven transactional system.
Theres no shortcuts here, I'm afraid.

How do I create an .exe (or similar) for a VS15 VB.net website?

I was asked by my client to build a basic website in Visual Studios 2015 that allows them to view mapping relationships between data. The entire thing is fully functional and tested. It is connected to a local MS Access database since it only needs to be a basic intro product.
The issue I am having is that the client requested the application as a .exe file so they can take it throughout the company and raise more funding for the project. I can't seem to find any options to build the program as an .exe or anything similar to that. VS15 seems to only want me to use Azure, which we do not have the funding to purchase. The solution to this does not need to be pretty, but it does need to be functional and portable. I developed the program on a PC, but the client has a Mac and wants to use that for the demos.
What do I need to do in order to give the client what they want without having to purchase something else or as for a server to run the website on? Is there any way I can allow the client to use the application without needing to run the entire program?
Please feel free to ask for any additional detail, as needed.
Thanks for your help!
-WS
The comments are correct - that's not exactly how this works. When you're hitting "play" in Visual Studio, it's using IIS Express by default: https://msdn.microsoft.com/en-us/library/58wxa9w5(v=vs.120).aspx
Your best bet will be to use that: https://learn.microsoft.com/en-us/iis/extensions/introduction-to-iis-express/iis-express-overview
However that is only for the "web server" part - you'll still need to deploy your application like you would another asp.net project - it will not be an executable though, it'll be served up as compiled html / js files and vb, etc
Once you have IIS express setup and running, you'll be able to hit that website like you do when debugging (http://localhost:SOMEPORT)

Windows Forms vs ASP.NET to create a Data Maintenance program

I am creating a application which is mainly used inside a office for data maintenance. It will be used to store data like work list, future works, reminders etc .All data will be presented to user in the form of grids. So it's all about data stored in SQL server database. There will be number of users accessing it and they modify data frequently. Also there will be so many options like an ERP program.There is no connection to internet is required for this program.
So in this case which programming language is better? Should I choose WinForms or ASP.NET? The main concentration to choose between this will be performance, ease of use, also it should support more function for grid controls etc. So which one should I choose? And what will be the advantage and disadvantage of both?
Some pointers:
WinForms
Good
No webserver to install, setup and secure
Bad
Installation of some kind required on each machine e.g .NET framwork, exe, assemblies, etc.
More difficult to rollout updates to the application
ASP.NET
Good
No installation on clients required
Can run on machines other than windows including mobile devices
Updates to the application can be published instantly to all clients
Bad
Have to use IIS or UltiDev Web Server to serve up pages
File system is more secure so reading and writing to files can be time consuming to configure
Unless you want to use jQuery and Javascript to add additional functionality to the Standard ASP.NET GridView I would say a Windows Form would be more suited, depending on the size of the data it will most likely offer better performance and you have much more control over the actual functionality of the program, rather than dealing with browser related restraints.
Not really a question for this forum... VB.Net is a Language and ASP.Net is a Framework. Do you mean should I create a client windows app or a web (intranet) app then this would depend on your strengths as the intranet option would also require HTML and possibly CSS/Javascript.

How to avoid chaotic ASP.NET web application deployment?

Ok, so here's the thing.
I'm developing an existing (it started being an ASP classic app, so you can imagine :P) web application under ASP.NET 4.0 and SQLServer 2005. We are 4 developers using local instances of SQL Server 2005 Express, having the source-code and the Visual Studio database project
This webapp has several "universes" (that's how we call it). Every universe has its own database (currently on the same server) but they all share the same schema (tables, sprocs, etc) and the same source/site code.
So manually deploying is really annoying, because I have to deploy the source code and then run the sql scripts manually on each database. I know that manual deploying can cause problems, so I'm looking for a way of automating it.
We've recently created a Visual Studio Database Project to manage the schema and generate the diff-schema scripts with different targets.
I don't have idea how to put the pieces together
I would like to:
Have a way to make a "sync" deploy to a target server (thanksfully I have full RDC access to the servers so I can install things if required). With "sync" deploy I mean that I don't want to fully deploy the whole application, because it has lots of files and I just want to deploy those new or changed.
Generate diff-sql update scripts for every database target and combine it to just 1 script. For this I should have some list of the databases names somewhere.
Copy the site files and executing the generated sql script in an easy and automated way.
I've read about MSBuild, MS WebDeploy, NAnt, etc. But I don't really know where to start and I really want to get rid of this manual deploy.
If there is a better and easier way of doing it than what I enumerated, I'll be pleased to read your option.
I know this is not a very specific question but I've googled a lot about it and it seems I cannot figure out how to do it. I've never used any automation tool to deploy.
Any help will be really appreciated,
Thank you all,
Regards
Have you heard of the term Multi-Tenancy? It might be worth look that up to see if that applied to your "Multiverse" especially if one universe is never accessed by another...
See:
http://en.wikipedia.org/wiki/Multitenancy
http://msdn.microsoft.com/en-us/library/aa479086.aspx
UPDATE:
If the application and database is the same for each client (or Tenant) I believe there are applications that may help in providing the same code/db as an SaaS application? ie another application/configuration layer on top that can handle the deployments etc?
I think these are called Platform as a Service (PaaS) applications:
see: http://en.wikipedia.org/wiki/Platform_as_a_service
Multi-Tenancy in your case may be possible, depending on client security requirements, with a bit of work (or a lot of work):
Option 1:
You could use the one instance of the application, ie deploy the site once and connect to a different database for each client. You would need to differentiate each client by URL to isolate content/data byt setting a connection string for each etc. (This would reduce your site deployments to one deployment)
Option 2:
You could create both a single instance of the application and use a single database. You would need to add a "TenantID" to each table and adjust all your code to accept a TenantID to ensure data security/isolation. Again you wold need to detect/differentiate the Tenant based on the URL to set the TenantID for the session used for every database call. (This would reduce your site and database deployment to one of each)

Where to start with web service development?

I am currently working on a project that is very new to me, and I feel a bit over my head as far as knowledge base is concerned. My request is for references and information to help me expand my knowledge base, as well as recommendations for technologies and methods.
I have experience primarily with Java, so all this Windows service stuff is new to me. I am not really asking for a how-to (but if someone has time....I wouldn't object :-P)
The project is as follows:
I am to develop an application in ASP.NET that runs as a process from start-up to shutdown. It will be checking some things in a folder, encrypting some files from that folder, and then check if internet connectivity is available. If it is available, it will be sending those files to a server (via a web service on that server, I believe). If it is not available, it will check every 'insert time interval here' to see if connectivity has become available, at which time it will send the files. Once the files are received by the service, the application will need to recieve some kind of confirmation from the server that the file associated with 'xxxxxxxxxxxxx' uniqueidentifier has been received.
Any explanation of the way that web services work or how to implement file encryption in a desktop app (resource load optimization is a very substantial requirement of this app).
Thanks!
badPanda
There are a couple of things going on here. First off it sounds like you are trying to write a service. Assuming you are writing code for Windows, and that code needs to run regularly and perform some tasks, and you want it to start and stop automatically when the computer is starting or shutting down, a service is ideal for this kind of task. Writing a service isn't too different from writing a normal application except that it has a few extra parts to allow the operating system to control it, and it typically has no user interface.
As far as interacting with a web service goes, typically a web service has a published WSDL (Web Services Description Language) which is just a fancy XML file that contains a description of the service. Most moden programming tools have a feature that loads a WSDL file and creates an object that communicates with the service for you. Then its as simple as creating an instance of that client object and calling the appropriate method. Typically using this created object is as simple as calling normal code, and the object does all the work of converting your parameters to a message, sending them over the network, waiting for the response, and converting the response from the web service back into a return value your client can read.
Encryption methods are going to vary based on operating system and programming language. To get any serious kind of answer you are going to have to add more details.
Really all of this is stuff you should be able to find with google, but one of the ironies of search is sometimes you can't find what you are looking for unless you already know what it is called. Try matching up terms like 'Windows Service' with your programming tools and throw in the word tutorial and you should find lots of good stuff to read. So if you are using Visual Studio and C#, a search like 'Windows Service Visual Studio C# Tutorial' should get you exactly what you need.

Resources