Categories
Entrepreneurship Software

Software Developer Shortage in Finland [Updated]

If you’ve worked anywhere near the tech industry during the last few years, you must have heard about the software developer shortage by now. The Helsinki Times reported a significant skills mismatch between Finnish IT companies and the domestic workforce. Developers with the right skills for the job are scarce in Finland. Many know obsolete technologies from 10 or 15 years ago.

The issue isn’t limited to just Finland. Other Nordic countries have the same problem — there’s just an abundance of software development jobs with few takers.

There are a few reasons why this is happening. Let’s dig in.

Time and time again companies have trusted us as a software development provider. Read more about some of our projects and find out why.

Lack of software developers graduating

Currently, roughly 1,100 students graduate from Finnish universities with graduate degrees in the ICT field every year. Out of these, only about 300 specialize in software development. Subtract 1,000 developers who retire every year, and the numbers get pretty grim.

It does not help that women are grossly underrepresented in the ICT field. According to Statistics Finland, only about a fifth of ICT students were female in 2016, which is the lowest female-to-male ratio in all the fields in Finnish universities.

Writing code is not for everyone

It’s no secret that software development is not for everyone. Almost anyone can “learn to code,” but that usually means taking a basic course of a single programming language.

To actually work in the field is a different matter altogether. A software developer usually has to be proficient in several programming languages, know how databases work and what it takes to integrate different technologies with each other. It’s a process that takes time, dedication, and a willingness to constantly grow and learn. Not everyone is cut out to be a programmer. Sometimes it’s hard, frustrating, methodical and highly abstract.

Read also: Industries that grow faster amid the pandemic with the help of digitalisation

Writing code is not for everyone

Constant reskilling

It’s no accident that when you think about software developers you likely imagine a young person writing code on a sleek modern device. The software industry has pushed this image attempting to be trendy.

Software developers have to keep learning new things constantly as new platforms launch or new programming languages become the industry standard. To quote a former developer: “relearning the skills you need to perform well at your job gets a bit tiresome after you’ve done it a dozen times.” This trend often leads to the more senior developers moving to managerial roles or doing consulting work. In effect, retiring from writing code.

In the case of Finland, there are plenty of experienced former developers who have moved to managerial positions or entrepreneurship. They know the ins and outs of what it takes to develop world-class digital products. So, they’re eager for new software development talent to join their teams. Here lies the greatest risk of the current developer shortage. What if the next Nokia or Supercell ends up spending their resources fighting to find the right talent, instead of focusing on their core business?

Constant relearning

How do you solve a problem of this magnitude?

Obviously, it would be great to increase the number of people studying in the ICT field and focus on software development. But that’s a generational goal. Training developers takes time, and time is what the developer recruitment market in Finland just does not have. What we can do, however, is learn from the countries that have noticed the needs in fields like software development before we even knew about them.

Poland stands out as a great example. Since the political shift to a free market, Polish universities took a hard look at revising curriculums with the new possibilities of an open market in mind. The fruits of that labor are visible today, with as many as 15,000 ICT professionals graduating every year. This volume of graduating software development professionals can help offset the needs of Nordic countries, with nearshoring being the most common approach.

Developers’ shortage in Finland in 2022 [Update]

The shortage of IT professionals continues to be a much-discussed topic in Finland. A prominent evening newspaper in Finland, Taloussanomat, has published an article addressing the issue and explaining what companies are doing to attract IT experts. The list included competitive salaries and benefits as well as training programs which more and more companies are looking into.

Attracting and hiring Finnish IT professionals isn’t the only solution companies are exploring. According to a study mentioned in the article of the technology industry published in November 2021, at least 95 percent of IT companies have at least planned to recruit from outside Finland.

“Espeo Software has been doing this since its establishment in 2008 – it combines Finnish market knowledge with the best software developers in Poland. The latest forecasts show that the demand for software developers is growing all the time. It is estimated that there is a shortage of up to 14,000 developers in the IT sector in Finland. If we consider the situation in Poland, where 15 000 new IT workers enter the market each year, the need on the Finnish market could be satisfied within a year by new Polish developers.” explains Aki Inkeroinen, Managing Director of Espeo Software Finland.

“Espeo’s continuous and efficient recruitment focuses on hiring only the best in the industry in Europe. During 2021, we have screened and hired the top 50 senior developers among more than 1,000 software developers.”, Aki says and continues, “This is how we can guarantee our customers senior-level expertise, at a competitive price. we always invest in tracking best practices and our app developer code is always evaluated by another app developer. Thanks to efficient teamwork, we are able to produce high-quality code, for which we always recommend integrated testing.”

With 14 years on the market, we have gained valuable expertise in various areas. Read more about what we excel at.

In summary

Yes, the situation is pretty bad. We are playing a game of musical chairs with way more chairs than players. And that’s no fun for anyone. But there is light at the end of the tunnel. Universities and governments are waking up to the fact that new talent needs to be nurtured in the education system. And while we wait for the surge of fresh talent to our local markets, there is always the option which takes most recruitment worries away — team leasing.

Using in-house talent to coordinate a project combined with outsourced team members is not a hassle. Remote working tools and highly communicative developers makes this work easy. Planning a software development project in the age of agile development may actually be easier now. With a partially outsourced team, companies can focus on the actual work instead of struggling to recruit. Scaling projects up or down becomes faster too — reducing costs overall. See our customer success stories here.

Want to start a new project with us? Let us know using the form below!

Categories
Software Technology

Test management tools: pros and cons of the best ones to use

Software development and delivery have to keep up with ever-increasing user demand for speed. Testing processes have to keep up right along with it. The question is – can testing prevent from missing major defects and making mistakes? Certainly yes, especially thanks to using the right test management tools that can effectively reduce the number of bugs that are overlooked.

What are test management tools?

Before I get into why you need a test management tool, let me explain what test management tools are. Software development teams use test management tools to keep all the things they need to manage, plan, run, and report tests. There are many different test management tools out there, but most of them facilitate both manual and automated test management. Many of these tools also allow you to manage test environments. In addition to planning, managing, auditing and running tests, test management tools also play another key role — they’re an efficient repository for defects that must then be managed.

To decide on a tool, carefully consider your needs.

First of all, you shouldn’t choose a tool for everything. Just because a tool has the most options doesn’t mean it will also work for your project. Sometimes it’s worth choosing something simpler, easier to implement and cheaper. Focus on achieving a real benefit for you and the team developing your application.

So what should you think about when deciding which test management tool to choose?

  • Number of target users
  • Ease of implementation
  • Integrations with other tools supporting software development
  • Test case grouping
  • Task monitoring
  • Visual reporting and analysis
  • Integration with frameworks and automated tests
  • Continuous integration
  • Ability to import/export files
  • Storage plan
  • Traceability matrix
  • Integration with API tests
  • Support
  • Price

It’s not accidental that I mention the price at the end. The price is a relative concept and depending on your needs, the amount you pay for the tool may turn out to be too high or just right for other projects.

Of course, your requirements may change. Therefore, when choosing a tool, you should also take into account the ease of changing or adding new modules.

Reasons to implement test management tools

So if you’re not already using test management tools, here are some reasons why you should consider implementing some.

First, you want to improve the quality of your software. If you’re reading this article, it means that you want to ensure the quality of your application. By providing high-quality software, you meet the needs and requirements of your application users. This is probably one of your most important goals. Test management tools are a great support for project teams and avoid missing errors that have been saved “somewhere in the excel file.”

Human error, especially software development errors, are inevitable. Fortunately, test management tools make it easy to cover as much of your application functionality as possible. Imagine working without the right test management tool. You save all errors in a text or calculation file. People at different levels in the organization can run on the same file at the same time. They can simultaneously edit this file, add data and delete it. In this case, there is a high probability that testers will miss a critical error or a critical test.

On the other hand, such tools will allow you to avoid repeated testing of the same errors by preparing clear and accurate documentation. Accurate documentation saves the team a lot of time to identify where the error occurs in the application and facilitate its reproduction.

Because you want to be up to date with everything. Building software isn’t all about code writing and testing. Creating software includes development, design, programming and testing. Reports on the current situation at every stage of software development allow for a quick reaction and possible transfer of forces to the right place. Reports on previous tasks are equally important. When building an application, it often happens that you have to go back to previous documentation or encountered errors
because you want to know what tests were carried out and when.

A test management tool will allow you to view the tests at every stage. By understanding the testing stage of your project, you can make key decisions more easily. A thorough analysis of the tests carried out will allow you to find out at what stage your project is. It may happen that on this basis you want to speed up or delay the release of the current version of the application because you want to increase the efficiency of the team and avoid repeating the same work.

In poorly managed projects, it happens that several people do the same job, or one person does something they did last week and has already forgotten about it due to the sheer volume of work. Avoiding repetition will allow your team to be more productive and efficient, especially if the project uses an agile approach. Test management tools allow you to automate many processes, which reduces the time needed to perform more important tasks because you want to manage access to documents, reports and want your project and test data to be safe. Test management tools have the ability to grant permissions to users for different levels. Thanks to this, you can be sure that only the right people have access to the right data. Below, I propose three interesting test management tools.

Download our resource and learn how to set up the ROI for testing services and what are the main reasons why not to skimp on it

PractiTest

PractiTest is a SaaS quality management tool. This tool is among the most advanced and functional test management tools available on the market.
It integrates with bug tracking tools like JIRA, Pivotal Tracker, Redmine ora Bugzilla, as well as various automation tools like Selenium or Jenkins. PractiTest API allows you to further customize the tool to your needs.

