Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Once we have enough custom validators we need to focus on bean validation which can prove to be tricky to accomplish seeing as a validation class cannot be created to validate every bean when desired. Instead a validator factory can be created and the value extractor functionality if required to cycle through the resulting list from the violator. However, this does include writing an extraction method for the desired class or object that implements the value extractor.

Image Added


  • Alternatively, and perhaps preferably a validator factory can be created manually and a set of violations can be created to hold the results of the validation. It is simply a case then of passing the required bean to the validate method and iterating through the set using the get message method to return any violations that may have occurred specified by the annotations in the bean that is being validated.


Image Added


Benefits of Spring Validation and Spring Boot.

  • Speed

    • Spring boot allows for rapid assembly and deployment of applications and may show optimization in the parameter handling if performed efficiently. It also provides conflict free versioning through dependency management in the POM's.

  • Testing

    • Testing will always be an important factor in the project and I believe that the Spring Boot framework will ease this process as it has its own testing library and annotations to allow for easy creation of tests and inversion of control. Spring boot also brings with it the benefits of mocking beans in our testing easing up on the amount of testing code written.

  • Properties Configuration

    • No XML based configurations at all. Very much simplified properties. The beans are initialized, configured and wired automatically.

Image Added


  • Community Support.

    • Put simply, Spring Boot is a popular framework used in development and therefore has a big community of developers behind it. This gives rise to beliefs that support on bugs and security issues may be addressed and documented by developers in the community and fixes made as soon as documented. This provides a layer of support and security that for lack of words a homebrew parameter handler can offer. The spring home page has a lot of documentation and forums that can provide aid for developers and tutorials on design patterns and so on. 


  • Code Readability.

    • A minor but still notable benefit of the Spring boot framework for the policy common is readability. This could be personal preference but the class level annotation constraints and properties configuration of a Spring boot application can be easier to maintain and follow for developers but as stated this can be preference. 


Current known implications of operating in the spring boot framework.

I can state that implementing the current common using the Spring Boot framework is possible and can offer benefits to the project going forward there are some blockades that must be addressed and decided upon before proceeding with the implementation of the parameter handling in Spring and they are as follows.

  • Code Restructure.

    • Restructuring the current parameter handling to meet the standard of the current common can be done but not without resources and time. There is also the fact that restructure in the common parameters may effect other packages and there functionality in the process. Do the benefits out weigh the resources required.


  • Custom Constraints to meet validation requirements that Spring Boot cannot.

    • Other investigations have shown that the current annotations and validation method have a greater flexibility and validation processing than the level that can be achieved with the standard java x validation API. In order to counteract this fact, custom constraints and validation rules will have to be written when converting to Spring Boot to ensure that no integrity is lost in comparison to the original methodology.


  • Bean Validation.

    • This issue is discussed in the java x validation paragraph of this paper along with my thoughts on a solution.


  • Security.

    • Security issues arise with spring boot mainly due to bad practice or not preparing for a possible attack in database creation primarily. Injection attacks are always a possibility if not accounted for.


  • Parameter Structure.

    • Spring boot uses a properties or YAML file to define the configuration of the application.
    • These configuration files are beneficial as they allow for handling of data types such as lists, maps, scalars and so on in the spring boot application.
    • The majority of participants communicate and receive messages from other sources such as Dmapp. These messages are in Json format which cannot be handled due to the configuration being defined as a properties or YAML file and will require translation before being able to be validated.


  • Deployment Size.

    • Spring boot has the potential to add to the deployment binary size if there are any unused dependencies in the project.