Francesco
Francesco

Reputation: 1792

Speed up javascript programming of Java EE application

I'm playing on a Java EE application using heavily javascript, a RIA application. Do you have any tip/best practice about speed up javascript developing process instead of change javascript, build a .war and deploy the app on the AS to see if my javascript is fine?

Upvotes: 0

Views: 119

Answers (3)

Pavel Horal
Pavel Horal

Reputation: 18194

Seeing other answers I feel like I have to write this: Just run the application from your IDE.

For example with Eclipse+Tomcat your changes will be automatically published without the need to rebuild or redeploy. You can even use tools like spring-loaded (or more advanced but commercial JRebel) to have Java class live-reloading as well.

Upvotes: 2

ljgw
ljgw

Reputation: 2771

Consider using a small proxy-server (apache, nginx) to run on localhost:8080 and use it as a proxy for your application, with one exception: the javascript/frontend code which you point to your workspace.

In nginx for example, you would use the location directive to configure this. See also: http://nginx.org/en/docs/beginners_guide.html#proxy

example configuration:

server {
    listen 8080;
    location / {
        proxy_pass http://<application server> ;
    }

    location /js/ {
        root /<path to javascript>;
    }
}

Upvotes: 0

Martin
Martin

Reputation: 3058

I have had good experiences using some lightweight AppServer like Jetty. You just need to put a starter somewhere in your project (for example in a test-project that doesn't deploy to the endsystem).

Then you can even configure what to deploy on the small server, for example, make a starter for each small module you might work on. Then, if you have proper dependency management, you can inject "fake" dependencies for third-party services and have a really fast and easy to use environment.

However, setting up such a solution is not something you can do in a few minutes, but once you have it, it will save tons of time!

Upvotes: 0

Related Questions