Tutorial by Examples: design

Design documents contain application logic. Any document in a database that has an _id starting with "_design/" can be used as design document. Usually there is one design document for each application. { "_id": "_design/example", "view": { ...
In a const-correct class, all member functions which don't change logical state have this cv-qualified as const, indicating that they don't modify the object (apart from any mutable fields, which can freely be modified even in const instances); if a const cv-qualified function returns a reference, t...
This example uses Icarus and GTKWave. Installation instructions for those tools on OSx are provided elsewhere on this page. Lets begin with the module design. This module is a BCD to 7 segment display. I have coded the design in an obtuse way simply to give us something that is easily broken and...
QtCreator is, at the moment, the best tool to create a Qt application. In this example, we will see how to create a simple Qt application which manage a button and write text. To create a new application click on File->New File or Project: Then choose the Projects->Application->Qt Widge...
Test automation framework can have several components depending on automation planned. Some of them(though not limited to) are: Test Runner (TestNG, JUnit, Jest, Protractor, Cucumber) Test Container (BDD Specs-Steps, Junit Tests, Spec based functions) Test Environment Configuration Test Data S...
“Adapter” as the name suggests is the object which lets two mutually incompatible interfaces communicate with each other. For example: if you buy a Iphone 8 (or any other Apple product) you need alot of adapters. Because the default interface does not support audio jac or USB. With these a...
Design Patterns provide solutions to the commonly occurring problems in software design. The design patterns were first introduced by GoF(Gang of Four) where they described the common patterns as problems which occur over and over again and solutions to those problems. Design patterns have four ess...
When designing a linked list, you can avoid all the special-cases (empty list, first node, last node, etc) by using a sentry node. Let's see how that is done: struct Node { Node* next; Node* prev; T data; }; // helper function to link 2 nodes void Link(Node* n1, Node* n2) { ...
The model view controller is a very common design pattern that has been around for quite some time. This pattern focuses on reducing spaghetti code by separating classes into functional parts. Recently I have been experimenting with this design pattern in Unity and would like to lay out a basic exam...

Page 2 of 2