Computer Basics - II
Hello readers👋 Today we will learn about the basics- part 2 of how a computer system works. If you haven't read part 1 of the computer basics then I would recommend you to first read it and then devour this blog.
Link to part 1 - Computer Basics - I
Backend & Frontend
- Fullstack Developers - They write both backend and frontend codes.
- Mobile Developers - They write code for android and iphone. Some developers specialize by doing one or the other.
Frontend and mobile developers write code that utilizes the backend code through Restful APIs.
HTML, CSS & JavaScript
What is done on the backend and frontend?
Backend codes cannot be accessed directly and are on the servers. They are secure there and you cannot see them. Frontend codes are accessible and but you should know where it is located/ where to look. They are insecure as they are present on the browser and are you can see them.
- HTML - Adds structure
- CSS - Makes the site pretty
- JavaScript - Built to work in the browser. Sites become interactive and they load data in real-time(no refreshing page). It enables better user experience(UX) by manipulating HTML/CSS in the browser.
A typical setup done by the developers
- Few calls to backend
- Get the data you need and process in user's browser/mobile device
- Every user has their own browser/mobile device so it is more efficient to process.
Libraries
These are someone else's source code. They carry out very limited and specific functionality. It saves development time by not building commonly used functionality. Apps can implement many different libraries but can only use if written in the language you are using. Example - for date manipulation we use Moment.js, D3.js for data visualization, jQuery to simplify the codes in JavaScript.
Frameworks
A framework is used for the same reason a library is used; because it allows for common functionality to be executed more effectively.
Frameworks
A framework is used for the same reason a library is used; because it allows for common functionality to be executed more effectively.
But there is one main difference between a framework and a library.
A library usually performs primitive and tedious tasks such as date formatting.
Whereas frameworks are used for software architectural design.
You use a framework because it has a scalable architecture already thought through, so you just have to follow it. An entire application can be built using a single framework. But an application can take contain 1 or many libraries. Frameworks often do have some libraries built into them. Angular, React, Vue.js are other examples of frontend frameworks that also have similar libraries built into them.
You can use whichever libraries you want with whichever framework you’re using, so long as they are both written in the same language. AngularJS, React and Vue.js are all frameworks written in JavaScript. As is MomentJS, so they would work nicely together.
API(Application Programming Interface)
It is a code that acts as an entry point that executes code internally. They are provided by the author of the code. API documentation is like a written manual that explains what will happen when specific entry point code is executed. Libraries and Frameworks have APIs.
SDK (System Development Kit)
It is a toolkit to build large applications. Contains frameworks, libraries, APIs, documentation, IDEs, and other programs designed specifically to help developers build apps. Example: Windows SDK, MAC OS SDK, iPhone SDK and Android SDK.
JSON (JavaScript Object Notation)
It is how (the format) data is sent between devices, clients and servers. Here, data is placed in key-value pairs.
Example: Here the left-hand side are keys and the right-hand side are values. This is one JSON object but we can create an array of JSON objects by adding more key-value pairs.
You can practice JSON here - JSON Formatter & Validator
Types of Programming Language
Programming Languages can be divided into - high-level language and low-level language.
Low-level languages
- They speak directly to the hardware; complete control
- They are machine-oriented and require extensive knowledge of computer hardware
- They have little to no abstraction from the hardware
- Used to write OS and Firmware
- Difficult to use, development time much longer
- Most developers are not low-level programmers
- They are further categorized into two - machine code and assembly language
Machine code is the only language that a computer directly understands. They are in binary format.
Assembly language is more human-readable language as it does not deal with 0 and 1 but with words. Computer hardware does not directly understands this language, it requires an assembler (converts human readable code to computer readable code).
High-Level languages
- They are more human readable
- They have more abstraction from machine code
- They are easier to read, write and maintain
- They require the use of a compiler or interpreter (just like a translator)
- Most developers are high-level developers
- Used to make everyday applications
- Example - Java, PHP, C++, C#, Swift, JavaScript
Real life example of compiler can be seen when you watch a foreign movie and there are subtitles added to the full movie for you to comprehend. For interpreter think you are talking to a foreign individual and require a translation of each line they speak so as to continue the conversation with the person.
The level of a programming language is determined by the abstraction from the machine code. More abstraction means easier to understand, but slower because it requires a compiler/interpreter. Less abstraction means more difficult to understand but it's a lot faster.
Comments
Post a Comment