Cocoa для Windows и GNUStep на Linux
От: OCTAGRAM Россия http://octagram.name/
Дата: 10.02.08 12:13
Оценка: 3 (2)
Safari for Windows -- это не только ещё один браузер для Windows, но и первый настоящий опыт Apple по портированию своих библиотек на эту платформу. iTunes такой масштабной разработкой, к примеру, не является, достаточно зайти в настройки iTunes и в настройки Safari, чтобы увидеть разницу.

Cuckoo for Cocoa: Is Safari on Windows the next iTunes?




Why Did Apple Port its Core OS X Libraries to Windows?
Porting Safari to Windows using .Net would have certainly resulted in a more Windows-like browser. That provides more evidence to suggest that Apple wasn’t simply interested in putting its browser on Windows to grab Google revenue or displace Firefox. It appears that Apple ported these extra libraries to do two other things:

First, delivering Core Graphics and Core Foundation on Windows enabled Apple to deliver a more Mac-like browser experience. Safari on Windows quite purposely feels like a Mac. If Apple wanted to deliver a browser that felt like Windows, it could have saved a lot of effort or even contracted it out to an external developer.

This brands Safari with a Mac-like feel, exposes Windows users to Apple’s own user interface conventions, and shows off the capacity of Core Graphic’s features, including translucent sheets and built-in color management.

Second, delivering Core Graphics and Core Foundation on Windows provides Apple with the option of later expanding Xcode to enable developers on the Mac to deliver their own Cocoa applications cross-platform on Windows.

Cuckoo for Windows Cocoa.
Having the essential frameworks of Cocoa embedded within Safari for Windows strongly suggests that Apple not only wanted a Mac-like browser, but may also soon offer Xcode developers a tested and refined mechanism for building and delivering their own apps on Windows, too.

Of course, the testing and refining of this mechanism is necessary, and that appears to be in part what Safari on Windows will be doing for Apple.

While the company is unlikely to port the rest of its own apps to Windows, offering a cross-platform build option to third party developers will make Cocoa an even more compelling alternative to Microsoft’s .Net, with the extra free feature of being supported on the Mac platform, and perhaps even the iPhone.


Нет никаких сомнений в том, что Apple откроет SDK для разработки Cocoa приложений под Windows. Это лишь вопрос времени.

Таким образом, когда это случится, на один кроссплатформенный движок в этом мире станет больше. Причём, даже в пределах Windows Cocoa может соревноваться с .NET GUI.

Microsoft .Net on Mac OS X:

I have experience with both Objective-C/OpenStep and C#/.NET. I've built applications with both (as well as Python/PyQT, C++/Delphi, C++/QT, and various and sundry UNIX command line applications in C and C++ with STL).

