How do I swap my app between desktop mode and Modern UI mode? [duplicate] - windows-8

How does Google Chrome make a hybrid app (i.e. one that works on the desktop and one that works out of the Modern UI, and that are switchable)? What new Windows API do they call?

The only applications that can be "hybrid" are browsers. See here (link to Microsoft whitepaper on making a browser desktop and metro enabled).

Related

Interact with USB storage device from web page directly or using communication to native applications

I already had an Java application that is downloaded as part of java applets from the web page, that can interact with the USB Storage device where it need to save and retrieve data from the device.
Since the chrome has stopped supporting out of sandbox running applets, I need to develop some new technique to interact with the USB Storage Device from my web page. My application architect does not want to achieve same using JNLP which is one options that I have learnt by reading some articles.
Now I would like you peoples to help me on build some applications, so that I can use the same in my webpage to access USB storage device(Pen drive) independent of OS (Operating System) and Independent of Browser(Cross browser support-mostly should work on IE, firefox , chrome and safari).
I am ok with application build on native (OS dependent), but should be there a way to communicate with that application from any browsers installed over that machine.

jWebSocket on mobile browsers

I've developed a web application which uses jWebSocket.
I've put it together on an Apache Server and accessing the site with a desktop browser works fine.
But it's not working on mobile browsers, that is, I can see the static website but no dynamic changes are made (using WLAN; on a laptop using the same WLAN everything works). The required ports can be reached but no connection is being established with the jWebSocketServer.
I've tested it on iPhone with Safari 6 and on Android phone 2.3 with WebKit browser and Opera 12.
At least Safari and Opera natively support WebsSockets, so I wonder if there's a general difference between mobile and desktop browsers regarding this functionality?
(On the Internet, I found nothing about mobile web apps with jwebsocket, there are clients for native apps but this doesn't suit my need.)
Thanks in advance!

Capability based security in Windows 8/Windows Server 2012

I want to evaluate the new sandboxing mechanism in Windows 8/Windows Server 2012. I searched MSDN site for any resources but the documentation is extremely scarce. In comparison with FreeBSD Capsicum documentation, the one provided by Microsoft is just unusable.
How are we supposed to build robust sandboxed apps? Are the sandboxing APIs intended for metro style apps only?
I'm not sure what you mean by "sandboxing APIs". All "metro" (Windows 8 UI Applications) are sandboxed. I'm not aware of any way to sandbox desktop applications in the same way. See here.
Metro apps are pretty tightly sandboxed, and apps submitted to the
Windows Store need to declare many types of capabilities that they use
— not unlike Google Play's permissions list.
. . .
Windows 8 features a specific SDK for Metro style apps . . .
A quick explanation of capabilities: There are certain potentially sensitive things that you can do on a user's machine, such as access the Pictures library or use the webcam. If an app wants to do these things, the developer must declare a capability in the app's manifest. Then, when users download the app from the Windows Store, they can clearly see if the app is using any of this functionality. More info and a list of all of the capabilities is provided at App capability declarations.
Regarding sandboxing, there is some information at http://msdn.microsoft.com/en-us/library/ie/hh673561(v=vs.85).aspx. Yes, Metro-style apps are sandboxed in a way that desktop apps are not.
There is a whitepaper discussing security in Windows Store apps built with HTML5 at Secure development of Metro style apps with HTML5. There are also some common security scenarios documented.

What is your testing workflow for client-side web development on OS X?

What would be a good workflow on OS X for testing client-side code (HTML/JS/CSS) for browser compatibility and other issues across all major browsers?
I do my web development with Textmate (HTML and JavaScript), CSSEdit (CSS), and use Safari's Web Inspector, mainly for checking the JS console. I do have Parallels with Windows XP on it, but haven't tuned it for web development at all.
We develop on Macs too so what we usually do is testing and debugging in Firefox with the help of the Firebug plugin and the Web Developer toolbar. We then cross-check stuff in Chrome/Safari using Chrome's built-in Inspector in case of any discrepancies.
For testing on Windows we use a dedicated Windows machine that we can access through Remote Desktop which has some Virtual Machines running various versions of Internet Explorer (one VM for each would be nice, but we just use one for IE6, one for IE 7 and use the IE version that's installed on the remote machine as the third option).
A colleague of mine has a setup with VMWare and running IE right off his Macbook in a VirtualMachine.
As far as I can tell debugging in IE 6 is pretty hard, but some of the newer IE versions have a pretty decent Inspector similar to the ones in Safari and Chrome.

How to Test Sencha Touch apps in windows

So I am developing a Sencha Touch application in Windows. I want to test how this is going to behave on iPhone/Android/BlackBerry phones.
I'd rather not make it public just to test it by navigating to it from each OS physically, although I will be doing that before our official release. How can I emulate the phones on windows. Is there anything I can use to emulate Blackberry/iPhone on a windows machine just to test how the web page is going to be rendered in those devices?
I know the Android emulator I can run through Eclipse, but what about the other two?
You need a Mac to run the iPhone/iPad simulator. Blackberry can be done on windows though: http://www.blackberry.com/developers/downloads/simulators/
You might also consider delivering them to these devices as apps using phonegap, which plays nicely with sencha touch.
If you just want to see how the app would look and behave while developing, just use Google Chrome. You can enable the very good 'developer tools' to do various checks.
Install and run on Ripple Chrome Extension
Check out the number of devices / platforms it supports
...
...
iPhone 3G / 4
iPad
Nexus One
Nexus S etc..
In order to start developing applications using Sencha Touch, it is highly
recommended that you have a working web server where you can host your
application. It's possible to develop Sencha Touch applications, viewing local
folders with your web browser. Without a web server you won't be able to test
your application using any mobile devices.
You can run the application on your web browser by using:
http://localhost/your_app_folder
Using Safari web browser to examine your Sencha Touch application during
development, and the Safari Web Inspector is a huge part of that. Both Chrome
and Firefox have similar tools (Chrome Developer Tools and Firebug for Firefox),
but as iOS devices use Safari for their web browser.