Ability to track the usage of a Web Component - polymer

I have created a library of UI Web Components using Polymer 3.x for a client, and the client would like to track the usage of components across various applications, is there any way to track the usage of Web Components?

Investigate how Google tracks sites, with that code snippet on nearly every site.
Then call it from your WebComponent code.
https://developers.google.com/analytics/devguides/collection/analyticsjs

Related

How to pass requests from browser to an external application

If you have Steam installed, following links such as steam://link will result in Chrome suggesting to launch Steam:
How can I achieve the same effect for a custom app with a custom handle? Where is this behavior documented?
Are you referring to an external mobile app or an external desktop app?
Here most likely your Steam App supports deep linking via URI Schemes, which is a common flow for being able to open apps from the mobile web.
If you wish to develop an app that supports that, you need to refer to the deep linking documentation for the platform where you develop your app.
Basically deep linking with URI schemes means that the browser tries to redirect to the steam://link scheme, and if there's an installed app which declared that this scheme can open it - deep link occurs.
The scenario to support that really depends on the platform you are targeting.

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.

TVML vs Custom App for Apple TVOS

Are there any advantage of using TVML over custom App (media based App not a game) for Apple TVOS? From what I read from Apple's documentation I could not figure out any such advantage (though it mostly talks about TVML/TVJs).
For iOS (Swift, Objective C) developers, using custom seems like easier, faster and with more possibilities.
I think whatever templates are provided by Apple can be build using UIKit because internally it is UIKit. Right?
[Update]
Let me rephrase my original question as the answers so far are not given any points in favour of custom App. I agree that #shirefriendship has some real valid points in favour of TVML (biggest one is- > App changes possible w/o an App update). Are there any advantages of using custom over TVML? Like anything not in reach of TVML?
Having already built an application using TVML/JS and now working on a native application I would say that the Javascript option is aimed more towards beginners or basic applications.
TVML applications provide an easier, faster way to build standard applications with common features/user interface. We used it to rapidly build a prototype of an application. Now that we've launched the application and it's getting some uplift (featured in What to Watch and Top Free Apps UK) we are now rebuilding it natively to add additional features such as analytics, crash reporting, custom interfaces and other bits to increase re-circulation and custom recommendations.
#shirefriendship's answer provides a good explanation to the benefits of TVML applications and I think this is a good option for beginners, prototype applications or even basic applications.
Native applications provide alot more control over how the application looks, works and feels. Having access to most of the iOS SDK's allows you to do more such as integrating Cloudkit, develop 2D & 3D games and more.
Once we have finished development of our native TV application I'll update the answer with some more information such as development time between the two different versions, features in the application etc.
UPDATE: To answer your second question, yes you can pretty much develop ANY user interface / template using UIKit, the TVML templates provide user interfaces that would be commonly used / quite handy. Using UIKit you could replicate or customize any of the pre-defined templates or build something completely new.
It is true that you have more flexibility with custom UIKit code. With enough time, you could potentially create an app that behaves similarly to a TVML/TVJS app...but why reinvent the wheel?
There are certain advantages to using TVML Templates, even if you are primarily a Swift/Obj-C developer.
TVML templates provide a familiar experience for the user. Have you
ever used the Netflix TV app, or HBO GO, or iTunes? They all use
TVML Templates and have a distinct look and feel to them. This cuts down drastically on design time.
Templates are incredibly easy to implement, even with very little
JavaScript experience. Auto-layout is taken care of for you. Lazy
loading images occurs automatically. The behavior of every UI
element on the screen has already been taken care of by Apple.
The templates are structured yet customizable. Templates are plug
and play, but you can still customize certain aspects of the UI
elements Styles and Attributes
You can host your TVML/TVJS files on a web server. This allows you
to make changes to your app without your user needing to download an
update to your app.
You can mix and match TVML with custom UIKit. Want Custom behavior with UIKit sometimes, but for standard views, you'd prefer a template? Why choose? You can have BOTH in the same app. Check out my answer here that describes how: How To Mix UIKit and TVML Within One App
When in doubt, try it out! Mess around with the Catalog App from Apple and see if you like TVML templates. You might surprise yourself.
MSK
The primary advantage of TVML is that it is all javascript which appeals to a broader base of developers.
Not sure about your second question regarding developing templates via UIKit

MVC4 mobile Web app into app store

