#WTHI? ReactJS vs React Native

ReactJS

ReactJS (A.K.A. React.js or React) is a free and open-source front-end JavaScript library for building user interfaces based on UI components. It is maintained by Meta (formerly Facebook) and a community of individual developers and companies.

React Native

React Native is an open-source UI software framework created by Meta (formerly Facebook) is used to develop applications for Android, iOS, MacOS, Web and Windows by enabling developers to use the React framework along with native platform capabilities.

Conclusion

ReactJS is for web UI and React Native is for developing native apps on multiple platforms.

#WTHI? Design patterns in software development

They are templates that identify problems in the system and provide appropriate solutions to general problems that developers have faced over a long period of time, through trial and error.

In 1994 the “Gang of Four” (GoF) formed by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published the book “Design Patterns, reusable object-oriented software elements”; where the design pattern is introduced in software development and 23 common patterns are documented to solve a specific problem

Patterns are classified into 3 types, “Creational Patterns“, “Structural Patterns“, “Behavioral Patterns“, where:

Creational patterns
They provide various object creation mechanisms, which increase flexibility and reuse of existing code in a way that is appropriate to the situation. This gives the program more flexibility in deciding which objects should be created for a given use case.

Structural patterns
They facilitate efficient solutions and standards regarding class compositions and object structures. The concept of inheritance is used to compose interfaces and define ways to compose objects to obtain new functionality.

Behavior patterns
They deal with communication between class objects. They are used to detect the presence of communication patterns already present and can manipulate these patterns.

#WTHI? SOLID

It is a series of principles and good practices that should be taken as a basis for software development to achieve a code that is cleaner, more maintainable, more scalable in the future and less prone to errors.

SOLID is the acronym for “Single Responsibility Principle“, “Open/Closed Principle“, “Liskov Substitution Principle“, “Interface Segregation Principle“, and “Dependency Inversion Principle“, where:

S: Single Responsibility Principle – Each module must have a single reason to change.
O: Open/Closed Principle – The code should be Open to extend it and add new features, and Closed to modifications, except those that must be made if an error is found.
L: Liskov Substitution Principle – A derived class must be able to be substituted for its base class.
I: Interface Segregation Principle – Several purpose-specific interfaces should be used, rather than a few large interfaces.
D: Dependency Inversion Principle – Must depend on abstractions, not concrete classes.

#WTHI? Test-Driven Development (TDD)

Test-Driven Development or TDD is a software development practice or technique where the tests are done first, then the code that satisfies the tests is written, and finally the generated code is refactored; this way you get high quality code

According to Kent Beck (its creator) the premise of TDD is that all code must be continuously tested and refactored

Tests are created from use cases or project documentation, ensuring that the written code meets the needs of the project for quality and performance

The TDD cycle consists of 3 parts: RED, GREEN and REFACTOR
RED, writing a test that fails
GREEN, write the code that satisfies the test
REFACTOR, eliminate redundancy in the code

Advantages
Optimized and tested code generation
Easy identification and tracking of errors when applying code changes

Disadvantages
If the documentation does not exist or is not well defined, the tests will be inefficient and will fail in their purpose of guiding development.
You must have the necessary skills and tools to create robust tests

#WTHI? API, Web API and REST API

API (Application Programming Interface)
It is a library with a set of methods that a software exposes to be executed by other software

Web API (Web Application Programming Interface)
It is an API on the Web accessible by HTTP protocol

REST API (RESTful Application Programming Interface)
It is a Web API that follows the RESTful architecture guidelines