i need to develop in java an application that accesses local resources, mainly a webcam, and possibly a wacom bamboo pen tablet. It should take pictures and notes and then post them to a web server.
The ways i can think of are:
use applets
use some kind of standalone app created via JavaFx (or swing or similar)
Which way would you go about it? Are applets considered a viable/secure way to achieve this?
Thanks
I would go the standalone app route. I always turn Java off in my browsers because I can never remember which specific version has security bugs.
If you build it as a desktop app I think you could quite easily convert it to be an applet later on if you wanted.
Related
I have an internal web application and I want to be able to take a screenshot of the user's entire desktop environment through the app, not just the browser window. In my research, I've found that I could do this using a Java applet. However, Java applets are no longer supported in Chrome as of v45, and they tend to be slow and dated. I've explored the possibility of using flash or a browser extension, but it appears that I would only be able to capture the browser window through these means. I'd prefer not to use a native application, as the screen capture is to be a feature of the web app, so I'd like to keep them as tightly coupled as possible.
Specifically, are there any other methods that I am missing to achieve what I'd like to do? I've sort of resided myself to a java applet sans chrome support or a separate native app, but I've had trouble finding literature online about my use case (assumably due to the security concerns).
I looking to make a web app that has a login page and has 1 button and a image of a LED that will flash.
I started to do this in Vaadin and latest version is so big (32MB in Vaadin files) it take a long time on start on Raspberry PI.
Is there a better way?
Then the button is pressed in software or triggers from the hardware, the hardware could take 1min or more before doing it stuff and flasher LED.
Flash good
Flash's poor
Flash's bad
etc
I assume you want to run the server portion (i.e. the application server) on the Pi?
In that case, Java is not a good choice (though possible), and Vaadin certainly doesn't help as it is a server-side application framework.
Why not use a client-side solution for the UI (i.e. using Angular JS) and a python-based solution for the server-side, based on SimpleHTTPServer (https://docs.python.org/2/library/simplehttpserver.html)?
The accepted Answer by miw is correct. I'll add a bit of explanation.
Vaadin is a great tool for being able to quickly write web apps using only Java programming but rendered using regular web browser clients (no applets).
The Vaadin app actually runs on the server-side. The user-interface is rendered remotely on the client-side (web browser) but the app lives on the server and reactions to the user’s actions are executed on the server.
This server-side execution means a Vaadin web app often needs much memory, enough to maintain the current state and enable the user action-reaction executions for each user, all in the same JVM on your server. Multiplying the users means multiplying the demands upon memory and upon the CPU of the server.
Between both a JVM (Java Virtual Machine) and Vaadin, you would be placing much demands on a resource-limited computer such as Raspberry Pi. While I've not tried it, you should be able to run a relatively simple app with relatively few users. The latest Pi models with more memory (a gig) should work much better. Some competitors to the Pi come with even more memory and so might work better for Vaadin.
So, no, running a Vaadin app on a Raspberry Pi is probably not the most optimal scenario. But it would be fun to try. ;-)
Can I run Java applications (Java Web Start) on iPad?
Looks like this is not possible, but someone suggested using Cloud Browse (an application I couldn't' find) to run Java.
Any solutions?
UPDATE: Cloud Browser is an application that was available on the App Store but it was removed my Apple. Cloud Browse would process the web site externally and then stream the web site content to your iPad screen (something like video streaming).
No, you cannot run Java programs on the iPad (or any iOS device). Apple's license terms forbid running applications that can execute code downloaded from the Internet (which is what Java Web Start is all about).
No, as staffan said, Webstart will not work. However using CloudBrowse, an applet can work. It looks like the idea behind Cloud Browse is that the browser gets rendered on the server and video of the web page get streamed to your phone. This way, it appears to the user that applets or flash are running on the ipad.
I tried CloudBrowse on my IPAD as I've got a Java Applet that runs inside a brower and wanted it to work on my Ipad.
I found that it works pretty well. The Java Applet has a 3D animation, it's not as smooth as running on Windows/Mac through a normal web-browser, but it's pretty good.
I paid for full version, wasn't that expensive and to me, worth it. Opens up the power of using Applets but within Ipad!
Check it out here ... 3D sailing replay.
I have read the Blackberry documentation and it is possible to push a notification from a webapp. I am planning to create a Blackberry application that compliments to our webapps. But I am still left in the middle whether to develop a webapp or native Blackberry app. I have also look at how a webapp runs on Blackberry browser and it looks smooth.
From your experience does the native app offer something that the webapp doesn't? Bonus question, is Facebook and Twitter app on Blackberry a native app or a webapp? If it is a webapp, is it possible to make a launcher for the application on Blackberry?
Thanks for your help.
Facebook and Twitter are on both types. The web apps are just a website formatted for a small screen so anything you do in say asp.net will show on a blackberry web app if you program it to. The native app just feels like part of my phone. You can save data on the phone so if your app is a relating to news or something that would be stored I can read it offline or slow connectivity (camping, rural areas, etc...). It can also interact with other feature that blackberry offers such as contacts, email, media player, etc...
If you would like to save anything for the user to view without pinging the internet a native app would be preferred.
It's possible to create a launcher but I haven't created one so I'm not sure of the details. I would assume it's just an app that opens the browser to your URL.
One more thing about a web app would be if your application stores users settings (twitter auth key, etc...) they would need to be stored on your server and not the users phone adding more expense and maintenance.
Good Luck.
Widget is not supported for device software less than 5 , you combine both of web and native development by using browser field ,but you need to consider that its Java Script support is poor
Let's not forget that the blackberry browser is really bad as well. I don't know any BB users who would want to use a web application because of that.
When it comes to native apps, you have some choice however and you are not restricted to java (depending on which OS version you want to target). In addition to the mentioned Java, you can use Widget (link for resources) that behaves like a native app, but can be accessed like a web app.
I was just at innoTech and they had a whole session on this topic. But instead of recaping it let me just post the funny video they showed at the end which sums it all up.
Mobile Dev Rap Battle: Native Code vs. Web Apps
I have seen a lot of people try to make a web ui looks like a desktop ui. However, most of the time i feel web ui is much more interesting than the desktop ui, with the help of javascript toolkit like jquery, gwt-ext etc.
My question is, how to port the web ui to desktop ui? Do I need to embed a javascript engine in java? css engine? html layout engine? That sounds like a lot of work to do.
Any easy way of doing this?
you can embed a web server in your app and you can embed a browser inside your app window. i know eclipse does this pretty well. it uses SWT to do the heavy lifting
http://www.eclipse.org/swt/snippets/#browser
check the Browser section
your web server doesnt even have to be a proper web server, it just has to set the content, and can query / change it on the fly. the javascript on the page can even interact directly with your app.
you should be even able to use crazy web frameworks like
http://echo.nextapp.com/site/
or
http://code.google.com/webtoolkit/
or even run a ruby site through JRUBY
or make really complex apps using the new HTML5 engine [canvas/video tags] (if your client has the new mozilla installed)
Adobe AIR technology solves this exact problem. The code you develop using Flex can be rendered in the Flash player plugin of a browser or the same code can be easily packaged as a Desktop application that runs on the AIR runtime.
Have you seen Appcelerator's Titanium Desktop
This is one of the best solution for you (i think!)
You write the javascript and html code, and the titanium SDK creates the Desktop application of the same
There is support for Python and Ruby.
Must try :
http://www.appcelerator.com/products/titanium-desktop/
if you are a Ruby programmer then you must also see this
http://www.rubyinside.com/bowline-rails-for-the-desktop-2183.html
Prism from Mozilla is made for this goal, exactly. It's out of beta now too, I believe.
Check Google Gears y Adobe AIR
It not 'a lot of work to do', it's a huge amount of work to do - you would in effect be writing you own browser and it'd never come close to the poplar ones out there, simply because you wouldn't get the level of feedback something like Firefox gets.
If you're trying to avoid address bars, menu bars, etc these can be switched off in all the popular browsers and so to the user the appearance would be that it's more application like with only the rich content of the HTML visible.
Sounds like JavaFX would be good for you?
http://en.wikipedia.org/wiki/Javafx
Try XULRunner from Mozilla. If you have developed extensions for Firefox, then this is the exact same thing. XULRunner contains the Gecko engine, so it can render XUL and HTML with CSS, and it supports JavaScript with many useful XUL Components, like file read and write, directory browser and network tools.
Because it supports HTML you can in effect make a webpage and have it run like an application. Also it is cross platform, so it will run on Windows, Mac and Linux, anywhere Firefox runs actually.
There is some information on creating XULRunner applications on the net, but since it's so similar to making Firefox Extensions, you can just google for that. A good Tutorial for getting started is this one.