Giter Site home page Giter Site logo

fingerprint-simtemplate's Introduction

SimTemplate

A WPF application to facilitate manual construction of templates for captures in the SimPrints DatastoreAPI database.

Setup

Installer

The Visual Studio solution includes a WiX toolset project SimTemplateInstaller, that Visual Studio will not recognise unless the toolset is installed. There is a NuGet extension that installs this functionality. Once installed, this project may be built to create an .msi installer that will install the production code onto a PC at: <Program_Files>\SimPrints\SimTemplate

User Settings

The application requires two user settings to be set in order to run: RootUrl and ApiKey. If these settings are missing when the application starts, it will prompt the user to enter them.

The RoolUrl setting should point to the root URL for the SimPrints DatastoreAPI. The ApiKey setting should be the GUID token that grants access to the API. Both should be obtained from SimPrints.

The settings will persist between application launches and are associated with a user account.

Documentation (for developers)

Overview

The SimTemplate application utilises the Model-View-ViewModel Pattern, where the ViewModel's behaviour is determined by a state machine implemented using the State Pattern.

Help Files

The code is (/will be!) self-documenting using the Sandcastle Help File Builder (SHFB) tool. The documentation can be generated from the SimTemplateDocs project using the SHFB GUI, or using MSBuild with the following command:

MSBuild.exe SimTemplateDocs.shfbproj

The Building Projects Outside the GUI help topic can provide further information on building the documentation without needing to install SHFB.

Logging

The application (and tests) logs using the log4net library to both a static file and over UDP.

The static file can be found at: C:\ProgramData\SimTemplate\Logs\logging.log The UDP logs are configured to be sent to:

  • Address: localhost or 127.0.0.2
  • Port: 7071

Tools such as the excellet Log4View can be used to visualise the UDP logs in real-time.

Testing

Automated tests can be found in the UnitTests/AutomatedSimTemplateTests project. Code coverage analysis can be run using UnitTests/RunCodeCoverage.bat and the resulting (including a summary for Github) can be found at UnitTests/GeneratedReports.

fingerprint-simtemplate's People

Contributors

briggysmalls avatar tristramn avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

briggysmalls

fingerprint-simtemplate's Issues

Introduce versioning

The product should be versioned correctly. A version number system should be determined and stuck to. Both the SimTemplate and SimTemplateInstaller provide versioning options - should these both be employed?

Provide a 'Reinitialise' button when faulted

Currently if the software experiences a fault the state machine moved to the Error state.
The only way to reinitialise is by changing the settings in the SettingsView.
If a transient issue, e.g. a failed HTTP request due to temperamental internet connectivity, causes a fault then the use has no obvious way to reattempt initialisation.
There should be a button provided in the Error state that provides this functionality.

Installer does not uninstall previous installation

When installing SimTemplate with the SimTemplateInstaller, if the version numbers have the same major number but different build the installation is permitted.
However the previous version of the software is not uninstalled. This should be fixed.

Write more unit tests

Currently there are very few unit tests (bad practice!).
Unit tests should be written for all testable code, particularly:

  • MainWindowViewModel
  • TemplatingViewModel
  • SettingsViewModel

Document code

The source code should be self-documenting. The SimTemplateInstaller project has been created that depends upon full XML comments. These comments must be added.

Use a factory to create SettingsViewModel instances

The SettingsViewModel determines what is shown in the SettingsView.
Currently a single instance of SettingsViewModel (passed into the MainWindowViewModel constructor) is used for every SettingsView, with fields needing to be refreshed each time.
It may be preferable to pass in a factory to create a new SettingsViewModel for each time the View is shown, ensuring a clean dialog every time.

Specify a scanner type (if provided) in ReST request

Currently the HumanTemplate resource of the Datastore API does not accept a scanner type as an optional parameter.
Once this is provided SimTemplate should make requests that specify the scanner type, if provided, to filter results.

Switch documentation tool

Currently the project is documented using Sandcastle.
Doxygen has better support and features (I am particularly keen on the automatically generated diagrams).
At some point it may be a good thing to switch tool.

Integrate test coverage tool into Unit Tests

Given testing is coming after development (naughty naughty!) it is important to ensure that test coverage is total.
OpenCover (or similar) should be integrated into the project to indicate test coverage

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.