Tag Archives: objective-c

ios development glossary

IOS Glossary: Architecture, Patterns, Xcode.

As soon as you know the basics, you set the foundation for growth. It works the same way for any job and there is no any secret that many significant innovations are still grounded on diverse knowledge boosting potential and force of creativity. So, today let’s do our homework on the basics and add one more article to the set of professional glossary. Earlier we have already published the Glossary posts with key terms for the topics of UI/UX design and web design as well as business terms and abbreviations. This time the perspective will get changed a bit, featuring first set of terms in the theme of iOS development. Let’s get started briefly reviewing the basic notions common for the sphere of iOS development.

 

iOS

 

Basically, widely known iOS is the well-established abbreviation taking its roots from the phrase «iPhone Operating System» which was created originally for the system of mobile devices produced by Apple such as iPhone, iPad and iPodTouch and now also AppleTV. 

 

User interfaces created for iOS are made on the basis of direct manipulation involving multi-touch gestures. Interface control elements present variety of functions and forms including buttons, sliders, and switches. Gestures taking place in the process of interaction with such type of interface are also various, for instance, swipe, tap, pinch, and reverse pinch; what is more, they all have specific definitions in the context of the iOS operating system. Some iOS applications even use internal accelerometers which can react to the cases of shaking or rotating the device in three dimensions. Another typical feature is portrait and landscape mode switching.

 

From the standpoint of development, Apple gives steady preference to simple and durable things, and this concept is applied to their products, applications, tools and frameworks. It is expected that when iOS developer builds an app for iPhone, it will run on any other device with the iOS. This aspect of iOS development can save large amount of time for programmers as writing code, let’s say, for iPhone, developer uses the same programming language for all Apple’s computing devices. Said otherwise, application created for iPhone can later be even integrated into Mac.

 

In both UI/UX design and development for iOS, specialists making screens and writing code, apply their flight of creativity in terms of definite rules and guidelines to keep. The apps which don’t keep those guidelines risk failing to submit their app to Apple ecosystem of devices. Working over the digital products intended to be used in iOS, professionals need to know iOS Human Interface Guidelines and always keep and eye on updates and fresh recommendations. The set of guidelines for designers states: «As an app designer, you have the opportunity to deliver an extraordinary product that rises to the top of the App Store charts. To do so, you’ll need to meet high expectations for quality and functionality». Actually, the same position works the same way for developers who are offered samples, guidelines and support to find the optimal solutions for user-friendly and effective digital products.

 

ios-developers-tubik-studio

 

iOS architecture

 

As it was mentioned before, iOS allows users to interact with their devices and products using gestures such as swiping, tapping and pinching. These finger actions are typically performed on touch screen displays, which provide fast response and accept inputs from multiple fingers.

 

The iOS architecture can be pictured as four abstraction layers that define it:

 

Cocoa Touch. The layer containing variety of frameworks which define the appearance of the app. It also provides the basic app infrastructure and support for main technologies such as multitasking, touch-based input, push notifications, and many high-level system services.

 
Media. The layer with graphics, audio, and video technologies which developers use to implement multimedia experiences in the apps. The technologies in this layer make enable building apps that look and sound excellent.

 

Core Services. The layer that consists of essential system services for apps. Main services are the Core Foundation and Foundation frameworks, which define the basic types that all apps use. It also contains individual technologies to support features such as location, iCloud, social media, networking, etc.

 

Core OS. The layer including services such as the security, local authentication and core Bluetooth frameworks.

 

Apple recommends developers to write code to the highest applicable layer whenever possible, and only use the lower-level frameworks for features not exposed at higher levels.

 

Architecture design patterns

 

In software development, architecture design pattern is the matter of structure. It is not a finished architecture that can be transformed directly into code. Patterns are similar to the case of reliable practices that the developer can use to solve common problems building an application or system.

 

In general terms, architecture pattern in case of development could be described as reusable solution that could be repetitively applied for the issues that frequently rise within a particular context of development and engineering interactions. This sort of patterns take into account various limitations and restrictions including the problems of hardware performance, availability, environment of use and even particular business goals.

 

Among main architecture design patterns we could mention:

  • MVC (Model–view–controller)
  • MVP (Model–view–presenter)
  • MVVM (Model–view–view-model)
  • VIPER (View-interactor-presenter-entity-routing)

 

First three types of architecture design patterns assume putting the entities of the app into one of 3 categories:

 
Models – give the controller/ presenter/ view-model the data to populate view.
 
