Tapestry - Websockets - java

recently i'm playing around with some "new" webframeworks(i'm planning to do a small hobby project (webcam picture ocr recognition -> put contents via rest -> display them within a self refreshing table), but i don't want to use anything i know already (mostly Spring MVC, Wicket and Spark).
First shot: Let's use Tapestry. Ok, Hello World is working fine, the concept is clear. But as i was looking for a library for Websockets, i almost desperated.
I found:
https://github.com/uklance/tapestry-atmosphere
(https://github.com/dragansah/tapestry-websocket)
Both of them are more or less outdated/dead.
Are there any extensions for tapestry, making Atmosphere/Websockets implentation easier? I can't get the libraries, shown above, to work (not even the examples are working locally - there is just a bunch of javascript errors).
Working with 'raw' athmosphere is no problem, everything is working fine, but i'm looking for a more framework 'included' solution.
Is there anything existing (as mentioned, tapestry is my prefered solution..)
thanks in advance four your help.

I'm the author of tapestry-atmosphere and tapestry-cometd. Although I've not done development on either for quite some time they should still do the job.
Is there a feature you need?

Related

What does one do regarding applets now that Chrome doesn't support Java?

Without thinking, I created an entire program in Java and began designing a website to use this applet. All it does is create image in a certain way but there is a bit more code (classifications and default values/images) that I just felt was easiest to do with Java. Now I have a Java app and HTML CSS and JavaScript that I can't seem to do much with.
I have thought of 2 ideas (below) but I don't know what the general alternative is to applets nowadays.
I have a spare PC I may use and just alter my applet to run the back-end of a server-based site instead, but I am hesitant to use my own IP and bandwidth for something like this. Also, this app doesn't even need access to the internet so this just seems like way overkill.
I could just release the .jar, but I plan on expanding the available options. I also told people that this website was coming. I'd like to be able to just update the website.
I don't really plan on writing my program in another language. This took me time to make. If there is no way to work Java into my site, I may just abandon the project altogether.
I am mainly concerned with Chrome for this problem.
Edit: I would like to use GitHub as my host, just in case this helps at all.
You can run anything you want on the server, including java programs. So
you could run the image creation program in the server and present the
resulting image using a standard img tag.

Running A Java Eclipse Project on a Cloud-based Server with external Libraries

I hope this is the right place to post this question. The web applications stack exchange did not look suitable based on the other questions asked on there so I guessed this might be the best place to put this question.
I have a java eclipse project that works as I would like it which takes in an image locally from the adjacent file path and performs the required action on this image before returning a double value at the end after all the calculations. To do these calculations I use the OpenCV library which is essential to the core functionality of the application.
The issue I am having is to deploy this application so that the the application when it receives a request will take in an image (preferably as a .jpg but this can be changed if absolutely essential) and then after the application has carried out the required task send back the resulting number. In future this will be sent and received by an Android app which will just take the photo, compress it and send it away before receiving and displaying the answer but for now I'm just trying to get my project onto an accessible server.
I have tried to use Heroku and followed their tutorials and instructions which encourages the use of Maven but I could not properly insert the dependencies for my project as it used an external jar. I spent a lot of time checking through the various solutions online to this issue but a lot of them felt like workarounds which only worked in some cases and none were working for me. I am open to using this again if there is an elegant solution that is simple to follow.
The main sections of this question that I am asking is for the simplest way to take my working eclipse project which uses an external library, modify it to take in an image via server request and then send back a number result. I also would like a suggestion as to which cloud-based service would be suitable for this project and allow me simply to put my code on their service and allow a test user to run this code whenever I want with reasonable availability.
Sorry for the long-winded explanation and I hope I have provided enough information. I have been trying to work out how to do these things with the help of tutorials and suggestions for a few weeks now but have no previous experience with making a web server as everything I have created has been a local program.
Thanks for your help and suggestions

GWT or JavaFX webpage dilemma

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

Converting equations to java for android?

I am a cameraman and I want to make an app for my Moto Droid that will
calculate my depth of field given four inputs.
I am literally brand
new to javascript and this programming stuff, so I was wondering if
anyone could help me out.
I have a very basic GUI set up using Droiddraw which allows me to
input my 4 variables, which are:
Focus (#+id/focust)
Focal Length (#+id/flt)
Aperture (#+id/apt)
Circle of Confusion (#+id/coct)
Equations for this calculation are located here
for example...
to get hyperfocal distance I need to get: ((f^2)/(N*c))+f
all of these variables will be drawn from inputs in the GUI, but I don't know how to call them, how to write the actual math, and how to address the results so I can make them appear in the "results area" on the bottom of the screen.
I've never done java before and I only want to make this app because the existing ones don't fit my needs.
Can someone help?
Thanks!
If I'm not mistaken, DroidDraw is a tool for building the XML user interface description used by the Java API. If you want to program for Android in JavaScript, something like PhoneGap might be a better choice. It lets you build real Android application using HTML and JavaScript.
On the other hand, if you want to use the XML and Java APIs, then you should probably run through the Android tutorials. The first one is Hello, World.
Since you're just getting started with programming, I can't stress tutorials enough. It's true that your idea shouldn't be too hard to implement, but you need to understand the basics first.
I don't mean to give the impression that one style (PhoneGap vs. Java and XML) is better. For your purposes, either should be fine. It's more a question of what you prefer. Java/XML is the paradigm supported by Google, and provides access to more functionality. On the other hand, if you already know HTML or JavaScript (or are interested in learning them), PhoneGap will certainly provide everything you need. I think PhoneGap is also intended to make it easier for beginners, though I haven't used it, so I don't know how successful they have been.
The XML file that is generated by DroidDraw can't be used within PhoneGap. If you do choose to use PhoneGap, then you will need to build the interface in HTML. You might be able to use something like DreamWeaver or FrontPage or one of any number of HTML editors to help you with this step.
The XML file is just a description of an interface. When you start your application, the Android platform uses this description to build the user interface that you see. Once that has happened, you can move data from the interface to Java, or from Java to the interface, without any hassle. You certainly won't be limited by the XML interface description - it's pretty flexible.
If you've been going through the Android tutorials, then it might be best to forget that I even mentioned PhoneGap. It's a wildly different alternative that is the right choice for some people and some applications. But the Android tutorials won't help you to understand it. I only brought it up because you mentioned JavaScript in your original post.

GUI frameworks for Java

I was wondering if anyone has any suggestions of frameworks to give an old desktop application a much needed facelift.
The application has had a long life without anyone giving any attention to its exterior resulting in a monster with an 80s look.
I've just downloaded and tried MyDoggy framework for making windows floatable and dockable. So I'm looking similar for quick and easy fixes that will bring a dead looking application back to life.
I think you don't want to rewrite your app, right? Because it seems as all the other guys think so, suggesting SWT and JavaFX.
To pimp your existing Swing App, take a look at jgoodies.com, the substance look and feel or the swinglabs
Just changing the look and feel and some components might already help to give your application a second youth. Consider for example Violet which is IMO a nice looking application. It uses a custom theme based on the PgsLookAndFeel and some components from L2FProd.com.
You could give Oracle's ADF a try.
If you want to go with the latest and greatest, you could try JavaFX. Bu tof course using good old swing or the more OS agnostic SWT does the trick as well.
There's ofcourse the Eclipse Rich Client Platform or the Netbeans Rich Client Platform.

Categories

Resources