PlugIn vs Dependency service in Xamarin.forms - xamarin.forms

hi I read some msdn tutorial on Xamarin form but there is no mention of PlugIn. I am a bit confused as to which one to use. Dependency service is used to call the platform Specific Api such as TextToSpeech in iOS and Android. But there are Plugin for Camera, Toast, Location and others. It seems this approach is better.
I need some confirmation and understanding to clear this confusion.
1.Is PlugIn an alternative to Dependency service?
for Example , I dont have to use Dependency service for location in iOS and Android if there is a Location-Plugin for Xamarin.forms.
your confirmation will help me on this matter.
Thanks

The DependencyService is a method that is built into the Xamarin.Forms library to provide you with a way to implement platform-specific code. More information can be found in the documentation: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/
The plugins, now bundled as Xamarin.Essentials (but of course there are much more), actually might use this DependencyService or at least work in a very similar way.
There really is not one answer to choose one or the other. If there is a plugin that does what you need and you feel comfortable using it, then do! If you need something different, you might want to write something of your own.
Always have a good look at the state of the code for a plugin: is it actively maintained? Is it built by someone you would trust, etc.

Related

Using Adyen from a SPA

We are building a marketplace using angular and we want to integrate Adyen payments. Googling for 'Adyen angular' or 'Adyen SPA' or even 'Adyen react' doesn't bring any useful results. NO results whatsoever.
Therefore I am left wondering, why the whole world (including Adyen docs) is not talking about integrating Adyen into a SPA.
It doesn't seem to be more vulnerable to network security attacks to me. At least I can't think of any reasons for that.
Please help me to understand, what I am missing out.
As madesch mentioned, integrating in a SPA shouldn't be too far from other kinds of integrations. Are you having issues with something in particular?
Here can see an integration with Vue, one with React and even one with React Hooks.
The card fields are not being loaded because I'm not using a real originKey, but it should give you an idea about how to do the integration.
I hope it helps!
It seems that I overestimated Adyen popularity and in reality, the truth is that it is just not popular enough to have gotten attention from SPA community. :(
it seems like originKey is deprecated, the current recommendation is to use Web DropIn. But this requires using a server component, as you don't want to expose your API key, right?
So if you don't want to use a deprecated API, you must always add a server component to your stack. A pure SPA does not seem to be possible using current APIs, it seems.
There are now few options available:
Angular support
Vue support
React support
All examples are based on the Web Drop-in approach which renders a checkout component with the supported/requested payment methods.
A basic explanation of the workflow is provided here.

How to handle routing in a DukeScript web application

DukeScript looks like a life saver for we Java guys! I am considering it for a serious project. Was curious to know whether it's production ready and well documented. Also, liked to know what would be the best way to support routing in a web application.
I asked this question at the official google forum, but didn't get a reply. So, thought to re-ask here.
Here's a blog post with a little example. It shows a simple integration of location hash based routing with knockout templates. The full example code is available on github.
You might also use one of the javascript libraries like sammy or pagerjs, which would require integration with these frameworks, but I wanted to keep it simple.

Are there examples of authenticating Desire2Learn api's using Flex or similar Adobe platform?

I'm new to Flex, not new to web services, but definitely not sure how to get started with authenticating as a user against the Desire2Learn API within the Flex platform.
Some examples would really help, and maybe promote some of the great tablet apps that could get developed. Are there any public samples out there? If not with Flex, then similar platforms?
Looking mostly here: http://code.google.com/p/desire2learn-valence/
There are no samples provided by Desire2Learn at this point. However, the source code for other platforms are posted. So you could take something like the c# code and combine that with the wiki docs in order to move it into flash/flex. (Also, javascript samples should be coming down the pipe)
If you create anything please feel free to contribute back to the project site.

What is the future of the Sys.require, ASP.NET AJAX loader script?

Does anyone know if this script will continue to have a future or is it DOA and being replaced by another component? I use its functionality a lot and would like to know if there is a better alternative or what the future holds for it...
To clarify, I'm talking about the async loader features in start.js.
None of the ASP.NET Ajax Library (not to be confused with ASP.NET AJAX) was officially released and development on it ceased before it was complete. You shouldn't use it. I've wrote an article on the subject.
The same team at Microsoft has produced a new script loader, DeferJS, which is the next logical evolution of Sys.require. You can find the latest version of it here: https://github.com/BorisMoore/JsDefer
There's not going to be any further development on sys.require, but the existing scripts and services will not disappear. Microsoft has taken considerable measures to maintain backwards compatibility with its older technologies, so there's no reason to think that what you have working now will suddenly stop working at some point in the near future.
Microsoft seems to be going in the direction of integrating with the open source jQuery library. Here's a blog post about it: http://weblogs.asp.net/scottgu/archive/2008/09/28/jquery-and-microsoft.aspx. jQuery is very powerful and flexible, and has both built in support as well as a plethora of plugins for AJAX.
There's also RequireJS (http://requirejs.org/), which is quite mature, and somewhat easier to use. It's not from Mircosoft, but it may be worth a look.
May be you can try this
it is an extensible resource loader, and it does dependencies tracking.

microsoft facebook sdk

Microsoft recently announced their Facebook SDK.
http://msdn.microsoft.com/en-us/windows/ee388574.aspx
Has anyone tried using it with ASP.NET or ASP.NET MVC ?
Would like your opinion. Any gotchas that developers need to be aware of ?
Michael
This is version 3.0 of the SDK. I've been using an earlier version and am in the process of upgrading to this new version.
Your question is very vague. What kind of gotchas are you expecting? There are so many pieces of the Facebook API that it's hard to speak to what your experience will be. What's stopping you from giving it a try yourself? You'd probably learn more from a few hours of building your own app with the SDK than anything anyone would be able to tell you here. If you get stuck or something doesn't work, then post your code and/or specific question and we'll do what we can to help you.
I am working on an ASP.NET MVC app using this library.
I have not used a whole lot of the functionality of the library since there are only two MVC specific class. An Controller Extension for getting a facebook api object, and an Action decorator attribute.
I have run into quite a bit of trouble with the methods in the Facebook.Rest.Data namespace.
Namely getting and setting Cookies.
Not sure what the deal is with this but it has been frustrating. And if it was not required by the client I would probably try and find a different library.

Resources