Button Behaviour, Concurrency Situation and Sourcetree

To begin with the week, I continued from last part I left off previous week. I did some research and some trials to allow the application to store data into two attributes from one input. It is troublesome for me at first, but I managed it after half day of experimenting and with the guidance of supervisor.

After I figured out storing data, I then started to plan on how I should proceed my task as below:
1. Read and compare two value from columns of database.
2. Statement for decision making algorithm.
3. Call existing functions to control behaviour of delete button.
4. Delete selected row when button is Enabled.
5. Pop ups dialog box for confirmation as delete button clicked.
6. Pop ups Error message whenever selected row is unable to be deleted.

Next, I begin with some testing based on existing code, hence, start my implementation. First of all, I learnt that AsNoTracking( ) in Entity Framework is useful when reading data from database. It is said so, AsNoTracking queries are quicker to execute compared to tracking queries. I understood that, I should use it whenever I don’t need to update retrieved data. However, I retrieved the data using tracking query, and perform test using logger to make sure I implementing it correctly. I proceed with comparing and if-else logic to decide behaviour of button.

After that, I implement a dialog box confirmation upon user’s delete command. Also, when logic allows deletion of selected data, it will completely remove it from database table. When logic forbid deletion of data, error message is invoked to inform user stating “Unable to delete data as it has been used”.

Apart from given task, I also learnt about idea of concurrency when things happen at the same time in a system. There is situation whenever two or more user adding new data with the same ID at the same time. Hence, there are some few example codes, for me to go through in order to handle such situation.

Lastly, I get in touch on using Sourcetree, A GUI software that is simplified to interact with git repositories. I learnt to use Sourcetree to stash and apply my version of codes of my project file. Besides, I also learnt how to solve conflicts when a group project is combined in Sourcetree. I could not agree less that Sourcetree provides idea of git and good features that support team implementation.

Leave a Reply