Use of npm package within Flutter - node.js

I come from an Android native background and have recently started using Flutter more frequently, but I have no ReactNative experience whatsoever.
Is it at all possible to port an existing RN (npm-package) for use with a Flutter application? My understanding is that a RN compliant package exposes a JS API. Is there any way to implement a form of JS interop to achieve this, or is it not possible, and it would be better to ask the package vendor for Android and iOS specific native library / SDK releases (which were probably used to create the npm-package initially)?
My initial outlook was that it was not possible, but then I saw this article;
https://www.thesmythgroup.com/in-development/how-to-use-npm-packages-in-native-ios-apps/

I would say it is better to use only dart packages, you don't have support for dart in npm, in some months you would have very big problems with that because of the lack of support, take that in mind...

Related

Use NodeJs in Kotlin Android Project to use Stream.io Feed Api?

Would it be advisable to some how integrate NodeJs with a Kotlin project to use Stream.io Feed API? From what I understand there currently isn't any support for Kotlin/Android regarding the Feed capability. I currently have an iOS app that uses Stream and would like to connect my Android users to the community also. If this isn't the right way to thin about this, is there a better way to go about this?
https://github.com/getstream/stream-java provides java integration for feeds. See its io.getstream.cloud package to leverage it in android.
Later this year, more modern and android specific SDK will be developed too.

Using flutter mobile packages in flutter web

I am using flutter web and I want to use some packages that are available for the mobile in the web version of flutter. The pubspec of flutter web look a bit different from that of flutter mobile but this is not the real problem. What I am concerned about is that is it possible to add the packages availble for mobile into that of the web. If yes, what is the proper way to do so?
This is not currently possible (as of June 2019) for any package which is dependent on the mobile OS. The reason for this is that the plugins on mobile use platform channels to communicate with platform-dependent code implementations for Android and iOS written in java/kotlin for android or objc/swift for iOS.
The only way those packages would ever work on the web is if a web-specific implementation were written for them which I assume would either use an emscripten-compiled library or more likely some sort of javascript bridge to call the relevant browser APIs.
From the flutter for web readme:
flutter_web does not have a plugin system yet. Temporarily, we provide access to dart:html, dart:js, dart:svg, dart:indexed_db and other web libraries that give you access to the vast majority of browser APIs. However, expect that these libraries will be replaced by a different plugin API.
For any plugin that is 100% dart code, you should be able to just include it in your pubspec.yaml the same way you would in flutter - under dependencies.
yes you can by take source code packages from github and take codes inside lib file inside package and put it in your project and fix errors may happen inside files by change path import to:
import 'package:flutter_web/material.dart';
and some more changes may need to do it.
it will work 100% and so easy :)

React-native Google Cast Library

(this is probably a stupid question, but here goes..)
I've been trying for some days now at having a go at creating a integrated cast that works with react-native, but can't get it working.
Is there any easy way of integrating the cast library with react-native, any go-to examples like the CastHelloText-Android for example?
You may check this react-native-google-cast library that unifies both android and iOS chromecast sdk.
For iOS
This library requires Cocoapods to manage Chromecast SDK.
Add pod google-cast-sdk to your Podfile. This is the easier way to have the SDK up to date.
For Android
This library requires Google Play Services, Media Router and Google Cast dependencies to manage Chromecast SDK.
You need to add compile 'com.google.android.gms:play-services-cast:9.4.0' and compile 'com.android.support:mediarouter-v7:23.0.1' into your your app's build.gradle dependencies. mediarouterversion must match with your appcompat version.
Refer to the example folder to find an implementation of this project. Use pod install and react-native link react-native-google-cast to try it.

Integrate C++ on webOS project

I'm developing a project for webOS 3.0 and I want to know if it's possible to integrate a C++ lib binary on a webOS aplication. I am tying to use nodejs addons and require the addon.node file into a JSservice like a module, but, according to this official LG developer it's not possible to integrate addons including C/C++ on webOS 3.0:
You cannot use modules including C/C++ addons. You must use modules implemented with JavaScript only.
I also tried using emscripten. This approach is not very convenient because it requires manually keeping track of all exported methods. As this project is maintained for several platforms and the code is already quite large, this becomes a hassle. The maintenance overhead would grow.
The question is whether there are any other ways of integrating C++ on webOS 3.0. Neither of the approaches I found seem ideal.
Sadly no.
WebOS on Palm supported C++ modules via their Plug-In Development Kit (PDK).
Unfortunately, to the best of my knowledge, it's not supported on LG TVs.

Is there a NodeJS plugin for Aptana Studio?

Is there a NodeJS plugin for Aptana Studio?
At least for NodeJS code-assist
And perhaps a way to create NodeJS project
And local NodeJS debugging
We have no NodeJS support currently. If this is something the community is interested in, it'd be helpful to file a feature request and vote it up: http://jira.appcelerator.org/secure/CreateIssue!default.jspa
Since we are built on eclipse, you should be able to try out the instructions for NodeJS debugging on Eclipse, found here: https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger
As for special NodeJs projects, there's no notion of that. You would likely just create a normal Web project. We do have the concept of libraries that you can add to a project, wherein you could point to js files/libs for NodeJS. We also has special syntax files for describing JS libraries/APIs so it can be integrated into our content assist. A good example might be the ruble we have for jQuery which contains that file for two versions of the jQuery API. Here's the 1.6.2 version: https://github.com/aptana/javascript-jquery.ruble/blob/master/support/jquery.1.6.2.sdocml The bundle.rb up in the parent directory hooks up the file in the ruble/bundle.
My guess is that creating an analogous NodeJS ruble and building up an sdocml (xml) file that described the API would be the easiest way to get started. Sharing that on github and sending it to us would allow for others to contribute as well. There are docs for creating rubles here: http://wiki.appcelerator.org/display/tis/Creating+a+new+Ruble
UPDATE: Project URL is http://nodeclipse.github.io/
There is Nodeclipse.org effort. Current version is 0.11 see http://www.nodeclipse.org/history .
Recommended installation for Aptana users through Enide - Eclipse Node.js IDE
Features
Creating default structure for New Node Project and New Node Source File
JavaScript Syntax highlighting
Content Assistant
NPM support
Debugging - Breakpoint, Trace, etc... via modified Eclipse debugger plugin for V8
CoffeeScript support
Installing
Update Site : http://www.nodeclipse.org/updates/
Read also Hints (section Aptana Studio)
(source: nodeclipse.org)
Read http://www.nodeclipse.org/ for more & latest information.
I highly recommend using Sublime Text 2.
There are a few nodejs plugins as well as v8 javascript [Sublime v8] and standard ECMA-262.
This is not a direct answer to your question, but if you're looking for a good IDE for node.js, you should definitely try Microsoft WebMatrix 2. It basically does what you requested to do.
I was fed up of fighting with Aptana Studio and plugins and all this stuff... until I found out Sublime Text. Simple and wonderful.

Resources