we all agree that when we use GWT, we compile our application on the server, several javascript file are created. Normally, when deploying, we would use the obfuscated mode.
Now modifying a javascript file in obfuscated mode is almost impossible. Now what happens if we want to make some modification in our GWT application.
Do we have to go back again in Java, modify the file, compile, and then deploy again??
I'd say yes... If you use a code generator you should avoid modifying the generated code by hand.
No, no, no.
You don't "go back" to the Java code to modify it. You simply debug, test and modify the Java code. You ignore the code in the compiled javascript files except to deploy it. As far as you are concerned, GWT source code is Java code, not javascript, written within the environmental restriction of the browser.
Your question is like asking, "I have a C application that gets compiled to object code. Do I modify the object code or go back to the C code to modify it?" !!!
You simply treat the generated javascript as "native code".
No doubt you can include javascript using jsni, and so can you include assembly code when using C. So except for those assembly code you inject and similarly except the javascript code you include, you leave the "native code" alone.
When you try to modify the object code generated from C, that is called hacking. Hacking is an interesting hobby but when you wish to create an application and your main task is not "hacking", hacking would only be your extra-curricular activity not connected to your main employment or project.
Go back to the beginning: http://code.google.com/webtoolkit/overview.html
...Write AJAX applications in Java and
then compile the source to highly
optimized JavaScript that runs across
all browsers
When you're ready to deploy, GWT
compiles your Java source code into
optimized, stand-alone JavaScript
files that automatically run on all
major browsers, as well as mobile
browsers for Android and the iPhone.
While debugging: if you are running in development mode you may not even have to redeploy while in dev.
Thanks to the GWT developer plugin,
there's no compiling of code to
JavaScript to view it in the browser.
You can use the same edit-refresh-view
cycle you're used to with JavaScript...
Related
I am working on the SAPUI5 application with normal ES5 code and using grunt-openui5 to create the Component-preload.js file to deploy to CRM system. Now I am planning to use ES6 style coding but we need to support an old browser. Therefore, I need to transpile it down to ES5 and then create the Component-preload.js file. Now my concern with this approach is when I debug the production issue, everyone gets it right, I want to debug my ES6 file, not ES5 file.
Any help or guidance is very appreciated.
One way to have a transpiled, debuggable preload file and separate ES6 based source files is probably to use the sap-ui-debug=true URL parameter option. Instead of the normal files, it will try to load -dbg.js versions of everything. This for instance is what the SAP WebIDE generates:
If you can set up your build set so that the original, untranspiled files are copied as -dbg versions, and your preload picks up the transpiled ones you might be able to make it work.
Here's the section of the SDK documentation that'll give you some more background information: https://openui5.hana.ondemand.com/#/topic/c9b0f8cca852443f9b8d3bf8ba5626ab
Frank is good, however, it requires the application's source code. And so do the others. For example, square/ KIF, Telerik, UIAutomation etc.
I am not considering Fonemonkey. I am looking for something analogous to "Robotium for Android" which lets you do the scripting in Eclipse by re-signing the .apk file and can work without application's source code.
I believe this is very important since, in a work environment, a developer will not necessarily share the source code of the application unless it is an open source app.
You can use instruments tool (which is inbuilt in xcode), which does not require app's source code.
I'm a beginner trying to learn my way through making my first real Android app. I actually started an app using Eclipse and have gotten pretty far with it. I'd like to be able to continue its development using B4A. Is it possible to bring my work from Eclipse into B4A?
What you can do, is to wrap your existing code as a library and then reference it from Basic4android. See this video tutorial.
B4A is a language on its own and it has its own editor.
While, in theory, you can edit project files of a B4A application with any editor, I would assume that you used JAVA as your main programming language.
As B4A uses a language that close resembles (Visual) Basic that, in turns gets converted into JAVA while compiling, you have actually 2 choices in front of you if you want to use B4A:
1) the first is to port your project to B4A but this means that you will need to rewrite the code according to the B4A language specifications;
2) the second option would be to integrate your JAVA code running it inline : see this forum post on the topic
2) if you can pack whatever you wrote as a library module to be used later on by B4A, you could opt to do that: see this forum post on the topic
I'm working with GWT and GAE in Eclipse with the google eclipse plugin. Sometimes I just want to make a quick server fix. I change something in my server code and re-deploy, but the GWT code is all recompiled as well. At this point that takes about 10 minutes, and is a real drag when a customer is waiting on the change.
The server code is not in a source path in my GWT modules. Anyone have ideas about convincing GWT that no relevant changes have been made, and that it can skip the recompile? Alternatively, I'd be happy to just manually force the GWT compiler not to run.
If using maven, set the property gwt.compiler.skip to true. If not, there should be a flag in whatever build setup you are using to force a skip when you know it isn't necessary (and if you can share how you are building, it might be possible to offer more specific instructions).
It is very difficult for the compiler to determine that no code which might affect the client has changed, even if you dont change any client or shared code. Generators and linkers both are arbitrary java code that can call anything else on the classpath, and the compiler can't ensure that they don't call into your other classes (and in fact this can be a useful feature, like for RequestFactory proxy validation).
I have an NSLog alternative that outputs the class it's called from as well as the line number and method (selector) called PLog in a class called PLogging. It's the exact same as the DLog taken from here with the exception of the name change. The advantage of DLog as it is written is that when compiled under Release mode, the log call is changed to a comment, negating the performance impact you would otherwise be subject to. I want to be able to use this and keep it within the framework, but be able to call it from the projects I add the framework to. But still have the log calls compiled to comments when in Release mode. Is this possible?
I would suggest a white list approach: add a preprocessor definition to your debug configurations which enables DLog/Plog to log to the console. In every other case it turns to comments.
Please have a look at this blog post which seems to point a finger at your problem. Of course, assuming that you don't want to change the way you are achieving your functionality: macros. I'm quoting abit: "An example of the basic problem is you want to link to a library that has both a Debug and a Release version. So in your application you want your Debug version to link to the Debug version of the library, and you want your Release version to link the Release version of the library."
I would rather tend to use targets for that, the trouble does look uncomfortable.
Third-party frameworks aren't allowed by the App Store. I assume you've got a static library or source files that you add to your apps with a cross-project reference?
If you've set your library project up with a debug flag set for your Debug configuration and unset for your Release configuration, then all you have to do is use the same configuration names for your app project, and the library will be built with the same configuration.