Debugging badaWAC application - javascript

I'm develop web app for bada platform using badaWAC api. What are the ways to debug badaWAC application? May be exists some browser plugin for this target?

You can accomplish this on your desktop browser, which offers a richer set of debugging tools, such as Chrome’s Developer Tools. This is where PhoneGap Emulation steps-in.
With your Google Chrome desktop browser, you can emulate PhoneGap’s JavaScript APIs. This includes everything from the deviceready event to navigator.device.capture to your custom plugins. By leveraging your desktop browser, you can speed up your initial development process and quickly debug the DOM, JavaScript, and resource loading.
It’s important to understand that PhoneGap Emulation only applies to JavaScript. While the emulator will use a device skin, it cannot emulate the rendering capabilities of a specific mobile platform browser.
If you just wish to step into and debug javascript via the browser you can do it easly via this tool, which acts like google's debugging tool.

Related

Use Chrome/Firefox while debugging client-side

I am using camera with getUserMedia and I get a few errors I want to fix. The thing is Visual Studio only allows me to debug JavaScript (I mean hitting breakpoints) with IE, and IE does not support getUserMedia.
If you want to debug in a browser other than Internet Explorer then you will need to use the Developer Tools of that individual browser and set your breakpoints accordingly. Alternatively you could use console.log() and/or console.warn() to get the state of your objects in code. Visual Studio does not and cannot understand the implementations of different JavaScript and rendering engines (V8, Blink, Gecko etc.) - nor should it ever attempt to do so. These engines move so rapidly with six week release cycles the IDE would be a totally misleading proxy for the actual the platform you're supposed to be testing against.
Both Firefox and Chrome allow you to retain console contents beyond a page reload/navigation and there are tools like Browser Link in Visual Studio will allow you to test in multiple browsers simultaneously - inspecting the console results afterwards for errors (interactions will have to be tested individually in each browser).
If you are testing mobile devices Adobe Shadow that would potentially allow you to test on multiple tablets and/or phone simultaneously whilst using Dev Tools (I believe Chrome) on your laptop or desktop. Otherwise desktop browsers dev tools allow you to debug page running on a connected mobile device using the same browser, or - in the case of Firefox - also Chrome instances on the device.
It is well worth getting to know browser dev tools for front end debugging and troubleshooting, as these are much more powerful for this purpose than those provided with Visual Studio. The free CodeSchool course Discover DevTools (focussed on the Chrome DevTools and sponsored by Google/Chrome) may help you discover some of the features of client developer tooling, and many of the interfaces and techniques will be broadly applicable to other browser dev tools.
If you want to test on devices that are not available to you, browsers that you cannot install on your system (e.g. Safari on Windows) or simply a newer or legacy version which you cannot install alongside the one already installed locally then there are services like Browserstack which allow you to do so in hosted virtual machines. There is a Visual Studio extension available for BrowserStack to help connect to projects running locally.

Can we have chrome Apps for tablets?

I was wondering if we can have chrome apps on tablet and mobile? They are used on desktop version of chrome but I dont know if it works for tablets or mobile.
Yes and no.
No in the sense that an app cannot be straight up loaded in Chrome for mobile. It needs to be published as a separate app in the app store.
Yes in the sense that there is a conversion process developers can use. There's a Google-provided toolchain based on Apache Cordova which allows you to make a native app for mobile out of a Chrome app.
See here for the workflow. Note that it is considered a preview release.
Edit: there's an alpha release of a tool which allows to load up an app without conversion. See Chrome Apps Developer Tool

Reasons for porting a Cordova App to a Mobile Chrome App?

