当前位置:网站首页>Apple has open source, but what about it?

Apple has open source, but what about it?

2022-07-06 06:23:00 Microservice mall technology sharing

Part 1 ( Please stamp... For details :《( On ) Apple has open source , But what about ?
》) Li said , Apple's first open source project Darwin The birth of , It is inextricably related to jobs's Revenge return .

As an open source operating system ,Darwin Has a very pure open source lineage , And then there is FreeBSD founder Jordan Hubbard Such a big guy to join . While in service , It has made outstanding contributions to Apple , Whether it's macOS、iOS still iPadOS, Even HomePod and Apple TV(TvOS) It's all based on Darwin On the basis of .

unfortunately ,Darwin Has become the past style , Disappear in silence . however ,Darwin A few years after open source , Another heavyweight open source project of apple WebKit Put on the table , Won Apple's open source baton .

This time, , Apple's open source is a few pounds 、 How about sincerity ?

medium-length : Browser World War II hero WebKit Open source love and hate

At the end of last century , The browser war between Microsoft and Netscape , It has been talked about so far . Simply speaking , At that time, Microsoft had relied on Windows Become a business giant , And web browsers are accompanied by NC、JAVA And so on , Let Microsoft begin to feel that its building is in danger .

at that time , The most popular browser is Netscape (Netscape,Firefox The forerunner of ). For netscape , bill ・ Gates used “ Ace in the hole ”: Microsoft invested 20 Billion Quickly roll out browser IE2.0, And decided to Open for free This product , At the same time, it was announced that Windows95 And IE  Bundling sales .

A set of combo , Microsoft successfully used its monopoly advantage to shuffle the browser market ,IE The market share of browsers is 2002 Once a year as high as 96%. This browser war , Microsoft is not developing a higher performance 、 Better technology products win , But with the “ Bad money chases good money ” Commercial means .

The consequence is ,IE This classic but flawed browser has greatly reduced the quality of life of developers , All kinds of problems left over by it still haunt many Web Developer . There is a radical view that ,IE The browser forces Web Developers climb slopes in ice and snow , Almost destroyed the whole Internet .

The war on browsers has not stopped .2004 year ,Firefox Reborn from nirvana in the ashes of Netscape , Plus the apple Safari 、 Norwegian Opera And Google Chrome, The second browser war is imminent . Under Siege , Microsoft IE Share is constantly eroded .

among ,Safari Through binding and powerful functions , Quickly become one of the world's mainstream browsers , Even once dominated the U.S. mobile browser market , There is no better time than the present . among , Open source WebKit(Safari Browser engine ) Is a well deserved hero behind . Of course ,Safari Finally lost to Google Chrome, And has shown fatigue in recent years .Statcounter Statistical display ,Safari stay 2022 year 2 Month after month 19.3% Share , Living at second .

https://gs.statcounter.com/

But at the moment, , Safari The most serious problem is not the decline in market share , It is Safari The browser supports Web It lags far behind other competitors in terms of function , Many people have regarded it as  “IE The spirit of ” The reality left behind .

Jen Simmons My identity is apple Safari & WebKit The evangelist of the developer team ,2022 year 2 month 8 Japan , She is in Twitter Launched a campaign about Safari Investigation and discussion of problems :

Everyone I meet is saying Safari Is the worst , It's a new era IE...... Then point out what disappoints you 、 Prevent you from building websites / APP The specific Bug And lack of support , Please be there. Tickets Submit . 

ad locum , We have no intention of pursuing Safari How did you get here . from WebKit Start with the story of open source , Maybe you can see some clues .

01 Mars hit the earth , Apple “ Cheating on men who play with women's affections ” Open source

stay Safari Before , Apple has experienced a period of being by Microsoft and Adobe “ control ” The time of
. At the time , Microsoft controls office software (Word、Excel and Powerpoint etc. ),Adobe Control Creativity 、 Key tools used by designers (Photoshop and Illustrator etc. ), They are almost... Third parties Mac The core of software ecosystem .

This third-party platform is more powerful than its own “ Humiliation ”, An apple can't swallow a mouthful . In order to strengthen the control of their own platform , Apple can't make “ Web browsing technology ” In the same dilemma , Research and development Safari Be imperative .

2001 year , Microsoft IE Has won the battle with Netscape , Very influential . This year , Take action inside Apple : Build a new team , Start a new 、 secretive Web browser project , To develop a new 、 Can replace Microsoft IE Browser . at that time , All sold Mac Computers will IE Browser as default configuration ,Mac No native browser .

To do this , A browser kernel is the key . The browser kernel is the engine , It consists of two parts : Rendering engine (layout engineer perhaps Rendering Engine) and JS engine . It's responsible for getting the content of the web page (HTML、XML、 Images and so on )、 Organize the message ( Such as joining CSS etc. ), And how to display the web page , It will then be output to a monitor or printer .

Different cores , The rendering effect is also different . Apple wants to be competitive in the browser “ Trump card project ”, You have to start with the kernel . This time, , The open source project that apple is interested in is KHTML and KJS.

