Skip to main content

Posts

Prototype Design Pattern

Prototype Design Pattern is a creational design pattern which will be used when there is a need to create multiple object with the same class and will be involved in lot of configurations. By using Prototype Design pattern we can clone a existing object with same configurations values, with same property values into a different memory location, that will exclude the costly operations. This will save us both time and resources. When to use? and Why? Creating new objects by cloning other objects. Allows for adding any subclass instance of a known super class at run-time when there are numerous potential classes that you want to only use if needed at run-time. Reduce the need for creating sub classes public interface Shape extends Cloneable {            public Shape makeCopy(); } public class Circle implements Shape {            public Circle() {                 ...
Recent posts

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.

Defining datasources in Application Vs App Server

Defining datasources in Application Pros Avoid configuring client's application server   Useful in development stage to just change the parameters and build and deploy  Cons Cannot use same build for Dev, QA, UAT and Pro. that may leads to minor problems  Defining datasources in App server Pros More secure by having it in app server configuration builder will not have the credentials to the clients DB  Can make war file smaller having DB modules in app server Can use same war file in multiple places (Test, Production and different clients)  Can use same build for staging and make sure that application works perfectly  Easy deployment  Cons Based on the different clients having different application servers would take some time to configure 

What is DevOps?

What is DevOps? DevOps is a set of practices that will increase the ability of an organization to deliver applications and services to the clients in a faster and more reliable way. These practices will enable development (Dev) and operation (Ops) teams to merged into a single team so the team can work entire application lifecycle, from development and test to deployment to operations rather than the be a traditional isolated teams that will work only on a part of the application lifecycle. DevOps teams try to automate as many processes as possible in order to build, test and release products in more faster and with more reliability. DevOps Practices   Agile Agile is a time boxed, iterative approach that builds software in an incremental way from the start of the project instead of delivering it all at once at the end of the project. In this way customer can see the software form the start of the project and the team can get feedback about the software from cl...

What is "Scrum"?

What is "Scrum"? When developing a product with a team, there will be few common problems like organizing the team, product scope change, team member not sure what to do next and redoing things that the other member had done. In order to solve theses kind of problems we can use scrum. Scrum  Scrum is a iterative and incremental agile software development framework which is used to manage product development. Where we can easily address these kind of questions , what other members should do?, what we need to?, are we on right track to complete the product in given time? And is the product owner happy with the progress? This is how the scrum works       1. A product owner creates a prioritized list called a product backlog where he will add what he needs in the product.       2. In the sprint planning, the team pulls a small chunk from the top of that list, a sprint backlog, and plan how to implement those requirements.      ...