Angular 8 is here! What’s new?

I’ve been using Angular for many years now, started with AngularJS. I simply love it. Angular is an excellent framework for building web applications.

Now Angular has been released in version 8.

This is a new major release spanning the entire platform, including the framework, Angular Material, and the CLI with synchronized major versions.

How to update to version 8

Visit update.angular.io for detailed information and guidance. For most developers, one command should take care of this update:

ng update @angular/cli @angular/core

If you are also using Angular Material

ng update @angular/material

Top 8 Features of Angular 8

* Differential Loading
* Builders API
* Support for $location
* Web Workers
* Router Backwards Compatibility
* Dynamic imports for lazy routes
* Bazel Support

* Ivy Rendering Engine (preview)

 

Angular 8 now depends on TypeScript 3.4. Check out the release notes to know what has changed.

How To Read HTTP Request Header in Spring MVC

This short tutorial is about how to read the HTTP request header in the spring framework.

While refactoring a REST service, I came across code duplicates.

There were 5 similar methods, whereby only the RequestBody and the Return method differed minimally.

In this case, it’s a GET request which serializes an RDF record into different formats on request.

Now I wanted to convert these 5 methods into a single method.
With the @RequestHeader annotation, this is no problem.

 
 @RequestMapping(value = {"/rest/**"},
        method = RequestMethod.GET)
    public @ResponseBody ResponseEntity getContainer(@RequestHeader(value="Accept") String acceptHeader, HttpServletRequest request) {

        log.debug("Request to get container: {} in format: {}", path, acceptHeader);

        // dummy code to get path
        String path = "";

        // return rdf in requested format
        return new ResponseEntity<>(containerService.find(path).toString(acceptHeader), HttpStatus.OK);
    }

Raspberry PI 4 Released – Complete specs and pricing

A new version of the Raspberry PI 4 model has been released, and it is incredible update over the older model. A few years ago, I got Raspberry Pi 3 . It was my first 64-bit ARM board. It came with a 64-bit CPU. Here are the complete specs for an updated 64-bit credit card size Raspberry PI 4 desktop computer level of performance.

The post Raspberry PI 4 Released – Complete specs and pricing appeared first on nixCraft.