PractiTest is one of the most secure test management tools on the market today. The PractiTest support team is renowned for providing great support

Pros:

  • Reuses existing tests and compares the results with previous trials
  • Detects and prevents duplicate issues
  • Enables graphical visualization of reports
  • Reports errors directly from email
  • Integrates with automation tools and C
  • Manages tests and requirements seamlessly
  • Manages tests based on cycles and sprints
  • Integrates with Slack

Cons:

  • Pricey
  • No SDK feature to support mobile app testing
  • No Mobile App
  • Only a cloud-based option

TestRail

TestRail allows you to manage your tests in real time. It works great in both small and very large teams. TestRail works both on a local server and in the cloud. It also integrates seamlessly with bug tracking and test automation tools.

Pros:

  • Document test cases with full details
  • Tracks the time spent on performing individual tests
  • Allows detailed filtering
  • Tracks the resources and time commitment of the team
  • Creates a coverage report from performed tests
  • Offers an open API

Cons:

  • No automation support or selenium integration
  • No mobile app
  • No defect management module
  • Doesn’t detect and prevent duplicate issues
  • No Slack integration
  • Doesn’t report issues directly from emails

XRAY

XRAY is a Jira add-on for test managment. All test management and testing happens on Jira. One major pro is that the tool is budget-friendly. XRAY enables testing in accordance with the assumptions of BDD and seamlessly integrates with automation tools and devops using the API. It is the most functionally limited of the tools I propose, however. It can’t manage requirements and user stories.

If you’re looking for a tool that relies entirely on Jira, then XRAY is a decent choice. XRAY already has 4,000 customers in 65 countries. It is the fastest-growing application for Jira.

Pros:

  • Has traceability between requirements, tests, defects, executions
  • Organize tests in folders and test sts
  • Tracks progress with test plans
  • Allows you to write test scenarios in BDD in Jira
  • Integrates with automation frameworks (Selenium, JUnit, Robot)
  • Provides REST-API
  • Integration with CI
  • Budget friendly

Cons:

  • Doesn’t detect and prevent duplicate issues
  • No slack integration
  • Doesn’t report issues directly from emails
  • Doesn’t manage requirements and user stories
  • Doesn’t have an external dashboard

Conclusion

The fact is that test management tools make it very easy to manage the development process of both simple and the most complex software. Most of the tools on the market are designed to integrate with other tools that you may be using today. If you want your processes to be even more efficient, flexible and at the same time absorb the least financial resources, then a test management tool is a must for you.

See also:

Categories
Blockchain Software Technology Uncategorized

Data Visualization best practices in web and mobile Apps

Want to make data visualization the core feature of your next app? Then you are on the right track because data visualization improves user engagement and increases conversion rates. However, in the mobile age, data visualization must be powerful, but simple.

Rather than ‘peering at details,’ data visualization lets us comprehend the substance of our data, and we’re smarter because of it. In this article, we’ll walk you through the best practices and present the best data visualization examples that improve user engagement and increase conversion rates. By the end of it, you’ll have a better understanding of the do’s and don’ts when it comes to data visualization for mobile apps.

Table of contents:

  1. The worlds of data visualization
  2. Why is data visualization important?
  3. Data Visualization Best Practices
  4. Common Mistakes
  5. Benefits of Good Data Visualization
  6. Conclusion

The two worlds of data visualization

Before the emergence of smartphones, data visualization’s home was the desktop, usually delivered through browsers and thick-client applications. But, when viewed on smart devices, data visualizations in PC-specific apps are difficult to read, navigate and use.

So, what does this mean for designers who are considering implementing data visualization? Creating data visualizations that work well within the constraints of mobile devices — screen size, resolution, and lighting conditions — requires thought and testing. While multiform device compatibility can be a very challenging task for designers, we’ve accumulated enough experience now to cope with it. This article takes a mobile-first approach and explores the best practices for data visualization design in mobile apps, and points out the most common pitfalls. It will assist you in making another critical decision in application development, in addition to selecting a platform or picking a strategy for avoiding frequent performance concerns.

Find out more about our expertise.

The Two Worlds of Data Visualization: PCs and Smartphones

Why is data visualization important?

Knowledge of data visualization software and programming libraries has become a requirement for many design and development jobs today. Websites and mobile apps alike complement their blogs and stories with infographic and multimedia content that follow the best design standards. All this suggests that web and mobile data visualization are becoming increasingly important for contemporary apps. Why is it so?

We have noted that good data visualization comes with some benefits in terms of user engagement, better information processing, and interactivity. Let’s put this into context.

Data visualization enables users to quickly recognize patterns in data and draw actionable insights that would otherwise go unnoticed.

Data presented in plain text is often harder for users to understand because of the mental effort needed to compare multiple disconnected data points. The task becomes even harder if users have to dig into large volumes of historical data. Data visualization solves this by making key trends and patterns in data directly observable. For example, looking at a stock price plot or a balance graph in an investment or banking app (see the image below). The user gets an immediate understanding of fluctuations and trends.

