You are on page 1of 31

Chapter 4

Design
Software design is an important activity as it determines how the whole software
development task would proceed including the system maintenance. The design of
software is essentially a skill, but it usually requires a structure which will provide
a guide or a methodology for this task.

In system designing the design’s functions and operations are described in detail,
including screen layouts, process diagrams and other documentation. The output of
this stage will describe the new system as a collection of modules or subsystems.

Design elements describe the desired system features in detail, and generally
include functional hierarchy diagrams, screen layout diagrams, tables of process
diagrams and a complete entity-relationship diagram (ERD) with a full data
dictionary. These design elements are intended to describe the system in sufficient
detail, such that skilled developers and engineers may develop and deliver the
system with minimal additional input design.

4.1 System Architecture


A system architecture diagram would be used to show the relationship between
different components. Usually they are created for systems which include hardware
and software, and these are represented in the diagram to show the interaction
between them. However, it can also be created for web applications or mobile based
applications.

For a web/mobile based application the system architecture design would include
components such as, database, application server, web server, internet, browser etc.
Not all of these have to be included in the diagram and there are other components
that can be included.

1
User

Unified Notes Application

Textual Notes Voice Notes Recorded Notes Scan Notes Handwritten Notes

Database Web Services

Figure 4.1- System Architecture Diagram

4.2 Design Constraints


Several resources are being used for the development of Unified Notes e.g. Android
studio framework 3.3, it is preferred because everything is clear, concise and easy
to use. Anyone can create android based application using it in an effective manner,
it is user friendly tool for development of applications. Minimum 8GB RAM is
required for efficient performance. It is required that the PC/Laptop or any other
device (in which Android Studio is installed) should have SSD instead of HDD for
decreasing the time efficiency.

There are certain general constraints for designing the applications for mobile
devices that are needed to be survived to provide a balance between the best
possible user experience. These constraints may include:

• Smaller screen size.


• One screen appears at a time.

2
• Shorter battery life.
• Wireless network connections.
• Slower processor speed.
• Less available memory.

4.3 Design Methodology


A methodology can be defined as the underlying principles and rules that govern a
system. A method can be defined as a systematic procedure for a set of activities.
Thus, from these definitions, a methodology will encompass the methods used
within the methodology. Different methodologies can support work in different
phases of the system life cycle, for example, planning, analysis, design and
programming, testing and implementation.

A software design methodology can be structured as comprising of the software


design process component and the software design representation or diagrammatic
component. The process component is based on the basic principles established in
the methodology while the representation component is the "blueprint" from which
the code for the software will be built. It should be noted, that in practice, the design
methodology is often constrained by existing hardware configuration, the
implementation language, the existing file and data structures and the existing
company practices, all of which would limit the solution space available to develop
the software.

Incremental Model of software development cycle is being used in our project.


Incremental Model is a procedure of programming advancement where
prerequisites are separated into numerous independent modules of software
development life cycle. Steady improvement is done in ventures from investigation
plan, usage, testing/confirmation, support or maintenance.

Every emphasis goes through the prerequisites, structure, coding and testing stages.
Also, each ensuing arrival of the framework adds capacity to the past discharge
until all planned usefulness has been executed.

3
The framework is put into creation when the main increment is conveyed. The
primary increment is frequently a center item where the fundamental necessities are
tended to, and valuable highlights are included the next increments. When the
center item is examined by the customer, there is plan improvement for the next
increment.

Figure 4.1- Used Methodology

4.4 High Level Design


High-level design provides a view of the system at an abstract level. It shows how
the major pieces of the finished application will fit together and interact with each
other.
A high-level design should also specify assumptions about the environment in
which the finished application will run. For example, it should describe the
hardware and software you will use to develop the application, and the hardware
that will eventually run the program.
You can view software development as a process that chops up the system into
smaller and smaller pieces until the pieces are small enough to implement. Using
that viewpoint, high-level design is the first step in the chopping up process.
The goal is to divide the system into chunks that are self-contained enough that you
could give them to separate teams to implement.
Typical viewpoints are:
• Conceptual or Logical
• Process
• Physical
• Module
• Security

