smartgwt offline-caching with no GWT module - smartgwt

I'm using Eclipse 4.2, appengine-java-sdk-1.8.9, gwt-2.5.1, smartgwt-4.0p
I'm trying make the simple project like this - http://uptick.com.au/content/create-gwt-project
but offline.
When I save page (as html page) it doesn't work offline and I receive alert - "GWT module may need to be (re)compiled".
My question is: how to change project to save it as html page (plus project_name_nocache.js file).
Thanks.

You might be getting this error message because you might be trying to run/debug your application in compiled mode. In order to do so, you need to re-compile your application for GWT after every single change in code.
To avoid this, you should run/debug your application in developer mode.
See this link, to have idea on how to run GWT application in dev mode.

Related

troubleshoot asp.net web app on iOS

I have a web app with asp.net mvc 5 on running on iis 7.5. I have a photo upload page that I made with DropZone (a javascript ajax upload plugin). In my asp.net controller during certain errors, I return an httpstatuscode of 500 with a status description with a descriptive error. DropZone then displays this descriptive error. Everything works as it should on desktop devices, however when used on an iOS device it displays a generic "Internal Server Error" message.
I'm lost at how to troubleshoot this issue. I've placed javascript alerts throughout my javascript code to try and figure out what the issue is but that didn't reveal anything helpful. I've tried using the MIHTool ipad app and the HttpWatchBasic ipad app to try and set breakpoints but that was not helpful either.
Is there a way to remotely debug an asp.net web app from an iPad? (I have visual studio 2013 premium) Or does anyone have any ideas what may be causing a different status code to be sent?
UPDATE: It appears that iOS devices ignore any custom xhr.statusText and uses the standard default statusText (i.e. code 500 is Internal Server Error). As a work around (which I hate doing, but since this is primarily for use on company iPads I didn't have much choice) I've returned a different 500 class code for each possible exception and then in the javascript code check the status code and assign my own custom error message in the javascript code.
Quickest and easiest way to see the actual exception is to turn off custom errors in your Web.config - you'll then be able to view the actual stacktrace on the iPad.
If you'd like to be able to debug the exception, you should be able to trigger it by accessing the site from the iPad by hitting your windows development machine while running in the debugger. You'll need to configure IIS express to allow remote connections (editing application host.config), adding a urlacl, and opening the Windows firewall if necessary. There are numerous guides in setting this up online.
If you want to actually debug the JS in mobile Safari, this is possible from the Mac version of Safari - see http://webdesign.tutsplus.com/articles/quick-tip-using-web-inspector-to-debug-mobile-safari--webdesign-8787 for details.

Using XDK, how do I link to another page? Hyperlinks are disabled

Edit: so apparently adding class="button" make it work... Can someone provide a reference on what other classes are there? We can't find any information on this.. Thanks
We are making an app in HTML5 using XDK, it has quite a few different views. We were planning to just link to another html page each time we want to go to a different view. But we quickly found out that hyperlinking does not work, is disabled, and button does not link either.
One of the people in my group said she saw an example about having a bunch of and then just show and hide them and use that as UI navigation... is that the only way?
Thanks in advance!
The Intel XDK doesn't insert any class definitions or require that you use a specific framework. It is a tool for assembling an HTML5 hybrid mobile app using the CSS, HTML and JS files that you supply.
If you look at the samples and the default "blank" project that is created when you create a new project you'll see that there may be references to one or more of the following "phantom" JS files:
intelxdk.js
cordova.js
xhr.js
The first two (intelxdk.js and cordova.js) are special "device API" JavaScript libraries. You won't actually find them in your project directory, they are automatically included when you use the emulator and when you build your project (which "wraps up" your HTML5 code and assets into a native wrapper that is specific to the target you are building -- it does not compile anything, it just converts it into a hybrid native/HTML5 container app that can be installed on the target platform that you built for).
The third one is a special helper JS library for dealing with CORS issues from within your app.
None of these three JS files define any classes or HTML tags, etc. They simply implement target-specific device APIs that consist of JavaScript on the "top end" and native code on the "bottom end." Your application only sees and interacts with the JavaScript interface, and only with the APIs that you need to use (which is totally optional).
For an intro to all of this, please see the Intel XDK Documentation page.
So, that means you determine which frameworks and structure your app takes. In other words, if you want to use Bootstrap and jQuery you can do so. If you decide to use the App Designer or the App Starter tools, they will define some classes that impact your layout. However, you are not required to use these tools to define your HTML and CSS, you can do it by hand or use your favorite UI framework library.
Keep in mind that your code is not being rendered by a desktop browser but the embedded "webview" that is part of the device. These webviews don't have the same memory and CPU resources that you're used to working with in a desktop browser, so you need to learn to be "lean and mean" for the best results. You are using HTML5 technologies to build a mobile app -- not creating a web site on a phone.
Hope this helps, please see our HTML5 web site for more background material. It's a little slim right now, but we're adding examples and background material as time and resources permit.
Hope that helps...

Combine JQM, MVC and PhoneGap together

I have a site which uses microsoft mvc 3 on the server side, jQuery Mobile on the client side and I want to combine it with PhoneGap and produce executes for Android and iOS.
Is it possible?
How?
Thanks
Yes, it is possible.
If you must use Phonegap, there are a couple of things to do:
First, you must create a project corresponding to each platform , following these instructions. Once you do that, you basically copy all the client side code (js, html, css) to the www folder of your project. This is one of the reasons, the app could load faster, since it's reading its resources from the local filesystem, and not receiving them from an http connection each time.
Second, you must find a way to provide your server side data to your app. If you are already using REST services or RPC methods to populate your website, then that's done, but if not, you must start by building them, and then calling them from your client (through ajax calls from jQUery most likely), and then rendering them through javascript (you can use the multiple templating libraries out there or just plain javascript, I recommend the latter only if the UI updates are minimal).
As you can see, the second part requires quite a little bit more work. Especially if you haven't built web services before.
The other option ,which does not require phonega/cordova is to use an embedded webview. Then you wouldn't have to do anything. It would work similarly to a browser (Loading the remote URL of your site), with the added advantage of being inside and android/ios app, and you could add other views or communicate with the embedded webview using native code. If you are planning to load html files from the filesystem and not from your server, you would have to do the same thing you have to do with phonegap.
It happened to me, if you have a web app depending on server code I would go with a WebView based app, and not a Cordova app.
It's really simple to create those webviews apps for Android or IPhone.
Here you have an example for building a webview based app on android
Here you have an example for building a webview based app on IOS
Hope it helps.
If you want to reuse your site you'll need a webview that browses it.
Phonegap wouldn't be needed if you use this approach, but the application will not be as responsive as a native app, and the IPhone moderators may reject your app for that reason (it happened to me).
Another approach would be that you recreate your site as a pure Javascript application and only communicate with your servers to execute some REST Services. In this case Apache Cordova makes sense.

download source code, but not working

I had a problem with part 3 of an orchard tutorial...
so I was attempting to download the source code for part 4 and continue on from there (which can be found about 3/4 of the way down at the end of the tutorial on the page http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-4
However when I run part 4 from webmatrix I get the error(see below)
im guessing this is because iv only downloaded the code but i need to put it inside a seperate project? is this correct? can someone advise me how to do this?
thanks for any replies
The error states that there is no default document configured in IIS. Attempt to access the document using the full URL.
For instance http://localhost:28266/default.aspx (or similar)
You can then adjust IIS to have the correct default document (if desired)
Edit: After reviewing the referenced ZIP archive.
This looks like a changed file zip for the application. This isn't a complete ASP.NET MVC application by itself and, as such, isn't viewable stand alone. I don't have the time to parse the exact steps required to make this application work alongside the demos provided, but be sure you're either combining all of the previous files and folders in order or follow the instructions detailed by the author.
As referenced, this is not a complete ASP.NET MVC application and isn't ready to be immediately rendered by IIS.
The problem is probably that the application can't start for some reason, which causes IIS to attempt to respond to the request with other handlers. Because there is no default document defined (and there shouldn't), it tries to do a directory listing, which is not allowed in your configuration. Do not focus on what IIS is telling you but rather on why your application doesn't run.
Things to check:
you have built the application
you are running in full trust
you are running in integrated mode
there is no exception in app_data/logs
you added the module to a working Orchard instance, in its Modules directory

Silverlight Test without opening browser

Is there any way to run Silverlight tests without opening the browser? It takes some time to open the browser. if you are doing TDD, you may not like it.
I don´t think so.
for Silverlights Sandbox has to be astablished to test apainst and the sandbox does life in the browser , I can´t see a way to achiev this.
Regards Ren
You can test the Out Of Browser (OOB) version of your application instead. To do this, add a call to Application.Install() within your application, run it, and then in Visual Studio debug the Silverlight project itself rather than the ASP.NET project.
Once installed, you can also run the OOB version of the application from the command-line using "sllauncher.exe". To get the right parameters for sllauncher, look at the properties of the shortcut the installer creates for your app.
Even though you can use the sllauncher.exe - it still runs in using an IEFrame - hence effectively still uses a browser to host the SL sandbox. Sure, you won't see the browser in the regular sense.

Resources