Skip to main content

Posts

Showing posts from February, 2020

Difference between Observables and Promises

Observables vs Promises Asynchronous programming in JavaScript can be achieved by using -  Callbacks, Promises, async/await, RxJs Observables  Observables are used to transfer messages between publishers and subscribers in your applications. Observables are a part of RxJs(Reactive extensions for javascript) which is a library for reactive programming using observables. Angular uses observables for a lot of asynchronous programming and event handling. For example, For transmitting data between components - EventEmitter extends RxJs Subject and exposes a emit() method to send values to the subscribers. Angular HTTP Module uses observables to handle AJAX requests and responses - Angular Httpclient returns an observable when making HTTP calls ex. http.get('URL') returns an observable. Few Advantages are the requests can be cancelled through the unsubscribe method, failed requests are retired easily) The ROUTER and FORMS module use observables to listen and respond

How to improve Application Stability in .Net Core Applications

How to improve Application Stability in .Net Core Applications Application stability becomes an important factor for an application to succeed in the long run. If an application is stable, it means there are fewer production issues or if any issue arises they are resolved quickly. But, what should be done to keep an application stable apart from writing new code for new features in the application. Here are a few things that you can do, Write Unit tests and improve code coverage (> 80%) Write more automation tests using testing tools like selenium, protractor Perform Performance, load and stress testing to identify the threshold volume the app can handle and can auto-scale as per needs (Tools: JMeter) Its also important that we maintain a tech debt epic and add stories that need changes to the application like refactoring the code, or fixing some performance lags in a hot spot in code which we might not be able to do as part of the normal sprint work. And, allocate 20% of every