4
4.4.1 Conceptual or Logical

Conceptual design is the very first phase of design, in which drawings or solid
models are the dominant tools and products. The conceptual design phase provides
a description of the proposed system in terms of a set of integrated ideas and
concepts about what it should do, how it should behave, and what it should look
like, which will be understandable by users in the manner intended.

Figure 4.2- Component Diagram of system

4.4.2 Process

In this view point we elaborate the runtime view of the system. Process Interaction
diagram is used for this purpose. From the term Interaction, it is clear that the
diagram is used to describe some type of interactions among the different elements
in the model. This interaction is a part of dynamic behavior of the system.

This interactive behavior is represented in UML by two diagrams known


as Sequence diagram and Collaboration diagram. The basic purpose of both the
diagrams are similar.

5
Sequence diagram emphasizes on time sequence of messages and collaboration
diagram emphasizes on the structural organization of the objects that send and
receive messages.

Floating
User Home Screen Textual Notes DB
Menu

1: Click on Floating button


2: Floating menu appears

3: Click on Text Notes


4: Texual notes screen appears

5: Enter text and apply formatting


6: Save note

7: Space Shortage

Figure 4.4- Sequence Diagram for Textual Notes

6
Floating
User Home Screen Voice Notes Microphone DB
Menu

1: Click on Floating button


2: Floating menu appears

3: Click on Voice Notes


4: Voice note screen appears

5: Click on Voice Notes Button


Clicks on mic. button

7: Record voice

8: Convert voice into text


9: Noise in Recording
10: Recognition Error
11: Save note
12: Space Shortage

Figure 4.5- Sequence Diagram for Voice Notes

Floating Recorded
User Home Screen Microphone DB
Menu Notes

1: Click on Floating button


2: Floating menu appears

3: Click on Voice Notes


4: Voice note screen appears

5: Click on Record Notes Button


6: Click on mic. button

7: Record voice

8: Save note
9: recorded note shown
in playlist
10: noise in Recording
11: Space Shortage

Figure 4.6- Sequence Diagram for Recorded Notes

7
Floating Camera/
User Home Screen Scan Notes DB
Menu Gallery

1: Click on Floating button


2: Floating menu appears

3: Click on Scan Notes


4: Scan note screen appears

6: Click on camera button

7: Take pictuers
Or
Pick from Gallery
8: Blur images
9: Convert images into text
or
10: Recognition Failed in pdf format
11: Save note
12: Space Shortage

X
Figure 4.7- Sequence Diagram for Scanned Notes

Floating Handwritten
User Home Screen DB
Menu Notes

1: Click on Floating button


2: Floating menu appears

3: Click on Handwritten Notes


4: Drawing screen appears

5: Draw images or write via finger/stylus


7: Error in creating bitmap
8: Save note
9: Space Shortage

X
Figure 4.8- Sequence Diagram for Handwritten Notes

8
User Home Screen Options Menu Sort By Notebooks

1: Clicks on overflow button. 2: Options menu appears.

3: Clicks on "Sort By" option.


4: Alert dialog box appears.

5: Selects an option from the dialog box. 6: Sort saved notebooks.

7: Notebooks sorted.
8: No saved notebook exists.

Figure 4.9- Sequence Diagram for Organizing Notes.

9
Individual
User Notebook All Notes
Note
1: User clicks on a notebook.
2: List of all notes appears.

3: Selects an individual note.

4: Selected notebook is empty.

Figure 4.10- Sequence Diagram for Viewing Notes.

Pop up
User Notebook Trash
menu
1: Clicks on the notebook.
2: Pop up menu appears.

3: Taps on delete option.


4: Note is moved to trash.
5: Notebook not found.

Figure 4.11- Sequence Diagram for Deleting Notebook.

10
Overflow Navigation
User Notebook Note Trash
Button Menu

1: Click on the notebook.


2: Clicks on a note to be deleted.
2: Clicks on the overflow button from action bar.
3: Taps on delete option.
4: Dialog box appeared.
5: Confirm Deletion.
6: No note exists.
7: Note is moved to trash.

Figure 4.12- Sequence Diagram for Deleting Note.

Overflow Navigation
User Notebook Note
Button Menu
1: Clicks on the notebook.
2: Select a note to edit.

3: Note not found.

4: Taps on overflow button.


5: Clicks on save option
6: Autosave mode not available.
7: User forgets to select save option.

Figure 4.13-Sequence Diagram for Updating Note.

11
Overflow Navigation
User Notebook Note
Button Menu
1: Clicks on the notebook.
2: Select a note to edit.

3: Note not found.

4: Taps on overflow button.


5: Clicks on save option.
6: Note saved.
7: Connection error.
8: Space shortage.

Figure 4.14- Sequence Diagram for Saving Note.

Home Floating Dialog


User Reminder Calendar Note
Screen Action Button Box
1: Click on floating action button.
2:Floating menu appears.

3: Clicks on reminder option.


4: Dialog box appears.

5: Enters title of reminder.


6: Clicks on calendar icon.
7: Choose date and time.
8: Selects note to which reminder is to be added.
9: Confirms reminder.
10: Inacurrate date and time zone of device.

Figure 4.15- Sequence Diagram for Adding Reminder.

12
Available
User Home Screen Action bar
Applications

1: User select notebook


or notes
2: no notebook exist
3: Click on Share button
4:Select Application
5: Network Error
6:Shared successfully

X
Figure 4.16- Sequence Diagram for Sharing notes.

User Home Screen Drawer Menu

1: Click on Drawers button


2: Drawers menu appears

3: Click on sync option

4: Network Error/failed to login


5: Synced successfully

X
Figure 4.17- Sequence Diagram for Sync notes.

13
Navigation
User Home Screen Searchbar Notebook Searchbar
Menu

1:Click on search icon


2: search bar appears
3: Type content to search
4: No contents exist/matched
5:Highlight matched content
alt 1: click on notebook

Search in note 2: select note


3:Click on overflow button
4: Navigation menu
appears
5: click on search
6: search bar appears
7: Enter contents to search
8: No content matched/exist
7: Higlight matched contents

Figure 4.18- Sequence Diagram for search notebook/notes.

Google
User Home Screen Drawer Menu Google Drive
Account

1: Click on Drawers button


2: Drawers menu appears

3: Select Bakup & Restore option


4: No signed In account fo und
5: Successfully backup on dreive

6: Sign In to Google Acoount


7: Successful backup
8: Network error or error in Sign In

9: internet Issue and Space Shortage(for backup)


10: Successfuly Restored data
11: No Backup found(for restore)

Figure 4.19- Sequence Diagram for Backup & Restore.

14
Online Internal
User Home Screen Drawer Menu Settings
Storage Storage

1: Click on Drawers button


2: Drawers menu appears

3: Click on settings option

4: setting page appears

5: Turn on Available offline toggle button


6: Network error 7: Access online

8: Downloaded on device

9: Space Shortage

Figure 4.20- Sequence Diagram for offline availability.

Locked
User Home Screen Popup Menu
Notebook

1: Long click on notebook


2: popup menu appears

3: Click on fingerprint option


4: Device not support fingerprint
5: Device not Keyguard protected
6: No registerd fingerprint
7: Encrypt via
fingerprint
8: Use fingerprint to decrypt notebook
10: Successf ully decrypt notebook
10: Authentication error
11: Noice in Recognitio n, use Pin/Password

Figure 4.21- Sequence Diagram for securing notes via fingerprint.

15
Locked
User Home Screen Popup Menu
Notebook

1: Long click on notebook


