Designing a model is an important phase and is a multi-process that represents the data structure, program structure, interface characteristic, and procedural details. It is mainly classified into four categories — Data design, architectural design, interface design, and component-level design.
- Data Modeling/Design: It represents the data objects and their interrelationship in an entity-relationship diagram. Entity-relationship consists of information required for each entity or data objects as well as it shows the relationship between these objects. It shows the structure of the data in terms of the tables. It shows three type of relationship — One to one, one to many, and many to many. In one to one relation, one entity is connected to another entity. In one many relations, one Entity is connected to more than one entity. In many to many relations one entity is connected to more than one entity as well as another entity also connected with the first entity using more than one entity.
- Architectural design: It defines the relationship between major structural elements of the software. It is about decomposing the system into interacting components. It is expressed as a block diagram defining an overview of the system structure — features of the components and how these components communicate with each other to share data. It defines the structure and properties of the components that are involved in the system and also the inter-relationship among these components.
- User Interfaces design: It represents how the Software communicates with the user i.e. the behavior of the system. It refers to the product where users interact with controls or displays of the product. For example, Military, vehicles, aircraft, audio equipment, computer peripherals are the areas where user interface design is implemented. UI design becomes efficient only after performing usability testing. This is done to test what works and what does not work as expected. Only after making the repair, the product is said to have an optimized interface.
- Component level design: It transforms the structural elements of the software architecture into a procedural description of software components. It is a perfect way to share a large amount of data. Components need not be concerned with how data is managed at a centralized level i.e. components need not worry about issues like backup and security of the data.
What is Data Modeling/Design?
The method of creating a data store model is called data processing in a database. This introduces theoretical data objects and connections between different data objects. Data modelling is a data formulation process in a standardized format in an information system. It helps to quickly analyze data, which helps to meet business needs. The data modelling process requires data modelers who work correctly with stakeholders and prospective IT users. Data modelling ends with the development of a model of data supporting the infrastructure for the business information system.
Understanding Data Modeling/Design
It occurs at three different layers:
- Physical model: It is a schema that says how data is stored physically in the database.
- Conceptual model: It is the user’s view of the data, i.e. the high level which the user sees.
- Logical model: It sits between the Physical model and conceptual model, and it represents the data logically, separate from its physical stores.
Hierarchical Data Modeling: These models were used to replace file-based systems. The data was kept in a tree-like one too many arrangements.
Relational Data Modeling: It’s true that the hierarchical model helped us to move from file-based systems, which reduced complexity but still, one had known the specific physical data storage employed. The relational database follows the relational model where data is stored in tables, unlike the Hierarchical database, where it is stored in a tree-like structure. In short, it reduced the complexity more when compared to the hierarchical model.
How does Data Modeling/Design make work so easy/why should we use it?
It helps us in a visual representation of data and enforces business logic, regulations, policies, etc., on data. It is a guide that is used by scientists and analysts in the designing and implementation of a database. So, without data modeling, the job of analysts and scientists to implement the business requirements on a database becomes difficult.
Why do we need Data Modeling/Design? / What can you do with it?
The main goal of using it is:
- To ensure that all data objects are represented correctly as if it is not done correctly, we would get incorrect results.
- It helps, as stated earlier, to design a database at conceptual, physical, and logical levels.
- It helps to design the relational tables, primary keys, foreign keys, etc.
- Database developers can create a better physical database with a good model as it becomes a guiding tool for them.
- It helps to identify missing and redundant data.
- It helps us to have a better IT infrastructure and to have easy and cheap maintenance when required in the long run though it’s time-consuming initially.
Working of Data Modeling/Design
Now let’s create a sample data model to understand how to work with a model. To do this, we have to follow certain steps:
- First, we have to understand the requirements; In this case, we will create a model for an online store. So, keeping that in mind, we need two tables a) customers b) products.
- The next step is to get the attributes of the tables or entities.
a. customer table can have attributes like:
b. Product table can have attributes like:
In the customer table, we can have Id as Primary key and similarly, Product Id in the Product table will be the primary key as shown in the below diagrams.
Now, we will design the relationship between these two tables. So to connect the customer and product table, we will create a table called purchase which will be like an order table (i.e. which customer ordered which product).
If you look at the figure above, the customer-purchase reference is OK because every purchase has one customer, and one customer has many purchases. So, this reference is okay. One more thing we have taken user_account_id as a foreign key (the reference to the id in customer key). Similarly product_id. There is still a problem with product-purchase reference as several products can be bought in one purchase as well several purchases can include the same product.
To overcome this, we will design an intermediary table known as purchase_item, which will be connected with purchase and product. In the below figure, we can see the problem resolved.
Introduction to Architectural Design in Software Engineering
Architectural design in software engineering is about decomposing the system into interacting components. It is expressed as a block diagram defining an overview of the system structure, features of the components, and how these components communicate with each other to share data. It identifies the components that are necessary for developing a computer-based system and communication between them i.e. relationship between these components. It defines the structure and properties of the components that are involved in the system and also the interrelationships between these components. The architectural design process is about identifying the components i.e. subsystems that makeup the system and structure of the sub-system and they’re interrelationship. It is an early stage of the system design phase. It acts as a link between specification requirements and the design process.
System properties of Architectural Design
In software engineering, during the architectural design process, some system properties are focused. Some of them are as follows
- Security: The system is secured against malicious users by encryption or any other security measures. The architectural design process uses a layered architecture with critical assets in the innermost layers.
- Performance: It is nothing but a meantime taken between request and response of the page. The performance of a system can be improved by avoiding critical operations and reducing communication between components. This is possible by using large components instead of small and fine-grained components.
- Maintainability: Architectural design process uses easily modifiable and replaceable components. Consider the components in a manner so that it is easy to change them over time according to the new requirements and build the software with the flexibility to change or maintain.
- Safety: Avoid critical functionalities in small components of the system.
- Availability: Architectural design process includes redundant components and corresponding functions for handling the occurrence of any type of errors.
Decisions for Architectural Design
In software engineering, the architectural design process differs as the system differs depending upon the type of system being developed. But still, there are some common decisions that should be taken care of in any design process are as follows
- How can the system be distributed across the network?
- Which approach can be used to structure the system?
- Is there a generic application architecture procedure that can be used which can act as a template for the proposed system that is being designed and developed?
- Which architectural styles are suitable for the proposed system?
- How can software architecture be documented?
- How can the system be decomposed into modules?
- What control strategy must be used to control the operation of the components in the system?
- How can architectural design be analyzed?
Software Architectural Models
To document the architectural design process, architectural models are used
- Static type of architectural structural model represents the major system components.
- Dynamic type of architectural process model represents the process structure of the system.
- Distribution type of architectural model represents how the component is distributed across various computers.
- Interface type of architectural model represents the interface of the components.
- Relationships type of architectural model represent models such as data flow diagram to represent the component interrelationship.
Architectural design models are application domain-specific and the most common two types of domain-specific models are:
- Generic model: These models are abstractions derived from a number of real systems and encapsulated the characteristics of these systems. This type of model usually follows a bottom-up approach.
- Reference models: These models provide information regarding the class of the system. They are derived from the application domain rather than from existing systems. It usually follows the top-down approach. It provides a comparison between different Software architectures.
Advantages of Architectural Design in Software Engineering
- Architectural design works as a tool for stakeholder communication. It is used as a support or roadmap in the discussion with system stakeholders
- It is used for system analysis. Architectural design is used to analyze whether the system will be able to meet its non-functional requirements or not.
- It facilitates large-scale re-use. The software architecture that is the output of the architectural design process can be reused across a range of the system.
Disadvantages of Architectural Design in Software Engineering
- Architectural design re-use the components, the use of redundant components improves the availability but makes the security of the system difficult to handle.
- Use of large components may improve the performance as large components include all the related properties and function into one component but it reduces the maintainability as it becomes difficult to modify and replace the large component. It involves a very tiresome task.
- Avoiding critical features inside the small components leads to more communication among the components which in turn degrades the performance.
Introduction to User Interface Design
User interface design refers to the products where a user interacts with controls or display of the product. Good programming technology alone is not enough to achieve user’s acceptance of software products. It also needs a good user interface; else, it fails in the market. While programming technology focuses on the software functions, user interface design focus on the usability specialists. User interfaces design becomes efficient only after performing the usability testing. This is done to test what works and what does not work as expected. Only after making the repair, the product is said to have an optimized interface. When it is applied to software, it is called as HCI, i.e. Human-Computer Interaction.
User Interface Design Process
The user interface design process is categorized into 4 activities which are as follows:
- Interface Analysis: It evaluates the UI design with end-users in order to understand the users who will interact with the system through UI design, to confirm the tasks that user will perform to complete their work, to understand the environment in which these tasks will be conducted, to understand the content of the interface. Once all requirements are gathered, the end-user carries out the task analysis.
- Interface Design: It defines the interface objects and actions that allow the user to perform all tasks that are defined in the user requirements analysis phase. It is an attempt to confirm that the designed tasks meet every usability goal defined in the user requirements.
- Implementation: It involves prototyping and then the actual implementation. The output of the prototyping is used for the implementation.
- Interface Validation: It validates the ability of the user interface to implement every user tasks correctly, user acceptance of the interface as an efficient tool in their work. Its focus is on the degree to which the user interface design is easy to use and learn.
Principles of User Interface Design
Given below are the principles mentioned:
- User Familiarity: The interface should provide user terms and concepts which are determined from the experience of the people who will make the most use of the system in that application domain instead of using new terms. This helps users to understand the working of the software better.
- Minimal Surprise: Users never like to see the system working in an unexpected manner. They get frustrated in such cases. Users must never be surprised by the behavior of the system because they build a mental perception of how the system works, and if this perception is broken, then the users get surprised seeing the system unexpected type of behavior, and they get stressed up.
- Consistency: It should be consistent, i.e. the system command and menus should have the same format, and the same parameter should be passed to all commands in the same way.
- Recoverability: Users most often make mistakes while working with the system. These mistakes can be reduced but cannot be completely eliminated. But there can be a provision to tolerate these mistakes and allow the system to come back to its working position. This is known as recoverability. It should include a mechanism to allow users to recover from errors.
- User Diversity: The interface should provide appropriate interaction facilities for the various types of the system user. This is based upon the third human described above.
- User Guidance: The user interface should provide meaningful feedback when errors occur and provide different levels of help and advice. This helping level ranges from providing basic information to the level of providing a complete description of system facilities.
User Interfaces Design Issues
Some issues need to be considered while designing a good user interface design. These issues should be taken care of so that they do not cause any technical problems.
- Response Time: This is the mean time between request and response or the software with the desired output. It can be measured in length and variability. If the response time is too long, then the user becomes frustrated.
- Error Handling: Poor error message may result in rejecting the product rather than accepting it. An error message should describe the problem in words that are easy to understand by the user.
- Help Facilities: The end-user requires help when he needs some information, and he cannot find it or if the user is in trouble. Both of these requirements are considered in the help system design and must be available all the time.
- Application Accessibility: It states whether the application is simple to interact with or not. Special guidelines are given to users while interacting with software.
What is a Component Level Design?
Component level design is the definition and design of components and modules after the architectural design phase. Component-level design defines the data structures, algorithms, interface characteristics, and communication mechanisms allocated to each component for the system development. A complete set of software components is defined during architectural design. But the internal data structures and processing details of each component are not represented at a level of abstraction that is close to code. Component-level design defines the data structures, algorithms, interface characteristics, and communication mechanisms allocated to each component.
Steps of Component Level Design
Steps 1 & 2 — Identify Classes
Most classes from the problem domain are analysis classes created as part of the analysis model.
The infrastructure design classes are introduced as components during architectural design.
Step 3 — Class Elaboration
Specify message details when classes or components collaborate.
Identify appropriate interfaces for each component.
Elaborate attributes and define data structures required to implement them.
Describe processing flow within each operation in detail.
Step 4 — Persistent Data
The persistent data sources are described (databases and files) and the classes required to manage them are identified
Step 5 — Elaborate Behavior
It is sometimes necessary to model the behavior of a design class. Transitions from state to state have the form:
Event-name (parameter-list) [guard-condition] / action expression.
Step 6 — Elaborate Deployment Diagrams
Deployment diagrams are elaborated to represent the location of key packages or components.
Step 7 — Redesign/Reconsider
The first component-level model you create will not be as complete, consistent, or accurate as the nth iteration you apply to the model. The best designers will consider many alternative design solutions before settling on the final design model.
Concluding with principles of Design Modeling.
Design must be traceable to the analysis model:
Analysis model represents the information, functions, and behavior of the system. Design model translates all these things into architecture — a set of subsystems that implement major functions and a set of component level design that are the realization of Analysis classes. This implies that the design model must be traceable to the analysis model.
Always consider architecture of the system to be built:
Software architecture is the skeleton of the system to be built. It affects interfaces, data structures, behavior, program control flow, the manner in which testing is conducted, maintainability of the resultant system, and much more.
Focus on the design of the data:
Data design encompasses the manner in which the data objects are realized within the design. It helps to simplify the program flow, makes the design and implementation of the software components easier, and makes overall processing more efficient.
User interfaces should consider the user first:
The user interface is the main thing of any software. No matter how good its internal functions are or how well designed its architecture is but if the user interface is poor and end-users don’t feel ease to handle the software then it leads to the opinion that the software is bad.
Components should be loosely coupled:
Coupling of different components into one is done in many ways like via a component interface, by messaging, or through global data. As the level of coupling increases, error propagation also increases, and overall maintainability of the software decreases. Therefore, component coupling should be kept as low as possible.
Interfaces both user and internal must be designed:
The data flow between components decides the processing efficiency, error flow, and design simplicity. A well-designed interface makes integration easier and testers can validate the component functions more easily.
Component level design should exhibit Functional independence:
It means that functions delivered by component should be cohesive i.e. it should focus on one and only one function or sub-function.