These two open source projects include WebCore and JSCore engine , yes KDE( K Desktop Environment ) stay 1998 Typesetting engine developed in , Originally used for Linux and Unix And other open source operating systems . In the comparison Gecko engine (Firefox Used ) after , Apple still chose KHTML, It has a clearer Architecture , And smaller . 

KDE Community icon  

2001 year 5 month 25 Japan , Apple Engineer Don Melton( At that time Safari The chief designer of the project ) Officially from KHTML fork Out of a branch , This is the same. WebKit The forerunner of .

It is worth noting that , KHTML And KJS The engines are all free software , It follows GPL license , Support at the same time BSD System development . That means , They are derived from , Must continue to follow GPL For open source .

therefore , When 2003 year 1 month , In San Francisco Macworld Expo In the keynote speech , Jobs personally released Safari At the same time , Also announced Apple KHTML Transplantation of engine —— WebCore Open source .( In fact, it will start from KHTML Moved directly WebCore And JavaScriptCore These have to come out of open source )

In the description ,Safari The main feature of is fast web browsing 、 Native platforms are more integrated and more compatible than most existing websites . It is important to , It has made... For apple Mac Control of a key technology in the product family . In some views , Apple is committed to open source WebKit The first reason is to pull Microsoft down , Shake the throne of its browser market .

This business purpose , Nature is very different from the ideal of freedom advocated by the open source world , Here, open source projects are tools 、 It's weapons 、 It is a sharp weapon used to break through Apple's commercial weakness .

Of course , Now that Apple has opened open source “ Pandora's box ”, Bowing without turning back , Apple wants to continue through WebKit Consolidate your browser position , You have to deeply participate in the open source community . But based on Apple's own culture , This can be regarded as , Mars hit the earth ......

2003 year , San Francisco Macworld On the same day of the conference ,Don Melton Officially established apple Safari The team , And give KHTML and KJS The chief developer of sent an email , To work with KHTML Just WebCore Try to cooperate .

Obviously , Whether it's an apple or KDE I am happy and proud of such cooperation ,Melton The letter is full of praise for this open source code , And Apple launched Safari There is no doubt that KHTML Carry forward , Both are happy to see their success .

unfortunately , The honeymoon period between the two is very short . Within two years , Open source KDE The discord with Apple was revealed . It is said that , Over time ,WebKit and KHTML It becomes more and more difficult to exchange code between , Apples will be separated for a long time , Submit a large number of changes , And no documentation , Many features may be only half developed .( Like a scum man ?)

about KDE for , Integrate these changes back into KHTML It's quite difficult . Besides , Apple also asked KDE Developers must sign a confidentiality clause before reading Apple code ,KDE It's hard to accept this .

WebKit in WebCore Is shared

A tear is inevitable .2005 year ,KDE Developers began to attack Apple publicly , And said that the cooperative relationship between the two sides has completely collapsed . That spring ,KHTML Two developers of Zack Rusin and Carewolf All expressed their frustration in blog posts .

This almost proves that apple is unlikely to use and enjoy the open source community to “ feedback ” The open source community .

After it was reported by the media , Apple made concessions .2005 year ,WWDC( Apple global Developers Conference ) On ,WebKit From behind the scenes to the stage , Old apple Bertrand Serlet Officially announce  WebKit Fully open source ( Before it was just WebCore). 

thus ,KDE The relationship with Apple has also improved . some KDE The developers began to work for WebKit Submit changes , Apple's team has also restored many apple specific fixes , And the abstraction of the platform layer is realized , Make the core code of the engine work on other platforms .

however ,KDE I didn't forget Apple “ Scum male behavior ”, They didn't fully join WebKit Development of , But in 2010 Launched at the end of the year KDE Development platform 4.5, Side by side support KHTML and WebKit.

No matter what , Apple led WebKit Indeed beyond KHTML and KJS In itself , It is famous in the browser field , And many innovations ,HTML5、CSS3 Such trends are consistent with Webkit Can't get rid of the relationship .

But in WebKit In the process of open source , Apple  “ Control ” And with the open source community “ The water ”  It's real .WebKit Apple's open source has won a real reputation and market , But in fact , WebKit It's completely open source, but it seems so unhappy . 

02 Kill a Google halfway , Open source WebKit Standing in the middle of the monopoly storm

2005 After full open source in ,WebKit Begin to appear in Safari Somewhere else . such as ,2005 year 11 month , Nokia for its S60 The platform released a platform based on WebKit My web browser .

WebKit More and more hot .2007 year 1 month iPhone Release ,WebKit As Mobile Safari The foundation of is iOS The platform exerts its power , Start sweeping the mobile space .

However , For a commercial fertile land , There is no shortage of competitors .iPhone On the stage 10 Months , Google killed it , Released a result of the acquisition :Android operating system . After learning the news , Jobs was furious :

We didn't enter the search business , They have entered the mobile phone business , Don't get me wrong , They want to kill iPhone.