2: popup menu appears

3: Click on Pattern option


4: Wrong Pattern drawen
5: Differnt pattern at confirmation time
6: Encrypt via
pattern

7: Use pattern to decrypt notebook


8: Successfully decrypt notebook
9: Authentication error

Figure 4.22- Sequence Diagram for securing notes via pattern.

Locked
User Home Screen Popup Menu
Notebook

1: Long click on notebook


2: popup menu appears

3: Click on Password option


4: too short length
5: Differnt password at confirmation time
6: Encrypt via
password

7: Use password to decrypt notebook


8: Successfully decrypt notebook
9: Authentication error

X
Figure 4.23- Sequence Diagram for securing notes via passwords

16
4.4.3 Physical

Deployment diagrams are used to visualize the topology of the physical


components of a system, where the software components are deployed. The term
Deployment itself describes the purpose of the diagram. Deployment diagrams are
used for describing the hardware components, where software components are
deployed.

Figure 3.24- Deployment diagram of system

4.4.4 Module

In software, a module is a part of a program. Programs are composed of one or


more independently developed modules that are not combined until the program
is linked. A single module can contain one or several routines. There are main five
modules in the application:

• Textual Notes
• Voice Notes
• Recorded Notes
• Scanned Notes

17
• Handwritten Notes
4.4.5 Security

Software design should sketch out all the application’s security needs. Some
applications may rely on the operating system’s security and not provide their own.
Others may use the operating system’s security. Application security also means
providing the right level of access to different users. For example, some users might
not be allowed access to every part of the system.

To keep data secure, this application provide security in form of encryption. User
can encrypt notebooks to make them private and secure. Application provide
following encryption options regarding security measures:

• Fingerprint Authentication
• Pin/ Passwords
• Patterns

4.5 Low Level Design


Low-level design fills in some of the gaps to provide extra detail that’s necessary
before developers can start writing code. It gives more specific guidance for how
the parts of the system will work and how they will work together. It refines the
definitions of the database, the major classes, and the internal and external
interfaces. Low-level design moves the high-level focus from what to a lower level
focus on how.

The low-level design (LLD) phase is where the actual software components are
designed. It defines the actual logic for each and every component of the system.
Class diagram with all the methods and relation between classes comes under LLD.
Component tests are created in this phase as well.

18
User Notebook

googleAccount id:Int
1 * title:String
createNotes()
updateNotes() add()
viewNotes() delete()
deleteNotes()
searchNotes()
shareNotes()
Notes
1
id:int
* title:String
category:String
create()
save()
delete()
update()

Voice
Textual
id:int
id:int title:String
title:String Handwritten voice
description
id:int
title:String
drawing

Recorded
Scan
id:int
id:int
title:String
title:String
voice
images

Database
dbName
store()
read()
delete()
update()

Figure 4.24- Class Diagram of system

4.6 Database Design


Database design is an important part of most applications. The first part of database
design is to decide what kind of database the program will need. You need to
specify whether the application will store data in text files, XML files, a full-fledged
relational database, or something more exotic such as a temporal database or object
store. Even a program that doesn’t use any database still needs to store data, perhaps
inside the program within arrays, lists, or some other data structure.

This project takes SQLite database system which is free, fast, reliable and open
source. Although it does lack some sophistication and facilities, but as it goes from
release to release, more capabilities are added.

19
4.6.1 Database Design Process

A well-structured database:

• Saves disk space by eliminating redundant data.


• Maintains data accuracy and integrity.
• Provides access to the data in useful ways.

Designing an efficient, useful database is a matter of following the proper process,


including these phases:

• Requirements analysis or identifying the purpose of database.


• Organizing data into tables.
• Specifying primary keys and analyzing relationships.
• Normalizing to standardize the tables.
4.6.2 Requirement Analysis: Identifying the Purpose of The
Database