I think most of the comments here miss the point. This isn't about Java vs. C#. It's about Cocoa vs. .NET (and perhaps slightly less about C# vs. Objective-C). Now that I've developed with C# and .NET, I can seriously say that I much prefer Cocoa.

It seems to be much more consistent to me. For instance, a .NET text box control has a BackColor property. So does a combobox. Great, fine. But why doesn't a date time picker (which looks to be a textbox with a special dropdown chooser) have this property? There's no good reason. Cocoa seems to me to have a much more consistent and unified design approach.

Second, the static compile-time approach of C# ensures that I cannot assume certain facts that I already know about my program at runtime. To someone who has developed with Python, Objective-C, or Smalltalk, such an approach is tiring and tedious. Yes, if you're writing system software static typing and early binding make a lot of sense. Not so for application software. And the lack of Categories from Objective-C really annoys me. It's extremely useful at times.

The Windows Forms designer generates code instead of an XML description or serialized objects. Yuck. It's extremely brittle and I have encountered incomprehensible problems when the designer decided to change something in the code and fooled itself into a corner, making it impossible to get back into design mode for no good reason.

Finally, the .NET design approach seems awfully "heavy". Cocoa has more of a "just do it" feel. .NET wants you to run through an obstacle course of inter-related structural behemoths. It just feels like mountains upon mountains of architecture that isn't necessary.

Sadly, I have a feeling that Cocoa (and Objective-C) will die in the marketplace because it doesn't fit the preconceived notions that most developers have about how programming languages and development work. Which is a shame, because once you get into it, it's much more comfortable to work in.


WWDC 2007: Kevin Hoffman Presents .Net vs. Cocoa


.Net vs Cocoa for Developers.
Despite being an expert in .Net but brand new to the Cocoa platform, Hoffman said the time to complete his project was much faster on Cocoa. The same project took only one third the time, despite his having far more experience with Vista's .Net frameworks than Apple's Cocoa. He also noted:

The user experience developed was better by default on Mac OS X. As a programmer and “not a designer,” Hoffman says he approached user interface development with some trepidation, needing to seek out help from professional designers on the Vista end.

Under Cocoa however, Hoffman says he found Apple's visual development tools very accessible, while Microsoft's visual interface builder tool in Visual Studio was “so poor I turned it off.”

A specific example related to Cocoa's Core Animation, which allows developers to create rich, animated interfaces with very little code. Vista offers tools to accomplish similar feats, but requires developers to explicitly build every step of their animations using far more code, even to do simple things like fade out a view on a transition.

Another example was the developer support for giving users undo and redo features. Hoffman said .Net's INotifyPropertyChanges “is not enough,” requiring pre and post-change notifications to implement undo and redo. It's “not pretty,” he says, particularly in comparison to the Cocoa framework, which offers undo and redo functionality to developers “or free,” using zero code, with NSUndoManager.

Also noted was a comparison between Apple and Microsoft's desktop data stores. Core Data in Cocoa, introduced with Mac OS X Tiger, offers developers rich, flexible options for storing an application's data using XML, binary files, or an SQLite desktop database.

Isolated storage in an object relational system won't be offered for .Net until later this year, forcing developers to use XML flat files, or jump up to full blown SQL Express work, a large burden to put upon desktop application developers.


А вот, например, ссылки на сам .NET Addict's blog:
Objective-C Categories vs C# 3.5 Language Extensions
Cocoa Programming vs. WPF : NIB vs XAML





Joel on Software: Apple Safari for Windows: The world's slowest web browser

PPPPPS 20 minutes later: The more I run Safari on Vista, the faster it launches. Am I hallucinating? Is there a cosmic force that means just when I complain about Safari taking 57 seconds to launch, as soon as that complaint is made public, it launches much more quickly? Am I going insane? Or is someone playing a clever prank on me? It's this kind of epistemological, reality-shifting shit that makes me not want to blog any more. We are at war with Eastasia. We were always at war with Eastasia. 2+2=5, and I love Steve Jobs.


Это не первые и не последние программисты и пользователи, которые предпочтут Cocoa. Очень хитрый ход со стороны Apple. Некогда OS/2 испытала потерю родных приложений, потому что хорошо поддерживала Windows. На этот раз синдром OS/2 используется против Windows. Не знаю, как для вас, а для меня искушение перейти на Cocoa очень велико.

В связи с предстоящим мне интересны мнения:
http://www.rsdn.ru/Poll/2015.aspx
Автор: OCTAGRAM
Дата: 10.02.08
Вопрос: Будь у вас выбор, отдали бы вы предпочтение Cocoa на Windows и/или GNUStep на *NIX в качестве кроссплатформенного GUI (см. http://www.roughlydrafted.com/RD/RDM.Tech.Q2.07/A35C23B9-BD22-4478-BC30-4111CFC360B5.html )? Если не уверены, не ставьте ни Да, ни Нет.


1. Как вы относитесь к интерфейсу Safari for Windows с точки зрения Windows пользователя? Сейчас это только Safari, но будут и другие программы, и не только Apple. Нравится ли вам факт, что таких программ будет больше?

На Mac OS X, скажем, пользователи очень чутко реагируют, если интерфейс программы отличается от принятого в системе. Яблочникам вообще трудно угодить. Тот же Qt, который передаёт лук, но не передаёт фил, забракован, в том числе мною. На Windows такого стремления к унификации интерфейса я не замечал, пока был её постоянным пользователем. Иметь собственный, уникальный интерфейс в порядке вещей. Winamp не похож, mail.ru агент не похож, NOD32 не похож. Да и сам iTunes, сколько я им пользовался, воспринимался без всякого отторжения. Я сейчас сижу в Safari, и он тоже не вызывает отторжения, скорее даже наоборот. Но это потому что я последний год провёл в Mac OS X. Так что я могу судить только по своим ощущениям ДО того, как я перешёл на Mac OS X. И, насколько, я себя помню, мне интерфейс iTunes нравился, даже было жалко, что на аудиоплеере всё и заканчивается. Так что, как ни крути, я двумя руками за.

2. А как программист? В приведённых цитатах высказано недвусмысленное предпочтение Cocoa.

Я пока что не прилагал руки ни к тому, ни к другому из-за приоритета кроссплатформенности. Но писать программы на движке, родном для моей OS, и бесплатно получать эту самую кроссплатформенность, соблазнительно.

3. И, наконец, как *NIX пользователь GNUStep?

Потому что в не-Windows/Mac OS X среде, если делать такие версии, придётся сделать откат на GNUStep. Я-то могу поставить что-нибудь из GNUStep. Собственно, у меня все три основных OS всегда под рукой. Проблема в том, что у меня нет чувства "духа" именно графических оболочек Linux. Я не знаю, как выглядят GNUStep приложения в глазах постоянных пользователей никсовых систем. Я могу только предположить, что для Linux пользователя к разношёрстности не привыкать. Были, есть и будут GTK+ и Qt программы. И, хотя лук можно подогнать, фил будет отличаться. Но как относиться к GNUStep, я не знаю. К популярным движкам GNUStep не относится. Но и забытым его не назовёшь (см. Etoile).
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.