Data visualization

 Figure #1 Investment Portfolio Simulation

Data visualization is more comprehensible than raw data.

Modern data visualization libraries, like D3.js created by Mike Bostock, are widely used to deliver the infographics of online media and enable sophisticated user-interaction with plots and graphs. For example, hovering over a state on a map of the U.S., the user may see voting results, crime rates, or other information that’s of interest.

Interactive features allow thousands of data points to fit into simple representations while making the overall dynamics available to the user as an experience.

data visualization in an app

 Figure #2 Election results app

In the age of social media and Web 2.0, users are more attracted to multimedia data.

Plain text and limited interactivity were the hallmarks of the Internet in its early years. However, with the advent of Web 2.0, users got used to multimedia communication rich with images, gifs, streaming videos, and audio. Visual content has already become the central tool of communication in social media via sharing photos, memes, gifs, etc. Therefore, web and mobile users more than ever expect to consume information in the visual form (see the image below).

data visualization graph

Figure #3 Data Visualization App for tablets

Data visualization simplifies application management and control.

With the development of internet of things devices and online trading, mobile apps are turning into important tools for controlling upscale systems, remote services and infrastructures. Whether it’s stock price performance or the sensors on an athlete, good data visualization helps monitor operations, optimize processes and make quick, well-informed decisions. In these use cases, data visualization is not only an option but a necessity within mobile apps.

data presentation in mobile app

Figure #4 The dashboard of the IoT App that visualizes data about shots made by basketball players

Data Visualization Best Practices

Designing appealing and usable dashboards, graphs, plots, and figures for mobile use is not a trivial task. Aside from following the general standards for visual representation and making sense of data — in a mobile context — designers also need to be aware of a whole series of possibilities and constraints characteristic of mobile technology. Below we present a list of the best practices for mobile data visualization.

Clear User Interface and Easy to Understand Data

Mobile app users typically see data visualization in a context that reflects the app’s navigation. For example, it’s clear to the user that if they visit a bank account balance page, the data displayed relates to income and expenses. For that reason, it’s good practice to simplify graphs to the bare essentials, omitting elements such as graph titles, axis labels, and other support components that might be expected in a PC or web app.

monthly payment breakdown

Figure #5 Minimalist mobile data visualization example

Interested in more tips for UI design? Check out Design category on our blog.

Leverage Mobile Device Capabilities

Leverage Mobile Device Capabilities
Figure #6 Google Analytics mobile and desktop apps

Depending on the screen orientation (portrait vs. landscape), designers should display different graphs to users. For example, a bar chart with a few data points may be more suitable for the portrait mode, whereas line charts would be preferable for the landscape mode. Also, as mentioned before, to fit mobile data visualization into smaller screen dimensions, graph designers can hide information from the user making it accessible when they hover or click on the graph element. These features make mobile devices a great place for interactive data visualization.

For example, zooming on a line graph can show the user changes in data over specific periods of time, allowing for a finer-grained look at the data over the last hour, for example. Isolating a data point from a graph does not only offer access to more detailed information but may be used to include specific actions and features like sharing data via social media or email. In the images above, we can see how these best practices are implemented in Google Analytics mobile and desktop apps. The data visualization for “audience” in the mobile app is simpler and more condensed than the desktop app’s rendition. It includes only the most relevant information and hides additional details about the number of new users, sessions, page views — unlike the desktop app, which manages to present all this data on one page.

Time and time again companies have trusted us as a software development provider. Read more about some of our projects and find out why.

User Controls for Touchscreens

Using touchscreen controls you can incorporate highly interactive elements into a mobile data visualization. For example, the user can touch the chart’s elements to see additional information, swipe graphs sideways to see its continuation, and zoom in to see the individual data points. All these features make it possible to create very interactive experiences – and this is still a fertile space for more design innovation and experimentation.

User Controls for Touchscreens

Figure # 7 Data visualization from the app created using ZoomCharts interactive data visualization library

Address UX Concerns of Mobile Users

Effective data visualization in mobile apps is adaptable to the different conditions in which people use their mobile devices. For example, people using their apps in bright daylight, and when using Night Shift (and equivalents), will prefer seeing graphs presented with more contrast. This is even more relevant for apps containing multiple data sets (e.g. charts with more than one line). If the ambient light is not optimal and the designer did not use sufficient contrast, the users won’t be able to distinguish separate lines with a similar hue.

Looking for more tips for UX and good UI design – read about UX Desing Trends to watch in 2018!

Address UX Concerns of Mobile Users

Figure # 8 Sales dashboard with multiple visualizations

Resolving Different Mobile OS Versions and Varying Screen Resolutions

