trying to load page with WinJS controls into IE 10.0 - windows-runtime

From VS2012, I right click on default.html page and choose to run this page in IE (10.0). Problem is that any WinJS controls that I have on the page aren't been displayed. I get a warning about Allowing ActiveX script where I allow to run the ActiveX script. Can windows 8 store app build with javascript should be able to run in IE 10.0?

WinJS is not meant to be a browser based application.
Windows Store apps are meant solely to be run in the WinRT environment.
If you explore WinJS, you'll see it calls into the Windows namespace which are the actual WinRT JavaScript projections - ie the translations from the C++ COM based API into in this case JavaScript.
So then the next question is what are you trying to accomplish? If you have a common code base to run in the browser, then don't have dependencies on WinJS or the built in style sheets.
Remember though,Windows Store apps have specific design recommendations that may not be the best for a browser based application, although thats your call.
If you post separately what you are trying to accomplish though to run in the browser and in your Windows Store app, we can try to help you make the best design decision.
Since that is a separate question than what's provided here, I'd say sign up for App Builder http://aka.ms/stackbuilder and check out the free design guidance you get from there, plus check my profile, I'm available for free time each week (oHours) and would be happy to go over this with you via skype, phone, etc

Unfortunately you can't, firstly due to licence of winjs (details here: http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/dbdabf29-206d-4d93-a491-b5e8fcd6a920/) and secondly because winjs is rather tightly coupled with winrt.
One alternative I found is http://www.bluesky.io/ which allows you to run winjs compatible code in browser. Not sure how it works in practice though.

Related

Xamarin: how to create views / UI of an app dynamically from a Json

Have you already developed a Xamarin app whose views are generated from a Json recovered when launching the application?
I met a client with this kind of need:
they are developing a web app to prototype the screens by adding and positioning some controls (TextBox, Label, ...)
this generates a Json that must be interpreted by the Xamarin app: this will build the different views dynamically
in a first version, the user's data would be stored locally (through a file or SQLite) and synchronized "manually" when the device is connected to a computer
the app will work on Android only in a first time, and then on WPF
The client has not yet decided between Xamarin.Forms or Xamarin native, but it's probably more interesting to do it through Xamarin.Forms, even if iOS is not required: this should make porting on WPF easier.
Have worked on similar cases? Have you some recommendations? Are there plugins or patterns that could be used to simplify this development?
I've found this one, but it doesn't seem to be the same use.
There is also this article on iOS, but there is not the same thing on Android.
This would in theory be possible using a massive code behind builder for a page but should NOT be done for a production app. Mobile apps have very specific requirements that need to be thought of before attempting.
Xamarin is great for simplifying code reuse, and if you use Xamarin Forms you can reuse the UI components for Enterprise apps.(the less fancy and pixel perfect the layouts need to be the better. )
Your client would be better served by making it a mobile compatible web page instead from the details you have shared.

Windows Apps Universal, XAML or JavaScript

I am embarking on my first windows phone app. I noticed there are two templates one is in Javascript (Blank App (Universal Apps)) and the other in C# (XAML) again Blank App (Universal Apps). Which one should I use, I know it depends a lot on the project context, but basically its just a simple phone app, that reads and displays data, mostly crud operations. Any help is appreciated.
I think there are a lot of resources in the internet regarding this question.
For example:
http://www.itwriting.com/blog/8350-xaml-and-c-or-html-and-winjs-for-windows-store-universal-and-cross-platform-apps.html
http://www.neowin.net/news/microsoft-likes-winjs-for-making-windows-8-apps-but-most-developers-prefer-xaml
https://softwareengineering.stackexchange.com/questions/156361/advantages-and-disadvantages-to-using-xaml-c-or-html5-javascipt-for-metro-apps
If you have a C#/.NET background, choose XAML - if you have a web background, choose WinJS...
I think that XAML is more popular than WinJS (especially for Windows Phone).
Here's my take to add to the list--http://www.kraigbrockschmidt.com/2013/01/17/html-javascript-xaml-directx-language-windows-store-app/ . In my partner-facing role at Microsoft I got this question quite a bit, and it really boils down to personal preference and experience unless you run into a place where the languages don't quite have parity at present. Parity was more of an issue in Windows 8, many areas were resolved for Windows 8.1. (Parity is more a matter between Windows/Windows Phone now rather than between the languages.)
Personally, being the author of Programming Windows Store Apps with HTML, CSS, and JavaScript, Second Edition (free ebook, Microsoft Press, 2014), I like the JS approach very much because you can leverage standards. On the downside, JS code is the least secure of all the options (see this blog post of mine), which might be a make-or-break consideration.

