Testing phase

The past week , I did concurrency tests , automatically creating item names with concatenating strings , set bindings and some UI updating .

UI updates were setting auto-generated item names to read-only so user cannot edit textboxes , adding new textboxes with new property. Also, adding migration to the database with the latest updated property .

String concatenating (meaning linking a string in a chain or series) is to join different property of strings together , while implementing the logic in Wrappers to save different strings concatenated into database.

The concurrency problem I faced was when two users execute a transaction simultaneously . Ideally in this situation, the first user transaction will succeed and the second will fail .The common concurrency problems that potentially happen in DBMS transactions are usually :

  1. Temporary Update Problem
  2. Incorrect Summary Problem
  3. Lost Update Problem
  4. Unrepeatable Read Problem
  5. Phantom Read Problem

https://www.geeksforgeeks.org/concurrency-problems-in-dbms-transactions/

However , one way to fix a concurrency problem is when the second user fails transaction , is to reload its transaction entry . Then resave it by clicking the save button again .

Mostly Database!

Last week, What have I done?

Oh yes, I was still doing the invoices module, fixed the issues related to the services and repositories files as well as created tests for the needed methods in the module. All the created tests have passed successfully.

I have also got exposed to new terms this week. Database transaction which means a unit of work carried out in a database management system. Next, a two phase commit as defined by techopedia.com is “a standardized protocol that ensures that a database commit is implementing in the situation where a commit operation must be broken into two separate parts”. Last concept, Concurrency in database that is known as the ability to control data being saved into the database during a concurrent execution, as in two users saving information on the database at the same time.

Concurrency has two types called optimistic and pessimistic. Optimistic concurrency involves the logic of users being informed when a change is being made to a data in the database, and whether they wish to continue with the changes being made, or in the case of different parts of data being changed, both changes gets updated into the database. Pessimistic concurrency revolves around the idea of initiating a lock or a read-only feature, that is activated when one user is making a change such that other users cannot make a change at the same time. Entity Framework implements the logic of Optimistic concurrency.

Aside from new terms and concepts, I was introduced to data migration from visual studio to database. The entities defined in visual studio were created into the database by using the concept of data migration using Package Manager Console in visual studio.

Finally, I started designing the invoice detail view and binding the commands to the correct view model context.

See you all next week again 😀