Functional Programming Concepts show a way to develop application composing functions without any side effects and that except the same response. The idea is send parameters through pure functions and always expected the same response.
Ensuring that the data is only changing when you want it to change, it helps developers to reduce what they need to keep in mental map of the application, using imperative structure it should define not only what it should do but also how it should be done.
Angular uses RxJs as part of its ecosystem, honestly, it is the best library by far. RxJs definitely changed the way that front-end developers manipulate and transform data before displaying on screen.
Although RxJs it is not a new concept, most developers still struggle to understand the difference between reactive and imperative programming.
The concept of reactive programming using observables, pipes and operators makes our life a lot easier. Although you still find a bunch of developers coding in an imperative way, even with this out of Angular concept, unfortunately, it still happens.
RxJs is a huge library with a…
Angular CLI provides a proxy settings for API calls to help developers to avoid those annoying cross domain issues during development process.
Most angular developers use CLI to setup their local environment, it means that your application will be running on localhost and using the port 4200 (whatever port you set up).
You might probably have to call API’s which are pointing to different environment or port, unless if you’re not developing a serverless application.
Running your Angular application you will see straightway the message below. …
Definitely, high-density displays affects the way we see Hardware Pixel and CSS Pixel, let’s understand how to use device pixel ratio (DPR) to calculate pixels conversion, and how it improves the web page quality.
Have you ever heard the expression “a pixel is not a pixel” ?
Should designers and developer be worried about how convert css pixel into hardware pixel ?
In earlier days, when high-density or retina displays weren’t a thing, developers and designers used to have a clear concept of pixel:
1 CSS pixel was exactly the same as 1 hardware pixel, simple like that.
Responsive images sizes is a frontend technique that help to improve application performance, considering that images are responsible for more than 60% of download size, developers should be aware of these techniques.
Images are loaded and sized appropriately depending on each device and resolution. Attributes like srcset and sizes let browsers know in advance how to display the right image based on the current viewport width.
Developers can also use picture and sources in combination with media queries to define the best loading strategy. …
Viewport defines the area of the screen that the browser can render content to. It’s the size of the window you’re viewing your website regardless the device screen size, that’s why viewport meta tag is considered the first step to to control a responsive website.
On desktops that size is easy to see because it’s just the size of your browser. It means the full size of the screen even when you shrink your browser. In other words, the portion of that browser that you’re viewing the website is essentially the viewport.
On the other hand, it’s not so obvious…