10 Free resources to learn Java for beginners

If you’re an everyday computer user, you probably heard about “Java” at some point in your life. However, not many people know what Java is really about, and even less know how to program and write code in it. On the other side, Java is one of the most demanded coding languages, and if you’re looking forward to being a developer, or you just simply want to learn to code, picking Java is a good start. I recommend learning HTML first as the knowledge of it will give you a good foundation for Java.

The internet is full of learning platforms, and there are many for learning to code in Java too. This article will help you choose a platform that suits your needs and the one that will help you nourish and learn your programming skills in Java.

Codecademy

This website is offering you many different courses. Mainly because this is basically an education company, and the main focus of the website is to teach students different coding languages. The HTML and CSS courses are definitely the best here, but Java is also really good. Both beginners and experienced programmers can use this website since it has free courses for both categories. Java courses are completely free on Codecademy, you just have to create an account.

CodingBat

Another great resource for learning and practicing to code in Java. All you have to do is to register, and the rest is on you. The registration will give you the ability to track your progress. It’s a great site for beginners since there are a lot of programming problems for beginners like recursion, logic, array, and string.

I highly recommend you to deal with recursion questions on this website since it is one of the most difficult concepts you have to master.

Codegym

If you want to be a successful developer, you have to practice a programming language you work with a lot. Of course, you can find some useful stuff in books, but without practice, you’re nowhere. If you want to master a programming language you will have to practice enough to be able to deal with all types of situations and problems. Exactly this is why Codegym is one of the best ways to learn Java in my opinion.

This platform gives you a lot of practice while learning Java. You will have to deal with over 1200 tasks while you’re learning, and this will help you deal with different situations. An easy, but effective way to learn a programming language, and the best thing about it–it’s totally free!

Coursera

Coursera is a good place to start learning to code in Java if you’re looking for some well-known tutorials. Tutorials cover a huge variety of topics, such as different programming languages, data science, and others. This website will provide you with video lessons for learning Java in different languages: English, French, Spanish, Russian, and Chinese.

In addition, you’re also provided with subtitles if you don’t know any of the above languages. Currently available subtitles are for German, Korean, Turkish, and many more.

Java Code Geeks

This learning platform is allowing you to learn Java, but you’re also able to download free examples of code you may need. This is what differentiates this website from others and why it is a trustable resource. You’re able to learn a couple of Java variants on this website such as enterprise Java, desktop Java, and core Java.

This website also has some e-books and useful documents in its directory. Of course, all of them are downloadable and are a trustable source of information.

Oracle

Oracle is a software development giant, and you probably know this if you’re interested in coding in Java. This company has free online Java tutorials for beginners and these tutorials are awesome. They are regularly updated and you’re able to learn how to create apps in a simple and easy way.

Oracle allows you to learn the basics and find out what is GUI and how to create it. This website will definitely teach you how to think like a programmer.

Sololearn

Another website with completely free courses for learning Java. The total number of lessons is 65 and you will go through 6 modules in order to complete all of them. It may not be as easy to learn to code on this platform as it is the case with others, but it is definitely a useful and reliable resource. Covering topics such as arrays, conditionals, loops, exceptions, objects, lists, are all going to help you learn Java.

Skillshare

Skillshare classes allow you to learn Java completely for free. The reason some people chose this platform over others is the feature that allows you to sort lessons by length and then watch the shortest ones if you’re busy with other things.

Codementor

Codementor is a site that offers you courses, tutorials, but also valuable tricks and tips for Java. This website will provide you with different programming tasks, coding articles, and Java-related news that you have to keep up with in order to be a successful developer.

Studytonight

As already mentioned numerous times, learning Java can be really hard. But this doesn’t mean that it can’t be fun, right?

It’s very important to pick the website that suits you well, and Studytonight is one of the best websites for learning Java, mainly because it has really good examples. This platform will help you learn more about practical Java problems and you will learn a lot from the tutorials provided. One of the biggest pluses is the coding skills test section

In conclusion

Learning Java is definitely not easy. But, if it is something you’d love to learn, it is definitely possible. You can learn this programming language on your own and completely for free from some of the sources mentioned. I’d recommend you to avoid getting paid lessons since the main purpose of Java is to enable people to learn and use programming language completely for free.

Top Features of Angular 7.0

Angular 7.0 is here. Continuing the trend set by earlier releases, migrating to Angular 7.0 is easier and faster. The latest release of the TypeScript-based open-source front-end web application platform is developed by Angular Team at Google along with a community of individuals and organizations.

Though there are a few new features added to the arsenal of Angular for the 7th major release, it gets some fascinating tooling changes and performance-enhancement features. Like with earlier versions of Angular, 7.0 is backwards compatible with previous releases.

New in Angular 7

Here is a list of most changes introduced to the 7th major release of Angular:
Angular CLI v7.0.2
There are several great features boasted by the new Angular CLI v7.0.2. These are:
While typing commands to the likes of ng-add, ng-new, or @angular/material, CLI will prompt users to help discover inbuilt features like routing and SCSS support
Creating new projects takes advantage of Bundle Budgets in CLI
Angular Compatibility Compiler
The new Angular Compatibility compiler is added to transform node_modules compiled with ngc to ones that are compatible with the new Ivy renderer. The newly converted node_modules appear to have been compiled with ngtsc rather than ngc. All of this is done so that such legacy packages can be used by the Ivy rendering engine without compatibility issues.

Angular DoBootstrap

Angular 7 brings ngDoBootstrap, a new life-cycle hook, and DoBootstrap, a new interface. These are used for bootstrapping modules that require doing bootstrap of a specific component.

Angular Elements with Slot

Meant for Angular Elements, Angular 6.1 introduced ShadowDom. In Angular 7, support for content projection using web standard for custom elements is available. Also, a new standard HTML element, dubbed slot, is introduced by the Web Component Specification. This new feature enables components with a template.

Angular Material & the CDK

The Material Design of Angular received a major overhaul in 2018. Further enhancements to the same is made in the 7th major release of Angular. For dynamically loading as well as unloading parts of the DOM in order to build high-performing, large lists of data, virtual scrolling (discussed in detail later in the list) is now available.

Furthermore, apps can be equipped with a drag-and-drop ability (also discussed later in the article) by means of importing the DragDropModule or the ScrollingModule.

Application Performance

Prior to Angular 7, developers were including the reflect metadata polyfill in production. This is unnecessary as it is required only during development. So in Angular 7, polyfill is removed from production by default. For achieving the same, Angular 7 will remove the reflect metadata polyfill from the ts file and then include it when building the application in JIT mode as a build step.
In order to speed up the performance, new applications will warn as soon as the initial bundle crosses the 2 megabytes limit and will error at 5 megabytes. Don’t like the idea? Worry not, as you can change the default setting in the angular.json file. These limits are meant for warnings that can be catered to users taking advantage of Google Chrome’s Data Saver features.

