Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ NoteBook - Desktop Note Taking Application

C# .NET Framework WinForms Storage Library Architecture Version Control

A simple desktop note management application built using C# Windows Forms and .NET Framework 4.7.2.

The application allows users to create, edit, delete, search, and manage personal notes with local JSON-based persistence using Newtonsoft.Json.

The project demonstrates practical desktop application development concepts including CRUD operations, data binding, file persistence, and basic separation of responsibilities.


๐Ÿ“‘ Table of Contents


๐Ÿš€ Features

โž• Create Notes

Users can create new notes containing:

  • Title.
  • Content.
  • Automatic creation date.

Features:

  • Validate required fields.
  • Generate unique note ID.
  • Save immediately to JSON storage.

Implemented through:

NoteManger.AddNote()

๐Ÿ“‹ View Notes

The application displays stored notes using:

DataGridView

Displayed information:

  • Note ID.
  • Title.
  • Created Date.

Data retrieval:

NoteManger.GetAllNotes()

โœ๏ธ Update Notes

Users can modify existing notes.

Features:

  • Select note from DataGridView.
  • Edit title and content.
  • Save changes immediately.

Implemented through:

NoteManger.UpdateNote()

๐Ÿ—‘ Delete Notes

Users can remove notes from storage.

Features:

  • Delete selected note.
  • Update JSON file automatically.

Implemented through:

NoteManger.DeleteNote()

๐Ÿ” Search Notes

The application supports searching notes by title.

Features:

  • Case-insensitive search.
  • Partial title matching.

Implementation:

NoteManger.SearchByTitle()

Note:

  • The current implementation returns the first matching note.

๐Ÿ“‹ Clipboard Operations

The application supports text editing operations:

  • Copy.
  • Paste.
  • Cut.

Implemented using Windows Forms TextBox clipboard functionality.


๐Ÿงน New Note / Clear State

The UI supports:

  • Creating a new empty note.
  • Clearing current input fields.
  • Managing DataGridView selection state.

๐Ÿ› Architecture

The project follows a simple layered desktop architecture:

NoteBook Application

        |
        โ†“

 Presentation Layer
      Form1

        |
        โ†“

 Domain Model
      Note

        |
        โ†“

 Persistence Layer
   NoteManger

        |
        โ†“

   notes.json

๐Ÿ–ฅ Presentation Layer

Main component:

Form1

Responsibilities:

  • Display user interface.
  • Handle button events.
  • Manage user interaction.
  • Bind data to DataGridView.

Main files:

Form1.cs
Form1.Designer.cs
Form1.resx

๐Ÿ“ฆ Domain Model

Class:

Note

Properties:

Id
Title
Content
CreatedDate

Responsibilities:

  • Represent note data.
  • Transfer information between layers.

๐Ÿ’พ Persistence Layer

Class:

NoteManger

Responsibilities:

  • Manage note collection.
  • Perform CRUD operations.
  • Read and write JSON file.
  • Generate unique IDs.

Storage:

notes.json

๐Ÿงฉ Design Patterns

Repository-Like Pattern

NoteManger works as a repository abstraction.

Responsibilities:

  • Hide storage details.
  • Provide CRUD methods.
  • Manage persistence operations.

POCO / DTO Model

Note is a simple data object containing:

Data
+
Properties

without complex business logic.


Data Binding

The application uses:

DataGridView.DataSource

to display note information.


๐Ÿ›  Technology Stack

Category Technology
Language C#
Framework .NET Framework 4.7.2
UI Framework Windows Forms
Storage JSON File
JSON Library Newtonsoft.Json 13.0.4
IDE Visual Studio
Build System MSBuild
File Handling System.IO
Input Dialog Microsoft.VisualBasic InputBox
Version Control Git

๐Ÿ—„ Data Persistence

The application stores data locally.

Storage file:

notes.json

Behavior:

  • If the file does not exist, an empty note list is created.
  • Every add/update/delete operation saves changes immediately.
  • CreatedDate is generated automatically:
DateTime.Now

โš™ Installation

Requirements

Install:

  • Windows Operating System.
  • Visual Studio 2022 or compatible version.
  • .NET Framework 4.7.2 Developer Pack.

Setup

  1. Clone the repository:
git clone <repository-url>
  1. Open solution:
NoteBook.sln
  1. Restore NuGet packages.

Required package:

Newtonsoft.Json 13.0.4
  1. Build the solution.

  2. Run:

F5

๐Ÿ“‚ Project Structure

NoteBook
โ”‚
โ”œโ”€โ”€ NoteBook.sln
โ”‚
โ”œโ”€โ”€ NoteBook.csproj
โ”‚
โ”œโ”€โ”€ Program.cs
โ”‚
โ”œโ”€โ”€ Form1.cs
โ”œโ”€โ”€ Form1.Designer.cs
โ”œโ”€โ”€ Form1.resx
โ”‚
โ”œโ”€โ”€ Note.cs
โ”‚
โ”œโ”€โ”€ NoteManger.cs
โ”‚
โ”œโ”€โ”€ packages
โ”‚   โ””โ”€โ”€ Newtonsoft.Json
โ”‚
โ””โ”€โ”€ README.md

๐Ÿ“ Runtime Behavior

When the application starts:

  1. Checks for:
notes.json
  1. If unavailable:
Creates empty note collection
  1. Loads existing notes.

  2. Displays them inside DataGridView.


โš ๏ธ Limitations

Current limitations:

  • Designed for single-user desktop usage.
  • No synchronization for multiple processes.
  • Minimal handling for corrupted JSON files.
  • Minimal file I/O exception handling.
  • Search returns only the first matching result.
  • No automated tests.
  • No CI/CD pipeline.
  • No installer.
  • No license file included.

๐Ÿ”ฎ Future Improvements

Possible improvements:

  • Add Repository Pattern with interfaces.
  • Separate Business Logic from UI.
  • Add centralized exception handling.
  • Add logging system.
  • Add backup and restore functionality.
  • Add rich text editing.
  • Add categories and tags.
  • Add note reminders.
  • Add unit tests.
  • Add automatic updates.
  • Create application installer.

๐Ÿ“ง Contact

Albara Fahed Alharissy

Software Engineer | C# .NET Developer

GitHub:

https://github.com/Albarafahed

LinkedIn:

https://www.linkedin.com/in/albara-csharp-developer/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages