Programming Paradigms
- Overview
A software programming paradigm perfectly serves as the blueprint for how developers think about code structure, logic organization, and problem-solving strategies.
A programming paradigm is the concept by which the methodology of a programming language adheres to. It is a way to classify programming languages based on their features. A programming paradigm is also an approach to solving problems by using programming languages.
Paradigms are important because they define a programming language and how it works. A great way to think about a paradigm is as a set of ideas that a programming language can use to perform tasks in terms of machine-code at a much higher level. These different approaches can be better in some cases, and worse in others.
Programming paradigms are broadly divided into two primary categories, each containing its own specific sub-paradigms.
1. Imperative Programming (How to do it):
This paradigm focuses on explicitly detailing the step-by-step instructions a computer must execute to change its program state.
- Procedural Programming: Code is grouped into sequences of instructions called procedures, routines, or functions. (Examples: C, Fortran).
- Object-Oriented Programming (OOP): Code is structured around "objects" rather than actions. Objects combine data (properties) and behavior (methods). (Examples: Java, C++).
2. Declarative Programming (What to do):
This paradigm focuses on describing the desired result or outcome without explicitly outlining the sequential control flow or step-by-step instructions.
- Functional Programming: Programs are constructed by applying and composing pure mathematical functions, avoiding mutable state data and side effects. (Examples: Haskell, Clojure).
- Logic Programming: Programs express facts and rules about a problem domain, and a system engine deduces the answers. (Example: Prolog).
- Database Query Languages: Programs specify exactly what data to retrieve rather than how to structurally find it. (Example: SQL).
2. Multi-Paradigm Languages:
Most modern, popular languages do not limit you to just one approach. They are multi-paradigm, meaning you can mix and match styles based on the specific feature you are building.
For instance, Python, JavaScript, and C++ allow you to write procedural, object-oriented, or functional code depending on what makes the most sense for your project.
Please refer to the following for more informtion:
- Wikipedia: Programming Paradigm.
- Native Platforms and Native apps
A native platform is a specific operating system (OS) or environment (like Apple's iOS, Google's Android, or Microsoft Windows). A native app is a software program built using tools and languages specific to that single platform, allowing it to run directly on the device hardware for maximum speed and reliability.
A native platform is a platform such as Mac or PC that has preinstalled and configured applications. For example, the Photos, Mail, and Contacts applications on every Apple computer are native platforms.
1. Native Platforms and Their Languages:
- Apple iOS: Built using Swift or Objective-C via Xcode.
- Google Android: Built using Kotlin or Java via Android Studio.
- Microsoft Windows: Built using C#, C++, or .NET frameworks via Visual Studio.
2. Key Benefits of Native Apps:
- Top Speed: Programs load fast and run smooth because they talk directly to the processor and memory.
- Full Hardware Access: Apps can easily use device features like the camera, GPS, microphone, and Bluetooth.
- Offline Use: Most functions work well without an active internet connection.
- Natural Look: User interface elements match the exact style of the host operating system.
3. Main Drawbacks of Native Apps:
- Separate Codebases: You must write different code for iOS, Android, and Windows instead of sharing one set of code.
- Higher Cost: Building and fixing separate versions requires more time, effort, and money.
- Core Featues of Native Apps
In mobile web app development, a native app is an application written to work on a specific device platform. Native apps are built for a specific operating system, such as iOS or Android, and use platform-specific programming languages and tools.
Native apps are different from cross-platform apps, which work on multiple operating systems.
Native apps have the following features:
- Performance: Native apps are faster, more responsive, and more interactive than web apps.
- User experience: Native apps have a smoother user input and output experience, and a consistent look and feel.
- Security: Native apps have access to platform-specific built-in security features.
- Offline access: Native apps can often be accessed offline because they store relevant data on your phone.
[More to come ...]