Working with HTML,CSS and Jquery Or Javascript in WP7

I am presently started working with mobile development and would like to know which is the best way to work with Html,css and jquery/Javascript for WP7.
As I have seen couple of things on the web as Phone Gap,Jquery mobile and Appcelerator Titanium
1.I have some of the problems actually this is not a problem but as PhoneGap gives a starter template with C# solution.
But I'm working on VB.Net.I'm unable to work with the C# solution as If I convert to VB.Net the entire starter template it is not working.
2.Just now I had a look at Jquery mobile there is no specific documentation mentioned how to use it with emulator in WP7.
Can anyone show me the links where I can start with the basics of Jquery mobile with WP7 emulator.
3.Do you think there is any other best way so that I Can work with jquery, html and css in WP7.
It sounds like PhoneGap is your best option here. Right now, it's the best way to deploy an HTML-based application on Windows Phone. The main thing that PhoneGap gives you is a bridge to the phone's hardware (things like volume buttons, vibration, etc.). It also gives you an easy way to wrap up your application into a package that can be installed like a real native app.
By themselves, other frameworks like jQuery Mobile, Sencha Touch and Kendo UI don't provide hardware access or the ability to deploy the app natively. They are purely UI frameworks, meaning they provide the interface widgets you'll use to build your app but little else. Generally, with these frameworks, you need to host the app somewhere like a website and access it through the browser.
Assuming you're running a Windows machine, you could host the app locally for development using Internet Information Services (IIS). Here's a guide to setting up a site. Then you could open the emulator and go to http://localhost to interact with your app. That would work, but it would be clunky.
The ideal scenario is to use both jQuery Mobile (or another UI framework) and PhoneGap to create a nice-looking, natively installable app.
What I'd recommend is trying to get PhoneGap set up in a VB project. From what I've seen, this shouldn't be too difficult. There are probably some details to work out, but mainly it looks like you need to copy the www and GapLib folders over. Then right click on References and browse to the GapLib .dll. You'll also need to get the MainPage.xaml and MainPage.vb files set up, but they probably just host a web browser control, so this should be straightforward.
Migrating the pieces into a new project should work a lot better than trying to convert an existing project.
If you post specific issues that you run into during the setup, I'm sure you could get them answered quickly.

How to share (e.g "open source") my PhoneGap based application?

I have a PhoneGap based application, written in html upon the Sencha Touch platform, and directed at for iPhone and Android devices.
I want to share my projects, and make it open source.
The thing is, I am using many different components in my application, which are already an open source project by themselves (Sencha Touch via the GPLv3 license, PhoneGap, various Phonegap plugins). I don't want to re-package these resources because I want to be able to easily update these components in my application, when they update.
One way to do it would be to include only my original code (html) and have instructions (Text file) that explains which version of which framework (PhoneGap, Sencah Touch, Plugins) to use with the code. That would be painful for anybody wanting to run the application.
Any ideas on how to share in a friendlier manner?
I'd recommend open sourcing the full working app (if the licensing allows.) That way, other adopters and contributors are much more likely to start with something that works.
They then have the option to update the components if they like. You could provide instructions about how to do that.
For you, it shouldn't be extra work to update the components. There are just more files to include when you push to the open source repository.
Here is a PhoneGap, jQuery Mobile, Android project I open sourced recently.

Assimilate existing apps?

I read all lot about rich client platforms and the OSGi framework, but stuck with this question: Is it possible to assimilate existing applications (either java-based or win32-based) in one application window?
I aim at connecting different kinds of (existing) application in one application (with Eclipse RCP) to offer the general window manager functionality (like resizing window, etc.) and additionally enhance it with inter-window communication or the like.
With SWT it is possible to write (kinda) native-looking applications and by using the OLE-Component I can integrate some functionality. What I would really like to know is if I can assimilate the whole window and integrate it somewhere else?
Important points are...
visual integration and
listening methodologies...
Thanks
There's an Eclipse based IBM product called Lotus Expeditor that does exactly this. If nothing else it's worth having a look at their datasheets, the trial code and the demos to get a feel for how it is implemented in the product.
You can change external application's window style to WS_CHILD, and set it's parent to your main window. Also remember to call AttachThreadInput(), it will help your UI handle focusing more correctly. In any case you will probably encounter many problems while trying to make multiple windows work together. I'm not sure if it's even possible to eliminate all the problems.