Can we convert standalone JavaFX application to WAR? - javafx

We've a stand alone application developed using JavaFX technology. Now we have a requirement to make it accessible using browser from remote machines(basically a web-app). I'm just wondering if there is any way to convert the said JavaFX application to war file so that it can be deployed on the web server. Any pointers would be appreciated.

A JavaFX based Application is an application that is running on a desktop. It's no server application that needs an application container or something. Therefore you should not build a WAR file.
By default you can't run JavaFX applications in a browser. You could use applet technology or webstart but this is a workflow that will create problems - wrong JRE version on client, etc. (Java Applets - is it a wrong choice today?).
The best way to build and share a JavaFX application is by creating an executable JAR or a native application / bundle (http://code.makery.ch/library/javafx-8-tutorial/part7/).
There are some prototypes that can be used to render JavaFX in the browser (by using HTML5 Canvas) but I would not use

Related

cross-compile ASP.NET website to desktop?

Is there a way to cross-compile or port an ASP.NET based webpage to a native Windows GUI?
I am developing a web app, with an ASP.NET webservice doing much of the grunt work, and an ASP.NET webpage as the GUI. I would like to also offer an "offline" version of the app that doesn't require teaching random people how to manage IIS. Some of my target users will not have internet access consistently when they want to use the app; also, I like not having to rely on an active web connection myself because I'm an old fogey and this web 2.0 stuff is just a fad, right?
The core of the app logic is a library that is disassociated from everything else - the service just provides an API (which I want publicly available for others to use), and that I use for my own app. I could go ahead and design a new GUI in WPF or WinForms, import my libraries and there you go, but I'm lazy enough that I'm curious if there's an automated solution. Or even a semi-automated solution.
If I can target not-Windows as well, that would be nice. I already have a console interface that I used in development of the core library that directly accesses them, which I'm still testing but should relatively easy to make work in WINE but if I can offer more support for offline use to non-Windows users I'd feel better.
You could run that web application on .NET Core in a self-hosted way. That way you get the full IIS feature set and there is no need for the user to configure anything.
You can then use a WebBrowser control to show the application as a GUI app, or just open the web site in the users installed browser.
.NET Core runs on non-Windows as well.

Angular + ASP.Net Core : Plugin Architecture

I am trying to build an Enterprise System that will evolve over time with features being added as time progresses.
I am planing to go with ASP.Net Core microservices architecture with Angular for the UI. I am unable to find a sample that shows how we can introduce new modules without changing any existing angular code.
I was able to do this in the traditional winforms applications using technology like MEF and dropping the dll in to a folder that shell watches and loads.
Looks like there is no such example using the Angular framework. So I was curious if its even possible to achieve an architecture as shown below?
Module are the asp.net core services that serve the angular files that the shell can render and Service are the logic services that are used by the applications themselves.
I did see this post, that is close to what I want to do, but I am not sure if this is even the right solution being discussed.
Any pointers appreciated.
I tried to implement a plugin architecture making use of ABP, Angular and ASP.NET Core: https://github.com/chanjunweimy/abp_plugin_with_ui
Basically, I developed angular plugins using different angular application, then I dynamically add them together.
More Information on how I achieve it:
I have 2 angular-cli application, 1 is the main angular cli application, and another is the plugin angular cli application. The problem we are facing in Angular-cli plugin architecture approach is how we integrate them.
Right now, what I did was, I run ng-build on both of the applications, and put them into a "wwwroot" folder, which then hosted in a ASP.NET core 2.0 server.
abp_plugin_with_ui is a repository which works on developing a plugin which contains both the backend and Angular cli. For the backend, I made use of the aspnetboilerplate framework, which the frontend is developed using multiple angular-cli application.
To have the main application integrated with the plugin application, we have to run "ng-build" on both of the application (note that we have to change to href of the plugin application as well), then we move the built contents of plugin angular cli application, to the main application "wwwroot" folder. After achieving all this, we can then run "dotnet run" to serve the ASP.NET Core 2.0 Web Application to host the static files generated by "ng build". In this approach, plugin Angular UI applications are independent from the main Angular UI application: they are connected using IFrame.
Recently, I realized that we could create components on the fly, which means that maybe it is better to download the "NgModule" and create that module dynamically instead. This option is better because plugins UI would directly integrated into the main application UI. I am still trying out this method.
Another option suggested by #bruno was to develop the UI in SOA instead. This means that, we could choose not to separate the UI into plugins, but separate them into modules as independent service instead. You need to have a so-called "IT/Ops Client" that could help you manage what view to show in the UI, and the main UI is just a frame/template that will show what "IT/Ops Client" want to show. Using this way, we could register these services, and chose what service to be used. This is the microservice architecture and might be closed to what you want. The microservice expert Udi Dahan has a post blogged about this (link: http://udidahan.com/2014/07/30/service-oriented-composition-with-video/)

Deploy Web-Api, Asp.net project and a Windows service in one msi project

Is it possible to deploy ;
1- a web-api project
2- a website written in Asp.net
3- a WCF service as windows service
in one msi file using/in Windows Web Installer Project (preferably) or in Wix ?
Yes, it is possible using WiX. I maintain an open source project called IsWiX that even makes it somewhat easy. See:
Create and Package a Windows Service using IsWiX
IsWiX Web Site Demo
The concept behind IsWiX is project templates (scaffolding) and graphical designers that give you a project structure and most heavy lifting for your WiX MSI project. The template already contains examples of IIS configuration that merely need to be uncommented out. If you need a Web API and a Web Site you'll have to clone that part of the code and make a few adjustments. For example a static website typically won't be a web application where a web-api will be. Then you'll use the services designer to define the windows service. The fact that the service hosts a WCF endpoint really doesn't matter.
For that matter, one of the really cool things about WCF is it's possible to eliminate your dependencies on IIS. I've seen solutions using this with no dependency on IIS and this really makes creating installers a lot simpler.

Make Desktop Application Web Interfaceable

Is there a way to make a desktop application easily interfaceable via Web ? Meaning, can you have a way to interface with a single desktop application as if you were remote desktop'd into the machine but not? I am looking at doing this in ASP.NET or Silverlight.
I'm not sure if this is exactly what you are looking for...
If you were able to create your entire application UI in Silverlight and host it properly (in IIS or whatever) it would then be accessible from anywhere on the web. If you needed the perception of a real desktop app when running locally, you could then just make some simple app (WinForms, WPF, whatever) which contains a web browser control that could also load up the hosted Silverlight app (and just be a transparent browser). Depending on what the application is doing, you would obviously need some sort of service layer (probably in WCF) do to all of the heavy lifting and data access.
I guess the main question would be: can you accomplish everything your application needs to do in Silverlight? Since Silverlight is meant to run in a browser, it can be very limiting.
There are many solutions based on plugins. Some of the popular ones:
Citrix
Spoon
If you're ok with plugins, but only if they're common ones (flash, java), there are various solutions:
http://www.wizhelp.com/flashlight-vnc/
http://www.tightvnc.com/doc/java/README.txt (bundled java applet with TightVNC)
If you don't want plugins at all, there's an experimental HTML5/javascript VNC viewer:
http://guacamole.sourceforge.net/

Can I use an XBAP in a ASP.NET Application?

The problem I started with is that I want to display in an ASP.NET application a 3D model.
First of all I thought of Silverlight, but Silverlight 3 does not support 3D rendering. WPF does, so the next step was creating a demo for an WPF browser application.
The 3D surface was rendered, but how can I include it in the APS.NET application? Furthermore, what would the web server need to have installed in order to load and run the XBAP? Is there any way that I can access from the XBAP server objects like Session?
You can't embed an XBAP directly in HTML, but you can put it in an IFRAME. The server doesn't need anything specific, the XBAP will run entirely on the client. You can even deploy it on a Linux server with Apache...

Resources