Better Error Handling

Previously, error handling might get awry if the property is not initialized for @Output. With Angular 7 though, there is a provision for enhanced error handling in such a scenario.

Drag and Drop

The novel @angular/cdk/drag-drop module offers developers the ability to easily and declaratively create drag-and-drop interfaces. It further supports free dragging, sorting within a list, and transferring items between animations, lists, placeholders, previews, and touch devices.
Moreover, two additional helper methods are also available. moveItemInArray for reordering lists and transferArrayItem for transferring items between lists.

New ng-compiler

The all-new ng-compiler is faster and better than ever. It offers an accelerated eight-phase compilation and an almost double reduction rate of large app size. Furthermore, the new ng-compiler is equipped with the ability of advanced 8-phase rotating ahead-of-time compilation. All of this simply means an unbelievable reduction of 95 to 99% in bundle sizes for most applications.

Router

If you try to trigger a navigation outside the Angular zone in the Angular 7 then a warning will be displayed. In any case, if the new warning fails to show up in the development mode then Angular will log a warning on its own. Furthermore, navigation execution context info is added to activation hooks.

Splitting of @angular/core

Angular is an enormous framework that comes with just so many modules. In most scenarios, many of these modules are never required by developers. As such, Angular 7 comes with a split @angular/core. Each split will be having no more than 418 modules.

Virtual Scrolling

The newly introduced Virtual Scrolling feature in Angular 7 enables loading as well as unloading elements from the DOM based on the visible parts. <cdk-virtual-scroll-viewport> is the scrolling package that offers helpers for directives that react to scroll events.

This allows a performant way for simulating all items that are being rendered. It does so by setting the height of the container element the same as that of the height of the total number of elements to be rendered and thereafter rendering only those items in view. This results in faster experience for users with very large scrollable lists.

Dependency Updates

Here are important dependency updates for the Angular 7.0:

  • Upgraded TypeScript to 3.1 – Typically, Angular lags a few releases behind TypeScript. In order to avoid so in Angular 7, the earlier TypeScript version 2.7 is now upgraded to 3.1. Now, it’s mandatory to use the latest version of TypeScript while working with Angular 7.0.
  • Addition of RxJs 6.3.3 – The latest version of RxJs, which is 6.3.3 is added to Angular 7. The latest version of RxJs has a number of appreciable additions and changes. In addition to offering a boost in performance, these enhancements allow easier debugging of call stacks and improvement in modularity.
  • Support for Node v10 – Along with support for Node 8, Angular 7 provides support for the latest Node 10.

Partner Launches

  • Angular Console – A brand new downloadable console allowing for starting as well as running Angular projects on the local machine.
  • NativeScript – NativeScript allows a single project that builds for the web as well as mobile.
  • Stable Release of AngularFire – In addition to having the first stable release, AngularFire comes with a new home on npm.
  • StackBlitz 2.0 – The 2nd release of StackBlitz is here. It includes the Angular Language Service and several new features, including tabbed editing.

Wait! No Project Ivy?

Despite the fact that Angular 7 is better than previous releases, it is a great disappointment that the long-awaited Ivy project wasn’t able to make it. Based on the incremental DOM architecture, Ivy is a brand new render engine.

Developed with a consideration to tree shaking, Ivy allows application bundles to be smaller. They solely include parts of the Angular source that is actually used by an Angular application, and thus a reduction in size becomes possible.

Worry not though, as Ivy is under active development, as stated in the official blog post, and will be out with the follow-up releases to Angular 7. As Google has committed offering two upgrades in a single year, it won’t be much of a surprise if Ivy gets released with the subsequent release to Angular 7.0.

Upgrading to Angular 7.0

As already discussed, migrating from previous Angular versions to the 7.0 is very simple. Only a single command is required to migrate all Angular 6 apps to Angular 7. It is:

$ ng update @angular/cli @angular/core

For those making use of Angular Material, the command to upgrade the same is:

$ ng update @angular/material

See! As easy as a breeze. If you’re experiencing problems while migrating from previous versions of Angular to 7, please go through the official Angular upgrade guide. Want to advance your Angular skills? Here are some of the best Angular tutorials to get you started!

5 Code And Framework Trends To Watch Out

The number of people who are constantly connected through their smartphones are now in the millions. And each year, the number goes up as more people are getting connected to the internet using smart phones. Subsequently, as an entrepreneur, it’s your job to make a strong online presence for a superior brand image. Wondering how? How about building a cutting edge website? Or say, building a mobile application to stay in touch with your clients?

Seems beneficial, doesn’t it? But keep one thing in mind, before you choose to build your own mobile application, learn about the programming trends that many IT outsourcing organizations are following in 2018. It will help you understand the market as well the potential of your app/website along with the Framework Trends in today’s world.
These are just 5 more important trends that are currently a must for any developer who is looking to enter the world of programming and web development.

1. Every organization needs a Data Scientist

Developers are gearing up to understand the conceivable outcomes like Data science and ‘cognitive’ innovations, for example, Machine Learning, Artificial Intelligence, and Natural Language Processing.

Data science is everywhere now, as confirmed by the rapid development of R programming and Python’s Data science libraries in 2017. Moreover, the growth will proceed into 2018, driven by the hype around (AI). You can already see the popularity of AI and Machine Learning with the launch of the latest updates to Google Assistant and also Apple’s Measure App!

2. Java will be more vibrant with upcoming new release

2017, was a great year for Java’s evolution. Where, Java SE moved to a six-month release cycle, Oracle’s JDK migrated to the open-source OpenJDK, and Java EE moving to Eclipse, Java will just get better and better with time with all signs of improvement. Java SE will be released more often, with more highlighted features and just because the OpenJDK will be the same as Oracle’s JDK, developers won’t face any kind of licensing issues.

These progressive changes occur with a noteworthy controversy that took place a year ago, when a Java Community Process official board voted against Project Jigsaw, a proposed usage of Java modules. There was hype that passed around that Jigsaw would harm the business, therefore the demand for modification was made. Soon after that, Oracle suggested that the OpenJDK will be released twice-yearly for new Java versions, because it was very common to release any version within the duration of a year or more

3. Kotlin will get considerably more support from Android