Views – display content and are populated by the controller/ presenter/ view-model. Each screen of the app is a ‘view’ which includes buttons, text, menus, fields and etc.
 
Controllers/ Presenters/ View-models – control behavior of the app. Apps are based on event-driven programming, controllers/ presenters/ view-models receive, process and return events.

 

Tubik Studio iOS development

 

To see how it works in practice, let’s take MVC pattern and describe it a bit more in detail. The model-view-controller (MVC) is an architecture design pattern that breaks code down into three parts: user interfaces (views), data (model), and the software that communicates between the two (controller). The building blocks of apps are objects — arrays of code organized with MVC pattern. Each screen of the app is a view: the data model controls the content it displays, and the controller manages communication between the view and the model. The model-view-controller is just one of the architecture design patterns developers use while building the app, still it is popular in development.

 

Xcode

 

Xcode is Apple’s integrated development environment (IDE) and it is the main tool for building iOS apps. iOS developers can work applying either Objective-C or Swift in fact using only Xcode. This software only runs on Macs and there are no official ways to launch it on a Windows or Linux PC.

 

Xcode has tons of features for iOS development, among which:

 

Interface Builder. It allows designing and testing user interface without writing a code. Interface Builder helps to prototype and then connect interface to the source within the Xcode editor.
 
Source Editor. It is a professional editor with code completion, code folding, syntax highlighting, and messages that display warning, errors, and other context-sensitive information.
 
Continuous Integration. It is a feature of OS X Server controlling server-side bots that continuously build, analyze, test, and even archive Xcode projects.
 
XCTest Framework. It assists to build unit tests that check iPhone, iPad, Apple Watch, Apple TV and Mac apps performance.
 
iOS Simulator. It allows prototyping and testing app during the development process. This testing tool simulates iOS, watchOS, and tvOS devices before testing the app on an actual device.

 

iOS programming languages

 

Two fundamental programming languages for iOS development are Objective-C and Swift. The benefits and drawbacks of each language were considered in our earlier post.

 

At the moment Objective-C is commonly described as the general-purpose, object-oriented programming language adding Smalltalk-style messaging to the C programming language. Before Swift came into play, Objective-C had been the main programming language used by developers for OS X and iOS operating systems, and their APIs. Swift, introduced at Apple’s 2014 WWDC, brought its own dose of revolution. In general description, Swift is a general-purpose, multi-paradigm, compiled programming language broadening the previous scope of operating systems as it was developed for iOS, OS X, watchOS, tvOS, and Linux. Swift was designed to enable work with Apple’s Cocoa and Cocoa Touch frameworks as well as the large body of Objective-C code already written for Apple products. 

 

Initially Swift was intended to be more resilient and safer than Objective-C, and also more concise and developer-friendly. It was built with the LLVM compiler framework including in Xcode 6 and using the Objective-C runtime library that enables C, Objective-C, C++ and Swift code to run within one program.  Therefore, it enhances broadening professional horizons for developers making their work more efficient. That was the milestone when developers started their discussion of what is better, tradition or innovation.

 

Since 2014, Swift language has been used by Xcode for coding more often than Objective-C. Objective-C is the initial programming language for building OS X and iOS software and in perspective of all the apps coded for iOS, it presents a superset of the C-programming language and provides object-oriented programming and dynamic runtime. Nowadays, Objective-C is a good fit for early iPhone and it is also effectively applicable for maintaining and updating the apps initially created in it. Swift in its turn is newer  and more flexible programming language for Apple devices that has the best features of C and Objective-C, without the constraints of C compatibility. It keeps step with modern hardware being faster in actual process of coding as well as shorter, more secure and easy-to-use. 

 

tubik ios development

 

Read more about the topic in our previous article 

 

Anyway, the choice of the programming language, framework, method, and tool for creating iOS apps should be based on the intention to provide the efficient product to both the client and the final user. 

 

This set of our glossary is ready for those who need it and we are going to continue this practice before long. Don’t miss the new sets. If there are any specific terms you would like to see explained, described and illustrated, feel free to contact via direct message in our Facebook page or Twitter as well as our Quora representative. New definitions are coming soon!


Welcome to read the articles by Tubik Studio on web and app development

Welcome to read us on Quora

ios development tubik swift objective-c

Swift or Objective-C? Tool Tips for iOS Developers.

In creative process, there are always some points of choice and contradictions. While UX designers are debating about Photoshop vs Sketch theme and give their opinions on efficient prototyping tools, iOS developers also have their own big debate. Today we are going to pitch in and add some of our thoughts to this global discussion of which programming language is better, Objective-C or Swift. We asked Tubik CTO and experienced iOS developer Maria Nazarenko to share her opinion with Tubik Blog readers.

 

