Category: Uncategorized

  • Configure fallback routes

    There’s a client-side route /products in your front-end application that displays a list of products for your shopping list. When you go to /products in your app by selecting the Products link, your browser’s address bar confirms that you’re at /products. When you refresh the browser while on this page, you want the app to refresh and display the products once again. However, without a fallback route, you see a 404 error stating the page can’t be found.

    You see a 404 error when you refresh the page because the browser sends a request to the hosting platform to serve /products. However, there’s no page on the server named products to serve.

    Fortunately, it’s easy to resolve this issue by creating a fallback route. A fallback route is a route that pairs all unmatched page requests to the server.

    Configure a fallback route

    Azure Static Web Apps supports custom routing rules defined in an optional staticwebapp.config.json file located in the app’s source folder. You can define a navigation fallback route in the navigationFallback object. A common fallback route configuration looks like this example.

    JSONCopy

    {
      "navigationFallback": {
        "rewrite": "/index.html",
        "exclude": ["/_framework/*", "/css/*"]
      }
    }
    sap s 4 hana training courses malaysia

  • Plan your Azure Static Web App

    Your ultimate goal is to host your app in Azure. Azure Static Web Apps takes care of provisioning all the necessary Azure resources for you.

    However, before your app can be hosted, you need something to build your app as you make changes. Those changes could be via commits or pull requests to your repository. A key feature of Azure Static Web Apps is that it sets up a GitHub Actions workflow to build and publish your application.

    When you create the Azure Static Web Apps resource, it creates the GitHub Actions workflow. The workflow is triggered immediately and takes care of building and publishing your app. The workflow is also triggered every time you make a change to the watched branch in your repository.

    Azure Static Web Apps

    There are two automated aspects to deploying a web app. The first provisions the underlying Azure resources that make up your app. The second is a GitHub Actions workflow that builds and publishes your application.

    When you publish your app to the web with Azure Static Web Apps, you’re getting fast hosting of your web app and scalable APIs. You’re also getting a unified build and deployment workflow provided by GitHub Actions.

    sap supply chain management scm training malaysia

  • Deploy code to App Service

    Now, let’s see how we can deploy our application to App Service.

    Automated deployment
    Automated deployment, or continuous integration, is a process used to push out new features and bug fixes in a fast and repetitive pattern with minimal impact on end users.

    Azure supports automated deployment directly from several sources. The following options are available:

    Azure Repos: You can push your code to Azure Repos, build your code in the cloud, run the tests, generate a release from the code, and finally push your code to an Azure Web App.
    GitHub: Azure supports automated deployment directly from GitHub. When you connect your GitHub repository to Azure for automated deployment, any changes you push to your production branch on GitHub are automatically deployed for you.
    Bitbucket: Due to its similarities to GitHub, you can configure an automated deployment with Bitbucket.

    sap wm warehouse management training courses malaysia
  • Create a web app in the Azure portal

    In this unit, you learn how to create an Azure App Service web app using the Azure portal.

    Why use the Azure portal?

    The first step in hosting your web application is to create a web app (an Azure App Service app) inside your Azure subscription.

    There are several ways you can create a web app. You can use the Azure portal, the Azure Command Line Interface (CLI), a script, or an integrated development environment (IDE) like Visual Studio.

    The information in this unit discusses how to use the Azure portal to create a web app, and you use this information to create a web app in the next exercise. For this module, we demonstrate using the Azure portal because it’s a graphical experience, which makes it a great learning tool. The portal helps you discover available features, add other resources, and customize existing resources.

    What is Azure App Service?

    Azure App Service is a fully managed web application hosting platform. This platform as a service (PaaS) offered by Azure allows you to focus on designing and building your app while Azure takes care of the infrastructure to run and scale your applications.

    Deployment slots

    Using the Azure portal, you can easily add deployment slots to an App Service web app. For instance, you can create a staging deployment slot where you can push your code to test on Azure. Once you’re happy with your code, you can easily swap the staging deployment slot with the production slot. All it takes is a few mouse clicks in the Azure portal.

    Screenshot of the staging deployment slot to test the deployments.

    Continuous integration/deployment support

    The Azure portal provides out-of-the-box continuous integration and deployment with Azure Repos, GitHub, Bitbucket, FTP, or a local Git repository on your development machine. You can connect your web app with any of the preceding sources, and App Service does the rest for you. It automatically syncs your code and any future changes on the code into the web app. Furthermore, with Azure Repos, you can define your own build and release process. A full process that compiles your source code, runs the tests, builds a release, and finally deploys the release into your web app every time you commit the code. All that happens implicitly, without any need for you to intervene.

    Screenshot of setting up deployment options and choosing source for the deployment source code.

    Integrated Visual Studio publishing and FTP publishing

    In addition to being able to set up continuous integration/deployment for your web app, you can always benefit from the tight integration with Visual Studio to publish your web app to Azure via Web Deploy technology. App Service also supports FTP-based publishing for more traditional workflows.

    Built-in autoscale support (automatic scale-out based on real-world load)

    The ability to scale up/down or scale out is baked into the web app. Depending on the web app’s usage, you can scale your app up/down by increasing/decreasing the resources of the underlying machine that’s hosting your web app. Resources can be the number of cores or the amount of RAM available. On the other hand, you can scale out your app by increasing the number of machine instances that are running your web app.In this unit, you learn how to create an Azure App Service web app using the Azure portal.

    Why use the Azure portal?

    The first step in hosting your web application is to create a web app (an Azure App Service app) inside your Azure subscription.

    There are several ways you can create a web app. You can use the Azure portal, the Azure Command Line Interface (CLI), a script, or an integrated development environment (IDE) like Visual Studio.

    The information in this unit discusses how to use the Azure portal to create a web app, and you use this information to create a web app in the next exercise. For this module, we demonstrate using the Azure portal because it’s a graphical experience, which makes it a great learning tool. The portal helps you discover available features, add other resources, and customize existing resources.

    What is Azure App Service?

    Azure App Service is a fully managed web application hosting platform. This platform as a service (PaaS) offered by Azure allows you to focus on designing and building your app while Azure takes care of the infrastructure to run and scale your applications.

    Deployment slots

    Using the Azure portal, you can easily add deployment slots to an App Service web app. For instance, you can create a staging deployment slot where you can push your code to test on Azure. Once you’re happy with your code, you can easily swap the staging deployment slot with the production slot. All it takes is a few mouse clicks in the Azure portal.

    Screenshot of the staging deployment slot to test the deployments.

    Continuous integration/deployment support

    The Azure portal provides out-of-the-box continuous integration and deployment with Azure Repos, GitHub, Bitbucket, FTP, or a local Git repository on your development machine. You can connect your web app with any of the preceding sources, and App Service does the rest for you. It automatically syncs your code and any future changes on the code into the web app. Furthermore, with Azure Repos, you can define your own build and release process. A full process that compiles your source code, runs the tests, builds a release, and finally deploys the release into your web app every time you commit the code. All that happens implicitly, without any need for you to intervene.

    Screenshot of setting up deployment options and choosing source for the deployment source code.

    Integrated Visual Studio publishing and FTP publishing

    In addition to being able to set up continuous integration/deployment for your web app, you can always benefit from the tight integration with Visual Studio to publish your web app to Azure via Web Deploy technology. App Service also supports FTP-based publishing for more traditional workflows.

    Built-in autoscale support (automatic scale-out based on real-world load)

    The ability to scale up/down or scale out is baked into the web app. Depending on the web app’s usage, you can scale your app up/down by increasing/decreasing the resources of the underlying machine that’s hosting your web app. Resources can be the number of cores or the amount of RAM available. On the other hand, you can scale out your app by increasing the number of machine instances that are running your web app.

    microsoft sharepoint certification training courses malaysia
  • Evaluate modernization options and opportunities for ASP.NET applications

    Imagine you’re an employee of a pizza company named Contoso Pizza. Your team maintains an internal application that’s written in ASP.NET MVC 5 and running on .NET Framework 4.8. Your manager has asked you to evaluate whether you should upgrade the application to ASP.NET Core.

    microsoft sql server certification training courses malaysia
  • Find and fix screen reader accessibility issues

    We discussed screen readers briefly in the “Accessibility and screen readers” unit. A screen reader does what the name implies: it reads the screen to you. Plus, it provides audible cues, context, and control to move through and interact with web applications and complex content.

    vmware certification training courses malaysia
  • Find and fix common visual accessibility errors

    Your users have various visual abilities. Someone who is color-blind might not be able to differentiate between colors or might have difficulty working with colors that are similar to one another. Other users might use zoom to enlarge content. Accommodating various visual abilities is an important part of accessibility.

    Contrast

    Ensuring adequate contrast makes it easier for everyone to read text content, interpret graphical elements, identify UI components, and notice when those components change state. People with low vision often have difficulty reading text, identifying buttons that don’t contrast with the background, or determining the state of UI components. The problems can be exacerbated if a person has a color deficiency that lowers the perceived contrast even further.

    Fortunately, contrast ratios can be checked programmatically. You can use the FastPass tool in Accessibility Insights for Web to perform contrast checking.

    microsoft windows server certification training courses malaysia
  • Find and fix form accessibility issues by using Accessibility Insights for Web

    One of the most important ways that users interact with web applications is by using forms to submit information. There are several important considerations in how you write your forms to make sure all of your users can move through, fill in, and submit them.

    The fundamental concept is to use HTML the way it was designed. Standard HTML form elements are built for accessibility, but it’s easy to unconsciously override accessibility features with the latest JavaScript library or overly clever CSS.

    Labels

    Every input tag on your forms should have an associated <label> tag to identify it. This tag is different from just putting some text on the screen next to the input element, because labels are programmatically associated with the input elements. For example, screen readers read the label text when the input element has focus.

    Selecting a label activates the input and makes interaction easier. It also helps users with touchscreen devices. Instead of looking for a tiny checkbox on a phone, users can just select the label.

    Here’s an example of an input text field with an associated label:

    HTMLCopy

    <label for="name">Name</label>
    <input type="text" id="name">
    

    Validation and error messages

    Required fields

    Let’s start with the simplest case: required fields. Rather than indicating these fields by using color coding or other custom UI elements, you can use the required attribute on the HTML input element. Screen readers can handle this attribute, and users on any browser see the required field interaction by using the standard UI for their platform.

    HTMLCopy

    <input type="text" id="name" required>
    

    If you want to include more visual design for required elements, you can use the CSS pseudo-selector. It’s fine to provide other styling, but using the required attribute provides accessible indication to all users. The following CSS style sets the border color for required text boxes to red:

    cssCopy

    input:required
    {
      border-color: red;
    }
    

    Input types

    HTML form elements offer comprehensive validation support for common input types. Rather than using custom JavaScript and HTML to show a date picker, for instance, you can just use this code:

    HTMLCopy

    <input type="date" id="birthday">
    

    This code provides a native date picker pop-up for the user’s browser and operating system. The date picker is tested for accessibility and it handles validation for you. There’s broad support for input types that used to require custom Regex validation, UI elements, and JavaScript:

    • Email
    • Date
    • Month
    • Week
    • Time
    • Range
    • URL
    • Color

    So now you can write less code and it’s more accessible. It’s a win-win!

    Tab order

    Users who move through your form by using a keyboard or screen reader rely on tab order. It works unless you have a complicated form design or are trying to do something too fancy. It’s hard to mess up tab order for most forms. However, it’s an important feature to test.

    You can test tab order by selecting the Tab key on your keyboard and checking the interaction. However, as we see in the next exercise, Accessibility Insights for Web can make this testing a lot easier.

    agile project management certification training courses malaysia
  • Find and fix form accessibility issues by using Accessibility Insights for Web

    One of the most important ways that users interact with web applications is by using forms to submit information. There are several important considerations in how you write your forms to make sure all of your users can move through, fill in, and submit them.

    The fundamental concept is to use HTML the way it was designed. Standard HTML form elements are built for accessibility, but it’s easy to unconsciously override accessibility features with the latest JavaScript library or overly clever CSS.

    Labels

    Every input tag on your forms should have an associated <label> tag to identify it. This tag is different from just putting some text on the screen next to the input element, because labels are programmatically associated with the input elements. For example, screen readers read the label text when the input element has focus.

    Selecting a label activates the input and makes interaction easier. It also helps users with touchscreen devices. Instead of looking for a tiny checkbox on a phone, users can just select the label.

    Here’s an example of an input text field with an associated label:

    HTMLCopy

    <label for="name">Name</label>
    <input type="text" id="name">
    

    Validation and error messages

    Required fields

    Let’s start with the simplest case: required fields. Rather than indicating these fields by using color coding or other custom UI elements, you can use the required attribute on the HTML input element. Screen readers can handle this attribute, and users on any browser see the required field interaction by using the standard UI for their platform.

    HTMLCopy

    <input type="text" id="name" required>
    

    If you want to include more visual design for required elements, you can use the CSS pseudo-selector. It’s fine to provide other styling, but using the required attribute provides accessible indication to all users. The following CSS style sets the border color for required text boxes to red:

    cssCopy

    input:required
    {
      border-color: red;
    }
    

    Input types

    HTML form elements offer comprehensive validation support for common input types. Rather than using custom JavaScript and HTML to show a date picker, for instance, you can just use this code:

    HTMLCopy

    <input type="date" id="birthday">
    red hat certified system administrator rhcsa malaysia

  • Accessibility and screen readers

    The web is an amazing place, and it’s best when everyone can participate. The first step in building accessible web applications is a basic awareness of the diverse ways that users interact with those applications.

    The importance of inclusive design

    When you’re developing a web app, it’s easy to get into a workflow of writing some code, testing it in a browser, fixing bugs, repeat, repeat, repeat. Unfortunately, this approach leads to web apps that don’t work for everyone.

    There are good reasons to consider accessibility in your web apps:

    • A substantial number of your potential users might have one or more impairments that require them to interact differently with web apps. Improving accessibility increases your potential user base.
    • Web apps are now under many legal requirements for compliance with web accessibility standards. Failure to incorporate accessibility into your development methodology can result in legal and financial penalties.
    • Accessibility is a human right. Helping others to gain full access to the internet is the ethical thing to do.

    We don’t all browse the same way

    Web developers often focus on conventional browser-based interaction, but many users access applications in different ways.

    Screen readers

    One of the best-known accessibility tools is a screen reader. Screen readers are commonly used clients for people with vision impairments. They’re built into most operating systems.

    At its most basic, a screen reader reads a page from top to bottom audibly. If your page is all text, the reader conveys the information in a similar way to a browser. It’s rare that webpages are purely text; they contain links, graphics, color, and other visual components. Care must be taken to ensure that a screen reader can correctly read this information.

    Visual impairments

    Visual ability is a spectrum. Some users require, or prefer, an auditory experience. Many prefer a visual experience but might encounter issues with small text or contrast.

    Input devices

    Developers commonly consider keyboard, mouse, and mobile touchscreen interactions in web apps. However, these devices are just some of the ways that users interact with computers and web apps. Other modes include ergonomic keyboards, chording keyboards, voice interaction, eye tracking, and head tracking.

    The web is an accessible platform

    All this information might seem a little daunting. Fortunately, HTML and web standards are designed for accessibility. In many cases, when you follow web standards, your web apps “just work” in various accessibility scenarios or require minor modification.

    angular training courses malaysia