As predicted, the Kotlin programming language took off a year ago. Since becoming an authority language for Android applications at Google I/O, its utilization among Android designers has developed essentially. Android designers anticipate that Kotlin will keep picking up popularity in 2018. There is a ton of authority documentation that is still in Java, which will gradually get changed over to Kotlin. One additionally thing that will be enthusiastic about Android in 2018 is AI. More AI capacities will be accessible straightforwardly and locally on the Android OS itself with the goal that any application developer can begin utilizing them.

4. Java 10 will incorporate performance boosts

According to last year’s prediction, Java 9 wouldn’t have as much effect as Java 8, and it was in reality what happened. Java 9 comes with huge changes that could be abating selection, since it forces developers to refresh few applications with a specific end goal to utilize the module framework. The more regular language updates that are coming in 2018 are another reason adoption has been moderate. Since Java updates come twice in every year, a few groups may choose to avoid a few versions before getting up to speed.

5. Node.js will withstand controversy, enhance execution

Node.js releases updates twice a year, including one long-term service update every year. That is a major advantage for big business adopters. In 2016, Facebook released its Yarn Node.js, which was so great it undermined to usurp NPM in notoriety. In 2017, NPM discharged a noteworthy update that gave it equality with the vast majority of Yarn’s features. In 2018, they set up procedures for distributing NPM modules created by means of compiler-to-JavaScript languages, for example, Babel or Typescript.” As serverless stages based on Node.js have turned out to be more prevalent, remaining aware of normal security patches has turned out to be significantly more basic for cloud service providers.

The greatest news for Node.js was the support for ES6 modules in Version 9. This was a colossal choice, with numerous detractors contending about the correct implementation of ES6 modules. “Node.js had a module design, followed by the Common.js design, so influencing ES6 modules to work with Node.js was a substantial task.” The principle usage instrument is another record augmentation (.mjs) to assign ES6 module documents. Numerous see this new document augmentation as dividing the Node.js biological system. For Node.js, the change to ES modules is significantly harder than for browsers because its module framework works synchronously.

Key takeaways and plan of action for the Framework Trends in 2018

2018 is loaded with a lot of ups and downs for the developers, including progressive new innovations, diversion changing updates to existing ones, and unquestionably a few debates. Here are few things that will have the greatest effect on you as a developer:

  • Having said that public pressure works, on tech giants, for example, Facebook and Google, the developer network will put more weight on associations that aren’t making a comprehensive domain.
  • Expect a tremendous push to adopt particularity, as both Java and JavaScript refine huge support for modules.
  • More companies will examine whether data science and machine learning can encourage their business, and you ought to as well.
  • Engineers will discover more even approaches to profit by utilizing serverless platforms.
  • Discovering organizations you trust to deal with security concerns that affects you, will be a critical challenge.

Which trend affects you the most, please let us know in the comment section below!

An Introduction to CUDA

CUDA is a parallel computing platform and programming model that makes using a GPU for general purpose computing simple and elegant, is an extension of the C programming language and was developed by nVidia. CUDA programming allows the coder to make use of the enormous parallel computing power of an nVidia graphics card to be able to do basic purpose computation. Before continuing, it is worth discussing this for a bit of bit longer.

CPUs as Intel Core two Duo as well as AMD Opteron are very good at doing one or maybe two jobs at a time and performing those tasks rapidly. Graphics cards, on the opposite hand, are very good at doing a tremendous number of tasks at the same time and performing those tasks relatively fast. To put this into perspective, imagine you have a twenty-inch monitor with a regular resolution of 1,920 x 1200. An nVidia graphics card has got the computational ability to compute the color of 2,304,000 various pixels, many times a minute.

To achieve this feat, graphics cards use dozens, possibly a huge selection of ALUs. Fortunately, Nvidia ALUs are completely programmable, which allows us to harness an unprecedented level of computational power into the programs which we create.

As mentioned previously, CUDA lets the coder reap the huge selection of ALUs inside a graphics processor, and that is a lot more effective compared to the couple of ALUs obtainable in virtually any CPU. Nevertheless, that does place a cap on the forms of applications which are well suited to CUDA.

CUDA is just properly designed for highly parallel algorithms

To run effectively on a GPU, you have to have several a huge selection of threads. In general, the more threads you have, the better. In case you have an algorithm that’s mainly serial.

Subsequently, it doesn’t seem sensible to use CUDA. Many serial algorithms have parallel equivalents, but some don’t. In case you cannot break the problem of yours down into no less than a 1000 threads, then CUDA possibly isn’t the ideal solution for you.

CUDA is very well designed for number crunching

There’s one thing which CUDA excels at – number crunching. The GPU is completely effective at doing 32-bit integer and also floating point operations. It’s GPUs is better designed for floating point computations, making CUDA great for number crunching. Several of the bigger end graphics cards will have double floating point devices. However, there’s just one 64 bit floating point product for every sixteen 32-bit floating point units. Thus using double floating point numbers with CUDA must be stayed away from in case they are not essential for the program of yours.

CUDA is well designed for huge datasets

Majority of modern CPUs have a few megabytes of L2 cache since many programs have very high data coherency. Nevertheless, when operating immediately across a big dataset, say 500 megabytes, the L2 cache might not be as useful.

The memory interface for GPUs is extremely distinct from the memory interface of CPUs. GPUs use huge parallel interfaces to be able to link with it is mind. For instance, the GTX 280 uses a 512 bit interface to it is high end GDDR 3 memory. This particular kind of interface is around ten times faster than a regular CPU to memory interface, that is actually fantastic.

It’s worth noting that the majority of nVidia graphics cards don’t have even more than one gigabyte of memory. Nvidia has specific CUDA compute cards which happen to have as many as 4 gigabytes of ram onboard, however these cards are costlier compared to cards initially meant for gaming.

To write a kernel in CUDA

As mentioned earlier, CUDA could be taken full advantage of when writing in C. This is good news because most programmers have knowledgeable about C. Additionally reported earlier, the primary concept of CUDA includes a huge number of threads carried out in parallel.

What was not stated is the fact that many of these threads are likely to be executing the identical function, known as being a kernel. Understanding exactly what the kernel is and just how it functions is crucial to your success when composing an application which uses CUDA.

The thought is the fact that although every one of the threads of the system of yours is executing the same function, the threads will be dealing with an alternative dataset. Every thread is going to know it has very own ID, and based off it is ID, it’ll decide which pieces of information to focus on. Commands such as if, do, while, for, etc.’ are supported.

Writing programs with CUDA

One important thing to keep in mind is the fact that the entire program of yours doesn’t have to be composed in CUDA. In case you are composing a sizable program, complete with a user interface, and also numerous additional features, subsequently most of the code of yours is going to be written in C++ or perhaps whatever language you prefer.