All of a sudden, there was a lot of smoke , Google and apple are in full competition , Including browser business .2008 year 9 month ,Chrome Browser officially launched . The interesting thing is ,Chrome Also by WebKit Supported by , It has been used. Webkit Medium WebCore part , And in the JS The engine uses Google's own V8 engine , After the improvement, Google has greatly improved the execution speed of scripts ,Chrome Stand out from the crowd .

2009 year 7 month 7 Japan , Google has announced a new project , start-up “Chrome operating system ”. Obviously , It was born to compete for the market of Microsoft and apple . and , So is it WebKit Supported by . 

Apple worked hard , Open source projects run in from the open source community , Used by another commercial company ? And it became Safari The most powerful competitor ? even to the extent that , Today, the two are still secretly fighting with each other . such as ,《Chrome Faster and stronger , stay Mac To defeat Safari
》, This news headline you taste .

Those business battles on the bright side , Enough to see . What is fatal is , Because Google browser is through WebKit Conduct fork And improved , Apple and Google have to work together at the open source level .

KDE A completely open source 、 Development groups that have no real threat to Apple , The open source cooperation with apple is still incompatible , Google is a competitor, not to mention .

Yes Statement Express , Google is not very useful WebCore Something developed by Apple , Instead, it uses its own multi process browser Architecture . and , Over a period of time ,WebKit Zhongyue 50% Of WebKit Changes come from Google developers . however ,WebKit The ultimate decision-making power is Apple's , According to some third parties WebKit The developer revealed , Both in open source cooperation , There is no sense of mutual support from ordinary open source developers , It's more like two lions looking at each other , Tense atmosphere .

This delicate relationship lies in 2013 The year ended . 4 month , Google announced Chrome To be abandoned WebKit and change to the use of sth. Blink Layout engine , The reason is that Apple... Without negotiation , Unilaterally launched  WebKit 2.

Google thinks  WebKit 2 There are too many apple specific codes in , Not only does it have no effect on Google , And it takes time to deal with compatibility issues . And a lot of changes submitted by Google , And it's hard to get Apple's approval in the end , Both parties WebKit There are great differences in the direction of development .

meanwhile , Apple launched WebKit2 And Chromium There are conflicts in sandbox design of , therefore Chromium Stay in WebKit, And use the way of transplantation to realize and mainline WebKit2 Docking . This increases Chromium Complexity , And to a certain extent, it affects Chromium Architecture migration work of .

Blink The engine is Google from WebKit Branched out derived browser engine , Designed to gradually break away from WebKit Influence , Another mountain . thus , The pattern of the four browser cores (Trident Also known as IE kernel 、WebKit、Blink and Gecko) This is the formation of . Over the years , The four sides have been occupying the top of the mountain , Only recently because Web Compatibility issues began to work together to customize specifications .

https://www.chromium.org/blink/

Blink After the engine news broke , Hacker News Developers from both sides immediately began to comment on . Most commentators believe that , Apple WebKit The change submission policy is hostile to non Apple developers , Especially in WebKit 2 This piece of . More people think , WebKit 2 It's a product launched by Apple alone , And there's no involvement with Google or anyone else WebKit The developer negotiates .

It's hard to tell what's right or wrong between commercial companies , After all, many times you need “ Business in business ” Of .

But from WebKit A series of things about open source can be seen , Big companies are profit oriented , Never think apple is open source WebKit for “ The Berlin Wall opened a gap ” 了 . Some people are right :“WebKit For Apple , It's just an open source black sheep in its closed garden .”

As Apple's open source project , And great achievements ,WebKit There is an awkward “ A sense of dislocation ”. such “ A sense of dislocation ” Recent “ UK antitrust investigation ” in , Show it vividly .

2022 year 2 month , British competition and market authority (CMA) Chief executive Andrea ・ Koschli (Andrea Coscelli) Announce in a press release

Apple and Google have formed a bad habit about the way we use mobile phones , We fear that this will lead millions of people in the UK to lose their way .

Among these allegations of anti competitive behavior , Apple's app for browsing the web is iOS and iPadOS Upper use WebKit The framework and WebKit Javascript And be criticized .Apple Of App Store The review guide states that :2.5.6 Web browsing applications must use appropriate WebKit The framework and WebKit Javascript.

Obviously , Regulators believe that this behavior will stifle innovation . Apple's defense argument is : It is necessary to protect the security and privacy of users , And prevent Chromium The dominant position .

“ We really want to live in a Chromium Browsers occupy 95% Market in the world ? Yes Web Come on , This will be a bad future ”. In the picture above Jen Simmons That's what I mentioned above Apple Safari Preacher . 

Of course , Others don't think so . For example, Zeng Yin App Store The high share policy and apple are at loggerheads Epic Games CEO Tim Sweeney It means ,WebKit Restrictions are anti competitive and non inclusive .

Apple WebKit Is it successful ? There is no doubt , It was successful . however , From an open source perspective ,WebKit Has been under Apple's strong control , Not only at the beginning of open source, but also full of open source disputes , Now it's falling into “ monopoly ” and “ business ” In , Take on an awkward posture .

原网站

版权声明
本文为[Microservice mall technology sharing]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060602446298.html