I have been looking at OpenLaszlo. I could not find how to deploy a solo application..
What do I have to copy or what programs do I have to run?
I know the deployment type can be dhtml or flash...
Thanks in advance.
For SOLO mode, you take the OpenLaszlo .lzx source "program" (expressed in XML format) and "compile" it into an Adobe Flash .swf file using the lzc utility.
For example, a hello.lzx source would be compiled as follows
lzc hello.lzx
into a Flash application called
hello.sw8.swf
Then you simply embed the .swf into an HTML page as you would any other Flash content. The client browser must have the Adobe Flash Player version 8 or version 9 to play the .swf Flash application.
To see the Flash application work right off the disk of your development machine, just point your browser directly at the local .swf file and it should show up in the browser.
The OpenLaszlo documentation contains a section with some information on how to deploy an application:
http://www.openlaszlo.org/lps3.4/docs/deploy/deployers-guide.html#deployers-guide.steps
There's another section in the docs describing the SOLO and proxied deployment mode.
http://www.openlaszlo.org/lps4.9/docs/developers/proxied.html
The documentation can be a bit confusing, since it has not been updated over the past years.
The simplest way to deploy an application is to use the developer console, which is displayed below the OpenLaszlo application in the browser. You'll see a "SOLO" button in the console, which will start the process of generating an embedding HTML page for you OpenLaszlo application, bundle up all static resources into a ZIP file, which can be processed by automated build scripts to generate a new version of your software.
All the compilation and deployment steps can be run from the command line using the "lzc" command for compilation, and the "lzdeploy" command to generate the deployment ZIP file. Both tools can be integrated into Ant. The commands can be found in folder
$LPS_HOME/WEB-INF/lps/server/bin
Check this blog post in the OpenLaszlo project blog for more information on the lzdeploy tool (which does not seem to be documented in the official documentation):
http://weblog.openlaszlo.org/archives/2008/04/lzdeploy-new-command-line-utility-for-deploying-solo-applications/
There has been a similar question regarding automated builds of an OpenLaszlo SOLO application using Apache Ant. The answer contains a full build script to compile either an SWF or DHTML/HTML5 application, including all required resources. The discussion can be found here:
How to build an OpenLaszlo DHTML application using Apache Ant
Related
to gain more experience coding and support good projects, I recently got into open source projects and Github. After looking for a project I would like to work on, I found Soundnode (https://github.com/Soundnode/soundnode-app). The project uses NW.js, Node.js and Angular.js.
The question is very fundamental: How do I run the NW.js desktop app from the given files?
I was able to compile the app once, using the bash command open -n -a nwjs --args "/Users/example/path/app". But how do I compile the changes? After changing the index.html file, which is the start for the application, I have to terminate the NW.js app and start it up again (otherwise nothing will happen) and then it opens again the same, unchanged, original app (I changed some html text to see if would load the changed index.html).
Could anyone give me a quick guide how to work with this? What I want to change and everything else I will try to figure out on my own. Just need somebody to give me a head start :)
Best Regards, bbrinx - eager to learn.
nwjs application works next ways:
direct load web files from FS or web
archive files to zip package.nw
Check nwjs manual and docs: http://docs.nwjs.io/en/latest/ and https://github.com/nwjs/nw.js/wiki
Easiest way to compile your app is to use Web2Exe. It can compile for Win, Mac, Linux.
You can use browser tools for developing/debugging your application. Set toolbar option in true in window section in package.json file to see browser elements in your app.
I am working about embedding a JavaFX GUI in a web application and I have this issue: the application launched standalone without using the jnlp file is faster than when it is launched by the web application using the jnlp file.
Some details:
The jvm is the last stable 1.7u40
All (also the application server) is running on my pc
All used jars are signed by a certificate I signed using a CA created by my self using keytool.
I set <update check="always" policy="always"/> on the jnlp file
The download policy of jars on jnlp file is lazy
On the web I found nothing useful or explaining this behaviour. My suspect is that the jnlp start my application and something more, I will do some check about this.
I am open to any suggestions.
Thank you
Update
I found that the JavaFX GUI is slow only if it is embedded in the web page: if I call from the web page dtjava.launch(that executes the jnlp standalone) instead of dtjava.embed(that embeds the GUI in the page) all seams to work quite good.
The question persists why is it slower embedded?
I want to build set of tools for my team and they will be as part of JavaFX application for which GUI will be build with help of SCENE BUILDER. I have seen everything that was available but I need an example how to embed this type of application on the server from which it can be invoked somehow. Please help with examples and links. I'd like to make it look as this one. http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html
Thank you.
Place a copy of the jar, jnlp and html file output by the NetBeans JavaFX project build or JavaFX packaging tools deploy command into a directory of your webserver, then access the html file in your browser.
For example, let's say you called your application MyPowerApp and netbeans output MyPowerApp.html and you wanted to deploy that to a local Tomcat server:
Download and install a copy of Tomcat
Copy the jar, jnlp and html file into tomcat's webapps/ROOT directory.
Start tomcat.
Access your application via http://localhost:8080/MyPowerApp.html
The applet will start automatically and you can click on the link to launch the application via WebStart.
To update the application just rebuild it in NetBeans, copy it over into the tomcat webapps/ROOT directory and refresh your browser link (no need to restart Tomcat).
In practice you will want to modify the html rather than use the generated html to embed either the applet or WebStart link somewhere on your website (you won't need both execution modes in a single page like the Netbeans generated sample).
You may need to sign your application if it refers to needs permissions outside of the jnlp application sandbox.
To get the application to fill a browser window like Ensemble, it's height and width need to be set to 100% and the HTML page template modified to not have any page margins (view source on the Ensemble page for a sample).
You can include your fxml in your application jar and load it from there or you can load it off your server relative to your application deployment directory.
The information above is a variation of my forum answer on deploying JavaFX web applications to a server.
See the JavaFX deployment guide and Ensemble sample application source for more info.
deployment guide
deployment QuickStart
ensemble sample application
JavaFX sample application source at the JavaFX demos and samples link
I am using YUI to test my JavaScript app, and want to integrate the test results into my CruiseControl build system. How can I use CruiseControl to run the tests? I initially thought about using the JUnit plugin to drive the tests, but that is a no go.
Does anyone else have this working?
(Please note: Changing either YUI or CruiseControl isn't an option for me.)
We have YUI Tests integrated with Hudson for our CI builds. The process should be pretty identical for CC, since we kick off the testing through a Java task in ANT.
We have a selenium driver (a java impl - we're working on making it public) which talks to a SeleniumRC instance, pointing it to the HTML files in build workspace to run tests.
You could take a stab at writing your own selenium driver:
http://seleniumhq.org/docs/05_selenium_rc.html#learning-the-api
The driver code talks to a SeleniumRC instance, and asks it kick off a browser pointing to the YUI Test based HTML test files from the build.
The HTML files run YUI Test Runner on load, and the driver injects code on page load, to pick up test results from YUI Test Runner when it's done running, and store them as files for Hudson to parse.
Regards,
Satyen
YUI Team
My solution, in the end, is a bit of a hack.
I modified our test runner HTML page to post the test results (the entire XML object that it creates) to a PHP page, then to close itself.
I added a PHP page to the build server (with a PHP processor attached to an Apache HTTPD instance) to accept the posted XML document and save it to disk.
The unit tests are now run by a 'test driver', which fires up a browser with the test runner HTML page, and waits for the browser process to end.
This gets the output of the tests onto the local disk of the build server. I then merge the output file into the CC log by adding the following to the project configuration:
<log>
<merge file="path_to_file" />
</log>
There are a few drawbacks, but are (currently) willing to live with them:
Had to introduce a test runner app to the infrastructure
Had to add an Apache server and PHP processor to the build machine
Because only IE will allow a browser page to close itself without a user prompt, the build server must be a Windows machine.
I was going to try Subsonic, you can generate DAL with buildProvider element in an ASP.NET website project. But I get curious why Web applications or windows applications do not support BuildProvider.
PS: I know for Subsonic there is one other option to use it with other than BuildProvider, but I just get curious.
It doesn't work because of the different way things are compiled in web application projects vs. website projects. From what I read on MSDN, it has to do with the fact that in web app projects, all your code files are compiled into a single assembly using MSBuild before deployment, but Build Providers are used to generate code that is compiled at runtime (from your App_Code folder).
In website projects, all of your code is compiled at runtime so it all plays nicely together.
You could possibly hook it into your pre-build event, and call the sonic.exe with the proper command line.