Computer programming language is a communication medium used by humans to communicate with machines. Basics of Programming Language is something that every newbie or starter should focus on before jumping to writing his/her first hello world program.
When we talk about programming language basics there are concepts that are widely misunderstood by many, even some experienced programmers in some cases. Well, no need to worry about it. We are here to talk about a few of such misunderstood programming concepts.
We are living in the era of the internet and the open Web like StackOverflow presents incredible resources for developers. But having so many resources and ready-to-use codes around minimizes the learning opportunity for a programmer.
This article will be especially helpful for beginners as well as for those who want to boost their basics of programming language concepts. We are going to explain in detail programming language basics, programming-related terms like Environments, APIs, Web Services, and Frameworks with their relations and differences.
Without further ado let’s begin with programming language basics first.
- 1 What is a programming language?
- 2 Types of Programming Language?
- 3 What is a Programming Environment?
- 4 What is a library in programming?
- 5 What is a framework in programming?
- 6 Library vs Framework
- 7 What is API in programming?
- 8 What is a Web Service in programming?
- 9 API vs Web Service
- 10 Final Thoughts
What is a programming language?
We use English, Spanish, and other various languages to communicate with others. This is called human interface language. A human interface language is governed by grammar or a set of rules to form sentences and convey the message to others. We all know that. Let’s not get any deeper.
Similar to human interface languages, computer interface language is required to communicate with computers, which is known as a Programming language.
To understand the basics of programming language here are various essential elements that will improve your understanding of this subject-
- Basic Syntax – Set of textual rules that define and control the structure of programming language
- Data Types – Various types of data that can be processed in a program. Like number, text, percentage, etc.
- Variables – A placeholder that can change, depending on conditions or on information passed to the program. Normally, we do all the data processing using variables.
- Operators – Used for some operation in programming. E.g. “+” is a plus operator which is used for the addition of two numbers or concatenation of two strings.
- Decision Making – Decision-making is an essential element of a program. For example, you want to check if a number is even or odd. Computer programming languages have syntax for decision-making like If, Else, etc.
- Loops – Used for performing repetitive tasks. Like While loops, for loops, etc.
- Arrays – This is a data type that is used to store a set of values for computation.
- Functions – Set of rules written to do certain operations and provide some output in some cases. For example, SUM(a,b) function can be created to add 2 numbers.
- File I/O – File I/O is provided in a computer programming language to handle files input/output/operations. For. example Storing the average age of class students in local txt file.
Types of Programming Language?
1- Machine Language
It is a language in which machines understand the instructions. It consists of only two characters, 0 and 1. Each and every program is ultimately converted into machine language.
2- Assembly language
Assembly language is a low-level programming language in which there is a correspondence between the instructions in the language and the architecture’s machine code instructions.
It is designed for specific types of processors and is a little bit easier than low-level language to understand by humans. ARM, MIPS, and x8 are commonly used assembly languages.
3- High-level language
High-level languages use English-like statements and symbols and easier for humans to understand and write instructions for computers.
Unlike assembly languages and machine languages, High-level languages are independent of the type of computer you are using.
Python, Java, C++, C# are commonly used high-level programming languages.
The next entity of Programming language basics is the Programming environment.
What is a Programming Environment?
A programming environment refers to the set of systems or tools that help in executing it. As per Dan Dunay, a computer scientist, “Everything that helps you host the programming language, run it, test it, and modify what you’ve written is the programming environment”.
To understand the basics of programming language one must be familiar with the programming environment. A programming environment can include a compiler, operating system, interpreter, etc.
What is a library in programming?
As per Wikipedia, “In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications.”
In more lament terms, Libraries in programming languages are collections of prewritten and ready-to-use code that users like us can use without really spending time writing codes for those features.
For example- In the basics of programming language for ai and ml TensorFlow is a very famous Python library developed by Google and used for high-level computations in mathematics, deep learning, and machine learning algorithms.
What is a framework in programming?
A framework is a platform that provides a foundation for developing software applications.
The framework is like a template of a working program that can be selectively modified by adding code. With a framework, the developer can add or replace features to give new functionality to the application.
There are various frameworks available to help you in your programming and software development activities. We can categorize them into two types-
1- Back-End Frameworks-
As the name suggests Back-End frameworks help in easing or automating complex tasks like database connections, authentications and session management, etc. Django is the most common python-based back-end framework.
2- Front-End Frameworks-
Front-End frameworks help mostly in UI-related development and run on a web browser. Bootstrap is a very common Framework used by developers to quickly design UI without banging heads in CSS.
Library vs Framework
Libraries are prewritten codes that can save your time by reusing the already implemented functionality you want.
All you have to do is import the library and call the methods or functions predefined to do a certain task. Important and worth noticing fact is that you have control over the library and can call it as per your freedom.
While in the other hand, Framework, which is built to make your task easier (similar to a library), can’t be called inside your code.
You will have to install the framework and run your code inside the framework. For example, you can install the Bootstrap framework in your Angular project to ease your front-end development part.
What is API in programming?
API is the acronym for Application Programming Interface, which is an intermediary interface that provides a connection between computers or computer programs.
After you understand the basics of programming language, API can be the next step you should definitely learn if you want to progress in web technologies.
Let’s understand API by an analogy.
There is a very common and helpful analogy on the internet related to API.
Let’s say you went to a restaurant and ordered some food. In this analogy, you are a computer or a program requesting some food, i.e. data, from the restaurant kitchen, i.e. another computer or program.
Would it be possible to get the food without a waiter? The answer is NO.
This whole system would not be possible unless a waiter takes your order to the kitchen and puts it on your table when it is ready. The waiter is working as an API here. You use API as a medium to communicate between computers or programs.
What is a Web Service in programming?
A Web service is a set of protocols and standards which are used for exchanging data between computers or applications.
A Web Service lets you exchange data over computer networks just like API. Web Service is a special type of API (a subset of API) that is bound by certain rules and protocols while exchanging data between computer networks.
Let’s learn more about Web Service in the next section – API vs Web Service difference.
API vs Web Service
Web Service is a specific type of API which support HTTP protocol for REST, SOAP and XML-RPC styled data exchange between network on computers or programs.
API in another hand is a wider interface that supports both HTTP and HTTPS protocols and all styles of data exchange.
In terms of data formats like XML and JSON both while Web Service support only XML formatted data exchange.
On high-level basics of programming language include syntax, loops, conditions, functions, and a lot of other small entities. We learned about them a little and then we discussed basic terms involved in programming like APIs, Web Services, Frameworks, Libraries.
If you are starting to learn a programming language with a long-term vision then I would recommend you to learn the programming language basics first and then try to learn language-independent stuff like APIs, Web Services, Frameworks & Libraries for your programming language.
One Reply to “Basics of Programming – What is a Library, Framework, Web Services and API in Programming?”
I was always curious to find the difference between Libraries and Frameworks. It’s good that you have pointed out in well explained manner. Thanks