CompTIA Tech+ (FC0-U71)Applications and SoftwareHard
A developer is writing a new application that will require persistent data storage and rapid retrieval for various user profiles and settings. The application needs to run on multiple operating systems (Windows, macOS, Linux) without significant code changes to the data access layer. Which type of application architecture is MOST suitable for this requirement?
- ACommand-line interface (CLI) application with text file storage.
- BNative application with OS-specific file system access.
- CCross-platform application using a database system.
- DWeb-based application accessed via a browser.
Show answer & explanationAnswer & explanation
Correct answer: C. Cross-platform application using a database system.
A cross-platform application using a database system (like SQL or NoSQL) provides a standardized way to store and retrieve data consistently across different operating systems, abstracting away OS-specific file system differences.
Why the other options are wrong
- A. CLI applications can be cross-platform, but storing complex user profiles and settings in plain text files is inefficient, lacks rapid retrieval capabilities, and is prone to data integrity issues compared to a database.
- B. Native applications with OS-specific file system access would require significant code changes for each OS, contradicting the 'without significant code changes' requirement.
- D. While web-based applications are cross-platform, they typically rely on a server-side database for persistent storage, making 'cross-platform application using a database system' a more direct and complete answer for the data storage requirement.
Cross-Platform Application
Software designed to run on multiple operating system platforms (e.g., Windows, macOS, Linux) without requiring significant modifications to its core code.
- Often achieved using frameworks (e.g., Electron, React Native) or universal languages (e.g., Java, Python).
- Databases provide a platform-independent way to manage persistent data.
- Reduces development time and maintenance costs across different OS environments.
Memory trick: Building apps for data needs a sturdy, flexible foundation.