Next, when something very computationally intensive is required, the application can just call the CUDA kernel function you wrote. And so the primary idea is the fact that CUDA must simply be utilized for most computationally intense areas of the plan of yours.

CUDA without having a graphics card

While CUDA is particularly designed to operate on nVidia’s graphics cards, it can additionally operate on virtually any CPU. Albeit, the system won’t ever be equipped to run almost as quickly on a CPU, it’ll still perform.

10 Ways to Learn Java in just a Couple of Weeks

Java is not to be confused with JavaScript, it has been built as a Write once, run anywhere language – which in simple technical terms means that it can be run on pretty much any device that there is.

What is Java Programming Language?

We interact with Java on a daily basis, whether we acknowledge that fact or not, and on many occasions – a website might tell us that we need to install Java in order to browse it, this goes a lot for websites that are flash dependent and have some kind of flash components integrated within the core system.

Java is also one of those programs that you usually download straight away, after a purchase of a new computer – I’m not quite sure whether anyone ships Java as a default program within the operating system. Its history with security issues is not one of the most pleasant, but for the most part, it has made the language as mature as it is.

From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere!

  • 97% of Enterprise Desktops Run Java
  • 89% of Desktops (or Computers) in the U.S. Run Java
  • 9 Million Java Developers Worldwide
  • #1 Choice for Developers
  • #1 Development Platform
  • 3 Billion Mobile Phones Run Java
  • 100% of Blu-ray Disc Players Ship with Java
  • 5 Billion Java Cards in Use
  • 125 million TV devices run Java
  • 5 of the Top 5 Original Equipment Manufacturers Ship Java ME

As we can see with the above statistics, the Java programming language is very sought after, and there is definitely a big market for it.

Salary for Java Programmers

I’d love to briefly touch the subject of Java salaries, and how much you’re able to earn – within a reasonable amount of time – by becoming a full-time Java developer.

The salaries differ according to the corporation they work for and the country they live in. The average salary in the US remains between $48,000 to $99,500. ZipRecruiter reports that annual salaries can vary between $22,000 to $132,000 in the US. In Denmark, the average salary could be as high as $69,000 while in Japan it can be around $51,000.

Programming Java for Beginners

I published this post a little while ago, and ever since then, I have received mixed feedback, mostly about the fact that people are saying it takes a lot longer than just a couple of weeks to learn this programming language. I’ve to say that I can’t disagree, and because of that – I’ve added this additional course that I suggest you take part in.

It does cost a little bit of money, but keep in mind that you’ll be getting access to a unique and separate community section in which you’ll find all 35,000 students who’ve taken part in this course. It contains over 10 hours of content, more than 100 lectures, and hundreds of discussions on the most problematic of topics.

You won’t find a better way to learn Java than by taking part in this course, the ultimate best alternative would be to learn in real-life from an expert, but that isn’t always that easy. I’d be more than happy to answer questions about this course.

1. Java Basics

It doesn’t really matter which programming language we’re going to learn, we will always begin with the basics, and Java is no exception. Thankfully, the official Oracle (company behind Java) website has a great introduction to Java, explaining what it is and showing you the basics of how it works.

You will also find that there a lot of resources for further learning, but most importantly – this page will help you get started with all the necessary tools and other stuff that’s required to begin learning Java.

2. Introduction to Programming in Java

This is another great resource, and not only because it is being presented by one of the top universities in the world, but you’re also bound to learn quality stuff from taking this tiny course. It will force you to read a ton of stuff, all of which is essential to the process of learning Java.

It has also been acclaimed as one of the most beginner friendly resources for learning Java, no matter how technical it might seem at first. It’s full of images, samples, preview code and documentation to get you going.

3. Learn Java Online

In recent years, interactive tutorials have become quite a thing, and so I feel obliged to include some links to what’s available on the web in this list. It’s worth knowing that you won’t learn a whole lot from this interactive tutorial (let us be honest), but I recommend it as a starting point for the first couple of chapters for any of the books you pick.

Plus, its always nice to be able to load some code and test it, without having to worry about launching your IDE to do it.

4. Learn Java the Hard Way

This is the only book on the list that is not free of charge, but due to the fact that it is resourceful and beginner friendly, I thought it would be a good idea to include it. It only costs $20, less than any decent t-shirt would cost.

You can see (and work with) the first 16 chapters for free, online, the link is here. I think many people are going to love this one, it is friendly designed combined with friendly exercises, what more could you ask for.

5. Programming by Doing

This website is built by the same person that has published the above book I listed, this site is also the inspiration for that book. You’ll find a lot of challenges that do not require a lot of programming skills at first, but as you advance through the challenges they’ll get tougher and tougher.

I’ve always believed that the absolute best way of learning something is by doing it first, testing and then going at it once again. Just pick any of the tutorials or books in this list and you’ll be ready to go.

6. Java for Complete Beginners

Some people prefer to learn from the video content, that’s totally acceptable. Sometimes, when you’re busy and got a lot of things to do, it’s better to have access to videos that you can just repeat whenever, to grasp some of the essentials of a programming language, in this case, Java.

It’s a free Udemy (you’ll need an account to view it) course that has got well over 100,000 students enrolled, and is one of the most popular courses on the site. It’s led by John Purcell, a software engineer who has had many years of experience with Java.

You’ll get nearly 20 hours of content, with over 70 lectures in total. If you don’t know Udemy, then you will also get access to a very large support community (all those 100k students who have done/are doing this course), and there is an in-built support system for asking questions.

7. CodingBat

Don’t let the design fool you if anything – it will keep you distraction free. CodingBat (formerly JavaBat) is one of the best ways of learning Java for free, interactively within your browser. It’s the second site in our list that offers interactive education, I do have to say its also better than the previous site.

The issues that you might experience with CodingBat is that unlike sites like Codecademy, which explain everything from bottom to top, step-by-step, CodingBat is more of an do what you know and pick what you’re capable of. Just don’t confuse it for being unorganized, there are plenty of tutorials for each section and you’ll be learning rather quickly.

8. Java (Beginner) Programming Tutorials

The New Boston is known for having great and comprehensive introduction videos for a lot of Java Programming Languages, and Java is no exception. You’ll find 80 step-by-step videos for learning Java and all that it has to offer, though I think its a little bit dated now. (Java 7)

Don’t count on what I said about it being dated, it’s still an incredibly useful resource for anyone who wants to begin to learn Java with determination, plus it doesn’t require of you to signup unlike Udemy does. The comments are quite insightful, for some of the videos.

9. Object-Oriented programming with Java

Another University course, it will take you roughly 6 weeks to complete it. Very beginner friendly, and everything can be done from within the browser. It also has one of the best gettings started tutorials on how to install Java and the necessary tools. In the course, you will learn all the basics of computer programming, algorithms and object-oriented programming using the Java programming language.

There is also part 2 available, which is another 6 weeks of programming. In total, you’ll be looking at 12-13 weeks of learning Java. By the end of it, you should know how to build your own apps, and how to think like a Java programmer. You’ll also be ready to advance to higher rankings, and explore the language much more in-depth.

10. Java Programming Exercises

I’m wrapping this up by giving you another website for Java programming exercises, specifically designed for Java that also contains the answers to each of the puzzles. It’s so important to practice, especially when it comes to a language like Java – which at first is not at all easy to master.

In total there are thirty exercises for you to try, and instead of saying ‘It’s impossible’ – take a break and come back to it later, that’s usually when the answer arrives.

10 Ways to Learn Java

It might not be a transparent as my learn Python post was, I certainly blame the fact that it is not as easy of programming language to learn, and does require higher levels of attention to detail. It’s among the top programming languages to learn this year, and it has a great deal of community behind it.

By which I mean that it’s advised of you to join sites like StackOverflow, and Reddit – for finding answers to common questions, and learning more by asking questions yourself. Without asking questions, we’re just telling ourselves we can live without a solution when that is not entirely the case.

How Elixir compares to Ruby

If the context does not involve reference to software development, the names of Ruby and Elixir might have referred us to some video game like Heroes of Might and Magic or Warcraft. 
However, in the world where the code runs things, these names denote two programming languages widely used for building various sorts of software. Each of them has its own followers, as well as haters. In this article, we’ll try to find out their differences and answer several relevant questions like “which product type is the best to create using Ruby/Elixir” or “is Elixir more in demand than Ruby”. And we’re starting as per seniority.

Origins

As of 2019, Ruby is 24 years old. Despite the mature age, we cannot call it one of the oldest languages like C or Eiffel. The peculiar thing about the language is the lack of opinionated or straight-out ways of doing coding. In other words, several engineers can go different ways to execute something using Ruby. Despite this flexibility, the code you get is associated with elegance and usability.

Ruby is not a very popular technology (18th rank according to the TIOBE index as of January 2019), and many haters used to throw up predictions about its flame-out in the short run. Meanwhile, the language is keeping afloat, and its supporters are eagerly waiting for the debut of the 3.0 version in the next year.

Unlike Ruby, Elixir can be called a youngster because its first appearance was dated seven years ago. At the same time, it is based on one of the world’s oldest virtual machines titled BEAM, which, in turn, rests on the Erlang Open Telecom Platform. Actually, these links to relatives are not very interesting except for the fact that a Ruby engineer is the Elixir inventor! Fancy that. His name is José Valim, and a trigger to creating a new technology was his desire to optimize the performance of apps built with RoR in multi-core systems. In the view of this, we would suppose that both languages are like two brothers or a brother and a sister at least. Let’s try to figure it out.

Paradigm

Ruby is listed along with Python and Java because they are object-oriented languages. It means that everything including methods, numbers, and variables is an object. Elixir is not cut from the same clot. It’s a representative of the functional programming paradigm, which gives a completely different way of looking at concurrency, debugging, and testing. The focus is made on the computation of pure functions. Besides, this paradigm is quite efficient for building large programs out of small functions. However, it does not mean that object-oriented technologies are either better or worse. They’re just different.

Therefore, engineers who decide to switch from Ruby to Elixir should be prepared to think differently. For example, you need to avoid changing state; variables cannot be redefined with another value; all data is immutable, etc.

Syntax

Many Rubyists say that the language they use is full of magic in a good sense of the word. And the clear syntax is always referred to one of the major benefits you get. Matz, Ruby inventor, says that the language offers concise, yet readable code. Other experts spare no praiseful words and characterize Ruby’s syntax as mellifluous and simply elegant.

Well, we cannot say the same about Elixir. Erlang, its underlying language, can boast one of the most consistent syntaxes among other technologies. For some reason, Elixir has not inherited this hallmark. The clumsy syntax is often considered one of its drawbacks and disappointments. Many engineers hate the language’s inconstancy which involves the possibility to write the same thing in many different ways. Opinions about the Elixir’s syntax are ambivalent. At the same time, both languages share some similarities in this regard.

Performance

Performance has never been Ruby’s cause for pride. Though the language showed better results with every new version, it was not enough to reach a significant speed enhancement. However, the latest release dated of December 25, 2018, promises to ruin this statement, since the latest version, 2.6.0, provides the 1.7x faster performance compared to the previous one, 2.5.3. So, there is hope that Ruby may get rid of a slow-programming-language cliche. And what about Elixir?

José Valim reached his goal of creating a technology that works faster than Ruby. Indeed, Elixir excels the Yukihiro Matsumoto’s brainchild (Ruby) in performance and scalability due to being optimized for maximum speed on the compiled code in the already running Erlang virtual machine. And the trump card is multiple cores support which allows you to do things in parallel, like run tests, for example. Elixir is faster than Ruby according to many benchmarks. At the same time, there are some cases across the web, which show the opposite result due to some improper usage of the languages under comparison. Therefore, it’s important to have an advanced understanding of modern high-performance dynamic optimizing compilers, statistics, hardware architecture, and a bunch of other details to write relevant benchmarks.

Web frameworks

When talking about web app development with Ruby and Elixir, we cannot but mention Ruby on Rails and Phoenix – the frameworks built atop the languages. Rails is known for its demand on the market. The evidence of this is many big names which have opted for the framework for their products. These include Dribbble, GitHub, and also a bunch of other businesses. Besides, numerous web app building companies like Railsware base their activities on leveraging RoR. It’s not enough to name the framework awesome. Rails is time and cost efficient solution characterized by such benefits as fast prototyping, MVP design pattern, test-driven development approach, the convention over configuration paradigm and other magic. And do not forget about a large vibrant community of engineers. All that makes RoR an ultimate tool for building web products.

Phoenix, in turn, is usually referred to a Rails imitation written in Elixir which is far from the truth. Some ideas were indeed borrowed from Ruby’s framework, but in general, the resulting tool brought innovative solutions to many technical problems. And these solutions turned out much better than those of RoR. Many experts acknowledge that Phoenix prevails RoR as for stability, speed, and hot deployment. Meanwhile, the frameworks differ in programming paradigm (functional vs. object-oriented), database tools (Ecto vs. ActiveRecord), third-party software pieces (packages vs. gems), and other elements. At the same time, the visibility of Rails keeps its Elixir-based rival in the sidelines on the market.

