lundi 22 février 2016

Software architecture for a system configurator tool

I am studying computer science and relatively new to software architecture and its implementation, so I need help with my project from experienced software development community.

My project consists in developing of a tool which automatically configure / checks the configuration of test systems. There are no specific requirements to the architecture, so I can be flexible and this is how I see this tool. If you have any improvement ideas, please let me know. All test systems are Windows based, therefore the tool will be written in C#. It consists of two applications: a GUI application which allows users to create their own profiles in JSON format where settings will be saved, and a command-line one which executes these settings. Settings are of different types: registry settings, system settings (for example, programmatically deactivate the start screen of Windows 8, change screen resolution, install some software etc), GPO settings (these have to be applied to all users before they log in to the system, for example assign of file extension associations), probably other types in future. They will be kept in .json (for registry and GPO settings) or .cs (for system setting - c# program code) files. There will be a large list of the settings which users are able to access through the GUI application, check some settings they want to be set or verify (set/check toggle near each setting) and save the selection as a profile in JSON format. The command-line application receives a path to a profile with settings using a first parameter (args[0]), deserializes it to setting-objects and executes each setting.

How do you think which design patterns should I consider for this tool?

I have already made a draft the Class diagram for the command-line application which looks as follows:

Class diagram

The client (main function) receives a path to the .json profile file and gets its content as a JSON-string using ProfileProvider.getProfile(string path). Then the client deserializes the JSON-string into an array of Setting-objects. For each setting using setting.Group property will be created (if not already exists) a corresponding executor which always has a function execute(string setting). The registry and GPO executors get necessary RegSetting or GPOSetting objects using RegProvider/GPOProvider which have a function .getSettings() to deserialize JSON-string from JSON-files into an array of RegSetting or GPOSetting objects. The system executor executes functions in SystemSettings.cs directly by name using reflection. All settings and functions will contain two parts "set" and "check" to set a setting and to check if the setting is already set (is set correctly). The "set"-mode should execute "check" after the set up is done to check if the execution was successful or failed. I don't have a good idea on how should I use setting.Mode to set or check a setting yet. I thought that it would be an easy way to just add "check" or "set" string to the setting names in the client, so for example the setFunction1() or checkFunction1() for system settings will be executed. Another way is to throw away "Mode" attribute in the profile file and add these "check" or "set" strings in the GUI application which creates profiles. Both ideas seems nevertheless not so good to me. Do you have any ideas on how would it be better to implement these "set" and "check" modes?

Could you please provide me any criticism against my ideas and give me some advices on how to make it better?

Thank you in advance!

Aucun commentaire:

Enregistrer un commentaire