OK so, let's say I have a Java applet that takes a while to load (~5 secs). It's getting the mysql-connector.jar and it's loading. Well.. instead of the gray box with the coffee logo... can I make it have a simple progress bar with the percent?
Thanks.
If you need the mysql-connector it seems like your application is fairly complex, and that you should, at least consider, using java webstart. From the faq:
How does Java Web Start relate to Java Plug-in Technology (applets)?
The two approaches are very similar. The key difference is in the user experience. If the Java application/applet needs to interact with a web page and be tightly bound to a web browser, then applets may be the solution. On the other hand, if browser independence is important, then Java Web Start is the deployment platform of choice.
If you really want to do the progress bar, this page describes a solution, but it's not trivial by any mean.
Related
So, I have a fully functioning html/javascript/css web app, not sure if that's the right term, it works fine and dandy in a web browser.
The thing is I now have to move it OUT of a browser, OFFLINE, and to the "desktop", make it a standalone app. I would have to somehow wrap it in java/c++/python something, to make it run like that.
I really like Java since that is the language I know out of that list. I have looked into Rhino & Gecko. I haven't really found anything that is a nice plug and play. Like here is my .html file now run with it. I assume it would have to be in a swing window or something too.
Any hints/help/comments?
(As per request, I reposted my comment as an answer.)
The Atom editor is built using only web technologies, and uses the Electron framework (based on the Chromium browser) to run as a standalone application, with no external browser dependencies.
It looks very easy to set up something similar yourself, and basically just requires you to put your files in a special directory. (Electron uses a lot of space, though, so it may not be practical for distributing applications below ~20 MB.)
If you are really looking for an option where you just point at your current html and are off then you might just want to configure run a local web-server. It changes almost nothing about how you are running your application except where it is being served from.
I've inherited a Java web app that actually uses a Silverlight XAP for one small section of functionality, which allows users to upload large batches (1+) of images to a directory on the server.
The business requirements are provided in more detail below, but can be summarized as follows:
Users must be able to upload multiple images at the same time - if the user has 500 images to upload they shouldn't have to click a button, select the next file, and click "upload" 500 times; they should be able to select all 500 files from the local file system and upload them as a single "batch"
The file upload component must be AJAX or AJAX-like (does not require a page redirect/refresh)
The developer who chose Silverlight did so because:
He knew C# and used to be a Silverlight developer ;-)
Silverlight does meet those requirements
Silverlight has (according to him) better browser coverage than our JS technology (jQuery)
When management found out that Silverlight was chosen (which they only did during this hand-off!), they flipped out because Microsoft/Silverlight is not a part of our standards/platform.
I've been asked to research what it would take to re-write this in something that isn't Silverlight and is standards-compliant. We're a Java camp, and have been given the following acceptable candidates for technology selection:
Any Java view technology that could satisfy these requirements (GWT, maybe even JSF?!?) - this would be my preference
JavaScript/jQuery/QooxDoo/etc.
Applets (ehhh...)
Flash (I have no experience developing Flash/Flex and prefer this the least but will entertain the idea for the company's sake)
Of course, developer skill sets weigh-in heavily. The project has been handed to me and one other developer. Both of us have decent JS experience, strong Java and JSP background, but zero Flash.
The most important thing here is that a user can have the following experience:
They click a button (which would be a part of this component) that reads "Select Images"
A modal dialog pops up (modality is my personal "requirement", but not mandatory though)
Dialog allows them to pick a folder on their local file system, and select 1+ image files from inside that folder
Dialog has an "Upload Now" button, once user clicks it the dialog disappears and the component shows a progress bar of each photo being uploaded, sequentially
I've spent all afternoon researching GWT, JSF, ICEFaces and jQuery, and they all seem like they could handle these requirements, but I have not seen anything that assures me.
My question is: is there a Java solution that can accomplish this, and if so, what (GWT, JSF, RichFaces, etc.)?
If not, then can jQuery or any other JS lib do this?
If not, do I have any other options besides applets or Flash (and, of course, Silverlight)?
I would honestly rather consider pitching a new technology to our Enterprise Architecture committee than to do an applet (which is the anethma of Java development) or Flash (which I would have to learn from scratch).
Thanks in advance for any nudges in the right direction!
Edit
I know many of you may be tempted to answer by suggesting completely different alternative solutions. Please see my comment to #GolezTol's answer, but basically these constraints are hard-bounded and beyond my control.
Java must be installed and available too. But if a use should be able to upload 500 files, I would choose to give them an FTP account, or upload the files in a compressed format like a zip file, which I think any OS can create natively. Java, Flash, Silverlight.. All of those are components that are not always available. And I don't think a web interface is the most suitable for uploading so many images.
Im trying to resolve following dilemma. I have to develop whole webpage system(with user friendly content management, it should look like very simple Drupal or Joomla) as a project to school. The webpage should have function of adding and removing articles, editing menus, editing whole webpage layout(header position, menu position etc).
Im in phase of deciding which system would be the best for this purpose. I wrote several applications in GWT. It's very quick to develop something, it works on Tomcat etc. So it could be very good adept for this task. But recently I got an idea of writing whole webpage system in JavaFX 2.0 (webpage would open inside the browser).
What is your opinion about this fact ? Should I use JavaFX or GWT? I'm not sure if whole webpage will be quick enough in JavaFX. If the users that will be visiting this page wont have problems with launching this page etc. I havent found any information about this on the internet.
Thanks for your answers :)
Go for GWT (also consider using Vaadin or SmartGWT). It does not require a Java Virtual Machine to be installed on the client. Also, GWT allows the client to download only small pieces of the application, and not the whole thing.
You cited two Content Management Systems like Drupal and Joomla that are written in PHP, so maybe the best solution for you is a CMS written in java like Alfresco or Magnolia.
do you want to do a web page or an applicatin for one plugin ? GWT of course.
GWT
GWT follows a most innovative approach: you write the entire application in Java. But it’s executed in Javascript. A good portion of your code is cross-compiled to Javascript and uploaded to the client.
Judging from the presentations I’ve seen, this approach works surprisingly good. In former times the GWT compiler used to be slow, but today, they seem to have solved (or at least alleviated) the problem. As far as I can see, GWT is an excellent choice
javafx
JavaFX 2.0 is a pretty new GUI framework. So expect a few glitches. The good news is that it’s likely to improve over the years. And I suppose people will start to write JavaFX component frameworks if JavaFX is going to be popular.
There’s a video showing the domain of JavaFX very clearly.
Container terminal monitoring with 3D JavaFX
Source
I've implemented an interactive map applet, which is embedded in a web application. The application uses some Ajax, but has a predominantly page based structure.
The problem is, navigating away from and back to the page containing the applet causes an applet reload, which takes several seconds.
Possible ways to alleviate this problem I thought of are:-
Make the applet run continuously in a separate browser window (I lose integration with the main web app though)
Convert the web app to use Ajax exclusively to avoid page reloads
Implement the map view as a standalone desktop app
If there is some way of preventing applet reloads in the browser I would be very interested to hear about it, but I don't think this is possible due to the applet lifecycle.
I think that you enumerated all options, their advantages and disadvantages.
I'd like to suggest you a combination of options you suggested.
You can separate you applet into 2 components. First, heavy-weight application that will be started using a java web start. It will contain all application logic and will run in minimized (or even transparent) window. It will prepare image and send it via network to light-weight applet that just shows it.
I this case you do not loose your application integrity: map is shown in browser. The applet is very light weight, so it starts fast. The stand-alone app implements the most of programming logic.
Here is how to make window transparent: http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/
I recently played around with the SWT browser widget (which is great). I am wondering if I could write a full desktop application with it (with java services behind - e.g. persistence) and what drawbacks I would have to consider. The advantage would be that people without java knowledge could work on the gui. Of course it depends on the requirements and I know that this is not a very specific question. But mabye someone already tried to build a bigger app this way and is willing to share insights.
Thanks
Marcel
I'm not sure I share your opinion of the SWT browser widget. AFAIK it's merely a shell into the default browser on your machine, merely with a few API access points. I've used it for minor things when I needed to show a web page from within the application. But writing a whole application? That doesn't make sense.
If you want to build a web-based application that runs in the browser against a Java based server framework, there are many AJAXian frameworks to do it. You'd still be doing JavaScript for your client code. And you'd still be dealing with all the complexities of different browsers. I'm not sure why you would want to host it inside an SWT application instead of just directly in the browser window.