To ensure that users of all Android and iOS devices see your graphs clearly, pick a well-tested data visualization library that abstracts the difference between various versions of the mobile systems, browsers, and hardware. Developers should choose mobile frameworks carefully, especially if they want to release cross-platform. Frameworks geared more towards one platform may disappoint the users of the other platform when it comes to the platform’s inherent differences in navigation and browsing. Also, mobile data visualizations profit from an adaptive and responsive layout design. The sizes of graphs, plots, and their additional details should change depending on the screen dimension and resolution. More graph details can be displayed on devices with bigger screens, while a simple display works better on smaller screens.

data in rows
mobile data visualization

Figure #9 Two examples of simple mobile data viz without textual and visual clutter

Hopefully, the tips above give you some simple best practices for data visualizations on mobile. To achieve an effective mobile data visualization, you should also be aware of the main things to avoid.

Common Mistakes

As previously mentioned, the key to effective data visualization on mobile is to make visualizations work and look great on small screen devices. The main design pitfalls, which may obstruct this outcome, are presented below.

poor data visualization

Figure #10 Example of poorly designed data visualization (too many blank sectors for some open jobs categories).

data presentation application

Figure #11 Another example of the poorly designed mobile data visualization (percentage data does not match the graph, the key depicts two colors for two lines but the graph has only one)

Lack Of Typography Standards

One of the most common mistakes is the failure to apply a typography standard where information hierarchy is matched by appropriate font choices. Likewise, avoid text crowding as shown in an exaggerated form in the image above. Here the designer adds too much text labeling; details that would be better presented in a condensed form. This graph would also be harder to make interactive on mobile because the circle’s sections are too small to be used as clickable or tappable areas.

Failure To Control The Effect Of Other UI Elements On Graphs

If not designed properly, modals and popups used along with graphs may adversely affect the user’s ability to see and extract meaningful information from the visualization. To avoid this problem, test your data visualization UI carefully to see what elements may hinder user comprehension of your graphs.

Varying Device Forms Make Graphs Hard To Read

Mobile devices have different screen dimensions and resolutions. If the designer fails to make the graphs responsive using appropriate rules to resize, shrink, hide and move the content, users of some devices might not see the information properly. To avoid this, once created, the responsive design should be tested on different mobile devices, using solutions like the free Google Mobile Test, or tools that emulate different mobile devices and screen sizes such as BrowseEmAll.

Benefits of Good Data Visualization

If you get your data visualization designed following the broad advice above, you can expect to see healthy growth of your app’s popularity and its monetization. Good data visualization helps bring significant benefits to your app business, including:

Better User Engagement

Good data visualization can enable mobile app users to see connections in their data more efficiently improving their understanding and helping them to effectively manage their own needs. Data visualization in banking and investment apps, for example, can help users identify problems with their account, spending patterns, and identify areas for improvement. Even simpler, good graphs generate higher levels of satisfaction all of which stimulates increased user engagement with the app and its features.

Less Churn

A high rate of churn indicates your business is not serving its customers adequately. They may be willing to stop using the product because of its poor performance, bad UX, or the lack of useful features. Reversing a high customer churn rate can be accomplished by better data visualization, providing customers with actionable insights directly relevant to your product. Consumers will be encouraged to stick to your app if your data visualization creates positive outcomes, practically and emotionally.

Conclusion

Without a doubt, data visualization has become an essential tool in the current data-focused world. That said, designers should strap in for the ride as even faster technological advancements, driven by the evolving needs of users, will increase demands on data-visualization apps and their creators! Ultimately, data visualization adoption is set to gather pace in the next few years and become an indispensable part of managing our everyday lives in this digital age.

Read about our services in:

Categories
Software Technology

30 Angular tricks and tips to improve your application

Angular shortens development time for applications, reducing the time it takes to deliver custom software. Improving your app’s performance is vital to staying competitive and profitable. Here are 30 Angular tips.