Despite the above, both solutions share a single problem of the talent shortage. It’s a challenge to find a good Rails developer, not to speak of Phoenix-savvy engineers. However, some experts put forward assumptions that the mentioned issue will be solved in the coming years. We’ll see.

Elixir = New Ruby?

It’s an unwise practice to say that some language is bad and another one is good. The truth is that each solution has its benefits and drawbacks. Another thing is that special requirements of a particular project demand its owners and managers to seek out the most applicable technology. 
Elixir does excel Ruby in performance and scalability. However, it lags behind as for talent availability, size of ecosystem and productivity. So, they are different in nature and purpose. Thus, if a goal is to deal with high-traffic systems or IoT, Elixir would be a smart choice. Ruby is more suitable for building MVPs, as well as fast and secure web apps.

Best E-books to Learn JavaScript

JavaScript has become one of the most popular programming languages throughout the globe. Released at the end of 1995, JavaScript or ‘JS’ as called by many as an abbreviation, this programming language has soared into popularity, so much so that many major organizations are known to be devout users.

Microsoft, Netflix, Groupon, eBay, LinkedIn, Walmart, Facebook are some of the names that are known to the top industries to use JavaScript. In fact, it would hard to find the name of an organization that doesn’t use JavaScript. The only other languages that are moving alongside JS are HTML and CSS, mainly in the fundamental technologies of the internet.

With its ever-growing popularity, affinity towards learning this language has never been greater and with multiple resources, it might be hard to know where exactly to start. Much of the knowledge can be attained from going through books on JavaScript. You can also try some courses for it as well such as this tutorial to learn JavaScript for Free!

And if you are someone who shares an affinity for E-books, you can learn about JavaScript through your kindle as well. Here are our picks for the best E-books on JavaScript:

1. A Smarter Way to Learn JavaScript. The new tech-assisted approach that requires half the effort

Let’s face it! When learning any new language, the greatest issue is when we try to retain that same knowledge. For French, Hebrew or Latin you have Flashcards, which helps you in revising certain words. With a heap of exercises, designed to make you retain what you have learned in every chapter, this book is designed for beginners mainly. Advanced concepts like variable scope and prototypes are hard to understand for a first-time learner. Many people may blame themselves but often it is the lack of teaching skills from the author. So, this book acts as a virtual teacher. You might not be able to land a job at Facebook or Google after reading this book, but the core concepts for beginners will be understood.

2. Eloquent JavaScript, 3rd Edition: A Modern Introduction to Programming

Do you want to be proficient with the language of the internet? If yes, then this book is a must for starting out. This book will help you write codes with ease but also with efficiency. A vast array of courses have been added to keep you on track to learn as many concepts of JavaScript as possible. Much like the previous editions, the author doesn’t cease teaching codes from the beginning and usage of substantial examples. With the exercises in this E-book, you will learn to write your own programs in no time.

3. JavaScript for Beginners The Simple Way to Start Programming

There are many, many courses out there that promise to teach you JavaScript. Many promises to make you proficient in the language in just a week! I am not sure how reliable they can be in terms of genuinely getting all the basics cleared. Many people are willing to any price just to get a miracle formula to ensnare all the concepts of JavaScript. 
This book isn’t like any of those miracle formulas. Instead, this book will help you discover what makes JavaScript so unique and how, to begin with, a new language? Also, you’ll learn the essential tools in JavaScript, other key languages to consider and errors you need to keep an eye out for.

4. JavaScript: The Definitive Guide: Activate Your Web Pages

The name “O’Reilly” starts to get more visible when browsing E-books or books on a programming language. Those who are sufficiently well versed with the basics, they can use this book as an excellent guide. It is considered akin to the Bible for JavaScript by many readers. The 6th edition has many chapters that have been edited and redesigned to make the reader familiar with today’s best web development practices. It has even chapters adhering to concepts related to HTML5 and ECMAScript 5. For advanced programmers willing to learn more about JavaScript, this book is a really excellent recommendation.

5. You Don’t Know JS Series

No matter how well versed you are in JavaScript, chances are there are some concepts that might not have been covered in other books. You Don’t Know JS Series covers the trickier aspects of the language assiduously. Features and performance techniques such as Web Workers, Generators and Promises helps you create single page web applications. This book will help you explore all the old and new ways of handling asynchronous programming and understand how callbacks allow a third party controls the execution of your program. Also, you’ll use generators to async flow in a synchronous and sequential fashion.

6. Learn JavaScript VISUALLY

If you are someone who knows a little bit about HTML and CSS and now wishes to learn JavaScript, you’ll find this book incredibly helpful. Also, if you are someone who cannot focus on reading technical texts for long and need to start slow, this book needs to be added in your library. Even if you are a parent who wishes to tutor your kid for JavaScript, you can go ahead with this book. The colored illustrations help you retain a lot of the chapters since images and graphics are harder to forget compared to written chapters in black and white. This book will teach you how to read and write codes in JavaScript like any other book on the subject. But also the syntax, vital concepts, programming technology, and challenging exercises.

7. Head First JavaScript Programming: A Brain-Friendly Guide

The book entails fundamental concepts to advanced topics such as functions, objects, along with the browser’s document object model. Not just inky words but games, solving mysteries and puzzles, and innovative ways to use Java. Start building your own web applications in no time with this book! 
Learn the inner details of JavaScript and how it works with the browser. Also, get familiar with the power of functions and understand closures. The book gives a visually rich formatted design for your brain which helps you learn things a lot more easily, compared to a text-heavy book that might put you to sleep.

8. Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript

This book teaches the best practices and design. Even though being considered as a primitive book, most of the content is still useful to the developer community. With solid examples, 68 proven approaches help you in creating better JavaScript. To master JavaScript, you need to learn how to utilize the flexibility of the language and how to avoid its pitfalls.

Final Thoughts

There is no denying that JavaScript has made a universal present with few companies in the world existing without its uses. These books will surely serve as one of the best mediums to gain extensive knowledge about JavaScript. 
However, if you feel you have covered the fundamentals of JavaScript and you would need extra help to learn the more advanced versions of JavaScript, you can try out this tutorial of Advanced JavaScript for beginners.

Also, if you feel like we have missed some other popular E-books for learning JavaScript, feel free to share them with us in the comment section below.

What is CRM and why every Business needs it

“Do what you do so well they will want to see it again, and bring their friends”, said Walt Disney.

From product-centric to customer-centric mindset, whether your business is in traditional fields such as energy exploitation and agriculture production or in newly emerging fields such as e-commerce and ride-hailing, customer service has more and more been proven to be the key of a business’ longevity. The unwritten secret to success is to treat all customers as if your world revolves around them.