Understanding the purpose behind your database will illuminate your decisions all
through the plan procedure. Ensure you think about the database from each point
of view. For example, on the off chance that you were making a database for an
open library, you'd need to consider the manners by which the two benefactors and
custodians would need to get to the information.

Here are some approaches to accumulate data before making the database:

• Meeting the general population who will utilize it.


• Break down business frames, for example, solicitations, timesheets,
overviews.
• Go over any current information frameworks (counting physical and
computerized documents).

Begin by social occasion any current information that will be incorporated into the
database. At that point list the kinds of information you need to store and the

20
elements, or individuals, things, areas, and occasions, that those data depict, this
way:

Categories

• Category ID
• Category Name

Text Notes

• Text Note ID
• Title
• Description
• Category Name

Voice Notes

• Voice Notes ID
• Title
• Description
• Category name

Handwritten Notes

• ID
• Title
• Description
• Category Name

Scanned Notes

• ID
• Title
• Description
• Category Name

21
Security

• ID
• Pattern Saved
• Password Saved
• PIN Saved

This data will later be moved toward becoming piece of the information word
reference, which diagrams the tables and fields inside the database.

Presently as we comprehend what sorts of information the database will


incorporate, where that information originates from, and how it will be utilized,
we're prepared to begin arranging out the genuine database.

4.6.3 Database Structure: The Building Blocks of Database

Inside a database, related data are assembled into tables, every one of which
comprises of lines (likewise called tuples) and segments, like a spreadsheet.

Each row of a table is known as a record. Records incorporate information about a


person or thing. Conversely, columns (otherwise called fields or properties) contain
a solitary sort of data that shows up in each record.

Categories
ID
Name

ID: PK (Auto Increment)

Name: UNIQUE Constraint (VARCHAR or TEXT)

22
Text Notes
ID
Title
Description
Category Name

ID: Primary Key (Auto Increment)

Title (VARCHAR)

Description (VARCHAR)

Category Name: Foreign Key (VARCHAR)

Voice Notes
ID
Title
Description
Category Name

ID: Primary Key (Auto Increment)

Title (VARCHAR)

Description (VARCHAR)

Category Name: Foreign Key (VARCHAR)

Handwritten Notes
ID
Title
Description
Category Name

ID: Primary Key (Auto Increment)

23
Title (VARCHAR)

Description (VARCHAR)

Category Name: Foreign Key (VARCHAR)

Scanned Notes
ID
Title
Description
Category Name

ID: Primary Key (Auto Increment)

Title (VARCHAR)

Description (VARCHAR)

Category Name: Foreign Key (VARCHAR)

Recorded Notes
ID
Title
Description
Audio File
Category Name

ID: Primary Key (Auto Increment)

Title (VARCHAR)

Description (VARCHAR)

Category Name: Foreign Key (VARCHAR)

24
Attachments
ID
File Name
Type

ID: Primary Key (Auto Increment)

File Name (VARCHAR)

Type (VARCHAR)

Security
Passwords Saved
Patterns saved
PIN Saved

Passwords Saved (VARCHAR)

PIN Saved (NUMBER)

4.6.4 Creating Relationships Between Entities

There are three types of relationships in the E-R model such as unary, binary and
ternary. The procedure to represent a relationship depends on the type of
relationship and the cardinalities of the relationship. The type of relationships and
their representation are described below:

One-to-One Relationship

At the point when there's solitary one instance of Entity A for each occurrence of
Entity B, they are said to have a one-to-one relationship (regularly composed 1:1).
You can demonstrate this sort of relationship in an ER chart with a line with a
dash on each end.

25
One-to-Many Relationship

These relationships happen when a record in one table is related with numerous
entries in another. For instance, a solitary client may have submitted numerous
requests, or a supporter may have different books looked at from the library without
a moment's delay. One-to-many (1:M) connections are demonstrated with what's
classified "Crow's foot documentation".

Many-to-Many Relationship

