Skip to main content

Posts

Showing posts from December, 2019

Why S.O.L.I.D

Why S.O.L.I.D SOLID principles are design principles that enable us manage most of the software design problems. Objective of SOLID is to make software design more understandable, flexible and maintainable. Why SOLID was promoted Rigidity - Every change affects many other parts Fragility - Things breaks in unrelated places Immobility - Cannot reuse the code outside of its origin context Because of these we ended up with these  End up with tight or strong coupling of the code with many other modules. Tight coupling causes time to implement any new requirements, bug fixes and some times creates unknown issues End up with code which is not testable End up with duplication of code End up creating new bugs when changing the code If followed SOLID Achieve reduction in complexity of the code Increase readability, extensible and maintainability Reduce errors and implement re-usability Reduce tight coupling S.O.L.I.D Principles Single Responsibility...

How to do a good code review

What is a code review? and why? Code review is a common, but an important part of the development process where a fellow peer or a  technical person go through the code that you have written to find out issues with it. By reviewing the code we can reduce risks by fixing the issues that the reviewer have found. By doing so we can reduce process of fixing bugs during the later stages, which will save lot of time and money. And by reviewing codes we can share our knowledge on like how others code, and what we are doing wrong in our code. And also it can be a learning material for the junior developers, where they can learn how to apply particular designs and such. What are the thing to look in a code review? Code format - A team should have a way of coding like coding practices, line per class, naming conventions, comments. By having this the code will be have consistence, easy to maintain and easy to be learned. (Formatting, Style, Naming and Test coverage this process ca...

Redirect to a url after login - Spring Security

If you wa nt the browser to remember the url that you enter before login and redirect to that url after you login to the application.  XML Configuration - spring-security.xml   What happens after login will be handled by AuthenticationSuccessHandler SavedRequestAwareAuthenticationSuccessHandler will use the saved request stored in the session. After the successfull login the user will be redirected to the original request url.