1039 points · by peterhunt · 11y ago · 287 comments
See for example the discussions at https://news.ycombinator.com/item?id=9111849 (eg. https://news.ycombinator.com/item?id=9113515)
Full disclosure: I work at Google, where many are sad to not be able to use recent Facebook code.
> The license… will terminate… for anyone that [claims] infringement of any patent… by any party if such claim arises… from any software, product or service of Facebook.
> The license… will terminate… for anyone that [claims] infringement of any patent… by any party relating to the Software.
> The license… will terminate… for anyone that [claims] that any right in any patent claim of Facebook is invalid or unenforceable.
Wow.
There are two separate kinds of legal protection at issue here, copyright and patent. The only thing that's close to covering ideas is patent law, not copyright law. (I'm assuming US law here, since that's where Facebook and I both are, but most of this is generally true I think.)
Copyright covers a creative expression, and is automatic. If I write a story, paint a picture, compose a song, or code a program, copyright secures my ability to commercialize that creative work as I see fit. If someone else writes a similar story, paints a similar picture, etc. but does not use my words or notes or lines of code, they aren't infringing my "copy right", because they're not copying my work.
Patents cover inventions, and are very non-automatic and best acquired with lawyers. Their term is also much shorter (about a decade, instead of about a century). US law currently lets you patent an algorithm or an arrangement of computer systems, under the artifice that you're actually patenting the implementation of that algorithm on any physical computers. Patents are issued for the invention, not for a specific implementation, and any implementation that works the same way infringes the patent.
(Trademarks, for reference, cover names used in advertising, i.e., "trade marks". They're somewhat automatic, they only cover names, and they're not very often relevant to F/OSS licenses.)
Traditionally, F/OSS licenses have been primarily concerned with copyright, partly because several of them were written when software copyrights were well-acknowledged and enforced, but when software patents were rare or nonexistent. This leaves you in the unfortunate situation where e.g. Facebook can write some code (automatically gaining a copyright), get a patent on the idea, open-source the code, and then sue you for patent infringement despite your copyright license. To avoid that, Facebook has an explicit patent grant in addition to the copyright license. (Although, as other commenters have pointed out, F/OSS licenses that don't specifically restrict themselves to copyright can potentially be read as a implicit patent grant if you stare at it hard enough.)
At no point in this does Facebook claim ownership of your work. Certainly your idea isn't legally owned by anyone, either you or by Facebook, if you haven't gotten a patent on it. Facebook's patents remain Facebook's patents, with or without this clause.
Because patents cover any implementation of an invention (whether or not the implementor knew about the patent), and because patents are in stupidly dense legalese, it's super common for people to be inadvertently infringing a bunch of patents. The traditional solution for this is that large companies have defensive patent portfolios in a sort of mutually-assured-destruction scenario: if Facebook sues Google over a patent, Google will countersue over all the patents they have. So there's an armistice, at least among big companies. The explicit patent grant weakens that, because now Google can just incorporate parts of React into their React-competitor, and Facebook loses a patent from their defensive portfolio.
So a few clauses like these are normal: you get a patent grant from Facebook, as long as you don't sue Facebook over (different) patent infringement. This maintains the armistice between big companies, and it's also great for the little guy, who wasn't going to sue anyway because they don't have any/many patents (but also doesn't have a defensive portfolio because they don't have any/many patents). These clauses only cover claims of patent infringement, which are the thing that everyone is unintentionally doing en masse, not copyright infringement, which is much harder to do unintentionally, so they're pretty fair.
But the fourth clause is super weird. It means that you can't dismantle any of Facebook's patents by e.g. providing prior art, without losing your patent license. It might even mean you can't lobby for software patent reform. It solely holds up Facebook's patent portfolio and the armistice between big companies. Usually dismantling patents is a good thing for everyone, because it's disarmament, and it's unfortunate this license doesn't extend to people who do that.
(IANAL, TINLA, corrections graciously appreciated.)
And even if we assume that to be true and assume that both parties believe in patents want a robust, well-functioning software patent system, that clause still sucks. If Facebook and I both invent something at roughly the same time and apply for patents, and the Patent Office misreads our applications and grants them both, and I point this out to them and I had priority (thereby invalidating some of Facebook's claims), Facebook gets to terminate all my patent licenses.
I'm confused. The Facebook PATENTS stuff seems no worse than MIT-licensed code that includes no patent grant at all.
In other words, if the PATENTS termination clause takes effect, then the software essentially reverts to being plain MIT, instead of MIT + patent grant, right?
EDIT: Appears the issue is implicit vs explicit patent grant, and the Facebook PATENTS stuff can indeed be worse than no patent grant. https://news.ycombinator.com/item?id=9113515
As far as I understand it, the patent grand terminates when you end up in court with Facebook and then you're effectively distributing software that may or may not be covered by patents you don't own/have a license for.
I'm mostly interested in the interpretation since it's a curious use case. The actual grant you'd lose is pretty much useless in that scenario either way (as it can't really be granted due to the software not patentable issue).
Whether the clause is triggered or not shouldn't matter if the patents aren't valid in your jurisdiction.
You don't have to state your rights — you just have them (there might be exceptions to this).
---
I'd love to get an answer to the bigger question as well.
Are there ever! For example, right against self-incrimination must now be invoked explicitly. Refusing to answer a question (they will say "being evasive") can be used against you unless you affirmatively state you are exercising your right to remain silent. [1]
[1] - http://www.abajournal.com/news/article/chemerinsky_silence_i...
Facebook holds patents granted in the US. Those patents to do not apply to all other jurisdictions. German law doesn't consider US software patents invalid, they just don't apply under German jurisdiction.
Basically, if Facebook can't sue you for patent infringement in the first place, the clause doesn't apply. If you use React in a product that enters the US market (or any market that is subject to US patent law), that's a different story.
That said, I'm suspicious that the entire thing is not enforceable in Germany in the first place (to clarify: I'm not claiming it's invalid, just speculating that it may not be enforceable in German courts). German contract law is actually pretty restrictive when it comes to what may or may not be in implicit agreements like software licenses.
Case in point: WhatsApp was told off in Germany because it blocked the accounts of users who used third-party clients. Using third-party clients was explicitly forbidden in the WhatsApp ToS, but the clause was considered "surprising" and therefore invalid. The ruling argued that using third-party clients was accepted by most popular similar apps and losing access (not just in the third-party client, but in WhatsApp proper) because of doing that could not reasonably be expected by users.
There are also serious restrictions to what rights you can waive. Not only doesn't the public domain exist in German law (you can grant a universal unrestricted non-exclusive license, but you can't waive your ownership completely), nor can you completely disclaim responsibility (e.g. you can still be sued for intentional harm even if you give something away for free). Another example was Walmart in Germany trying to prohibit employees from entering romantic relationships with each other (and failing, resulting in lots of bad PR).
There's a reason contracts in Germany typically include a clause stating that even if any single clause is legally invalid the other clauses (or even "the spirit of those clauses" in so far as it can be enforced otherwise) still remain in effect. I'm not sure whether this is actually required, but the idea is that it prevents contracts from becoming invalid because of any single clause being ruled invalid.
> If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
This seems equivalent to me, is the Facebook one broader?
The general argument is made that there is an implicit patent license granted when an open-source license is applied to a software product, and that this explicit patent license somehow overrides the implicit patent license (despite not being part of the license itself).
I've received different advice on the matter, so YMMV. But at the Google level, I'd imagine there'd be channels to negotiate an acceptable solution to this issue…
I'm not really sure what Facebook thinks they are gaining with this clause. They aren't going to stop patent trolls, because they are non-practicing entities. Maybe they want to guard against someone making improvements to React and then suing Facebook if they do something similar later.
Wouldn't that apply to Google as well?
But I think you've made a very good point. If you're not going to avoid all component-based and/or virtual-DOM view engines, picking an alternative to React may not give you any advantage in a legal situation.
1. You have a license to our related patents
2. You're on your own if someone else claims that your use of our stuff infringes their patents
2a. But if the party suing is also a licensee, they lose their license.
3. You lose your license if you come after us for anything.These kinds of licenses have network effects, and are only really effective in a mutually-assured destruction scenario.
http://ipjournal.law.wfu.edu/2011/03/googles-afraid-its-free...
Not only did the call for patents never actually materialize anything (12 supposed but never named companies in a press release four years ago), Google bought out the MPEG LA's claims anyway[1].
Meanwhile the VP8 patent grant[2] is exactly the kind of thing being contrasted here: you lose your license to the VP8 patents only if you sue over patent infringement in VP8 itself.
[1] http://arstechnica.com/information-technology/2013/03/google...
If I'm reading this right, any fork of this code is not covered by the patent-protection can be sued into oblivion, by Facebook themselves if they feel threatened. Wow.
Ability to fork is crucial for real life open-source projects, so having a clause like that pretty much nulls out any open-source benefit which may have been there in the first place.
It should only regard to react. If the clause is to protect their right to develop react, it should only pertain to such.
Suing Facebook does not void your license to use React. It voids your additional patent grant. That's different.
That might or might not be Facebook's goal in the license, but regardless, it seems like a great outcome. Likewise, avoiding that outcome might or might not be Google's reason for not using this code, but since other companies are, it seems in need of explanation.
Or they sue each other anyways and it takes another 5-10 years to figure that situation out, hobbling any OS development under those licenses while there are very clear and widely used and accepted patent grants available.
There's a reason the FSF recommends Apache 2.0 if you aren't going to go GPL.
Good for you buddy.
This weekend I am going to try and get a working application built using React Native. Facebook are absolutely killing it in regards to their open source contributions. The learn once, write anywhere paradigm is smart as opposed to what others have done via their write once, deploy anywhere approach which just doesn't work for web and native applications.
I downvoted you not because I don't agree that Native will be compelling but because I hate to see all this hate that's come out against hybrid apps in general that's even been propagated by React Native devs.
Webviews will get there. WKWebView is already a huge step forward. I think Native is great, but it's not a clear winner in many cases. I even like "learn once apply everywhere" (though it doesn't really go against the web in any way), but I would say the mountain of hybrid apps out there actually disprove that it "just doesn't work".
That's just FUD. Only hybrid apps that use non-native scrolling are jittery, and for years now you can use '-webkit-overflow-scrolling: touch` to get native scrolling with bouncing.
Could you explain that? I'm not familiar with phone development and I'm having difficulty figuring out what "the other way around" is.
I'm a little concerned because, for example, a button is not implemented as a native UIButton, and a ListView doesn't use UITableView. Instead they are composed of native UIViews with a lot of JavaScript glue.
That being said, Facebook has more experience writing iOS apps than me, so it may be possible that those things don't really matter (and doesn't preclude 1:1 components from being added down the road).
[1] https://facebook.github.io/react/docs/displaying-data.html
- React Native from Facebook (https://github.com/facebook/react-native)
- Appcelerator's Titanium and Alloy Frameworks (http://appcelerator.com)
- Telerik's Native Script (http://telerik.com/nativescript)
- Xamarin (http://xamarin.com)
As I understand it, all three of these frameworks have a JS (or C#) runtime that is compiled along with the app. This JS runtime is what drives the app and uses the native features of each platform (iOS / Android).
I've been building on Appcelerator for the last 4 months on some basic apps, and it works pretty well.
I look forward to trying out some toy apps on the other platforms.
We also do Scala, Kotlin, Clojure etc. and we are OSS as well (we started out as OSS). You can build unlimited apps without paying us a dime. You can also compile the entire compiler plus Eclipse/Idea/Maven/Gradle integration yourself so you aren't locked in.
We expose all iOS APIs and have a custom bridge besides JNI to make binding and subclassing of Objective-C APIs and C APIs as seamless as JNA or p/invoke, but without performance overhead. We use LLVM to compile JVM bytecode to native code directly, so performance is excellent and on par with Objective-C.
At this point you can write apps for iOS and Android, using the native UI APIs, and share business logic between them and your backend, if that's also JVM based. I personally think that using native UI APIs is best. However, for CRUD or enterprise apps you may not care about shininess, which is why our next focus will be on a cross-platform UI toolkit for Android and iOS.
You do have to pay for debugging support, interface builder integration and SLAs/hotfixing. We hope that's a fair way of supporting our OSS work.
Now I feel dirty...
On Android, there is no JS execution environment available. We want to avoid the memory and cpu overhead of web views.
So we are basically forced to ship Android with a copy of either JSC or V8.
The main advantage I see is that it's open source and free (with some patent caveats).
There's also Corona SDK, which uses lua and OpenGL. Write once, build for Android, iOS, and Windows Phone 8. UI performance is quite good. Supposedly building Mac and Windows desktop apps is coming soon, but HTML5 support was announced a year ago and has not yet happened.
The free version of Corona SDK supports only a subset of the native APIs (albeit an extensive subset that's probably sufficient for 95% of uses). If you want the full set, you have to pay $1,000+ a year for Corona Enterprise and implement your own os-specific glue logic.
How, when you're running JS on a different thread to the iOS main thread, do you avoid race conditions? A simple example:
* Say a button's event handler pushes a new view controller onto the navigation stack, what's to stop the user from tapping the button twice very quickly before the JS thread gets a chance to service the first tap, eg it may be garbage collecting or busy elsewhere, and once it's free again it runs the handler twice and pushes two view controllers onto the navigation stack?
Looks great by the way, i'll certainly check it out.
Also ask yourself a question, do you really think you can call yourself an iOS developer when the only way you truly know how to create apps is with React?
I don't really want to call myself an iOS developer. I just want to port a simple web app to iOS, and my options are learning just enough iOS development to do it myself, or hiring a real iOS developer. So I'm curious if this framework would tip the scale in favor of the first option.
Saying this, I have no real idea how abstracted react native is from normal IOS dev, so maybe it wouldn't be as helpful as, say, learning python and django at the same time.
You don't even have to dive into React (which has its own unique way that I'd call barely JS anymore).
Have you tried Cordova / Phonegap?
I totally agree with you, but does it matter in the grand scheme of things? Look at web developers that only know frameworks. They may only know jQuery or only know Rails, but if they're still getting shit done, does it ultimately matter? There may come a day where that developer is required to go deeper than the lib/framework allows and they may be exposed or may be forced to learn more or they may drown because they never learned to swim.
This is interesting to me because it brings up the question of how important is mastery when there are deadlines?
Like Facebook's Groups app and Ads Manager app, which both use React Native?
What proportion of iOS UI elements are available through React Native ? Is there a 1:1 mapping somehow, but how are discrepancies between platforms (Web/iOS/Android) handled then ?
Could a complex app's views realistically be built entirely using this or would you have to resort to native UI elements in some cases ? How well would they mix with React Native code ?
When asked when it will be released they said "You will know when its released, it will be really obvious"
Q. Can I submit my own React Native app to the App Store?
A. Not yet, but you will be able to soon. If you build something you want to submit to the App Store, come talk to us ASAP.
Thanks! :-D
The reason I'm excited for it: Java promised write-once-run-anywhere, which means you are always serving the least common denominator. React Native promises learn-once-write-anywhere, which means a single team of engineers can realistically build high-quality apps using the target platform's UI paradigms.
Really exciting stuff!
Funnily enough it's a different matter for games, see Unity, UE4, libGDX, Cocos2D-x etc.
Adobe Air comes pretty close to "WORA". For 2D games it goes almost without saying, but throw in the excellent Starling + Feathers framework and it is great for Apps too. A drawback is of course that you do not have native UI, but if you can get passed that it works really really well.
I evaluate cross platform technologies quite regularly and my opinion still is that Adobe Air is the best (just make sure you stay away from Flex ;) For everyone who gave up on Adobe Air some time ago I highly recommend to take another look. The Eco system did not stop to evolve at all and it provides a really good development environment.
Funny you mention Flex, still gives me the shivers, still used by a lot of enterprises around here. Pretty much on par with applets in terms of badness.
I am extremely hopeful about React. Even though I know Objective C and have apps in the app store, I'd use a cross-platform toolkit if I could get Android and Windows for free (or minimal effort). In my past experience it didn't really play out that way, but I am ever hopeful that this time it will really work.
I guess a lot depends on what is meant by encountered but Xamarin would probably be a much more full featured cross platform UI toolkit than anything else out currently.
Supports Xamarin.iOS, Xamarin.Android, Xamarin.Mac, WPF, Windows Forms, Windows Phone 8 and Windows Store apps. Check out "Writing Mobile Apps the Github Way by Paul Betts" @ https://www.youtube.com/watch?v=voa44OHBKME
It is the framework that powers GitHub for Windows and various other undisclosed projects ;-)
You're into commercials and marketing hype?
Since when is react providing any semblance of stability? Javascript is already bad enough of a moving target without an unstable api on top of it.
Take a look here: http://facebook.github.io/react-native/docs/pushnotification...
This seems to be the case with a lot of cross-platform development kits. One or the other of the platforms is a second-class citizen.
It seems that all of us are salivating at the idea of having true cross-platform tools that actually work really well on all environments so I will keep my fingers crossed that Facebook can pull it off.
For example, I used to have a phone with only 1gb of internal storage, on which Facebook took over 200mb on its own (far more than basically any other app). It's pretty clear that whatever the devs are doing in regard to space usage, they're doing it incorrectly.
My concern is that it actually works and isn't buggy as hell on one of the platforms, which is something that I haven't found from similar toolkits.
If the latter, I wonder if the React Native developers have considered using Duktape rather than JavaScriptCore. Duktape might be better for memory usage, since it uses reference counting, with mark-and-sweep GC only being necessary to break cycles.
Because we built React Native around an asynchronous batched bridge, we can plug it into any JS execution environment. For now we plug it into JSC, which is available on iOS 7 and 8. We also use websockets to execute the JS in chrome so we can utilize the debugger.
Without much difficulty, we can make the bridge work over a WebView (if we want to support older iOS versions), or Duktape.
Native apps rendering capacity is sub-micro seconds. Hoping for Appcelerator's dreaming Hyperloop that give us native JS capabilities.
I still plan to use ReactJs (web) within web-view.
new ListViewDataSource
should have been: new ListView.DataSourceIt seems ComponentsKit is a very specific to iOS as opposed to React.
My understanding is that ComponentsKit has you write your iOS apps with ObjC/Swift or whatever, but it gives you a way of structuring your apps that is similar to React.js
http://facebook.github.io/react-native/img/chrome_breakpoint...
I am really confused. Why is this easier - this looks extremely buggy and complex?
I've been checking my Twitter obsessively today and yesterday for this.
It's basically Relay but using Promises instead of GraphQL to write queries. Transmit is coincidentally also a very efficient way to create isomorphic apps that can render on the server.
https://github.com/facebook/react-native/tree/master/Example...
How would one go about making the Movies sample accessible, or is that even possible?
Scala -> Scala.JS -> React Javascript -> Native code
I'll have to try this out on a small project and write about it.
var { AppRegistry, Image, ListView, StyleSheet, Text, View, } = React;
is this ES6 feature?
It gives an error in Console.
http://facebook.github.io/react-native/docs/nativemodulesios...
We use a key-value store for most of our client-side persistence:
http://facebook.github.io/react-native/docs/asyncstorage.htm...
still wish there was a way to develop for iOS on windows platform but I guess I will have to purchase a mac now if I want to build mobile apps