[TIMOB-26570] Node compatibility and developer experience
GitHub Issue | n/a |
---|---|
Type | Epic |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android, iOS, TiAPI, Tooling, Windows |
Labels | 2019-cl |
Reporter | Christopher Williams |
Assignee | Christopher Williams |
Created | 2018-11-16T15:24:04.000+0000 |
Updated | 2021-02-08T18:58:38.000+0000 |
Description
It's pretty clear that Node.js is the dominant JavaScript engine/experience for developers, and there's a huge ecosystem of npm packages to use.
We should allow our developers to leverage all that code, as well as the package management and tooling.
People have tried to hack around this for years, and here's the most popular means of doing so: https://github.com/smclab/titaniumifier
Creator and (once upon a time) maintainer of titaniumifier here. We at SMC are still very willing to share details on expected developer experience and integration implementation. Just small food for thoughts: *Node.js compatibility is a lower priority than access to npm/Yarn distribution process and ecosystem.* Technically Titanium SDK should support just the bare minimum… the problem is that you accumulated a little bit of delay and alternative platforms have a strong story on this already. Also you should also get rid of all inconsistencies in “almost, but not quite, entirely unlike”-Web APIs (I’m looking at you
Ti.Network.HTTPClient
) or provide new entry points that either act correctly (such asXMLHTTPRequest
) or are implemented through Node.js APIs (require('http')
). Another crucial thing would be to contribute implementation to _de facto_ standard libraries, such as [socket.io](https://socket.io/). See the [corresponding issue on the socket.io repo](https://github.com/socketio/socket.io/issues/1590), dating back to 2014, with *41 comments* and thus making it the *third issue by comments number* in the repo. At the time the maintainer ofsuperagent
was [willing to accept](https://github.com/visionmedia/superagent/issues/529#issuecomment-75417508) an extension for Titanium SDK but I personally never got to the stage to make a PR because I found too many problems on offering a reliable API to developers. _*Please note:* I’ve not been part of the Titanium community for a long time, the aforementioned issues could have been solved in the meanwhile. Sorry if that’s the case._