We got a Cordova App running and wrote ourselves a build script using Grunt which makes building the App a breeze. We don't require any of the APIs Chrome offers and are, apart from some performance issues with elderly Android devices which forced us to block some minor features on those devices, pretty much satisfied with the current status of our app.
So far we couldn't find any reason why it would make sense to transform our Cordova App into a Mobile Chrome App. Or is there something we're missing? Are there any differences in terms of JS speed, CSS support, etc.?
The primary motivation for Chrome Apps on Mobile leveraging Apache Cordova was to bring Desktop Chrome Apps to Android and iOS.
However, there are some reasons why you should/shouldn't consider using the cca toolkit, particularly if you already enjoy using cordova:
Chrome Apps APIs
If you wish to leverage some of the useful Chrome Apps APIs which we have ported to mobile, you may already be able to use them inside your vanilla cordova app, even without using our cca toolkit! (We went out of our way to try and make this work whenever possible, giving back to the community that helps us in turn).
However, for some of the APIs, you really do need to use our cca toolkit, since we may rely on the chrome app lifecycle or other specifics. (It seems our docs don't yet make this distinction clear, so I've filed an issue to address that).
Verdict: consider cca if one of the Chrome Apps API's which do not work on vanilla cordova appeal to you.
Desktop Platform
Chrome Packaged Apps run on any desktop platform chrome runs on -- which is every single mainstream Operating System in popular use today. The capabilities and native integration of these apps are rapidly improving, and are truly removing barriers to using web technologies for whole ranges of application types.
So, while the motivation for Chrome Apps on Mobile was to enable porting some of those desktop apps to mobile, you should consider if the reverse isn't actually useful for you!
This would mean adjusting your existing app to use the chrome app lifecycle and manifest, adhere to restrictions like CSP and disabled web features, and cannot rely on cordova extensions -- but in practice this is often not prohibitive for a cordova app which is already a package offline-enabled web application (thats the hard part)!
Verdict: consider cca if you would also like to also target the desktop platform, or would like to submit your app to the chrome web store.
Cordova Plugins
If your existing mobile app already leverages some cordova plugins, you can still use the cca tool, since we create a fully compatible cordova project. This comes with the caveat that those plugins will only be available on mobile -- but you can use feature detection for desktop-mobile app compatibility.
Verdict: the cca tool does not prohibit the use of cordova plugins.
Mobile Platforms that are not Android or iOS
We do not currently support some of the platforms which vanilla cordova does, such as BlackBerry, Windows Phone, or upcoming platforms like FirefoxOS, Tizen, and Ubuntu (though many of those do not yet have feature parity with Android / iOS anyway).
Verdict: don't use cca if one of these mobile platforms is important to you.
Final Words
If you are already happy with what you have, well, they say that if it aint broke, perhaps don't fix it!

Combine browser and web app for deployment

What's the best way to turn an HTML/Javascript web app into a self-contained app that can be run from Windows (and maybe Mac/Linux) PC's? Preferably without any installation, ie a network share.
I have looked into Chrome and Firefox Portable, but these require write access to the folder, so are unsuitable for running off a read-only network share.
(some background, I have a big javascript app but many of my clients are using IE6 or 7. Their IT teams won't allow Chrome Frame, or other modern browsers).
node-webkit sounds most promising.
From the README on the github repository:
node-webkit is an app runtime based on Chromium and node.js. You can
write native apps in HTML and Javascript with node-webkit. It also
lets you to call Node.js modules directly from DOM and enables a new
way of writing native applications with all Web technologies.
If LightTable can be built with it, certainly a web application can be ported and run natively using it.
I know this is a bit late, but what about Sencha Desktop Packager?
http://www.sencha.com/products/desktop-packager
It was primarily developed for ExtJS apps, but it should work on any JavaScript app.
We had a similar requirement and ended up building a dedicated web browser using QT. However if we'd known about the Sencha Desktop Packager before we may have gone for that.

Desktop application development with Javascript and HTML

I am looking for Titanium Appcelerator alternatives for Desktop application development with HTML and JavaScript. I want to convert a web app to a desktop application. Hence, there will be a lot of server interaction. Appcelerator was a good choice, but it looks like the company is no longer interested in the Desktop SDK. Also, ajax request from Appcelerator does not retain cookies.
I read that Adobe Air can be used for desktop app development, but I don't want to use flash.
How good is XULRunner? Will it allow features like Growl notificaiton and creating tray icons?
Will I be able to develop applications using mostly Javascript and HTML in Qt?
I started looking into Titanium for desktop dev. I liked the concept but not the implementation. I then stumbled upon chromiumembedded and have been mostly very happy with it. It's basically a web browser control based on chromium.
http://code.google.com/p/chromiumembedded/
It's written in C++ so you can do all the low level OS stuff you want(Growl, tray icons, local file access, com ports, etc) in your container app, and then all the application logic and gui in html/javascript. It allows you to intercept any http request to either serve local resources or perform some custom action. For example, a request to http://localapp.com/SetTrayIconState?state=active could be intercepted by the container and then call the C++ function to update the tray icon.
It also allows you to create functions that can be called directly from javascript.
My biggest challenge has been debuging. It's very difficult to debug javascript directly in CEF. There's no support for anything like Firebug that I am aware of.
Appjs (appjs.org) looks very promising.
You could also check Bowline which is another alternative: http://bowlineapp.com/.
Although it's not officially intended for general-purpose use, a number of people have had success using brackets-shell for HTML/JS desktop apps. It embeds Chromium (CEF) and adds APIs for menu bar management and file IO. It also embeds an instance of Node.js so you get access to all its APIs for launching processes, etc. It's MIT-licensed and available for Mac & Win, with a Linux version currently making rapid progress.
As I mentioned, it's not officially a general-purpose app shell, but someone wrote a detailed blog post about how to customize brackets-shell for your own uses.
I notice that the other answer about Titanum says CEF is hard to debug. I'm not sure if that's true in Titanium, but in brackets-shell it's easy to debug JS – you just open http://localhost:9234/ to load a full instance of the Chrome Developer Tools (including breakpoints, profiling, etc.).
TideSDK is a continuation of the old Titanium desktop http://www.tidesdk.org/

Categories

Resources