Sažetak | U sklopu ovog završnog rada, u kratkom uvodu opisana je biomehanička vaga i motivacija za izradu pripadajućeg softvera.
U prvom poglavlju ukratko je predstavljen programski jezik C# zajedno sa pripadajućim radnim okvirom .NET i alatima poput Visual studija te neke glavne prednosti tog programskog jezika koje ga čine pogodnim za izradu softvera.
U drugom poglavlju opisan je programski kod. Najprije su opisana svojstva SQL-a i Microsoftove inačice tog jezika, T-SQL-a, a zatim dizajn izrađene baze podataka pomoću alata SSMS. Baza se sastoji od jedne glavne tablice , „Pacijent“ i ostvarena je lokalno, na korisnikovom računalu. Prije analize koda, objašnjena su dva glavna oblikovna obrasca korištena pri izradi aplikacije : obrazac model – pogled – prikazivač (MVP) i obrazac jedinstveni objekt.
Prema obrascu MVP programski kod podijeljen je na tri glavne cjeline. Modeli predstavljaju kosture implementiranih razreda i grafičkih komponenti izrađene aplikacije. Pogledi predstavljaju konkretne grafičke komponente prikazane na zaslonu i definicije funkcija koje su usko vezane za poglede. Pogledi su ostvareni kao jedinstvene statičke instance objekata po uzoru na oblikovni obrazac jedinstveni objekt. U prikazivačima se odvija sva složena pozadinska logika koja predaje objekte kroz elemente koda i sadrži eksplicitne definicije funkcija.
Osim nabrojane tri glavne strukture, u kodu se još nalaze i funkcije za validaciju, te konfiguracijske datoteke. Konfiguracijske datoteke, između ostalog, omogućuju spajanje izvornog koda s bazom podataka, pomoću veznih nizova, koji služe kao prijenosni medij za podatke.
|
Sažetak (engleski) | In the introductory part of this bachelors project, a device called biomechanical scale is described, along with the motivation to create an appropriate software for the mentioned scale.
In the first chapter a short introduction to C# programming language is given, along with its corresponding framework, called .NET framework, and tools such as Visual studio. This chapter gives a brief description of positive aspects of C# programming language, which make it ideal to create the desired software.
In the second chapter a description of the source code is given. Firstly, the SQL programming language and Microsoft's own variant o fit, called T-SQL, are described. After that, the design of the database created with SSMS was described. The database contains only one, main table , called „Patient“, and the database is hosted locally, on the host's computer. Before detailed code analysis, it was important to mention two design patterns which were used when building the app. Those patterns are the model – view – presenter (MVP) pattern and the Singleton pattern.
Source code of the application was divided into three large segments : models, views and presenters, as described by the MVP design pattern. Models represent the base of implemented object classes and graphical elements. Views define essential methods and are also explicit graphical elements, shown on the desktop. Views were made according to the singleton design pattern, thus being static instances of classes. Presenters contain all complex background program logic, has explicitly writted methods, and is in charge of sending objects between the layers of the application.
Besides the three main segments of the application, there are also some other segments, such as validation methods and configurational files. Configuration files, among other functionalities, enable the connection between the source code and the database, using connection strings, which act as the transfer medium for the data.
|