Brief background

 

Let’s start with a tiny bit of history. The first and therefore the eldest in the discussed pair of programming languages was Objective-C. Primarily it saw the light of the day in early 1980s and was created by Brad Cox. So, one of the points that could be definitely applied to this programming language is that it’s really tried-and-true and tested by several generations of developers.

 

At the moment Objective-C is commonly described as the general-purpose, object-oriented programming language adding Smalltalk-style messaging to the C programming language. Before Swift came into play, Objective-C had been the main programming language used by developers for OS X and iOS operating systems, and their APIs.

 

Swift, introduced at Apple’s 2014 WWDC, brought its own dose of revolution. In general description, Swift is a general-purpose, multi-paradigm, compiled programming language broadening the previous scope of operating systems as it was developed for iOS, OS X, watchOS, tvOS, and Linux. Swift was designed to enable work with Apple’s Cocoa and Cocoa Touch frameworks as well as the large body of Objective-C code already written for Apple products.

 

Initially Swift was intended to be more resilient and safer than Objective-C, and also more concise and developer-friendly. It was built with the LLVM compiler framework including in Xcode 6 and using the Objective-C runtime library that enables C, Objective-C, C++ and Swift code to run within one program.  Therefore, it enhaces broadening professional horizons for developers making their work more efficient.

 

That was the milestone when developers started their discussion of what is better, tradition or innovation.

 

tubik ios development

 

What is better: Objective-C or Swift?

 

Some time ago expressing our opinion in the hot global discussion about the choice between Photoshop and Sketch we mentioned: “The answer we would like to give is really simple. There is no any vs. There shouldn’t be any war between the options which can complement each other. Obviously, now there is no any perfect and ideal software for design: if it existed, everybody would use only this ideal choice and there wouldn’t be any need for fight.»

 

It seems that in iOS development the situation of today is really similar. The choice is not so obvious as it could seem even after reading about all the extended functionality of Swift in comparison with Objective-C. In practice Objective-C is checked and tested over the years while Swift is young and new. Huge bulk of products have been developed in Objective-C so transition to the other perspective is definitely taking some time and effort.

 

Briefly characterizing the programming languages according to her extended practical experience in iOS development, Tubik CTO Maria mentions that although Objective-C is older and common, Swift could be described as more simple in syntax and stable in work process.

 

Swift Objective-C development tubik

 

Which programming language is more useful to know?

 

Due to Xcode which is the integrated developing environment (IDE) with a set of software development tools iOS developers can work applying either Objective-C or Swift in fact using the same developer tool.

 

As long as Objective-C exists much longer, it’s natural that plenty of simple and complex applications have already been accomplished with this language. Not knowing Objective-C and starting straight from Swift can limit developer’s professional flexibility. It can be especially obvious in case when developers have to update existing products.

 

Sometimes it happens that developers, knowing only Swift, recommend to rewrite existing (perhaps big or even huge) piece of code from Objective-C to Swift, the customers logically do not see this acceptable and certainly do not accept the necessity to pay for this work.

 

Considering this, the best option is knowing both languages. That gives developers natural professional flexibility for any task and environment they have to tackle with in current projects. There are two strategies which mostly depend on the time available.

 

In case if there is considerable amount of time between studying basics and applying them into real practice, our advice is to start with Objective-C. Although it is often described as more complicated, it establishes a solid foundation of basic principles and routine of creating applications for and using iOS system. On this basis, learning another iOS language such as Swift which is syntactically simpler will not seem too hard.

 

However, there can be also another strategy, a bit more dynamic than the previous one and applicable for those who don’t have enough time in their disposal needing to start actual work asap. In this case, you can start with Swift as it is easier in syntax and more similar to other programming languages so it will take less time to start practical coding. Getting the basics of development in this way, don’t forget to add Objective-C to the practice and polish skills in both languages. It will definitely give result if approached thoughtfully and rigorously.

 

iOS development swift objective-c

 

Here in Tubik Studio we believe that the only single thing that a designer and developer should think about is the high quality of the final product. The highest. Quality. Possible. Period.

 

Any tool and method chosen for this aim is a good way as long as it provides the efficient product to the client and the final user.

 

Don’t miss our next articles on iOS development giving practical tips and case studies of coding complex design decisions.


Welcome to see designs by Tubik Studio on Dribbble and Behance