Staff members who have the privilege to meet customers face-to-face in your company such as market researchers, salespeople and PR executives could spend thousands of hours approaching, connecting and maintaining a relationship with your business’ customers.

Each file of a customer, including basic information their name, age, gender, education, career choice, likes and dislikes, geographic location and past encounters with your company, adds up to a gigantic database that is more valuable to your business strategy than anything else. You cannot understand your customers any better without your hard-earned database.

As a result, the organization of your database – how you manage to store and gain access to such data – is the hinge of your business understanding towards your dear customers. How to efficiently and effectively manage your customer database and customer relationship? The answer lies in CRM.

What is CRM

CRM stands for customer relationship management. CRM is a software system solution that gives business owners the freedom of managing and processing customer data so as to maintain your relationship with a large number of customers and to fetch customer insights that would further improve customer service.

Majority of market leaders chose to have their own CRM system customized for their company based on their unique demand instead of choosing a pre-built CRM platform since each business possesses different issues and organizational structures.

A CRM system built per request is beneficial to a business due to security reasons since it is a must to protect the confidentiality of customer data. A well-respected business is a business who pays great attention to customer private information and commits to not revealing such discreet information for profit reasons.

Unilever: The market leader had their own CRM system tailored named SAP CRM, which allows them to improve call center’s quick response and problem-solving.

”It enables faster response time to queries and needs raised by consumers, provides for effective maintenance of customer database, and gives easy access to customer information for analysis and strategy development”, Efren Samonte Commercial Director, Unilever Philippines asserted.

Zara: The ‘hotshot’ Europe-based fast fashion brand utilized their custom-made CRM to track customer preferences and sales. Each customer who ever made a transaction with Zara would have a profile including their birthday, phone number and past purchases. This makes maintaining a close relationship with customers’ super smooth for Zara since fashion buying is about understanding customers’ needs as if you – a business owner – is their close friend.

Zara’s CRM system was developed with a new feature called digital assistants or DAs which store customer input and allow designers to map out next season’s style and rebuy existing orders based on customers’ request.

Amazon: The e-commerce giant selected an Oracle-provided CRM system that specialises in customising the micromanaging data of each customer, setting up automated personalised marketing newsletters to each customer with recommended purchases, expanding purchase panel with more items that might be of customers’ interests, saving cache so that customers could avoid the hassle of re-logging personal information at every check out and customizing the interface of customer feedback segment.

How to choose the right CRM system for your business?

No matter what scale your business is, bear in mind what the best is for your business’ operations and progress tracking on a daily basis. We would like to give you some pointers in choosing the right CRM platform for your business.

Easy to use

Let’s be real. The ideal situation is all of your staff members come from the same or similar educational background and possess similar work performance, showing the same adaptability to new systems. Training time to get used a management system is also counted as the amount of investment you spend on a new project. So the less training time the better as long as your employees are fully ready and thoroughly understand the new system.

Mobile accessibility

A study on the difference between the usage in mobile applications and other smart devices in 2016 and 2017 featured on Harvard Business Review on May 1st, 2008 revealed a remarkable increase in visits from mobile devices (57% to 63%) and time on site from mobile devices (40% to 49%) over the course of a single year.

In addition, traffic from mobile devices reported rising swiftly from 2016 to 2018, respectively from 40% in 2016, 51% in 2017 and a full two-thirds of all traffic by the end of 2018.

Mobile access makes it easier to carry work tasks on the go and minimize the time of task response and problem-solving duration from the minute a complaint from a customer is filed till the problem is completely solved with the service satisfaction achieved.

Analytics

Nobody should invest a large amount of budget on a platform that only stores data and keeps it safe. Microsoft Excel can help you with that thanks to its thousands of convenient calculating features.

An efficient CRM system must be able to carry out more than that. It must possess the ability to cleverly gather, consolidate, analyze and extract analytical reports that can help you unveil helpful customer insights, trends, patterns and help you predict the outcome of your upcoming campaigns or suggest you take up a new marketing trend that suits your customers’ preferences.

Real-time data tracking

A mantra to chant every day as a business owner – Time management in business management is financial management. Managing time effectively is the smartest way of budget allocation. An instant report on the current performance of your campaigns on two separate niche markets can be generated on the spot if you adopt a custom-made CRM system.

The majority of e-commerce start-ups that are based in Ho Chi Minh City has acquired the real-time tracking feature, showing the performance of your campaigns and real-time interaction with the users, e.g: through visits, clicks, hyperlink clicks, likes, comments, time spent on site, etc… No better way to keep your customers close and your competitors even closer than keep tracking of the operation at any second.

Customization

“Walking on water and developing software from a specification are easy if both are frozen” – Edward V. Berard.

Each business entity functions as a whole person, therefore the business personality has to be flaunted in a suitable way that helps the system users relatable to the platform they will use on a daily basis.

Customization lies not only in sleek and chic interface design of the new CRM system but also in the entire user experience. The best service for your customers must come from a team of people who have the best “user experience” themselves. You need to have a taste of your own services in order to provide one for others.

How to build your CRM? Pre-built platforms vs. Custom-built system

Had a special idea for your own CRM system in your mind but not sure how to pull it off? Here are top 5 suggestions of CRM building tools.

Subscription fee of CRM systems

While bouncing off decisions whether to choose a pre-built or a custom-developed CRM system, bear in mind that not every pre-built CRM tool suits your requirements for a new system such as real-time data tracking, overall statistics reports and internal communication among company employees.

Especially if you are planning to have a new CRM system fully equipped for the complexity of workflow in a medium- and large-scale company, it is strongly advised you seek professional help from a software development company and work closely alongside a team of designers and developers until the final product is born.

That being the case, you can totally negotiate the pricing plan with a software development company since your desired CRM tool would only require specific features.

This, in turn, would be more economical than you might think, considering the fact pre-developed CRM tools can lure users into their 30-day free trial following a surprisingly low-budgeted pricing strategy providing abundant features that are not in your interest.
Adopting a new CRM system could be overwhelming if you have no clear objective set beforehand and a budget plan for this type of investment. Having observed the current marketing trends and consumer behavior, people at Designveloper offers insights into the upcoming trends in CRM.

Crucial Tips For Creating A Responsive Website

As I mentioned earlier, it’s the age of mobile devices nowadays. In fact, there are 6.8 billion people on the planet, 4 billion of them use a mobile phone and only 3.5 billion of them use a toothbrush.

How ridiculous it is! That’s why if your website doesn’t read well on those devices, it is possible to lose out on a huge chunk of potential customers. This is where responsive design can come into the picture and save your day nicely.

Good news is that creating a responsive website from scratch isn’t as daunting as it once was. Follow these crucial tips for a responsive site that actually works well and provides the flexibility it’s supposed to.

