Choose a method that fits the data and view parts of your application

Source: Internet
Author: User

  • Choose the basic method that fits the data model:

    • Existing data Model code--If you already have a data model code written in a C programming language, you can integrate that code directly into your IOS application. Because IOS applications are written in Objective-c, they match code written in other C programming languages. Of course, there is also the benefit of being able to write objective-c wrappers for any non-objective-c code.

    • Custom Object Data Model-custom objects typically combine certain simple data (strings, numbers, dates, URLs, and so on) with business logic, which is needed to manage such data and ensure consistency. Custom objects can store a combination of scalar values and pointers into other objects. For example, a class defined by the Foundation framework is used for many simple data types and is used to store a set of other objects. These classes make it easier to define your own custom objects.

    • Structured data Model--If your data is highly structured (that is, the data is suitable for storage in a database), use Core data (or SQLite) to store it. Core data provides a simple, object-oriented model for managing structured information. It also provides built-in support for some of the advanced features, such as Undo and ICloud. (SQLite files cannot be used in conjunction with ICloud.) )

  • Decide if you need a supporting document:

    The work of a document is to manage the application's in-memory data model objects and coordinate the storage of such data in the corresponding file (or set of files) on disk. A document usually means a user-created file, but an application can also use a document to manage files that are not user-facing. One of the great benefits of working with documents is that UIDocument classes make it easier to interact with ICloud and local file systems. Classes provide similar support for applications that use Core Data to store content UIManagedDocument .

  • Choose a method for the user interface:

    • Building Block Method-the simplest way to create a user interface is to use an existing view object to assemble the interface. Views represent visual elements, such as tables, buttons, text columns, and so on. You use many views as is, but you can customize the look and behavior of the standard view to suit your needs, as needed. You can also use custom views to implement new visual elements and to freely mix such views with the standard views in the interface. The advantage of views is that they provide a consistent user experience and allow you to quickly define complex interfaces with relatively little code.

    • OpenGL ES-based approach-if your application requires frequent screen updates or complex rendering, you may want to draw content directly using OpenGL es. OpenGL ES is primarily used in games and applications that utilize complex graphics to a large extent and therefore require the best possible performance.

Choose a method that fits the data and view parts of your application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.