Can Windows desktop applications be developed using JavaScript?
I know about HTA (HTML Application) programs, but I'm curious if there is a more recent .NET or different solution that allows for integrating the DLL libraries from Visual Studio.
Can Windows desktop applications be developed using JavaScript?
I know about HTA (HTML Application) programs, but I'm curious if there is a more recent .NET or different solution that allows for integrating the DLL libraries from Visual Studio.
The most recent version of .NET does not include this particular feature, but there are alternative solutions available:
a) Utilizing a WebBrowserObject within either a WPF or Windows Forms application to embed an Internet Explorer browser.
b) Exploring Opera Widgets, a presentation engine based on the Opera browser that allows for the creation of desktop applications using standard Web technologies and adhering to the W3C widgets standard. These applications can function independently without requiring the user to open Opera, although Opera must be installed on the user's device.
There are additional options such as Mozilla XUL, although its limited support for desktop application development may restrict its usability in this scenario.
Although this question may be old, I wanted to provide an answer for those who may come across it while searching.
If you're looking to utilize the .Net framework in JavaScript, you might be interested in checking out this project. It essentially serves as a JavaScript interpreter with access to the .Net framework.
For example, you could try something like this:
jish.assembly('path/to/System.Windows.Forms.dll');
var mb = jish.create('System.Windows.Forms.MessageBox');
mb.Show('Hello World');
It seems to work well, although I haven't tested it extensively with more complex WinForms applications to confidently state its reliability in all scenarios.
If you give it a try, feel free to share your experience.
Edit 1: I further tested it with a slightly more intricate example, and it performed as expected. Give this a shot:
jish.assembly('path/to/System.Drawing.dll')
jish.assembly('path/to/System.Windows.Forms.dll')
var app = jish.create('System.Windows.Forms.Application');
var form = jish.create('System.Windows.Forms.Form');
var lbl = jish.create('System.Windows.Forms.Label');
form.Text = lbl.Text = 'Hello World!';
lbl.Location = jish.create('System.Drawing.Point', 50, 50);
form.Controls.Add(lbl);
app.Run(form);
Guido
There are various tools available that allow you to package javascript/html/css code into a cross-platform "native" application, complete with an installer and updating feature.
Here are a few options that come to mind:
Utilize local JavaScript in your application by using Mozilla's XULRunner environment. This environment is capable of leveraging XPCOM components, which can be developed using C++.
By building your application with JavaScript and XUL in Mozilla's environment, you can harness the power of C++ and DLL's in XPCOM components. This tried and tested approach has been used in desktop applications like:
One interesting feature is being able to incorporate WebKit into a WinForms application, which is the same HTML engine that powers both Safari and Google Chrome.
For anyone interested, there is a .NET control available for integrating WebKit into your applications:
My attempt to clarify this explanation is my best, as articulating exactly what I am trying to achieve is quite challenging: Initially, I have a list of names: { "Items": [ { "Id": 0, "Name": "Robinson" }, ...
I'm currently experimenting with socket.io on NodeJS and I am facing a challenge in figuring out how to activate the socket solely from NodeJS. Previously, I have been using socket.io by invoking it from the front end. However, I am curious if it is ...
Can you write a Java code in TypeScript that achieves the same functionality as the code below: Class<?> meta = Object.class; and meta = Processor.class; // Processor is an interface In TypeScript, what would be the equivalent of .class? Specifica ...
I have a project structure set up as follows: https://i.stack.imgur.com/bvmK5.jpg The todo-form component triggers the created event and I am looking to handle this event in the todos component. todo-form.component.html: <form class="todo-form" ( ...
I have created a regex for file paths with specific conditions: It must match the regex ^(\\\\[^\\]+\\[^\\]+|https?://[^/]+), which means it can be a network path like \server\share (optionally ...
I have been working on displaying markers on a map. When I fetched the data, everything seemed fine in Vue DevTools. The `this.markers` property also contains the data. However, to my surprise, the values for `lat` and `lng` inside the markers are showing ...
I am encountering an issue with loading all the elements of an array from my ExpressJS backend to my frontend framework OpenUI5. Despite having an array of 520 elements, only the first 100 elements are being loaded into the model. How can I ensure that all ...
I have implemented my higher-order component (HOC) in such a way that it can be invoked twice, emphasizing the concept of "functional programming". However, I am facing challenges in connecting Redux to access state and certain functions. I would greatly ...
Imagine having a contenteditable area with some existing content: <div contenteditable="true"> <p>first paragraph</p> <p> <img width='63' src='https://developer.cdn.mozilla.net/media/img/mdn-logo-s ...
I am searching for a solution to automatically close a component when there is a click outside of the element. I attempted to use an addEventListener for this purpose. Although it successfully closes the component, it encounters an issue where it fails to ...
Exploring the capabilities of the Animated component in react-native, I came across the powerful Animated.timing(); function which operates within a specific duration defined as duration: 2000,. While duration is useful in certain scenarios, I found myself ...
I need help passing in a searchTerm from a variable, what is the best way to do this? const mongoquery = { description: { $in: [ /searchTerm/ ] } }; I attempted it like this initially: const mongoquery = { description: { $in: [ `/${searchTerm}/` ] } }; H ...
Having trouble using ngReadonly within a directive, my code isn't functioning as expected: app.directive('jqdatepicker', function() { return { restrict: 'A', require : 'ngModel', link : functi ...
I have been working on developing a function that will return true if the argument provided to it is an instance of a JavaScript Map. When we use typeof new Map(), the returned value is object and there isn't a built-in Map.isMap method available. H ...
I have the following JavaScript function that creates a button element with a click event attached to it. function Button(id, url, blockMsg){ var id = id; var url = url; var blockMsg = blockMsg; var message; this.getId = function(){ return id; }; th ...
Looking for some assistance in creating a CSS pop-up with a touch of JavaScript magic. I've managed to trigger the pop-up box by clicking a link, and while it's visible, the background fades to grey. But I'm struggling to make the pop-up fad ...
I'm attempting to implement basic form validation using Laravel 5.3 and Vue.js. Laravel controller: public function test(\Illuminate\Http\Request $request) { $this->validate($request, [ 'name' =&g ...
How can I navigate users to the same page after an OAuth request to Twitter by setting a session variable? Here is how the routes are currently configured: // Authentication routes (function () { app.get('/auth/twitter', passport.authentica ...
This shiny app has a feature where users land on the 'Upload data' panel upon launching. To restrict access to the other two 'tabpanels', users must first upload both necessary files in the 'Upload data' tab. The condition for ...
My data text file looks like this: [[1412525998000,"91.83"],[1412525998000,"91.83"],[1412525997000,"90.14"]...ETC However, when I receive this data via an ajax request, something strange happens. The 'data' variable turns into this: 1412525998 ...