Posts

Showing posts from April, 2021

Design Patterns -- part 2

Criticism about Design Patterns: Failed to provide clear criteria for when to use what pattern, and explain the criteria for the rules or choices (such as cost/benefit analysis of find & change costs or something from  Category Metrics ). Focused mostly on  Systems Software , mostly ignoring database and  Crud Screen -centric applications. Usage of Design Patterns: Design patterns have two usages in Software development lifecycle: 1.      Providing common platform for developers using standard terminologies and are specific to particular scenario. For example, a prototype design pattern will be creating a prototype design which creates clone of actual object to be used in the program. 2.      Learning these design patters helps inexperienced developers to learn software development in a fast and easy way. These design patterns are being used from longer period of time and provide best solution to maximum of the problems in programming.

Design Patterns -- part 1

Design patterns are the best practices used by Developers while working on project. These give design level solutions for recurring problems that software engineers come across often. This helps developers to tackle these problems and design a solution well using patterns. These patterns help other developers so that they do not need to waste time in those problems which were faced by those developers.  What is   Gang Of Four (GOF)? There is a band called Gang Of Four (band) but here we will not be talking about band. We will talk about the authors of Gang of Four design patterns. In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides published a book titled Design Patterns - Elements of Reusable Object-Oriented Software Source:  Wikipedia Patterns are formalized  best practices  that the programmer can use to solve common problems when designing an application or system. Object-oriented  design patterns typically show relationships and  interactions

Error vs Exception in java

Image
Error vs Exception An Error "indicates serious problems that a reasonable application should not try to catch." while An Exception "indicates conditions that a reasonable application might want to catch." Error and Exception both are extending Throwable but usually Error is thrown by JVM in a scenario which is fatal and it is not possible for the application to recover from that error. For instance OutOfMemoryError . Even application can raise an Error but its just not a good practice. Application should use checked exceptions for recoverable conditions and runtime exceptions for programming errors.Error is something that most of the time you cannot handle it but exception was meant to give you an opportunity to do something with it. like try something else or write to the log. Exception is generally divided into two categories e.g. checked and unchecked Exceptions. 1.     Checked Exception has special place in Java programming langu