web application with local webserver on client machine - ruby-on-rails-3

I have simple web application built on html5 and RoR. It is simple application where user records his voice(html5 web audio) and then it is saved locally. Application won't be hosted on server instead it would be hosted on individual user machine. I need to develop some portable package like exe which will be run on Windows and Mac.
Is this possible? If yes, then what are the ways to achieve it?

You might find some useful info here
Here are some more recent tools

Related

Using Electron based app as a web server

I'm developing a cross-platform application (Windows/Linux/macOS), which:
Should be able to run locally as a desktop application
Should be able to run on a remote machine, preferably with the same UI as on local.
So far Electron looks good enough for the first bullet.
The question is about the second one. I'd like to reuse both the logic and the UI from the local scenario for the remote scenario. In other words, I'd like to use Electron based application as a web server and connect to it via browser.
Is there any way to do that?
You can create a remote web server without Electron, just with Node.js, and deliver a web page like a PHP server for example.
But if you want to deliver a complete remote UI and manage the window remotely, that's VERY complicated to do... That needs to configure a lot of things and manage connections between client and server, using asynchronous keyboard & mouse and encryption to secure the communications.
You want a hybrid app I think, like a few of them that out out there (i.e. Slack). Generally there's a web app plus an Electron client version with some shared UI code but it's not Electron all around. The main point of electron is to be a local web server acting as a desktop app. You could certainly keep it all node though.

Windows application server communication issue

I recently developed a windows phone application using phonegap(HTML5, CSS) in visual studio and generated the deployable XAP file. When I registered my device with my developer account I was able to install my application locally and was able to do server communication as well. But when I submit the same XAP file to store and then download from store, the server communication is failing. As this issue is observed only at store I am not able to debug the issue.
My question is how can the same application show different behaviours when deployed locally & downloaded from store.
Note: I am doing ajax requests for server communication.
Please let me know if some permissions need to be given while submitting to store or any work around needed from me to fix this issue. Requesting a response soon.

Deploying an application server to a server

I am building a client-server application, this is all running locally on my computer whilst I am developing the system. However, eventually I would like to deploy the server-side part of the application to a server to run 24/7, enabling client applications to connect and consume the service at will. What I would like to know is, when I come to doing this would I simply just install the server-side application on the server, hit run and that's it? That just seems... well not right (to me), is this the way it is done? or is there a lot more to it? I imagine there is, but I can't seem to find any content on this subject.
FYI - the server is a self hosted WCF application.
You'd want to take your program's executable, support dlls and config files and drop them into a folder. Then create a Windows Service to run the program; if you don't use a Windows Service, the program will only run while you're logged on, which isn't good. As a Windows Service, a reboot of the server will bring the program back online even if you're not logged on.
Here's a knowledge base article from MS on how to make a windows service.
http://support.microsoft.com/kb/251192
If you're program is compiled as a DLL, then create a small .exe program to run it (a wrapper) then deploy the program as described in the article.
Good luck.

Accessing the C:\ drive on azure VPS with ASP.NET

Basically I have a asp.net site hosted on windows azure, and I also have a virtual machine hosted there. Is it possible for me to read/write files to the disk on the virtual machine from my website?
I'm using ASP.NET MVC 4 if that's any help at all. Sorry for the possibly vague question, if you need more info i'll happily try to provide it.
Thanks in advance!
Sure. Since you want to access the VM's drive, and you have complete control over the VM it's easy.
Server
Expose your VM's drive using WebDAV. It's a HTTP API for file sharing.
Here's a WebDAV setup guide for Windows: http://mythoughtsonit.com/2013/05/deploy-a-file-server-in-the-cloud-webdav-on-windows-azure/
Client
If you are using Windows Azure Websites (very restrictive), your only option on your ASP.NET site is to add C#/VB code to read/write from the WebDAV share. Here's some .NET WebDAV clients:
https://github.com/kvdb/WebDAVClient
http://webdavnet.codeplex.com/
http://www.independentsoft.de/webdav/
If you are using a Windows Azure Cloud Project and have a Web Role (more flexible), on that web role you could make a startup task which maps the WebDAV as a network drive and use normal System.IO.File code. I think this is easier than the WebDAV client stuff, but it's up to you.
I came to a similar conclusion to #Yoshi. However, when trying to map the share to a drive on the instance hosting the web role via a startup task, I found that this requires WebDav client to be installed. This is installed as part of the Desktop Experience feature. To date I have been unable to install this using a startup task as it requires a reboot.
I have tried writting a startup task that includes the steps from this article but cannot get it to work so far.
Has anyone else managed this?

Out Of Browser Silverlight app with local offline database and WCF-RIA

I have the following scenario:
We develop a silverlight 4 app for our customers, that will be used as an out-of-browser app. The app is working offline, i.e. app and database are on the users local machine. The app is using WCF-RIA-services to connect to the local database. The database will be an SQL Server Express, SQL Server CE or MySQL. We are using MVVMLight and MEF.
An external webserver is only used for updating the app from time to time or adding new modules to the app. To achieve this we do something similar as shown in Jeremy Likness blog (http://www.wintellect.com/CS/blogs/jlikness/archive/2010/05/25/silverlight-out-of-browser-dynamic-modules-in-offline-mode.aspx )
The reasons why we are doing such a scenario are complex. But to keep a long story short it is mainly for compatibility reasons for a later online version and we don't want to use WPF. So we need to get this working with Silverlight and WCF-RIA services.
Ok, that's the scenario and here's the question:
Do we need a local webserver in this scenario? The app is programmatically installed as out-of-browser, the database is local and connected via WCF-RIA.
If yes, which webserver would be sufficient? It should be installed and configured via an initial setup that is executed by the customer. The customer should not have to do anything with configuring the webserver.
Any other ideas or comments on this scenario? Any other possible solutions for this?
Thanks for your help
Dirk
silverlight wasn't meant to be used this way I think. So it would be like when you are developing app in visual studio and use Cassini to see result - everything runs locally - but you still need a web server. Maybe more info here - http://www.infoq.com/news/2010/06/WPF-vs-Silverlight
I´m not able to provide with a full answer to your problem, as we are currently facing the same problem. (WPF not being cross-platform, Very specific hardware on some clients)
But I may share some of our thoughts on our type of Thick-Silverlight-Client:
To keep deployment etc. simple we use a self-hosting process (installed as background process)
We may not use RIA as the background process has to run using Mono VM (but for MS-only solution see Can WCF RIA Services be self hosted? )
Architectural thoughts on standalone "Clients":
Depending on your requirements implementing a server for each client communicating with the "main"-server by messages (NServiceBus) may be overkill. But if you want to use a client database if offline and silverlight for ui you should consider using an event-driven-architecture.
There is a slideshow on combining "Event-Driven-Architecture" & "CQRS" with Silverlight. But i would not use it as a blueprint more like an inspiration.
http://www.slideshare.net/dennisdoomen/cqrs-and-event-sourcing-an-alternative-architecture-for-ddd