At the point when different elements from a table can be related with numerous
substances in another table, they are said to have a many-to-many (M:N)
relationship. This may occur on account of understudies and classes, since an
understudy can take numerous classes and a class can have numerous understudies.

In an ER graph, these connections are depicted with "Crow Foot Notation" on the
two sides.

ERD for Unified Notes


CategoryID Username Password

USER

Creates

Category Category Category


Name Name Name
TextID VoiceID RecID
CATEGORY
Title Title Title

Description Description Description


Has
Category Category Audio File
Name Name
ScannedID HandwriteID
SCANNNED HANDWRITTEN RECORDED
TEXT NOTES VOICE NOTES
Title NOTES Title NOTES NOTES

Description Description

Has

Defines RemID REMINDERS Sets

Category
Name

Security Time Date ATTACHMENTS

ISA ISA ISA ISA AttachID File Name Type

PASSWORD FINGERPRINT PIN PATTERN

Figure 4.6.4.1-ERD for Unified Notes

26
4.6.5 Data Integrity Rules

You ought to likewise design your database to approve the information as indicated
by the suitable tenets. Numerous database the board frameworks, for example,
Microsoft Access, uphold a portion of these standards consequently.

The element honesty decide says that the essential key can never be NULL. On the
off chance that the key is comprised of numerous segments, none of them can be
NULL. Else, it could neglect to particularly distinguish the record.

The referential uprightness rule requires each remote key recorded in one table to
be coordinated with one essential key in the table it references. On the off chance
that the essential key changes or is erased, those progressions should be actualized
wherever that key is referenced all through the database.

Business rationale respectability decides to ensure that the information fits inside
certain sensible parameters. For example, an arrangement time would need to fall
inside typical business hours.

4.6.6 Adding Indices and Views

An index is basically an arranged duplicate of at least one sections, with the


qualities either in climbing or plummeting request. Adding a list enables clients to
discover records more rapidly. Rather than re-arranging for each inquiry, the
framework can get to records in the request indicated by the list.

In spite, of the fact that files accelerate information recovery, they can back off
embeddings, refreshing, and erasing, since the list must be revamped at whatever
point a record is changed.

A view is essentially a spared inquiry on the information. They can helpfully join
information from various tables or else show some portion of a table.

27
4.6.7 Database Management Systems

A considerable lot of the plan decisions rely upon which database the board
framework you use. The absolute most regular frameworks include:

• Oracle DB
• MySQL
• SQLite Database
• Microsoft SQL Server
• PostgreSQL
• IBM DB2

At the point when given the decision, pick a suitable database the executives
framework dependent on cost, working frameworks, highlights, and that's only the
tip of the iceberg.

This project takes SQLite database system which is free, fast, reliable and open
source. Although it does lack some sophistication and facilities, but as it goes from
release to release, more capabilities are added.

4.7 GUI Design


Graphical User Interface (GUI) design is human-system interaction, operating logic
and interface aesthetics for software design. It enables application to become easy
operate-able, friendly and freely. Here we discuss about UI in Unified Notes
application.

The graphical UI (GUI) is a type of UI that enables clients to associate with


electronic gadgets through graphical symbols and visual pointers, for example,
optional documentation, rather than content-based UIs, composed order names or
content route. GUIs were acquainted in response with the apparent soak expectation
to absorb information of direction line interfaces (CLIs), which expect directions
to be composed on a PC console.

They are showed in following figures:

28
Figure 4.7.1-Splash Screen Figure 4.7.2-Main Activity with
Notebooks

Figure 4.7.3-Floating Action Button Main Figure 4.7.4-Text Notes Activity


Activity

29
Figure 4.7.5-Main’s Drawer Activity Figure 4.7.6-Speech Input in Voice Activity

Figure 4.7.7-Voice Notes Activity Figure 4.7.8-1st Category

30
Figure 4.7.9-Handwritten Activity Figure 4.7.10-Setting Reminder

4.8 External Interfaces


There are no external interfaces in this system.

31

You might also like