iPhone Gets .Net App Development 327
snydeq writes "Novell has announced MonoTouch 1.0, a commercial SDK that allows developers to build iPhone apps using Microsoft's .Net Framework instead of the Apple-designated C or Objective-C languages. The SDK leverages Novell's Mono runtime for running Windows apps on non-Windows systems, allowing developers to utilize code and libraries written for .Net and programming languages like C#. With MonoTouch, the Mono runtime provides such developer services as garbage collection, thread management, type safety, and Web services, said Mono leader Miguel de Icaza."
Launch Times? (Score:5, Interesting)
Re:Launch Times? (Score:4, Interesting)
If I am not mistaken and given that Apple bans other execution environments, the last step in building is compiling to native code. So there are no JIT times, I donÂt know about other loading times.
Re:Launch Times? (Score:5, Interesting)
I would be more worried about WinForms compatibility. I developed a couple of .NET applications(never again!) and running them with the Mono runtime is markedly different than MS's runtime. Stability wasn't great with Mono and controls didn't always behave the same.
Although I won't developing any more .NET applications if I can avoid it, it would still be nice if Mono matured to the point where it could replace the MS runtime without noticeable difference.
Re:Launch Times? (Score:5, Interesting)
Actually, there are two large things standing in the way of that:
#1 means that even if people want to target Mono, they might develop in VS.NET anyway, which is a bunch of VS.NET and Windows sales for Microsoft. #2 means that anyone who doesn't deliberately target Mono is probably going to call a bunch of native win32 code, just because it's so trivially easy to do so.
Note that both of these exist even with a "100% compatible" Mono, unless it was also combined with a 100% compatible Wine, and we all know exactly how likely the latter is.
Re:Launch Times? (Score:5, Interesting)
How does this hurt Apple?
I don't know, how does Google Voice hurt Apple? How does Java hurt Apple?
I mean, you can sort of come up with a rationale, but it's really, really strained. Basically, it's not about whether it directly hurts apple, as whether it might hurt Apple, and/or whether it lets Apple give up even a tiny iota of control over their platform, and/or whether it hurts Apple's partners.
In this case, it's probably about control. Apple is going to be very wary of any language which supports eval(), since that means my app could just download new code from the Internet and eval it, thus eliminating the middleman (bottleneck!) that is the Apple approval process for all future updates.
Re:Mono (Score:3, Interesting)
I seem to recall that Mono is/was justified by Miguel de Icaza by virtue of .Nets inevitable popularity (Linux distros would _need_ it). When I read this article I can't help but think that the motivation here is to help make .Net more popular, and by extension, Mono more popular. I already abandoned Gnome, but I won't be surprised when I'm eventually trapped into installing Mono. .Net, C#, Java, I can't point to technical deficiencies and say "That's why I don't like them," but I have _never_ liked an app written in one of those languages. Buggy dependency ridden crapware has been my experience. I realize that an applications overall suckiness isn't necessarily a reflection of the language, but experience has set that expectation for me.
I really hope this project goes nowhere, because the last thing I want is more .Net apps in the world, on any platform.
Re:Mono? (Score:4, Interesting)
Re:Violates the developer agreement (Score:3, Interesting)
Having more libraries doesn't make a language more powerful; in any case, it would make it more productive.
The hard link you have in your mind between Objective-C (or the libraries available to it, since you seem to interpret it as the same thing) and GUI widgets is just supported by your ignorance.
Besides, I don't get what's the big deal about learning Objective-C. It's a real C superset and heavily inspired by Smalltalk. Ruby programmers would feel at home. Who wouldn't like to think of Smalltalk or Ruby while writing real world solutions at close-to-the-metal speed.
Have been doing this for months. (Score:3, Interesting)
I have been programming games in unity which uses mono for the iphone for over 6 mos now. Since it compiles to
native code it runs blistering fast and is very stable. No there is not a problem with violating the apple sdk requirements
as it is compiling to native code.
Re:Shame : Article is FUD from MS-zealots :( (Score:3, Interesting)
"Guys, if you need to make iPhone apps, you got to build it using ObjectiveC"
Those games I have been programming and distributing using mono C# in Unity for the last 6 mos must be a figment of my imagination.
Re:Launch Times? (Score:3, Interesting)
It hurts Apples partners and customers.
Ok, I'll bite. How does it hurt customers?
The telcos ability to use the same device to sell various upgrades and data plans, mins ect.
Um... What?
Data seems to be much more expensive than minutes.
Your role as a consumer is to link your bank account to a regional telco and enjoy.
I don't see how this is improved by letting said telco lock down my phone, or lock me into a two-year contract.
Java might just eat into battery life just enough to on average change the device from "lasts a long time on a change" to "the battery life is ok".
...and Javascript doesn't?
Re:Violates the developer agreement (Score:3, Interesting)
but one must be careful not to confuse popularity with ease of development. The iPhone may be easy to develop for (don't know personally), but that doesn't prove that popular == easy to develop for.
Absolutely, but in this case, from my experience it is true. I find it very easy and there are numerous stories of people new to programming making some very good and popular apps.
Apple has historically been more like Sony in this regard, limiting who can write for their platform AND what they can publish.
This is only try for the iPhone. ("historically" thus only going back 14 months!) There is not a single limation on the Mac platform; you can write anything you like and publish it any way you like. All without paying Apple anything, of course.
Also, something to remember about mobile platforms in general and iPhone in particular: they generally have a more limited and defined feature set because everyone has essentially the same hardware device (or with only minor variations).
You should try mobile development! :) To support the majority of Java ME phones that are technically capable of running your app you should really make hundreds of builds! Windows Mobile isn't much better, with wildly varying hardware inside.
Apple could learn a thing or two from Microsoft about treating developers right
This is a gripe you have with iPhone, not the Mac platform. MS charges hundreds for Visual Studio where XCode is free, for example. They do have a paid developer program which gives early access as well as good discounts on hardware. But you don't need to pay them anything to develop or get their approval for anything on the Mac.
How many people do you know who are interested in general purpose computing and choose to run MacOS?
An ever growing number around me, actually! People buy computers very much on price and "what I already know". Luckily more and more people are realising there is something better than Windows and switching is easy.
As a beta user of this, let me clarify (Score:4, Interesting)
Let me clarify how this works:
1. Yes, it is compiled ahead-of-time so there is no violation of the iPhone Developer SDK ToS rules; this also means a lot of the powerful Reflection stuff doesn't work because you can't do runtime inquiry on a type and create an instance dynamically. It also means the DLR is unlikely to ever run on the iPhone.
2. Much of the types map to Objective-C types, UI Kit, etc, and so does the only GUI library. (Note that types like System.String map to NSString, etc as well.)
You actually still do your GUI in Interface Builder, but MonoDevelop picks up changes to the XIB and auto-generates partial classes to represent the XIB actions and outlets. This step alone eliminates a lot of the boilerplate crap you have to do with Xcode that we Visual Studio developers are used to having the computer take care of automatically. Events can be handled via the C# obj.Event += handler syntax, MonoTouch takes care of hooking it up behind the scenes.
3. You can import Apple frameworks with DllImport and call any of the Foundation functions. There are also helpers that take handles (pointers) from those functions to Objective-C objects.
4. Most of the glue is automatic by decorating your classes/methods with the proper attributes (eg: make a class implement a protocol, then mark the methods as to what message in the protocol it handles). It really is a very slick package and a joy to use.
5. Garbage Collection! This rocks, it was very disappointing to see Apple fail to bring their GC over to the iPhone.
6. Most of your libraries aren't going to work because they require reflection, framework classes, etc that don't exist or aren't statically linkable into your executable. Besides, that isn't the point. For me, the point is to use a language I am used to (avoiding the @synthesize, -/+, and [[[[[[[ crap that makes Objective-C annoying to use). It is impossible to overstate how much the automatic hookup with XIB files makes developing a GUI so much easier to do. I only wish IB would automatically make all controls Outlets, then I'd be set. I find that you spend way too much time spitting out boilerplate code and doing repetitive boilerplate actions in IB when the computer could just as easily figure all that out for me (like Visual Studio does with a WinForms app).
Should have used HTML5 (Score:3, Interesting)
If this was an HTML5 target the app would not require Apple's approval to run on the iPhone, and it would also run on other platforms. This could be a target that makes an app to run on all smartphones, since they all have WebKit.
If these apps look generic they won't get approved for App Store. You have to design your way into app Store as well as engineer. With HTML5 you can do what you please.
Re:Launch Times? (Score:3, Interesting)
How much do you use it? I use my iPhone G3 as a music player roughly six hours a day, make a few phone calls, send lots of text messages and perhaps an hour or so of Web browsing and I generally have a least a half-charge left at the end of the day. Sure, I've had phones with better battery life but they didn't do nearly so much. It's a trade-off, for sure.
I do use it a fair deal more than an average user and while I would agree that it is really pretty decent on battery when you listen to music, any time a screen is on you can just SEE the battery drain. I mostly use phone, email, calendar and SMS and while most of those use screen (and thus drain battery) I think also at fault is the very poor radio inside my G3. I pretty much do not get any reception inside most buildings (which is sad, cause I spend most of my time in downtown SF - if you can't get reception there....) - I did find that if I spend most of my day outside with strong reception - the battery life is significantly better (But then again, I am using the phone significantly less when I am outside)
Re:Launch Times? (Score:3, Interesting)
Doesn't the EULA also forbid you from distributing executables made with Visual Studio Express editions?