Nowadays, Apple seems is the biggest phone manufacturer in the world because the popularity of iPhone. Although in overall, the share in mobile phone market of Apple is still low if compared to other big company such as Nokia and Samsung, but must admit that iPhone is one of the popular smartphone for today.
http://actionscripter.co.uk/blog/
So do you not what programming language does iPhone applications used?
Unlike Android which used Java mostly, iPhone run the application or iOS platform mostly with Objective-C.
Objective-C
- A reflective, object-oriented programming language that adds Smalltalk-style messaging to the C programming language.
- Today, it is used primarily on Apple's Mac OS X and iOS.
- Allow for flexible, and often easy, solutions to programming issues.
- Delegating methods to other objects and remote invocation can be easily implemented using categories and message forwarding.
- Swizzling of the isa pointer allows for classes to change at runtime.
- Serialization, commonly called Archiving in Objective-C, can be done by overriding read and write methods.
Objective C & C++
- Different in their design and intent.
- C++ extends and modifies C significantly to create a new object-oriented language.
- Sometimes leads to confusing interactions between features.
- Objective C is a set of simple extensions that provide ANSI C (or C++) with a simple but powerful standard object model.
- Most C programmers will be able to learn enough Objective C for most applications in a few days.
- Because of this difference in design philosophy, each language has its own benefits and limitations.
- Allowing C programmers to write object-oriented code quickly with Objective C.
- Allowing C++ programmers to mix Objective C and C++ in their projects.
- Because of its simplicity, Objective C does lack some features that C++ provides;
- However, most of C++'s functionality can be accessed in other ways in Objective C.
Benefits of C++
+ Multiple inheritances- Objective C, like Java, does not support multiple inheritances. Instead, it allows the user to define a protocol.
+ A friendly language- C++ gives finer access control over all of an object's elements than Objective C, with private, public, and protected keywords and the concept of friend functions.
+ iostream.h- C++ provides a new implementation of the ANSI input/output library for stream-based i/o. Objective C does not have an analogous library, but some implementations of Objective C++ do allow you to call the C++ iostream library from your Objective C++ projects.
Benefits of Objective C
+ Dynamic typing and the id type- Any variable may be declared as type id, meaning a pointer to an object of an undetermined type.
+ Categories and dynamic loading- The dynamic nature of Objective C allows existing classes to be extended at runtime. Objective C allows you to define categories, related sets of extensions to objects you've already created.
+ Simple and standard- C++ is a complex and evolving language, leading to differences between compilers and implementations; as a result, C++ users need to be more careful about using features like boolean types that may not be supported on all compilers. Objective C 's simplicity makes these problems less likely; it has also helped it maintain a stable standard. (And yes, Objective C does have a BOOL data type.)
+ Shortcuts- C++ doesn't have a monopoly on convenient features, either. Objective C's additions include C++-style // comments and the #import directive, which acts like the #include directive but ensures that each referenced file is included only once per project.
Here is a video regarding iPhone SDK: Store App Part 1 - Objective C Math…
Reference from
0 comments:
Post a Comment