I have developed an web app using MVC4- mobile and HTML5. Every things is working fine when we enter URL from any phone. But i am wondering how to convert my web app into hybrid app so that i could upload in istore or GooglePlay.
Please help me with the procedure or steps i need to follow and is there any tool other than phoneGap that i could use.
Thanks in advance.
There are few options but I will mention only two of them.
Most commonly used is a Phonegap/Cordova app wrapper framework (Also my main choice). Cordova is a new name for a Phonegap framework. It will give you an access to common mobile phone functionalities (Android, iPhone, Blackberry and WP7+). It is rather easy to use and there are a lot of vorking tutorials available, you can even find them in youtube.
Here's an phonegap link: http://cordova.apache.org/. There you will find tutorials how to install/configure it on all available platforms. This is a older link: enter link description here, it still has usable informations.
If in doubt always search for phonegap examples instead of cordova. For some reason Phonegap is still a mostly used name.
Here's an Phonegap + jQuery Mobile example: http://therockncoder.blogspot.com/2012/07/jquery-mobile-phonegap-and-camera.html, there you will find a github link for Android and iOS implementation.
Through the PhoneGap javascript APIs, the "web app" has access to the mobile phone functions such as Geolocation, Accelerometer Camera, Contacts, Database, File system, etc. Basically any function that the mobile phone SDK provides can be "bridged" to the javascript world. On the other hand, a normal web app that runs on the mobile web browser does not have access to most of these functions (security being the primary reason). Therefore, a PhoneGap app is more of a mobile app than a web app. You can certainly use PhoneGap to wrap a web app that does not use any PhoneGap APIs at all, but that is not what PhoneGap was created for.
Now some disadvantages. With PhoneGap for each platform you have to maintain a different project. The burden for that increases when there is a need to use multiple PhoneGap plugins because you need to search and update different files on each platform.
Mosync is also an excellent solution. This framework has a few things better handled then Phonegap. Like:
With MoSync you’ll have only one project to maintain for all the platforms. For iOS you will still need to use Xcode because MoSync outputs a project for it but, other than just building it, there is no need to dig deeper in Apple’s IDE.
The entire provided functionality for JavaScript is placed in the same file for all of the operating systems. There are no files for plugins because it has none (at least that I know of), but the same extensibility is achieved in ways described in the next section.
If there is some functionality that MoSync doesn’t provide on the JavaScript side, there are no plugins that you can use, but there is another way. MoSync provides a lot of features from the C++ side and if they aren’t accessible from JavaScript by default they can be easily made available. I’m sure that in the future the MoSync team will add more features to the JavaScript library.
With MoSync you are not restricted to only JavaScript frameworks to replicate native UI, you can truly create native UI elements that are more responsive using only JavaScript.
Rhomobile on the other hand is much less used thus a lot less supported.
I heard few good things about this framework but never had time to learn/use it.
RhoMobile applications are OS-agnostic, able to support enterprise-
and consumer-class operating systems including Windows® Embedded
Handheld, Windows® CE, Windows® Phone 7 Series, Apple® iOS, Android®
and BlackBerry®. You have complete control over how applications
behave on different devices. With RhoMobile Suite, you are finally
free from OS design constraints, able to create business applications
that are every bit as elegant looking and intuitive as their consumer
counterparts (This was copied from their main site).

Approaching a new Web app with Mobile app

I have a new project starting up that consists of building a webapp for a workorder based system. The main views are:
Viewing all open/closed/hold work-orders,
View Detail of Workorders
Create new Work orders
Account management.
In addition to being a webapp, it should also function as a mobile app.
What is the best approach for doing this? Will i have to develop a separate app for the mobile side? Can i use my webapp + sencha, jquery mobile, something.. that can work with my logic, classes, HTML structure to have it effectively work on mobile?
Or do i develop a mobile version first and think about progressive enhancement to the webapp (website)?
This question is open to all interpretations of flow, process, technologies.
Thank you Stack Overflowers.
Seperate out your business logic and model code from the view layer. Then use sencha touch and Extjs to create both a web and mobile (mobile web atleast) application. You can then reuse the model and business logic code and use the different frameworks to manage the view. When you have a mobile app running, use phone gap to turn it into a full-fledged app (assumming you need access to phone only systems (camera etc)).
We've done this with our own custom framework built on top of Ext and Sencha. We use ActiveRecord to run the models and then have a compile script that knows which files are for mobile and which are for web. We can then have all the code in the one repository and use the compiler to produce versions for the correct type (mobile or web).
It's definitely not a good idea to start with the mobile app, since web browsers are more ubiquitous than smart phones. Start with the web application and tailor the UI so that it can be easily displayed on smart phones as well as desktop browsers. If that's not a viable route, you could have a regular version and a mobile version of your website. In general, I think the overhead of writing a dedicated mobile client to browse your website is greater than the payoff unless you want to take advantage of the phones' hardware features like GPS or sensors (and even GPS you can still access from a web app using W3C geolocation api).