IDEA GWT compiler and backend issue - java

My project uses GWT. Our team write code under IDEA And every time when I change something on backend I have to recompile both GWT and server side code to be putted on artifact folder. It is not very good situation. So I want to know if it is possible to setup project/IDEA/GWT in such way that we would not need to recompile GWT every time regardless of whether we have changed GWT or not.

We are using GWT with Intellij IDEA as well.
For server side changes, we have to restart the backend server in IDEA, but we don't have to recompile GWT code.
You can keep the GWT code server running all the time (in super mode):
And the URL to check is http://127.0.0.1:9876/, and then put the "Dev Mode On" button in your bookmark bar.
To enable latest code, you only need to click this button when the application page is opened. It will apply the latest GWT code into your application page, which is also pretty fast.

Related

Export Processing Project as aWeb App

I've made a cool processing project that I would like to embed on the web; however, it uses 3rd party Java libraries to access an sqlite database. For this reason, the normal export-to-javascript which has worked well for me in the past is just not capable enough here. How can I make my Processing project into a Java applet that will allow it to be run remotely?
This depends upon what version of Processing you are using...
It was only in the final move to 2.0 that they got rid of the 'Export to Applet' option, so if you can make do with a 2.x-beta version, you're golden.
Of course, that's just through the PDE - so failing the ability to move to an earlier version, the library itself should be able to handle it still, from a different IDE, say Eclipse or NetBeans...
I guess the other option would be to see if you can port your library to a JavaScript library ?

updating JUST HTML files on Google App Engine

I have a Google App Engine Application, and as part of that Application I have my standard HTML pages, Home, ContactUs, Testimonials, Pricing ETC ETC, when users click on "login" or go to a specific URL eg (www.diarybooker.com/demo) it loads the actual application.
All these standard HTML files are fairly static files though, with analytics and SEO etc in them, however in order to update these currently I need to release a new version of my application every time.
Can anyone offer any advice as to how I can JUST update the HTML without having to release a new version of my application (especially if I am in the middle of a development cycle and don't want to branch just to update a contact number or fix an SEO issue etc)
It is entirely possible that I am actually using the system incorrectly and that I should be re-wiring things better/differently, but I cant find any information about how this SHOULD be setup, and Im not even sure what to search for either, so if anyone can at least point me in the direction of some information on this, I would be very greatful!!
By way of an alternative example, I have a friend who is running www.wineathome.org.uk and if you click on "attend a tasting" it moves off into http://wineathomeuk.appspot.com. Clearly this is not very clean and is also not the way to make it work, I could embed the application in an iframe, but is that really the way to go?!
You have your application code in source control, right? I'd suggest that you create a deployment directory and clone into it the version of the application that you want to have running on AppEngine. Then, copy into the deployment directory the versions of the HTML files that you want updated. Deploy away.
That is the only strategy that's going to work for you. The GAE deployment tool only deals with your application as a whole.
Looks like you have a couple of issues going on.
On the first issue as #AdamCrossland states you can use source control. I use git and create branches for my application at different versions. If you do that you can merge your updated HTML back into an older branch then update your application from that branch. That way your only changing the HTML files and leaving the application in it's current state. App Engine deploy is intelligent and will only upload the modified files. Doing this from Eclipse is a bit more difficult than from the CLI IMO, but YMMV.
The other issue of a friend clicking on attend a tasting routing the url to appspot is a bit harder to deal with unless some code is provided. I would think it is because the code is doing a redirect to a hard coded URL. I have several application mapped to a domains and none of them route to appspot unless I forced it to in order to use some functionality like HTTPS which only works on appspot.com. I personally try to avoid iframes it opens up an avenue for exploits.

IntelliJ IDEA: prevent redeploy for any little change

I am using IntelliJ IDEA and developing web application in Java.
Is there any way that I debug my app without redeploy for any little change? the redeploy thing makes the working very slow and annoying.
Update action in IntelliJ IDEA is configurable, in case of exploded web application you can set what to do: update resources, update classes and resources, redeploy, restart the server. In most cases it's enough to update classes and resources. Update can be performed automatically on frame deactivation (when you switch from IDEA to the browser).
It depends what are you redeploying, JSP or raw Java class? If you change a Java class then IDEA will not compile it and redeploy by itself. If you change a JSP (pr JSF...) you can click package file (Ctrl+Shift+F9) from right mouse click menu.
If you use Netbeans, Netbeans does this for you. I am also fan of IDEA but I liked Netbeans due to this feature.

Clean Working directory of Tomcat in Eclipse

When I work in on an servlet application in Eclipse, I have to choose Clean Working Directory in the server tab of Eclipse for the changes to be visible in the browser. Is there any way to make sure that I only have to build my servlet and the changes are immediately visible?
Doubleclick the Tomcat entry in Servers view, go to the Publishing section and select Automatically publish when resources change.
It by the way won't happen that "immediately". It might take around 3 seconds, you should see this activity in server logs. Although a slow starter, but Glassfish publishes in a subsecond. You may consider it instead for fast development.
Honesty, i do not think this is possible.
It is like programming in javascript and there is no way to see the result without clearing the browsers cache and reloading the page.

Google App Engine/GWT/Eclipse Plugin Newbie Question- how to autobuild client side resources?

I'm tinkering with the default GWT application generated by the Google Eclipse plugin when I click the Google "New Web Application Project" button in Eclipse 3.5. This will no doubt be familiar to many of you.. basically there is an h1 title stating "Web Application Starter Project," a text field, and a Send button.
What I've found is that whenever I make changes to the client side resources, e.g. change the text on the Send button to "Submit" in the .java file, Eclipse does not appear to autobuild these resources. In fact I have to rebuild the entire project in order for these changes to be reflected in my browser. I do have "build automatically" selected in eclipse.
I should state that this is my second GWT project, the first was almost entirely server side (restlet on GAE) and everything built automatically nicely.
When I first tried this new project with updated client resources, on refreshing my browser, the browser stated "you may need to (re)compile your project." I'm not sure if this is relevant but I thought I'd mention it all the same.
So what's going on? How do I get Eclipse/GWT to autobuild these client side resources? Cheers for any help you can offer! :-)
I just installed Eclipse + the GWT SDK/plugins. When I run the default project, install the browser plugin, it shows me a send button. When I change the text "Send" in the .java file to "Submit" and I refresh the browser, it shows me "Submit", in other words: the .java file has been recompiled to javascript, while the server was still running.
It prints the following info, fyi:
I am running Google App Engine Development/1.3.3.1.
It looks like you are using:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Furthermore, I use Eclipse 3.5 Galileo. So it looks to me that it pretty much does what you want by default. I also tested this in my Windows environment, works the same there.

Categories

Resources