Industry Practices and Principles in Software Engineering

Jamisulochana
5 min readMar 5, 2022

Application frameworks consist of software framework used by software developer to implement standard structure of the application software.

What is SOLID?

S.O.L.I.D are 5 object-oriented principles that should be followed when designing software.

1. Single responsibility (A class should have only a single responsibility)

2. Open-close (A software module should be open for extension but closed for modification)

3. Liskov substitution (Object should be replaceable with instances of their subtypes without altering correctness of that program)

4. Interface segregation (Clients should not be forced to depend upon the interfaces that they don’t use)

5. Dependency inversion (Higher level classes should not know the implementation of low-level classes but depends on abstraction)

We used software engineering to find technical solution for business problem. There are some best ways to solve those problem.

Think throughout the problem

Divide and conquer

KISS

Learn, especially from mistakes

Always remember why software exists

Remember that you are not the user

Also, when we are implementing the designed solution there are some guidelines to keep in mind.

Ø YAGNI

Ø DRY

Ø Embrace abstraction

Ø DRITW

Ø Write code that does one thing well

Ø Debugging is harder than writing code

Ø Kaizen

Practices

There are some software engineering best practices we should follow when we are writing a program.

Ø Unit testing

Unit testing is a software development process in which the smallest testable parts of an application, called units, are individually and independently scrutinized for proper operation.

Ø Code quality

Code should readable and easily understandable. Code complexity, large methods and classes, meaningless identifiers, code duplication, large number of method parameters.

Ø Code review

Peer reviews, lead reviews and pair programming are some methods of doing code reviews

Ø Version controlling

Allow developers to change and improve the code freely without being afraid of breaking the code.

Ø Continuous integration

Allows developers to detect issues early and fix them without a delay.

JavaScript

JavaScript is dynamically typed, non-blocking I/O(It refers to the program that does not block the execution of further operations), asynchronous, single thread programming language. Also, JavaScript is multi paradigm. It mean JavaScript support OOP(Object Oriented Programming) and functional programming.

In JavaScript constructor function used ‘new’ keyword to create a object. And when function used ‘new’ keyword, that function acts as a class. Also there is another way to create a object. We can used object literals (‘{}’) to create JavaScript object. And JavaScript supports static methods and variables.

JavaScript refer another object instance called prototype. Prototype used to create object, for inheritance and to add method for class. And object instance also has a prototype it is basically the object instance from which object is being created. Object ‘__proto__’ is where object get its properties inherited from.

In JavaScript, ‘this’ keyword refers to an object. The ‘this’ keyword refers to different objects depending on how it is used.

Strict mode helps to write cleaner code, like preventing using undeclared variables. The purpose of restricted mode of JavaScript is make it easier to write secure JavaScript code.

In JavaScript closure is used to encapsulate variables into a function and restrict access to it from the outside.

Promises and callback are used to handle asynchronous operations in JavaScript. A key difference between the two is when using the callback approach, we’d normally just pass a callback into a function that would then get called upon completion in order to get the result of something. In promises, attach callbacks on the returned promise object.

Version controlling

Version control, also known as source control, is the practice of tracking and managing changes to software code. Version control systems are software tools that help software teams manage changes to source code over time. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to fix the mistake while minimizing disruption to all team members.

Terminology

● Repository (Central location where all the files are being kept. Usually a directory with set of files)

● Trunk (Also referred to as master branch. This is where the most stable code is being placed which is referred as the production code)

● Stage (Mark files for tracking changes)

● Commit (Create a snapshot of the changes being made to the files)

● Branch (Copy of the master branch taken at a given point. All the feature developments and bug fixes will be done in a branch. Usually it is allowed to have multiple branches at the same time)

● Checkout (Mark/unlock file for changing)

● Merge (Combining branches together to update the master branch)

● Merge conflict (Merge conflicts occur when merging a file which has been changed in two separate branches or places. Changes that interfere other changes)

Git

Git is the most popular version control system. Git has many features and few of them are given below.

v Branching and Merging

v Small and Fast

v Distributed

v Data Assurance

v Staging Area

v Free and Open Source

v Trademark

v Support multiple protocols

Git Commands — Git init, Git clone, Git add, Git stage, Git commit, Git push

NoSQL

A NoSQL database provides a mechanism for storage and retrieval of data that is modeled in means other than the tabular relations used in relational databases. NoSQL databases are increasingly used in big data and real-time web applications. NoSQL Remove the burden of data structures mismatch between application in-memory and relational databases and integrate databases using services.

CAP theorem

MongoDB

MongoDB is a source-available cross-platform documented database program. Classified as a NoSQL database. MongoDB uses JSON like documents with optional schemas. MongoDB supports field, range query and regular-expression searches. Queries can return specific fields of documents and also include user-defined JavaScript functions. MongoDB use SpiderMonkey JavaScript engine. Also MongoDB can be used as a file system, called GridFS (Grid File System), with load balancing and data replication features over multiple machines for storing files.

--

--

Jamisulochana

Bsc(Hons) Degree in Information Technology, specializing in Software Engineering at Sri Lanka Institute of Information Technology