Keep things simple

One of the first and foremost principles to keep in mind when creating a responsive website: simplicity is the key to brilliance. Sometimes, web designers want to show off their excellence designing skills when creating a website. That’s not bad at all but when it comes to a responsive website, everything should be made as simple as possible. Also, 2016 is about minimalism and simplicity.

Remember that you are delivering the content to very limited space, there’s no room out there for you to clutter up.

Remove the unnecessary content

In order to make your responsive site really shine, simply bear one thing in mind: get rid of non-essential content. It’s not only for your user experience but also the website’s speed.

You know some content or elements of a desktop website are never meant to be used in its mobile version. Our goal is not to precisely reproduce the desktop website, but to offer the same experience to all visitors even coming in through their smartphone or their tablet.

Take the sidebar as an example, it’s a fundamental element of desktop web design, but it can clutter up the limited space of mobile screens.

Always prioritize mobile devices

Because mobile is becoming more relevant than desktop, you should always focus on the way visitors interact with your website by using their mobile phones first. Then build out your design for larger screen size. This will ensure the best possible user experience across all platforms.

Make your images flexible

Everyone already knew that one of the drawbacks of responsive design is a slow loading time. But not all of them know the main reason behind a slow site is non-optimized images. So don’t let those images drag your responsiveness down.

You can make your images flexible in a variety of ways, but one of the easiest methods is using this little handy tool: Adaptive Image

One more thing, be sure to use GIF, JPEG or PNG-8 formats to limit file sizes and help speed up the website.

Make friend with Media Queries

For those who haven’t been acquainted with media queries yet, they are a feature of CSS3 that allow content to respond to different condition on a particular device. Media queries check for a device’s resolution, height, width, and orientation. Media queries come in really handy when creating a responsive website. They are extremely simple to use as well.

Make your website readable

Nothing is more frustrating than zoom in and out, up and down, right and left to read the content. So, make sure your website legible. Visitors always want convenience, not a challenge. Your text should be large enough and comfortable to read from a smaller screen. I highly recommend a text size of 16px, 1 em or 12 pt.

Final thought

These mentioned above are just some of the more important ones you can try out. And hopefully, by now you already had some ideas of how you can use these tips for your stunning responsive website.

How to create a custom Dialog by Angular material dialog

In this post, we will go through a complete example of how to build a custom dialog by using the Angular Material Dialog component.

This covers many of the most common-used cases that of the Angular Material Dialog, such as: common dialog configuration options, dialog layout options, passing data into the dialog, and receiving data back.

With a step-by-step tutorial like this one, you should code along as we are going to start with a simple scenario. Features will be progressively added one by one along the way and detailed explanation will be provided as well.

Step 1 of 5 – Declaring a Material Dialog body component

Before we use the Angular Material Dialog, we must import MatDialogModule first:

Notice CourseDialogComponent, it will be the body of custom dialog.

In order for the component to be usable as a dialog body, we can declare it as an entryComponent, otherwise, it will appear the following error while opening the dialog:

Step 2 of 5 – Angular Material Dialog: Creating and opening

With this in place, we are now ready to create our dialog. First, we can open a dialog from one of our components:

Ok let’s see what is going on here:

  • In order to create Material Dialog instances, we are injecting the MatDialogservice via the constructor
  • Then we are creating an instance of MatDialogConfig, which will configure the dialog with a set of default behaviors
  • We are overriding a couple of those default behaviors. For example, we are setting disableClose to true, which means that the user will not be able to close the dialog just by clicking outside of it
  • We are also setting autoFocus to true, meaning that the focus will be set automatically on the first form field of the dialog

Angular Material Dialog Configuration Options

The class MatDialogConfig allows us to define a lot of configuration options. Besides the two that we have overridden, here are some other commonly used Material Dialog options:

  • hasBackdrop: defines if the dialog should have a shadow backdrop, that will blocks the user from clicking on the rest of the UI while the dialog is opened (default is true)
  • panelClass: adds a list of custom CSS classes to the Dialog panel
  • backdropClass: adds a list of custom CSS classes to the dialog backdrop
  • position: defines a starting absolute position for the dialog. For example, this would show the dialog in top left corner of the page, instead of in the center:
  • direction: this defines if the elements inside the dialog are right or left justified. The default is left-to-right (ltr), but we can also specify right-to-left (rtl).
  • closeOnNavigation: this property defines if the dialog should automatically close itself when we navigate to another route in our single page application, which defaults to true.

An example of when we would like to set this to false is the Draft Email Dialog of an Email application like Gmail, where the email draft remains opened as we search for ancient emails.
The MatDialogConfig also provides the properties width, height, minWidth, minHeight, maxWidth, and maxHeight

Step 3 of 5 – Building the Material Dialog body

Let’s now have a look at CourseDialogComponent. This is just a regular Angular component, as it does not have to inherit from any particular class or implement a dialog-specific interface.

The content of this component could also be anything, and there is no need to use any of the auxiliary Angular Material directives. We could build the body of the dialog out of plain HTML and CSS if needed.

But if we want the dialog to have the typical Material Design look and feel, we can build the template using the following directives:

Here are the 3 main directives that we used to build this dialog:

  • mat-dialog-title: This identifies the title of the dialog, in this case, the “Angular For Beginners” title on top
  • mat-dialog-content: this container will contain the body of this dialog, in this case, a reactive form
  • mat-dialog-actions: this container will contain the action buttons at the bottom of the dialog

Step 4 of 5 – Passing Input Data to the Material Dialog

Dialogs are often used to edit existing data. We can pass data to the dialog component by using the data property of the dialog configuration object.

Going back to our AppComponent, here is how we can pass some input data to the dialog:

We can then get a reference to this data object in CourseDialogComponent by using the MAT_DIALOG_DATA injectable:

As we can see, the whole data object initially passed as part of the dialog configuration object can now be directly injected into the constructor.

We have also injected something else, a reference to the dialog instance named dialogRef. We will use it to close the dialog and pass output data back to the parent component.

Step 5 of 5 – Closing The Dialog + Passing Output Data

Now that we have an editable form inside a dialog, we need a way to pass the modified (or new) data back to the parent component.

We can do via the close() method. We can call it without any arguments if we simply want to close the dialog:

But we can also pass the modified form data back to AppComponent in the following way:

In the component that created the dialog, we can now receive the dialog data in the following way:

As we can see, the call to dialog.open() returns a dialog reference, which is the same object injected in the constructor of CourseDialogComponent.

We can then use the dialog reference to subscribe to the afterClosed()observable, which will emit a value containing the output data passed to dialogRef.close().