If you are an iOS developer, the Windows ecosystem can appear a strange and frightening place. Writing an app for Windows requires an investment in all kinds of new things: new tools (Visual Studio), new languages (C#), new APIs and Controls (Win32, XAML), new graphics engines (DirectX) and before you know it, life seems too short and wouldn’t another Flappy Birds clone be more fun anyway?
Fear not, brave adventurer, for Project Islandwood is here.
Dear iOS developers, please invest. The last thing anyone needs is extending the pool of ‘wonderful’ Windows apps with apps coming from converted obj-c magic.
So what? What do you mean by “invest”?
If you mean writing a new, native Windows Universal App, then I’m all for it…
99% of iOS developer’s are not going to start making UWP apps, or port apps using the Islandwood bridge.
From reading, the MSDN article you can see that porting with Islandwood will require continuous maintenance work to keep the iOS and Windows app in sync.
With project Astoria, 99% of Android apps’ would have just worked without any work required by the dev.
Good reason to cancel it then: The existing developer community would have been wiped out by the ensuing near-instant tidal wave of ported apps from the Android platform coming over to the MSFT phone platform if Astoria were to be released.
Have the feeling this will never happen, but it has to start from somewhere.
Just know something is broken when the scrolling is done backwards (osx style) in an app that is “designed” for Windows.
No, from those that I know, it looks like an abandoned warehouse on the wrong side of town with cartoon tumbleweeds blowing past.
But otherwise, those tools and technologies are pretty sweet. Microsoft’s development stack is not terrible. c# is a much easier language to transition to than objective c. Its really nice.
Edited 2015-12-03 15:04 UTC
Still far too much verbose even for the most obvious tasks.
C# is easier to grasp if you understand C++. Objective-C is easier to grasp if you understand Object Orientation.
In any case, Apple is transitioning to Swift. Aren’t they?
I’ve heard the “Object Orientation” line before in regards to objective-c being easy to learn. Which, I don’t disagree with, except “Object Orientation” is a more abstract idea that people tend to learn in conjunction with a language. For me, that was c++, for younger kids, probably java. I’d submit that c# is closer to those than objective c in practice. If you were coming from a smalltalk background, I think objective c would be easier. But I don’t think many people really ever got a chance to play with small talk.
Indeed C# is basically C++++ after all (the # is 4 + stuck together). I’ll give credit where credit is due, and MS did produce a much better evolution to the C++ paradigm than god awful Java. But still, C++ is deeply flawed, in the context of object orientation (OO), and it’s descendants carry that sin.
My background is not in small talk, as much as I was fortunate (or cursed) to have attended several seminars by Alan Kay through my academic years. I highly recommend people watch some of his lectures on youtube.
Once you hear it straight from the horse’s mouth what they intended regarding OO, there’s no context between which language (C++ vs. Obj-C) got the OO paradigm better.
Edited 2015-12-03 21:33 UTC
Dang! That must have been fun. Never thought of finding him on youtube. I’ll definitely check that out.
The big “message” I got was that a lot of people (most?) in the field had completely missed the point of OO. Because they thought of OO being mostly about classes, when in reality it was mostly about messages.
Edited 2015-12-03 23:07 UTC
Actually the way I see it the corner stone of OO is the object (the instance itself) rather than messages. From that perspective I see the languages like this:
Objective-C: Dynamic communication. any message can be sent. Prototypes are just “hints” of what it accepts. All objects support a base of functionality.
C#: Static communication. Interfaces define a strict contract of what message (method call) can be sent. All objects support a base of functionality (like the COM IUnknown model).
C++: No shared base class. Objects can be made to act like C#, but the focus is all on the class being an improved struct. Any OO present is of your own making.
The C++ part is clearly what you are referring to. What I meant was that C#, and COM that came before it, does follow the OO concept far more closely. Because of that I think C# is more like Obj-C than C++.
There is. It’s called “template<typename T>”. All objects support a base of functionality – construction, copying, moving, assignment, destruction, dynamic allocation of objects its type, taking of its address, taking of its reference (both l- and r-values), taking of its size, deduction of its type, all the various type traits that are provided, even being thrown/caught as an exception.
Although I don’t know enough about ObjC’s dynamic communication. I assume you’d still have to provide an implementation just in case a message is sent that isn’t already handled. In which case, that’s also the same with “template<typename T>”. Function overloading also fits the bill.
That doesn’t really create a shared base class for the purpose of OO. You need dynamic_cast<T> to work before you can get to what OO is all about. Dynamic_cast only works if there’s a common base class. You can of course create such a thing in 5 seconds in C++, but any class in C++ that doesn’t derive from such a base class isn’t being OO.
You’re right that using templates can often get you the same outcome, but templates suffer from the problem that you cannot hide its implementation. And if you implement such a thing with templates you are just going even further way from how C#/ObjC/JavaScript/COM attacks the problem.
How so? Say you have an algorithm like std::fill. Depending on what you pass in, the compiler may do a simple for loop, or if a specialized version for fundamental arrays is available, it will use something like memset.
To the user of the algorithm, you don’t ever get exposed to its implementation. You rely on its contract and that is all. In fact, with templates, you can hide certain interfaces to prevent misuse.
Conversely, in OO languages and frameworks (like many in C++) that force a common base class to be used, you are actually exposing implementation details. Inheritance is the leakiest form of information hiding.
I am venturing deeply into “what is object orientation exactly” as in the original definition, and I could very well be narrowing it too far here:
The way it works in COM, C# and Objective-C, there’s two distinctive things: interfaces/protocols and classes (implementations). In C++ terms, only pure virtual classes define the objects and the ‘object orientation’ comes from testing if a specific instance of an object supports a particular interface.
With some C# code as an example:
interface IFoo { void foo(); }
interface IBar { void bar(); }
interface IFooBar : IFoo, IBar { }
class Example {
void doStuff(object c) {
if (c is IFoo) ((IFoo)c).foo();
if (c is IBar) ((IBar)c).bar();
}
void doFoo(IFoo f) { f.foo(); }
void doFoobar(IFooBar fb) { fb.foo(); fb.bar(); }
}
It is the run-time aspect of it that changes it into “sending messages” rather than if you achieved the same thing with templates.
In most of the C++ frameworks with base classes they are rarely exploiting this property and usually more doing implementation sharing with inheritance.
The problem with the class being the cornerstone of OO is that then you really aren’t gaining anything over traditional procedural approaches, other than some dubious syntactical sugar.
Kay’s point, and he’s one of the originators of the paradigm so I trust he should know, is that by thinking in terms of messages you move away from the procedural-centric mindset to a network-centric one. Which is where the real power of the paradigm comes into play, and which keeps being missed by most people who think they’re programming in OO.
Perhaps using the term “Object” to define the paradigm was a bit unfortunate.
Edited 2015-12-04 08:24 UTC
Messages as implemented by Obj-C are just virtual function calls. Dispatching an ObjC message involves doing a look-up and calling the function pointer you found. Calling a virtual function involves doing a look-up and calling the function pointer you found.
The way I see it, the power of OO comes from the ‘black box’ aspect of an object. An user of an object doesn’t need to know how an object is implemented – they just have to agree on a set of function calls/messages (the interface/protocol). And thus the difference between C# and Obj-C objects are whether the protocol is static or dynamic.
Well, an object is an instantiation of a class. And if you veer down the abstraction layers anything in CS is the same, because at the end of the day is just 1s and 0s executing in a computer.
Lastly, that’s why mentioned the network-centric approach, because its shifts the focus away from the implementation details -of the black boxes- and into how those boxes are composed.
Definitely recommended. Some of the talks are quite interesting, also his interview for Dr Dobb’s Journal is recommended.
DDJ: “Still, you can’t argue with the Web’s success.”.
AK: “I think you can.”
DDJ: “Well, look at Wikipedia — it’s a tremendous collaboration.”
AK: “It is, but go to the article on Logo, can you write and execute Logo programs? Are there examples? No. The Wikipedia people didn’t even imagine that, in spite of the fact that they’re on a computer. That’s why I never use PowerPoint. PowerPoint is just simulated acetate overhead slides, and to me, that is a kind of a moral crime. That’s why I always do, not just dynamic stuff when I give a talk, but I do stuff that I’m interacting with on-the-fly. Because that is what the computer is for. People who don’t do that either don’t understand that or don’t respect it.”
http://www.drdobbs.com/architecture-and-design/interview-with-alan-…
Edited 2015-12-04 16:17 UTC
He kind of comes off as a jerk there. Wikipedia, like most organizations, is trying to do the most with the limited resources it has. Trying to devise an emulator in java script ( or some other technology) for every obscure (face it, logo is obscure these days) programming language would seem to distract from their goal of trying to focus on text to share as much of the worlds encyclopedic information as possible.
I actually find that C# and Objective-C are rather similar in many ways. The interfaces in C# and the prototypes in Obj-C are serving the same purpose. Where they differ is mainly that, in C#, the interfaces and objects are static, while in Obj-C they are dynamic.
Well, syntax is one of the main defining characteristics of a language. In any case, C# being a component oriented evolution of C++ was something stated by the people who made the language.
Ah yes there is no doubt that they were marketing it quite heavily for C++ devs and why it was better (same as Java did). I just think that in retrospect they differ quite a lot in how they approach OO.
C# much better than that godawful Java? You do realize that C# is basically a copy of Java, right? Sure with time they added features like lamdas (which Java eventually added), LINQ, properties and async/await, which are all great. But at its core it is and was a Java clone. If you love C# so much it seems to me you shouldn’t be so quick to disparage the language that more or less single-handedly gave birth to it…
Why? WHY? What’s wrong with using Qt/Qml or Java or the wealth of cross platform tools we already have?? WHY???
Simple really
N as in Not
I as in Invented
H as in Here
To be fair to MSFT, a complete departure from my usual tendencies, the NIH attitude seems to have lost much of its underpinnings and support under Nadella.
Nah, the NIH is still pretty strong within MS.
NIH has produced fantastic returns to them, and it’s too ingrained into the DNA of Microsoft’s corporate culture, and their current CEO is a product of that culture.
Edited 2015-12-03 19:04 UTC
Qt/QML still doesn’t offer a proper support on mobile.
Oracle dropped the ball on mobile OS support and all available Java compilers are commercial.
That’s an easy question to answer:
MS isn’t touching that again after the Sun lawsuit.
Qt is free for commercial use if you link to the libs dynamically. Just like all LGPL stuff.
Edited 2015-12-04 14:45 UTC
Only if you make any modification to Qt and want to ship the modified version, then you will be bound by the terms of the LGPL. Else there is no problem at all for commercial use.
Not sure about Microsoft’s Terms and Conditions for their toolkits and libraries.
I share your pain
Java is out, if you make a game for Android in Java that is the only place it will run (well, that and BlackBerry OS, but that’s it).
Qt/QML – maybe, but it’s not geared toward game development, and I have a feeling that is the main target audience for these tools. And for not-games Qt doesn’t look native, which is a turn-off for a big swath of apps. On top of that Qt costs a lot more for commercial development ($350 / month) than comparable tools from Apple (free) and Microsoft (free, at least if you’re “just” porting from iOS). To a big software house that may not seem like such a big deal, but to indies it’s a deal-breaker.
Edited 2015-12-05 11:53 UTC
That’s funny because I’m currently writing OpenGL games for Android with Qt. It serves that purpose really well.