Time and time again companies have trusted us as a software development provider. Read more about some of our projects and find out why.

  1. Define form parameters before Component definition. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    export const FORM_PARAMS = {
     status: 'status',
     classification: 'classification',
     note: 'note'
    };
    
    
    
    @Component({
     selector: 'app-preview',
     templateUrl: './preview.component.html',
     styleUrls: ['./preview.component.scss']
    })
    
    
    
    this.form = this.formBuilder.group({
     [FORM_PARAMS.status]: [false],
     [FORM_PARAMS.classification]: [null],
     [FORM_PARAMS.note]: [null, Validators.required]
    });
    
    
    
    this.form.patchValue({ [FORM_PARAMS.status]: 'status' });
    

    [/dm_code_snippet]

     

  2. Use renderer addClass, removeClass where possible. It will prevent too many change detection checks. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    // SLOWER
     
    collapseRow(rowIndex: number) {
     this.setRowCollapsed(rowIndex);
    }
    
    
    // FASTER
    collapseRow(event, rowIndex: number) { 
      this.setRowCollapsed(rowIndex);
      this.render.removeClass(event.target, 'arrowDown');
      this.render.addClass(event.target, 'arrowRight');
    }

    [/dm_code_snippet]

  3. Try to use get, set on Input() instead ngOnChanges. When you have many Inputs in the ngOnChanges, each “if” has to be checked. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    // SLOWER when many ifs
    ngOnChanges(changes: SimpleChanges) {
     const data: SimpleChange = changes.data;
     if (data && data.currentValue) {
       this.data = [...data.currentValue];
     }
     if (configuration && configuration.currentValue) {
       this.config = configuration.currentValue;
     }
    }	
    
    
    
    // FASTER
    
    
    
    public _config: Config;
    @Input('configuration')
    set configuration(value: Config) {
     this._config = value;
    }
    
    
    
    get configuration(): Config {
     return this._config;
    }
    
    
    
    _data: Data;
    @Input('data')
    set data(value: Data) {
     this._data = [...value];
    }
    
    
    
    get data(): any[] {
     return this._data;
    }
    

    [/dm_code_snippet]

     

  4. Use pipe when rendering content in ngFor. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    // Slower
     {{ render(row, column) }}
    
    render(row: any, column: string) {
     return YourService.render(row, column);
    }
    
    
    
    // Faster
     {{ row | render:column }}
    
    
    
    
    @Pipe({
     name: 'render',
    })
    export class RenderPipe implements PipeTransform {
     transform(row: any, column: string) {
       return YourService.render(row, column);
     }
    }
    

    [/dm_code_snippet]

  5. Specify baseUrl and module aliases (paths) to your compilerOptions to avoid any inconsistency when importing other files. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    {
     "compilerOptions": {
       "baseUrl": "src",
       "paths": {
         "@core/*": ["app/*"],
         "@assets/*": ["assets/*"]
       }
     }
    }
    
    
    
    import { Recruitment } from '@core/domain/recruitment';
    
    
    
    instead
    
    
    
    import { Recruitment } from '../../../domain/recruitment';
    

    [/dm_code_snippet]

     

  6. Add stylePreprocessorOptions to your angular.json file to avoid inconsistency while importing other files. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
     "projects": {
       "project-frontend": {
         "root": "",
         "sourceRoot": "src",
         "projectType": "app",
         "architect": {
           "build": {
             "builder": "@angular-devkit/build-angular:browser",
             "options": {
               "stylePreprocessorOptions": { // <--- add this
                 "includePaths": [
                   "./src/assets/style/scss"
                 ]
               }
             }
           }
         }
       }
      
     @import "variables";
      
     instead
    
    
     @import "../../assets/style/scss/variables";
    

    [/dm_code_snippet]

     

  7. Run npm outdated command or add npm-check once a month to keep your dependencies updated. It will definitely help you keep track of changes. It’s much easier to update Angular 5 to 6 than 4 to 6.
  8. Run npm audit command once a month to check if any of the libraries has any vulnerabilities. It will help you keep your app secure. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    if [[ $(npm audit | grep Critical -B3 -A10) != '' ]]; then exit 1; fi"
    

    [/dm_code_snippet]

     

  9. Use parent in form validation instead of this.form which may not be initialised while doing/performing custom validation check. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    // Correct 
    
    
    
    static validateEndDate(fc: FormControl) {
     const startDate = fc.parent.get(FORM_PARAMS.startDate);
     if (startDate.value) {
       const diff = fc.value - startDate.value;
       return (diff < 86400) ? { endDateInvalid: true } : null;
     }
     return null;
    }
    
    
    
    // Incorrect 
    
    
    
    static validateEndDate(fc: FormControl) {
     const startDate = this.form.get(FORM_PARAMS.startDate);
     if (startDate.value) {
       const diff = fc.value - startDate.value;
       return (diff < 86400) ? { endDateInvalid: true } : null;
     }
     return null;
    }
    

    [/dm_code_snippet]

     

  10. Keep route names as const. It will prevent accidental typos. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    export class ROUTE {
     public static readonly LOGIN = '/login';
     public static readonly RECRUITMENTS = '/recruitments';
     public static readonly RECRUITMENT_EDIT = '/recruitments/:id';
    }
    
    
    
    goToRecruitment($event, id: number) {
     $event.preventDefault();
     this.router.navigate([ROUTE.RECRUITMENT_EDIT.replace(':id', id)]);
    }
    

    [/dm_code_snippet]

     

  11. Start using webpack-bundle-analyzer. It will help you detect any fast-growing modules.In our case by mistake main.scss has been included in another file instead variable.scss. It has doubled the size of the bundle! [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    "scripts": {
       "bundle-report": "ng build --prod --stats-json && webpack-bundle-analyzer dist/stats.json"
    },
    93f72404-b338-11e6-92d4-9a365550a701.gif
    Gif Source: https://github.com/webpack-contrib/webpack-bundle-analyzer
    

    [/dm_code_snippet]

     

  12. Use browser Performance tests. 17ms rendering time means you use 60fps. Actions with fewer than 60fps and more than 30fps are ok. Any speed below 30fps makes the user notice the visualized slowdown of the application.
  13. Use the Augury chrome extension to track the current state of components.
  14. Prettier as code formaterTo prevent conflicts between tslint and prettier use the npm tool. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
     
    // .prettierrc
    {
     "printWidth": 140,
     "parser": "typescript",
     "tabWidth": 2,
     "singleQuote": true,
     "trailingComma": "all"
    }
    

    [/dm_code_snippet]

     

  15. Use trackBy in ngFor loops to optimize the re-rendering of iterable.trackByFn is a  function that defines how to track changes for items in the iterable. When items are added, moved or removed in the iterable, only those nodes that have changed are re-rendered.
    Example: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

     

    @Component({
     template: `
    • {{item.id}}
     `,
    })
    export class SampleComponent {
     constructor() {
       this.items = [
         {id: 1},
         {id: 2},
         {id: 3}
       ];
    

    [/dm_code_snippet]

  16.  Use a virtualized scroll list like e.g. CDK Virtual Scroll when you need to display a very large records collection. It will render just items that fit within ViewPort in the current scroll position, in comparison to rendering all items at once without virtualization.
    [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

     

    import { ScrollingModule } from '@angular/cdk/scrolling';
     
    @NgModule({
     ...,
     imports: [
       ...,
       ScrollingModule
     ],
     ...,
    })
    export class AppModule { }
     
    @Component({
     template: `
    • {{item.id}}
     `,
    })
    export class SampleComponent {
     constructor() {
       for (let index = 0; index < 10000; index++) {
         this.items.push({ id: index });
       }
     }
     trackByFn(index, item) {
       return item.id;
     }
    }
    

    [/dm_code_snippet]

  17. From Angular v9+, use ngZoneEventCoalescing flag to reduce the amount of change detection cycles while Event Bubbling.
    [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

     

    platformBrowserDynamic()
     .bootstrapModule(AppModule, { ngZoneEventCoalescing: true })
     .catch(err => console.error(err));

    [/dm_code_snippet]
    Example: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    platformBrowserDynamic()
     .bootstrapModule(AppModule, { ngZoneEventCoalescing: true })
     .catch(err => console.error(err));
    

    [/dm_code_snippet]

    Normally when we click on the button element, both “childrenFn” and “parentFn” are invoked, causing two change detection cycles. With ngZoneEventCoalescing flag set to true, there is only one change detection cycle to run. 

  18. Debugging Angular component in console
    1. Open browser developer tools.
    2. Select element in “Elements” tab
    3. Debug this element in console: ($0 – in this variable is selected element)

    Before Angular v9:[dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    const selectedComponent = ng.probe($0).componentInstance;
    selectedComponent.value = "New value";
    ng.probe($0).injector.get(ng.coreTokens.ApplicationRef).tick();

    [/dm_code_snippet]

    From Angular v9+:
    [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    const selectedComponent = ng.getComponent($0);
    selectedComponent.value = "New value";
    ng.applyChanges(myComponent);
    

    [/dm_code_snippet]

    From Angular v9+ it is even better to use this SB Angular Inspector.

  19.  Lazy loading in Angular – instead of loading a complete app, Angular loads only the modules which are required at the moment. It reduces the initial load time. 
  20. Always keep an eye on your Bundle Size. Depends on the scale of your project, in enterprise apps if your main.*.js file exceeds more than 0.5 MB, you may need to be aware. After your Angular app is deployed check if your cloud platform or CDN, hosts your bundles gzipped. In the network tab in the developer console in Response Headers, you should see the header: “Content-Encoding: gzip.” If you have your own server serving your app and it doesn’t implement gzip compression, you should definitely add those. 
  21. While you don’t need to validate or react on every single change of your FormControl, use updateOn: ‘blur’. Event callbacks will be executed on blur events. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    this.email = new FormControl(null, { updateOn: 'blur' });

    [/dm_code_snippet]

     

  22. Use Services for any Side Effects.It is a good place for any  HTTP requests, event handlers, time-based events. It reduces the complexity of the component and provides reusability to our codebase. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    @Injectable({
     providedIn: 'root'
    })
    export class UsersService {
     constructor (private http: HttpClient) {}
     
     getUsers() {
       return this.http.get(API_ENDPOINT);
     }
    }
      
    @Component({
     selector: 'app-component',
     template: '
    • {{item}}
    ',
    })
    export class AppComponent implements OnInit{
     constructor(private usersService: UsersService){
     }
     items = [];
      ngOnInit(){
       this.usersService.getUsers().subscribe(items => this.items = items);
     }
    }
    

    [/dm_code_snippet]

  23. Use the Angular CLI tool that makes it easy to create your application. With just one command you can generate whatever you want, use analytics, sets project configuration, and many more. Here are some useful commands.

    To generate component under desired path with sass style files: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

     

    ng generate component components/yourComponentName --style=sass
     
    Abbreviation:
    ng g c components/yourComponentName --style=sass
    

    [/dm_code_snippet]

    To see what files will be generated without creating them use flag: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    ng g c components/yourComponentName --dryRun=true

    [/dm_code_snippet]

    To generate without tests files: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    ng g c components/yourComponentName --skipTests=true

    [/dm_code_snippet]

     

  24. From Angular 6 on, with the help of @angular/elements package you can create custom native components (Web Components) that can be used outside of the Angular. This package provides polyfills to support browsers that don’t support Web Components.To get started, install the package in an Angular project with the following command: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    ng add @angular/elements --name=

    [/dm_code_snippet]

     

  25. Use an ErrorHandler from @angular/core to handle errors in your app. With this dedicated service, you can easily manage errors in your entire application. As a default, the service catches the errors and logs them to the console, but it can be extended by additional side effects, whatever you need. It is pretty easy to implement such a service: Simply create a file called e.g. error-handler. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    import { ErrorHandler } from '@angular/core';
     
    class MyErrorHandler implements ErrorHandler {
     handleError(error: any) {
       // do something with the exception
       super.handleError(error);
     }
    }
     
    @NgModule({
     providers: [{provide: ErrorHandler, useClass: MyErrorHandler}]
    })
    class MyModule {}
    

    [/dm_code_snippet]

     

  26. Add Aliases support to your project. If you think importing your components is ugly, try this. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    import { MyComponent } from '../../../../components/parent-component/my-component'

    [/dm_code_snippet]

    Specify aliases to your project folders in tsconfig.json file: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”markup” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    {
     "compilerOptions": {
       "baseUrl": "src",
       "paths": {
         "@components": "app/components",
         "@services": "app/services"
       }
     }
    }
    

    [/dm_code_snippet]

    And import your code in this way: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    import { MyComponent } from '@components/parent-component/my-component';

    [/dm_code_snippet]

  27. Preload your resources and routes to speed up your application.

    Angular has a preloading strategy implemented already in @anuglar/router module. It allows us to preload routes/links but also resources, modules etc. This process speeds uploading and rendering time of the resources, by preloading them to a browser cache. [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    class CustomPreloadingStrategy implements PreloadingStrategy {
     preload(route: Route, fn: ()=> Observable) {
         // ...
     }
    }
     
    RouterModule.forRoot([
     ...
    ], {
     preloadingStrategy: OurPreloadingStrategy
    })
    

    [/dm_code_snippet]

  28. Do you have a heavy computational function that slows your application down? From default JavaScript is a single-threaded language, so your heavy computations runs along with UI updates, but there is a remedy for it. With help of the Web Workers you can move your heavy non-UI algorithm to run on separate non-UI-blocking thread.Create file with your custom Web Worker (‘./myWebWorker.js’): [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    onmessage = function(e) {
     console.log('Worker: Message received from main script');
     const result = e.data[0] * e.data[1];
     if (isNaN(result)) {
       postMessage('Please write two numbers');
     } else {
       const workerResult = 'Result: ' + result;
       console.log('Worker: Posting message back to main script');
       postMessage(workerResult);
     }
    }
    

    [/dm_code_snippet]

    Then in your component subscribe on it: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]

    @Component({
     selector: 'app',
    })
    export class App implements OnInit{
     private output
     private webworker: Worker
     ngOnInit() {
         if(typeof Worker !== 'undefined') {
             this.webWorker = new Worker('./myWebWorker')
             this.webWorker.onmessage = function(data) {
                 this.output = data
                 console.log('Message received from worker');
             }
         }
     }
     runHeavyAlgorithm(firstValue: number, secondValue: number) {
         this.webWorker.postMessage([firstValue, secondValue])
     }
    }
    

    [/dm_code_snippet]

  29.  Use Pure PipesTo specify that your Pipe as “Pure” simply just set the “pure” flag in its configuration: [dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#eeeeee” theme=”dark” language=”javascript” wrapped=”no” copy-text=”Copy Code” copy-confirmed=”Copied”]
    @Pipe({
     name: "units",
     pure: true
    })
    class UnitsPipe implements PipeTransform {
    ...
    }
    

    [/dm_code_snippet]

    In this way any inputs passing through this Pipe is computed only once and cached, next calls with the same inputs will be skipped and returned the cached data.

  30. Remove all caret “^” and tilde “~” from your package.json. If you want your project to be stable and not to fail in the future you should stick to specific versions of packages you use.

Go to our expertise page and read more about what we excel at.