Related
I'm working with a small startup with the goal of creating an iPhone application. The programmers on our team all know both C and Java, but we've got no ObjC/C#/iPhone experience -- we'll be learning something no matter what. All the questions I've seen on this subject have been from the perspective of a C# programmer getting into iOS, so I don't have any information on the relative merits of learning one or the other.
So, what I want to know is the relative merits of C# and Objective-C for new programmers, with respect to these things:
Performance
Ease of use
Ease of learning
Reliability (i.e., will a new iOS version break a MonoTouch app?)
Also, would writing in MonoTouch have any benefits for cross-platform development with Android?
If the goal of your startup is to create an iPhone app, then obviously you should learn the language iOS applications are built with, Objective-C. Your team already has experience with C, so it should be very easy to get started. The Big Nerd Ranch books will get you up and running in a week or two (I'm not associated with Big Nerd Ranch, I just think they're awesome).
I don't understand why you bring up MonoTouch, considering your team doesn't have C#/.NET experience. There are tons of other frameworks like MonoTouch, including Titanium SDK (JavaScript), RubyMotion (Ruby), and so forth. All of these are great, but as I see it are primarily for those with experience with their respective languages. They allow you to write iOS applications using a language you're more familiar with, but have the following drawbacks:
Performance can be just as good, but usually a little (sometimes a lot) worse than an application written in Objective-C.
Resources for learning are not as plentiful as those for iOS SDK/Objective-C. There are tons of people who want to make iOS apps, and of those people some use these frameworks, and they are diluted amongst them. Only a small fraction of the resources available for iOS development will be devoted to any given framework.
These frameworks are based on the iOS SDK/Objective-C, so naturally development is always a step behind. If Apple rolls out radically new APIs in the next version of the iOS SDK, you'll have to wait for these frameworks to adapt (applications written in Objective-C might break, too, but it'll be easier to deal with based on point #2).
Most of these frameworks require a familiarity with the iOS SDK. You will still need to know that an application calls the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions method on launch, but in addition you will need to remember how to translate that into the appropriate method for MonoTouch: public override bool FinishedLaunching (UIApplication app, NSDictionary options). The iOS SDK is massive, and most iOS developers rely on Apple's documentation for insight. So you will be looking at the API docs, written for Objective-C, and translating methods into the framework of your choice.
The Objective-C ecosystem is constantly evolving, with cool new projects like CocoaPods, bwoken, etc. These are primarily developed with Objective-C and Xcode in mind. Configuring them to work with your framework of choice will almost invariably cause you extra time and work.
The above points have generally kept me from delving too much into any of these other frameworks. They're all very cool, but their primary merit in adoption seems to be facilitating development for people with deep skill sets outside of Objective-C, or allowing cross-platform development for small teams lacking the resources to invest in Android and iOS (and Windows Phone) programmers. Hopefully the benefits outweigh the above costs for adopters.
Also, would writing in MonoTouch have any benefits for cross-platform development with Android?
I suppose it would. Indeed, the MonoTouch homepage touts that as a primary advantage of using the framework. I'm not so sure about view/controller classes, since those seem like they would be tied into UIKit, but the logic encapsulated in your models should be fairly easy to port.
Long story short, I think you and your team should stick with Objective-C for iOS development.
If you're just building an iPhone app, then by all means choose Objective C. But if you want a mobile app — which may include android, windows phone, windows rt, blackberry, webos, or other options — you might want to take a close look at a few of the alternative platforms, of which MonoTouch is one prominent option.
Objective C is a strict superset of C, so if you understand the performance characteristics of compiled C code on ARM, you can just use that C subset with which you are familiar, except for the iOS UI.
There seem to exist reports that experienced C programmers start getting up to speed with writing iOS apps in Objective C in on the order of 2 weeks. But, of course, learning extensive frameworks and APIs in an ongoing learning process, whatever the language.
For performance, the answer is Objective-C, all the way.
That said, take a look at doing this with HTML5. If you stick to accelerated transforms, HTML5 performance for an application front end is surprisingly good. It's also pretty easy to move your HTML5 app to Android.
The simple answer is Objective-C. It's not too hard to learn. If you're solid on C and solid on OOP, you'll be fine.
This question is specifically related to a recommended architecture and people's previous experiences for cross-platform WP7, iOS, Android apps developed using C#, Monotouch and Monodroid respectively. I have researched previous questions here, here and here. They provide good answers but not quite what I'm looking for. I have also found this excellent question which does go into the cost benefit so there is some overlap.
I have a requirement to develop a cross-platform iPhone/iPad, WP7 and android app for a health & fitness company, which will integrate with their website. The app requires a small amount of local data storage for offline mode and synchronisation with the website when a network is available. I am a Windows (C#/C++) developer through and through and don't really want to go down the route of three Objective C, Java and C# apps, although I will if I have to. I will also be operating as tech lead and farming out some work to a team on this project.
I would like to know if anyone here has experience with cross-platform development using Monotouch, Monodroid and WP7 and to share their experience on application architecture to re-use as much code as possible. The architecture I am considering is as follows:
My question is as follows:
Has anyone here tried something like this?
Are these frameworks (Monotouch, monodroid) worth their salt for this sort of work?
Can I setup the entire project in Visual Studio 2010 with separate projects (dlls/exe) for the Monotouch, Monodroid and Wp7 target (but shared code using 'Add as Link')?
What sort of code-reuse can I realistically expect with this (or a similar) architecture? i.e. what strategies/patterns can I use to re-use local data access, webservices, and business logic?
You might want to look into the MonoCross project which is designed to help you reuse C# code with multiple presentation layers:
http://code.google.com/p/monocross/
The authors of MonoCross (ITR Mobility) have created multiple mobile cross platform solutions for a variety of customers and have written two books on the subject one is "iPad in the Enterprise" (http://amzn.to/zAhQK6) and the upcoming "Cross-Platform Mobile Development with C#" (http://amzn.to/wM6RsF).
In the meantime, you can watch Scott Olson's presentation that he did at Monospace 2011 that describes how to use MonoCross to target multiple mobile and desktop platforms at once reusing the business logic:
http://www.infoq.com/presentations/The-Rise-of-Mono-in-the-Enterprise
They enforce a strict MVC split in their code:
(source: tirania.org)
The biggest benefit of designing an application with this model is that you can run the same application with native user interfaces on each platform. You get native iOS, Android, Windows UI and they even have an ASP.NET front-end that allows you to publish Web versions of the same business logic.
This technology was used successfully by the Medtronic sample app that is showcased by Apple in their iPad business:
http://www.apple.com/ipad/business/profiles/medtronic/
I suggest you also check out Scott's blog where he posts regularly about his experiences with cross-platform architecture.
Based on your comments your requirements are for a cross-mobile platform that will integrate with their existing services, but also work offline. You are specifically interested in C# via Mono, however you have indicated that you are not discounting other approaches.
I feel that HTML / PhoneGap / JavaScript is a route that you should explore in some detail. The WP7 version of this framework has just been released, and I have had experience of releasing an application to the marketplace using this approach.
PhoneGap wraps your HTML / JavaScript code, in the case of WP7 this is loaded into local storage. This enables the application to work entirely offline. This is true for all versions (iOS, Android etc...)
Probably the biggest issue with PhoneGap / HTML5 is the same issue we have when developing complex web based applications for the browser. The tooling for JavaScript is not great and browser differences are a constant issue. However, it is a tried and tested solution.
Finally, it is possible to create an application UI that is entirely different for each platform. By using the MVVM pattern I have managed to share all my JavaScript business logic between WP7 and iOS applications whilst having a totally different UI:
Compare this to the WP7 screens:
NOTE: I plan to have the iOS version of Property Finder in the AppStore shortly, I just need to work out how to use PhoneGap Build!
Just adding another alternative to the mix - mvvmcross
This project was developed out of experiences with monocross, mvvmlight, and opennetcf.
It's quite an opinionated mvvm framework (with my opinions in it!), it includes data-binding support for Droid and Touch, and it really does encourage code reuse between the platforms.
The source is available from https://github.com/slodge/MvvmCross, it's been used in at least a couple of large projects already and it's still under active development.
There's an introductory presentation on it on slideshare: http://www.slideshare.net/cirrious/dev-evening-monotouch-monodroid-mvvm-mvvmcross-and-databinding
One of the more fully featured samples is a conference app:
The question is very hard to answer, yet I would like to share some thoughts.
The situation with the mobile development is very similar to the development at the first half of the 90s. Phone have limited resources as computers had, mobile OSes are making their baby steps, hence the ecosystem is relatively small. They have own philosophy, tools and even languages. And this is a good thing, but leads to a headache for cross-platform development. As a result, there are many attempts to clear this a bit. People build frameworks, wrappers etc. which is a kind of abstraction and abstractions are leaky. This is extremely important for mobile devices not only the performance as numbers of CPU cycles, but also the performance of the battery, which is far more important for the user.
If I were you I would build apps in a native environment especially if you have some performance considerations. Best support, tools, educational resources etc. pays for the duplicated business logic. All in all, it's not a OS or Database Management System, codebase won't be huge ;)
That being said. Regarding Monotouch and Monodroid I would be very careful since Apple blocks iPhone OS apps created by many third-party compilers and The King doesn't really care about developers. The case that mono will be flushed to the toiled by patent infringement or proprietary software vendors is very likely. This is sad for me cause C# is my favorite language.
PS. I don't believe that HTML5 for mobile will take over any time soon.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I'm a php developer and I want to broaden my knowledge base by learning a higher language (java, c#, c++). My specialty is in building web applications (ria etc). I'm trying to think of the appropriate path to take (hedging my bets so to speak) in terms of which language I should be focusing on. I love open source technology but at the same time C# seems to be getting a lot of notoriety. Despite the newer technologies available there still remains c++ which is the staple for many popular vendors including google and facebook (hip hop) in building scalable and robust cross platform apps.
Can anyone offer suggestions as to how I should be looking at this. Should I go Java, C# or C++). They all take time to master and I just want to choose a specialty.
Thanks
I find that I do less stuff in C++ than I used to. It has its place, but that place is growing smaller.
If you want to make a connection with web development, c++ probably isn't what you want. I'd agree with other posters. Java might be a good choice.
For my web-related projects, I've had a lot of fun with python and Django. I'm guessing Ruby on Rails would also be a possible thing to look at.
Since you mention scalable and robust... a lot of the big scalable and robust sites started out with other technologies and only switched when the massive traffic actually required it. Getting things finished is often better than making something scalable that never is finished.
C++ is not as popular for web development as PHP, Python, Java or C#. But it still can be successfully be used for web development using frameworks like CppCMS.
So if you generally want to learn more web technologies I would not suggest you using C++, but if you want to learn and explore new technologies it is very important language to learn as it opens very different kind of world.
C++ only comes in play when you work on large applications where you need low-level language features to write back end with performance in mind.
Java and C# are meant to boost your productivity. First of all, by taking care of memory management and offering a very functional class library.
Java seems to be a less actively developed language, due to the vendor position. It has however the largest ecosystem in terms of various libraries and third party products. Also cross-platform. Java jobs are plenty, but tend to pay less.
C# language is being quite actively developed, to the point that sometimes annoys developers (who say they don't manage to keep up). Through this however you get a modern and powerful language including huge .NET class library, which makes developers very productive and on average very happy. It is however not cross-platform (except for Mono experiment) and at some point of your growth you may have to pay for licenses (Visual Studio IDE above Express edition and SQL Server (if you use it and if you exceed 4 GB database limit)). Jobs are usually fewer but pay more.
For back-end development, I'd go with Java. It will give you the most options in terms of platforms. C# is a nice language, but still essentially limits you to Windows (Don't know much about the Mono port, maybe someone else can elaborate).
C++ is rearely used for web application development.
I would suggest Java there are some great APIs for web applications out there.
I have used Google Web Toolkit (GWT) in the past and found it a powerful API for web apps
Choose the language in which you feel more well, it will be one that will bring success.
If you are looking to improve your marketability, you definitely need to learn c#. C++ is my favorite language and I use it all the time to write back-end servers; but because it extends development times very few projects require it as a backend to a website. These days if you can code in PHP, C#, and in some cases Java then you have pretty much anything you need for 99% of web application developer jobs.
If you desire to branch into much larger niche markets (like working for Google), then C++ is definitely where you want to go; otherwise you'll be better served with C#.
Assuming you want to stay within the web development realm I agree with most on here and would go with Java. After getting comfortable with Java I would start looking into Groovy (and Grails) which is starting to gain a following in larger companies. Also, once you are comfortable the transition into C# isn't bad (that is what I am doing right now and it reminds me of Microsoft's awesome version of Java).
C++ is rarely used in web development, it's mainly on the desktop. And with my experience with C++, that would seem like an exorbitant amount of code just to make simple things appear on screen.
While Java is a decent web language, there is still alot of overhead. Most websites currently use PHP. Its powerful, easy to use, and easy to learn. Their isn't a large development cycle, and no complicated WAR and EAR deployment. And changes appear instantly, not like some Java based web servers who take minutes or hours to update.
If your scared of PHP, don't be! It runs extreamly popular sites like Facebook, and powers popular web programs like PhpBB, InvisionBoard, Drupal, Joomla, and Wordpress. Clearly php is doing something right or it wouldn't be all over the internet.
I would definitely take the Java/J2EE route. It's currently the most popular choice for web applications.
My impression (from my limited vantage point) is that C++ is becoming the next COBOL or C. That is, an enormous base of legacy applications but used for new development less and less frequently. If you expect to be writing new code rather than maintaining older code, I'd focus on something else.
If you're just looking to broaden your knowledge, then yes, C++ is a good language to sharpen your teeth on. If you're looking to use it in web development, then no, go with either Java or C# since C++ is rarely used in web development.
Do you realize there's no correct answer for this?
Since you seems to be more fond to C++ I would suggest yo go for it.
Personally and subjectively speaking of course, I think Java still would be the best choice.
There not much I can say about Java if you think is not worth it ( or the other way around, there nothing I can say bad about Java if that's what you want to learn next )
So there's no way to have a correct answer for this.
And, we all know the only correct answer is Java ;) </sarcasm>
My vote would be for both C++ (in the first place) and Java. And yes, I look at it from the Web Developer perspective. The reason for that being that things recently have been moving slowly but surely towards the cloud computing.
Notice how browsers start supporting websockets. Socket connections will eventually replace AJAX and Comet and will provide for more responsive and more robust web applications. The reason to learn C++ and/or Java is for writing backend scripts that run as daemons and service your web socket connections. Daemons in PHP are possible but not as fast or robust as C++ compiled apps.
At this time I'm a Linux supporter (having had extensive background with Windows servers and .NET) and I have and will continue suggesting clients going with Linux over Windows. You get more reliable user concurrency on Linux over Windows on the same equipment. I feel that the cloud will be split between the two, but employers who are knowledgeable will go with Linux. It's also our job to educate them. This is my reasoning for learning C++ at this time.
I just had to write a daemon for maintaining a 24x7 connection to a text messaging aggregate (users text operators who respond to multiple connections from a web interface), I went with C++. But I also plan to familiarize myself with Java, because of the huge available Java code base out there. It may come in handy.
I'm interested in learning some AI algorithms that have a practical use in web applications eg. search, product recommendations etc. Obviously since I'm asking this question I am look for some more entry level material.
Any sort of useful stuff on the subject is good - books, blogs, tutorials, anything. My language of choice is c# so anything in that would be awesome but I'm happy to look at examples in other languages.
Toby Segaran's Programming Collective Intelligence isn't strictly an AI book I guess, but it does cover the kind of topics you're interested in (e.g. product recommendations, predictions, price modelling), and as a newcomer to the field I found it pretty accessible. It does sometimes skip over algorithmic detail in favour of "here's how to use this technique via an existing library" though; also the code samples are written in Python though it's clearly explained and easily translated to C#. It has a strong Web focus because, as the title implies, it deals with mining data from user-provided content, particularly on external sites such as eBay, etc.
I use AForge.NET in several projects. There are quite simple and fast implementations of genetic algorithms, neural networks, machine learning and so on.
It is an open-source project, so I can recommend it as a starting framework for any project using AI.
There is an excellent series of Google talks that will cover the foundations called Statistical Aspects of Data Mining. It's the same graduate level class that David Meese gives at Stanford.
The book Algorithms of the Intelligent Web by Haralambos Marmanis & Dmitry Babenko (Manning ed. 2009) provide a primer into this kind of things.
This book covers a rather broad spectrum of areas where "smarts" can be applied to web applications. Because of this, many topics receive at a rather superficial treatment, BUT each chapter includes very relevant references for digging further.
Also, code-wise, the working examples found in the book are made available in a code.google.com project (sorry however, mostly java, not C# as suggested in the question)
I cannot think of other AI resources specifically focused on Web applications, but many areas of AI-at-large are relevant the "intelligent web", in particular:
Natural Language Processing
[some] Neural Networks
Machine learning and classifiers
"Algorithms of the Intelligent Web" by Marmanis & Babenko. Hands down the best reference for what you need (based on your description). Yes, the code is written in Java but it is so clean and straightforward that you can probably transliterate it, into whatever you want, rather quickly.
In terms of search functionality it goes beyond indexing and describes, in-detail, PageRank, user click enhancements, and a PageRank-inspired ranking algorithm for plain documents (ASCII, Word, PDF) that the author called DocRank.
The book also provides, probably the best, practical coverage of recommendation engines, e.g. user-user, item-item, content based.
I'm starting to re-skill myself in Desktop applications. I've been doing Web applications for a few years now.
I've got come decent C# books that I am going through, but they are more like language references. What I would like is a list/site/book with practical exercises, preferably graded in terms of difficulty.
They don't necessarily have to be from a C# site, either, but that would of course be advantageous.
Do you know of any resources like this?
On the topic of learning C# language itself and the runtime, I would recommend the Learn C# section on the MSDN. There are links to lot of articles and trining materials abtou C#. You can combine this with Jesse Liberty's Learning C# 3.0.
On the topic of desktop programming, the answer depends on what platform you would like to use.
If you want to target WPF, I'd recommend Petzold's Applications = Data + Markup. (As a side note, learning WPF would give you the basis to learning about RIA with Silverlight)
If you want to target WinForms... well, I am biased and would recommend against. But if you insist, Petzold's Programming Microsoft Windows Forms is another good book. :-) Chris Sells' Windows Forms 2.0 Programming also is very good book about WinForms.
The WindowsClient.net Get Started and Learn sections have a lot of training videos, articles, FAQ and samples for both WinForms and WPF. The Community Books section also has an extensive list of books on both technologies.
There are a lot of good C# tutorials on C# Practical Learning, ranging across several topics.
I also recommend Head First C# if you want to try a non-reference book.