Quantcast
Channel: Infragistics Community
Viewing all 2223 articles
Browse latest View live

Announcing the new WPF XamDataGrid Control Configurator

$
0
0

If you're a customer of our Infragistics Ultimate UI for WPF controls, then you are probably already aware of our innovative new control configurators.  Configurators enable Infragistics customers to more easily learn and discover the control APIs because as properties or collections are changed at design-time, these changes are immediately reflected in the Configurator UI. The Configurators also have customized property window categories that group properties by feature.  The Infragistics Control Configurators are a giant leap forward in Visual Studio design-time tooling, providing you with an unparalleled experience and feature set.  Simply put, the control configurators are the gold standard of excellence for a design-time development experience.

With our initial release of the control configurators we supported the following controls:

  • XamBulletGraph
  • XamCategoryChart
  • XamLinearGauge
  • XamPieChart
  • XamRadialGauge

Since our first release, we have had a large number of requests for a control configurator for our most popular, and most complex control in the Ultimate UI for WPF product; the xamDataGrid.  The wait is over!  We are excited to announce the immediate availability of the new xamDataGrid control configurator.

As you know, the Infragistics WPF XamDataGrid is a feature-rich, high performing data grid that meets the needs of demanding enterprise line-of-business applications.  For new users the API and vast feature set can be overwhelming.  With the xamDataGrid control configurator, we make it dead simple to bind your data, add your fields and field layouts, and turn the most important features on and off with the click of a button.  When you're done adding the features you want, you simply hit the "Apply & Close" button and all the code will be generated for you.

Your next question is probably, "How do I get it?"

If you have already installed the Infragistics Control Configurators then you don't have to do anything.  The Visual Studio extension will be updated automatically via the Visual Studio Marketplace.  If you haven't installed the control configurators yet, you can download and install them directly from within Visual Studio or by visiting the Visual Studio marketplace.

If you are a WPF line-of-business developer, we strongly encourage you to investigateUltimate UI for WPF. Feature-rich controls, outstanding support, and design-time Control Configurators for visually configuring your controls, and let us know what you think.

The Infragistics documentation for the Configurators is here:

The Infragistics YouTube videos for the WPF Configurators are here:


Expert Opinions: Server-Side Rendering and Standards

$
0
0

As the web continues to evolve in 2018, developers need to know whether to rely on client side or server side rendering—or whether there’s a middle-ground approach. Our SVP of Developer Tools, Jason Beres recently had a chance to sit down with Stephen Fluin, Developer Advocate on the Angular team at Google.  This is the third of three parts of the conversation including the future of Native apps vs. PWAs, this post about Server Side Rendering, and one more with the Angular team’s advice for Enterprise Developers.

Jason Beres: In your keynote at Angular Connect, you talk about the benefits of server-side rendering. If I'm looking at things like search engine optimization, is there a benefit to using server-side rendering versus pure client side, or is there a negative effect? 

Stephen Fluin: It always depends on your audience. You should look at the specific situation, but for example, the Google web crawler is able to run JavaScript. So Angular applications, if you have the right polyfills, they will index perfectly.

Follow your routes. Navigate across your application. Get all your content index,  all that stuff.

Other search engine crawlers don't necessarily run JavaScript. So if those other search engines are important to you, then that's going to be a driver towards server-side rendering.

But the other thing I would look at is; do you have a share button in your application or do your users want to copy and paste your URL's and put them on Twitter or Facebook? Because those kind of scrapers, those web crawlers that social media platforms have also don't run JavaScript.

So being able to share a link and then have them by a single HB-request get out the bulk of your content and the images and things like that increase the connection to those platforms. And so that kind of also drives you to server-side rendering.

Then the last piece about it from my perspective is that it increases the perceived performance. I say perceived performance because technically you're actually slowing down the process with server-side rendering. By server-side rendering for users, you're giving them a fully rendered version of the application by HTML, because then the browser has to parse and then it bootstraps JavaScript and runs the application on top of that. And ultimately that's I think what enterprises are looking for.

It renders the page and then it renders the page with it. So if I look at every millisecond of performance, it's actually slower.

But because it's increasing the perceived performance, that's usually what matters.

Beres: I think a lot of the world was all server side rendering, then we came to client side rendering the last five to seven years, and it's interesting that you guys are, not going back to, but introducing a server side option in your framework.

Fluin: Yeah. Exactly. And for me, I give a talk at another conference called "What's up with the Web," because I find this really fascinating to watch how there's been a pendulum swing back and forth between client and server and right now the pendulum is swinging, or has swung far toward the client because experience is so key.

Every millisecond that I delay or interrupt my users I'm losing engagement. I can't quite come up with the number off the top of my head, but it's something like if you disengage a user or if you have them wait for a loading screen for more than four seconds, it's like a 60 or 70% chance they're going to disengage and go task switch, think about something else.

And so whether you're serving your employees and you're losing their focus or whether you're serving customers and you're losing their sales, these are both a really big deal.

BeresA lot of the discussions we have as a vendor delivering solutions like component libraries is around questions like; “Where's the web going? What's the best decision to make?” And there really is no standard, but I believe the good thing about Angular is that you guys are providing a more complete, prescriptive framework that developers can get behind. It’s like, “We're here. It's ready. It's primetime.”

You said at Angular Connect, "Thank you but we're sorry," to the folks that were using the beta versions and the RC versions. I think that's the right approach because you're building that trust, but now that you're on Angular 5, we're seeing more growth in Angular. And really it's because of the prescriptive guidance that you're pushing that gives a little bit of certainty and standardization moving forward.

And ultimately that's I think what enterprises are looking for.

Fluin: Yeah, I mean we're seeing huge growth as well. There are tons of production applications that launch every day using Angular, which is kind of really exciting to see all of our hard work paying off, kind of Angular coming back to the main stream so to say after the Angular JS to Angular 2 switch.

When it comes to stability, I really think that's key for developers, but at the same time we have to balance that with innovation. I really like how we've positioned ourselves for the future where we can keep you developing applications the way you learn. So you learn Angular and then you write applications one way. And then we can kind of automatically take advantage of the web as it continues to progress for you.

And I'll give a couple examples of this.

WebAssembly is a really cool new technology, but you shouldn't actually be shipping WebAssembly today for a lot of use cases.

But, as the Angular team, we're in a really unique position where if at some point WebAssembly makes sense for how you should be delivering all web applications, we could actually flip a switch and then instead of compiling down to ES5, we could be shipping WebAssembly. Then depending on bootstrapping, handling all the connected piece, all the dom communication for you and because we've had this platform approach, we're really uniquely positioned to do that.

And another example is the shift around ES modules. So ES modules have been a spec standard for a while. But they didn't actually exist in the browsers until basically this year. Like WebAssembly, it's maybe not the best idea today to try and ship an application with ES 2015 modules for search quality and for other reasons. But when that does make sense, or if there's a way for us to ship an application that automatically opts the user's modern browsers into those sorts of things for performance gains, we can do that for you because we're the ones handling the build tool chamber, the ones handling the bootstrapping for you.

I'm really, really excited to see the web continue to evolve and Angular developers being able to just turn a switch on or getting, receiving all these benefits automatically by default.

Beres: How do you see WebAssembly evolving in the next few years?

Fluin: I don't know. I think it's really exciting. We've almost gotten to a point where JavaScript was the assembly of the web, but obviously, WebAssembly's far more performant. I think it's going to evolve dramatically in the next couple years as we, as people start trying to use it. As they encounter all of the issues of cross-project compatibility, run times ... kind of permissions issues. We're going to have to work through all those things before every application, every site can take advantage of it.

Beres: For specific verticals, like financial services where they're building internal apps where every nanosecond counts, and performance is the primary goal.  So if dev teams can use any technology that will improve any type of performance, it could be interesting for them but I was intrigued when I saw WebAssembly a couple years ago at Google IO, and it's interesting to see that it's slowly making its way up the ladder, right.

Fluin: Yep. Exactly.

Beres: I mentioned Material earlier and there was a lot of talk about Material at Angular Connect. How do you see Material evolving or have do you see its use by Angular and other platforms over the years and is Material something that you guys are focused on? Or are you focused on other design languages as well?

Fluin: Sure. The Angular Material team is kind of focused on two things. First, they are focused on taking Google's Material Design philosophy and manifesting that philosophy as a set of usable components that give you the Material Design aesthetic kind of out of the box. If you add Material to your project, it's going to feel like a Material application. And that's really important for a lot of teams to have that from Google because we came up with Material design, we ship Angular, so having a default, “hey, I don't want to do any time thinking about my design.”

Beres: Like clarity. Use it and you get what you expect.

Fluin: Yep. So, Material ends up serving as kind of a great default, so to say. But then the other half of what they're doing is the CDK or the component depth kit which is designed to enable other people to build fantastic component libraries. It's really important to me at least that we have a healthy ecosystem of design philosophies, of approaches to component, of enterprise-grade solutions that solve the different problems. Material is never going to solve everyone's problems.

And so having us providing tools that help other component authors and vendors move faster, provide better quality user experiences, it's really their second mission.

I think if we look forward five years from now, that team is maybe still somewhat focused on Material, but they're also responsible for making all of the other component libraries successful.

Beres: What I hear a lot from our customers is, “Is it Material based? Does it work with Material?” So I think Material is getting that traction anyway because it's a beautiful stylized library, it has a beautiful look and feel.

Fluin: It feels very consistent across platform.

###

We’d like to thank Stephen Fluin for his time in this interview, and invite you to check out more of what he has to say over at the Angular Blog. To learn more about Infragistics’ support for Angular, check out our Ignite UI for Angular page. ICYMI- Here's part one of the conversation, and part three is available now.

Building your Company's 360 Dashboard with ReportPlus

$
0
0

We’ve all seen those dashboards.

A 360 dashboard can be very hard to build when you need to include information from different departments. It is especially difficult if the information is needed for a presentation; how to include all items within a single dashboard?

With ReportPlus, there is no need to.

The tool offers a clean interface with responsive, dynamic dashboards and widgets. The plus side? You can link a row or widget to a different dashboard very easily in all platforms (that is, Desktop, iOS, Web and Android). Not only can you access a new dashboard, but you can go back to the original dashboard with just one click. No third-party applications, no fuss.

Start with a basic dashboard

Choose the dashboard you want to start with. When presenting information, it’s important to remember your audience: while they might be interested in numbers, including all of them together might be overwhelming. Most of them will probably zone out while trying to absorb everything they are seeing; the rest will stop listening to anything you are saying.

The dashboard below is a sample of what a simple Company 360 dashboard might look like:

 ser

While you have valuable information on revenue, projects, customer satisfaction and downtimes, there is only a glimpse of each module.

Add dynamic interactions to your dashboard

While a simple, clean dashboard might be a good starting point, you will, sooner or later, need to include all the information you need. Here’s the trick: there doesn’t have to be one dashboard.

With ReportPlus, you can link more than one dashboard into a single one. Using one of the available ReportPlus actions, you can link a widget to another dashboard, or even to a URL. You simply need to enter the Widget Editor and choose what you want your widget to do:

Now, when you maximize the Projects widget of the initial dashboard, you will be looking at a dashboard with detailed information on your projects, including the assigned budget, the amount of open issues and risks, the team’s effectiveness, and other metrics.

But that’s not all…

Need more detailed information on each case? You can add a link to where the project information is kept in case there are any questions during your presentation, or if the dashboard is being forwarded to the attendees.

Why not give it a try?

This is only an example of how far ReportPlus can take your Business Intelligence experience.

Interested in trying this out? Try any of our ReportPlus platforms now, or contact us to see the wonders it can do for your team’s productivity!

Webinar: Getting Started on Xamarin.Forms with Powerful Tools from Infragistics Ultimate UI

$
0
0

NOTE: This webinar occurs on March 22nd at 2 PM JST (GMT +9).

Next webinar I am hosting is for Xamarin.Forms! Here comes a fun framework for mobile app development.

Webinar Agenda:

When developing native mobile applications, Xamarin is the best choice for building cross platform applications.

In this session, Daizen Ikehara, our Product Marketing Manager from Infragistics’ Japan Office, will present how Xamarin and Xamarin.Forms works with Visual Studio and Infragistics Ultimate UI for Xamarin.Forms Productivity Pack Tools (or you can install tools from Visual Studio Marketplace).

With these tools, you can jump start your Xamarin.Forms project and can use our powerful UI control sets for Xamarin.Forms.

In this webinar, you will learn:

  • The pros and cons of Xamarin and Xamarin.Forms
  • Overview of Infragistics Ultimate UI for Xamarin.Forms
  • How to jump start Xamarin.Forms projects with our Productivity Pack Tools

This webinar is best for:

  • .NET Developers interested in mobile application development with their skillset
  • Developers interested in Xamarin and Xamarin.Forms platforms
  • .NET Developers who would like to use Infragistics Xamarin.Forms UI controls

Technical Level

  • 100 - Basic

I am going to demonstrate our productivity tools for Xamarin.Forms, which allow you to jump start Xamarin.Forms development with your Visual Studio:

Register Now!

UXify 2018 – The Future of User Experience

$
0
0

Celebrate UXify 2018 – The Future of User Experience with the Infragistics team and special guests on Friday, April 7, 2017 from 11am – 5:30pm, with networking from 5:30 - 7:00pm.

Our sixth annual FREE user experience event brings together the community of academics, practitioners, technologists, and business leaders for a conversation about design, user experience, content strategy and development at Infragistics' ultra-sleek, central New Jersey headquarters. Lunch, snacks, and soft drinks will be provided throughout the day. 

It's an excellent opportunity to network, learn, share knowledge and gain new insights!

Register for UXify

 

2018 Presentations and Speakers

If ‘Everyone is a Designer’ Then Why Am I Here?

Darian O'Reilly, Senior UX Designer at Infragistics

 

What Do Design Skills Look Like in the Age of AI?

David Fisher, Product Lead at ustwo

 

Shifiting Dimensions: From 2D to Virtual Reality, the UX Designer's Journey

Lisa Lokshina, Principal User Experience Designer & Researcher at L3A Studio

Kristine Malden, Associate Director of Creative Strategy at Slab Design

 

The Next Generation of Project Management: Getting Results without Formal Authority

Justin Fraser, Senior Project Manager at Infragistics

 

The Future is Today

Tobias Komischke, Ph.D., Global Head of UX at Honeywell IT

 

Detoxifying Your Prototyping Process for Better Results

George Abraham, Senior Product Owner and Design Principal at Infragistics

 

AR, VR and MR: Where Are We Heading To?

Paulo Melo, Design Manager at SIDIA: a Samsung Research and Development Center in Brazil

Mauricio Sá Ribeiro, Product Designer at SIDIA

 

How to Design Complex Stuff You Don’t Entirely Understand

Rick Winslow, Head of Digital Innovation at Capital One Commercial Banking

 

Is it Time to Switch to Conversational UI?

Michael Eydman, Senior Consultant at ABME Corporation

 

Register for UXify

 UXify 2017 Conference

How to choose the best chart for your data

$
0
0

The amount of data at our fingers tips today can be overwhelming. How do you know what really matters? Data visualizations can help, but how can you set up your data to best visualize it? What chart will help you analyze and digest the data into actionable insights?

One struggle is that there are so many different chart types. How do know which one is going to bring the most meaning to your data? Are you measuring performance? Do you have 1 or many variables? Is your data time-based? Geospatial? How many data points do you have? Are you comparing different categories of data?

Kinds of Charts

There are 7 different types of relationships that chars are typically used to display:

  1. Nominal comparison: Display a series of discrete quantitative values so they can be easily seen and compared

 

  1. Time Series: Shows quantitative values that are associated with categorical subdivisions of time. Will help you to view trends over time in a sequential, chronological order

 

  1. Ranking: Shows individual quantitative values associated with a set of categorical subdivisions relate to each other sequentially by size. Data is displayed from Highest to Lowest or Lowest to Highest

 

  1. Part to Whole: Shows individual quantitative values associated with a set of categorical subdivisions related to the complete set of values (and each other). The common unit of measurement is a percentage.

 

  1. Deviation: Relationship of one or more sets of quantitative values differ from a primary set of values. The units of measure are actual units, ratio relative to primary value, positive or negative Ratios

 

  1. Distribution: Shows how a set of quantitative values are distributed across its entire range, from lowest to highest.

  1. Correlation: Display whether two paired sets of quantitative values vary in relation to each other. The correlation will show the direction and the degree, High or Low, Positive or Negative

Choosing Your Chart

When choosing a chart type is it best to keep 4 communication methods in mind.

1. Do you want to communicate a composition of your data?

A composition chart is designed to show different parts of information that make up a whole. Such as your total sales broken down by product line or sales rep.

Charts that best communicate a composition are:

  • Stacked Column / Bar: Changing over time, Few Periods, Relative & Absolute differences matter
  • Stacked 100% Column / Bar: Changing over time, Few Periods, Only Relative Differences Matter
  • Stacked Area: Changing over time, Many periods, Relative & Absolute differences matter
  • 100% Stacked Area: Changing over time, Many periods, Only Relative Differences Matter
  • Pie: Static, Simply show the share of a total
  • Waterfall: Static, Accumulation or Subtraction to total

2. Do you want to communicate a relationship between two data sets?

A relationship will show a correlation between two or more variables through the data you pull together. This can be used to show either a positive or a negative effect that the given variables have on each other.

 Charts that best communicate a relationship are:

  • Scatter: Two variables
  • Bubble: Three or more variables
  • Line: Two variables

 3. Do you want to communicate the distribution of your data?

A distribution chart is used to show the behavior of certain variable over time to help identify any outliers, normal tendencies, and a range of your information and trends.

 Charts that best communicate a distribution are:

  • Scatter: Two variables
  • Line: Single variable, Many data points
  • Column: Single variable, Few data points
  • Bar: Single Variable, Few data points

 4. Do you want to communicate compare different variables of your data?

A comparison chart is used for comparing one or more sets of data where you can easily show the minimum and maximum values of that set. This chart tried to fix each set of variables from the others and display how those variables compare. For example:

  • Column: Among items, One variable per item, few categories, many items
  • Column: Among items, One variable per item, few categories, few items
  • Column: Over time, Few Periods, Single or few categories
  • Circular Area: Over Time, Many periods, Cyclical Data
  • Line: Over time, Many periods, Non-Cyclical Data
  • Line: Over time, Few periods, Many categories

To try all of these charts, download a free trial of ReportPlus today!

How to do Conditional Validation on valueChanges method in Angular Reactive Forms

$
0
0

In this blog post, we will learn to use Angular Reactive Forms value change detection and enable conditional validation on basis of that.

Learn How to Create Your First Angular Reactive Form here

Let us say you have a Reactive Form created using FormBuilder class as shown below:

ngOnInit() {
    this.loginForm = this.fb.group({
      email: [null, Validators.required],
      password: [null, [Validators.required, Validators.maxLength(8)]],
      phonenumber: [null]
    });

  }

 You have created loginForm, which has three controls: email, password, and phonenumber. Here, you are using FormBuilder to create a reactive form. On the component template, you can attach loginForm as shown in the code listing below. Using property binding, the formGroup property of the HTML form element is set to loginForm and the formControlName value of these controls are set to the individual FormControl property of FormBuilder.

<form (ngSubmit)='loginUser()' [formGroup]='loginForm' novalidate class="form">     <input formControlName='email' type="text" class="form-control" placeholder="Enter Email" />     <div class="alert  alert-danger" *ngIf="loginForm.get('email').hasError('required') && loginForm.get('email').touched">         Email is required
     </div>     <input formControlName='password' type="password" class="form-control" placeholder="Enter Password" />     <input formControlName='phonenumber' type="text" class="form-control" placeholder="Enter Phone Number" />     <div class="alert  alert-danger" *ngIf="loginForm.get('phonenumber').hasError('required') && loginForm.get('phonenumber').touched">         Phone Number is required
     </div>     <br />     <button [disabled]='loginForm.invalid' class="btn btn-default">Login</button> </form>

We have also put error messages for email and phone number fields. Besides, that submit button would only be enabled when the form is valid.  Form submit is handled as shown in the listing below:

loginUser() {
    console.log(this.loginForm.status);
    console.log(this.loginForm.value);
}

 

If the form is valid in browser console, you will get the output as below:

In addition, if there is an error, submit button would be disabled and an error message will be shown as below:

You can learn to create Custom Validators for Angular Reactive Forms here

 Now assume a scenario that you have a radio button to send a notification. The user should able to select the send notification option, and on basis of that, certain FormControl will have some validation.

Consider the form below,

We have added a Send Notification option. If the user selects Phone to send notification then Phone Number field should be required, otherwise, it should not be. To achieve this we need to perform following tasks,

  1. Listening to changes
  2. Put conditional validation

 To start with, let us modify our form to handle the notification. So now form has a notification FormControl with the default value set to null as shown in the listing below :

this.loginForm = this.fb.group({
    email: [null, Validators.required],
    password: [null, [Validators.required, Validators.maxLength(8)]],
    phonenumber: [null],
    notification: ['email']
});

On the Reactive form template, we will add radio button group to handle Send Notification option.

<form (ngSubmit)='loginUser()' [formGroup]='loginForm' novalidate class="form">    <input formControlName='email' type="text" class="form-control" placeholder="Enter Email" />    <div class="alert  alert-danger" *ngIf="loginForm.get('email').hasError('required') && loginForm.get('email').touched">        Email is required
    </div>    <input formControlName='password' type="password" class="form-control" placeholder="Enter Password" />    <input formControlName='phonenumber' type="text" class="form-control" placeholder="Enter Phone Number" />    <div class="alert  alert-danger" *ngIf="loginForm.get('phonenumber').hasError('required') && loginForm.get('phonenumber').touched">        Phone Number is required
    </div>    <br />    <label class='control-label'>Send Notification</label>    <br />    <label class="radio-inline">        <input type="radio" value="email" formControlName="notification">Email
    </label>    <label class="radio-inline">        <input type="radio" value="phone" formControlName="notification">Phone
    </label>    <br />    <button [disabled]='loginForm.invalid' class="btn btn-default">Login</button></form>

At this point form, looks like below:

Subscribe to valueChanges

In Reactive forms both FormControls and FormGroups has a valueChanges method. It returns an observable type, so you can subscribe to it, to work with real-time value changing of FormControls or FormGroups.

In our example, we need to subscribe to valueChanges of notification FormControl. This can be done as below:

formControlValueChanged() {
    this.loginForm.get('notification').valueChanges.subscribe(
        (mode: string) => {
            console.log(mode);
        });
}

We need to call this an OnInit lifecycle hook a shown below:

ngOnInit() {
    this.loginForm = this.fb.group({
        email: [null, Validators.required],
        password: [null, [Validators.required, Validators.maxLength(8)]],
        phonenumber: [null],
        notification: ['email']
    });

    this.formControlValueChanged();

}

Now when you change the selection for notification on the form in the browser console you can see, you have most recent value.

Keep in mind that, we are not handling any event on the radio button to get the latest value. Angular has a valueChanges method which returns recent value as observable on the FormControl and FormGroup, and we are subscribed to that for recent value on notification FormControl.

Conditional Validation

Our requirement is that when notification is set to phone then phonenumber FormControl should be required field and if it is set to email then phonenumber FormControl should not have any validation.

Let us modify formControlValueChnaged() function as shown in the next listing to enable conditional validation on phonenumber FormControl.

formControlValueChanged() {
    
    const phoneControl = this.loginForm.get('phonenumber');
    this.loginForm.get('notification').valueChanges.subscribe(
        (mode: string) => {
            console.log(mode);
            if (mode === 'phone') {
                phoneControl.setValidators([Validators.required]);
            }
            else if (mode === 'email') {
                phoneControl.clearValidators();
            }
            phoneControl.updateValueAndValidity();
        });

}

 

There are a lot of codes above, so talk through line by line.  

  1. Using get method of FormBuilder getting an instance of phone number FormControl
  2. Subscribing to the valueChanges method on notification FormControl
  3. Checking the current value of notification FormControl
  4. If the current value is phone, using setValidators method of FormControl to set required validator on phonenumber control
  5. If the current value is email, using clearValidators method of FormControl to clear all validation on phonenumber control
  6. In last calling updateValueAndValidity method to update validation rules of phonecontrol

Run the application and you will see that as you change notification value, validation of phonenumber is getting changed,

 By using the power of Angular Reactive Form’s valueChanges method, you can achieve conditional validations and many other functionalities such as reacting to changes in the underlying data model of the reactive form.

Like this post?

If you like this post, please share it. In addition, if you haven’t checked out Infragistics Ignite UI for Angular Components, be sure to do so! They’ve got 30+ material based Angular components to help you code speedy web apps faster

How to dynamically create a Component in Angular

$
0
0

In this article, we will learn to create a component dynamically. You may need to load a component dynamically in various scenarios such as want to show a popup modal etc.

Let us assume that, we have a component as listed below, which we will load dynamically.

import { Component, Input } from '@angular/core';
 
@Component({
    selector: 'app-message',
    template: `<h2>{{message}}</h2>
`
})
export class MessageComponent {
    @Input() message: string;
}

To load MessageComponent dynamically you need a container. Let us say that we want to load MessageComponent inside AppComponent. We need a container element in the AppComponent.

Template of AppComponent is as below:

<div style="text-align:center">     <h1>         Welcome to {{ title }}!
     </h1>     <template #messagecontainer>     </template> </div>

As you see that, we have an entry point template or a container template in which we will load MessageComponent dynamically.

In the AppComponent, we need to import following:

  1. ViewChild, ViewContainerRef, and ComponentFactoryResolver from @angular/core
  2. ComponentRef and ComponentFactory from @angular/core
  3. MessageComponent from message.component

After importing required things, AppComponnet will look like following listing:

import {
    Component,
    ViewChild,
    ViewContainerRef,
    ComponentFactoryResolver,
    ComponentRef,
    ComponentFactory
} from '@angular/core';
import { MessageComponent } from './message.component';
 
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    title = 'app';
}

We can access template as the ViewChild inside the Component class. Template is a container in which, we want to load the component dynamically. Therefore, we have to access temple as ViewConatinerRef.

ViewContainerRef represents container where one or more view can be attached. This can contain two types of views.

  1. Host Views
  2. Embedded Views

 Host Views are created by instantiating a component using createComponent and Embedded Views are created by instantiating an Embedded Template using createEmbeddedView. We will use Host Views to dynamically load MessageComponent.

Let us create a variable called entry which will refer template element. In addition, we have injected ComponentFactoryResolver services to component class, which will be needed to dynamically load the component.

export class AppComponent {
    title = 'app';
    @ViewChild('messagecontainer', { read: ViewContainerRef }) entry: ViewContainerRef;
    constructor(private resolver: ComponentFactoryResolver) { }
}

Keep in mind that entry variable which is reference of template element has API to create components, destroy components etc.

Now to create component, let us create a function. Inside the function, we need to perform following tasks,

 

  • Clear the container
  • Create a factory for MessageComponent
  • Create component using the factory
  • Pass value for @Input properties using component reference instance method

Putting everything, together createComponent function will look like listing below:

createComponent(message) {
    this.entry.clear();
    const factory = this.resolver.resolveComponentFactory(MessageComponent);
    const componentRef = this.entry.createComponent(factory);
    componentRef.instance.message = message;
}

We can call createComponent function on click event of the button. Let us put two buttons in the template and call createComponent function on click of the buttons.

<div style="text-align:center">    <h1>        Welcome to {{ title }}!
    </h1>    <button (click)="createComponent('Welcome Foo ! ')">Welcome</button>    <button (click)="createComponent('Foo Again ?')">Not Welcome</button>    <br />    <template #messagecontainer>    </template></div>

In output, you can see that component is getting loaded dynamically on click of the button.

As you click on the buttons component will be reloaded with different message.  You can destroy a component using destroy method on the componentRef.

destroyComponent() {
    this.componentRef.destroy();
}

 

Either you can destroy dynamically loaded component by manually calling the function or put it inside ngOnDestroy() life cycle hook of the component, such that when host component is destroyed automatically dynamically loaded component will also destroy.

Putting everything together, AppComponent will look like listing below:

import {
    Component,
    ViewChild,
    ViewContainerRef,
    ComponentFactoryResolver,
    ComponentRef,
    ComponentFactory
} from '@angular/core';
import { MessageComponent } from './message.component';
 
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html'
})
export class AppComponent {
    title = 'app';
    componentRef: any;
 
    @ViewChild('messagecontainer', { read: ViewContainerRef }) entry: ViewContainerRef;
    constructor(private resolver: ComponentFactoryResolver) { }
 
    createComponent(message) {
        this.entry.clear();
        const factory = this.resolver.resolveComponentFactory(MessageComponent);
        this.componentRef = this.entry.createComponent(factory);
        this.componentRef.instance.message = message;
    }
    destroyComponent() {
        this.componentRef.destroy();
    }
}

At this point on running application, you will get an error because we have not set the entryComponents in the AppModule. We can set that as shown in the listing below:

import { AppComponent } from './app.component';
import { MessageComponent } from './message.component';
 
@NgModule({
    declarations: [
        AppComponent, MessageComponent
    ],
    imports: [
        BrowserModule
    ],
    providers: [],
    bootstrap: [AppComponent],
    entryComponents: [MessageComponent]
})
export class AppModule { }

This is all you need to do to load a component dynamically in Angular.

Like this post?

And there you have it! If you like this post, please like it and share it. In addition, if you haven’t checked out Infragistics Ignite UI for Angular, be sure to do so! They’ve got 30+ material based Angular components to help you code speedy web apps faster.


Infragistics Rounds Out 2017 with Awards from VSM, ComponentSource and SD Times

$
0
0

Before we close the books on 2017, we’re proud to announce that we ended the year with product awards from Visual Studio Magazine, ComponentSource, and SD Times Magazine.  

Visual Studio Magazine 2017 Reader’s Choice Awards

Infragistics products won gold, silver and bronze across six categories in the Visual Studio Magazine 2017 Reader’s Choice Awards. Readers vote for their favorite Visual Studio- and .NET Framework-related development tools and services in 36 categories. SharePlus Enterprise won Gold in the SharePoint Components and Tooling category, edging out the previous year’s winner in tight voting, according to VSM.

Infragistics products winning Silver were Ultimate UI for Windows Forms in the Component Suite: Desktop (WinForms, WPF) category, and Ultimate UI for Xamarin in the Component Suite: Cross-Platform (Windows, Mac, Linux, etc.) category. Bronze awards went to Ultimate UI for WPF in the Component Suite: Desktop (WinForms, WPF) category; Ignite UI for JavaScript/HTML5 and ASP.NET MVC in the Component Suite: Web (ASP.NET, HTML5, JavaScript, XAML) category; and Indigo Studio in the Software Design, Frameworks, and Modeling Tools category.

ComponentSource

Three Infragistics products were named to ComponentSource’s list of bestselling products for 2017: Infragistics Professional (formerly Infragistics NetAdvantage for .NET) at No. 7, Infragistics Ultimate at No. 20, and Infragistics Windows Forms at No. 46. The awards are based on 2016 sales figures by dollar value.

SD Times

Infragistics was one of eight companies awarded Best in Show for User Experience in the 2017SD Times 100 Software Development Awards. Honors go to companies with products “with tools and technologies that can win a user’s attention (and appreciation), regardless of device.”

Design Responsibly

$
0
0

Clients and users tend to appreciate the technical aspects of a design; the way the parts fit, the information architecture, the layout, the way it looks, how it meshes with expectations, the way it allows tasks to be accomplished. If they’re really attentive, they just might appreciate the way the design itself disappears, becoming part of the environment, unnoticed, supporting a users’ actions but never becoming more important than the action.

Philosophy and Vocation

I find it helpful to think about design as a philosophy rather than as a product, and a calling rather than a job title. Design is expressive. It moves us. Done well, design enables people to more completely become who they want to be. From kitchen utensils to complex scientific software, good design allows for the unhindered expression of human intention.

Our Responsibility

As custodians of design, we have a duty to positively affect the lives of others. I’m serious when I suggest that we should even have our own oath, “Do Only Good”, similar to the Hippocratic Oath, "Do No Harm”. After 27 years in this profession, I’ve learned that doing good isn’t always easy. It takes work, perseverance, and dedication to our craft. Even the best of intentions can be whittled away by compromises and self-interest. Constrained by the overlapping sets of user, business, and technical requirements, we may not always be able to design “outside the box,” but we need to always be thinking around the edges.

Beyond Deliverables

Our role in society, however, extends beyond our deliverables. Good work and satisfied clients are not enough. Our work has consequences. To borrow Alan Cooper's phrase, our goal should be to become “good ancestors.” We need to consider how our work impacts the broader, techno-social ecosystem. Will we be leaving the world better than we found it? This isn’t easy, and we certainly can’t know for sure. But striving to become a good ancestor should be a prerequisite for any designer who wants to be worthy of their title.

Design at Infragistics

Here at Infragistics Consulting, we pride ourselves on delivering thoughtful and useful design. Getting the job done isn't the same as getting the job done well and we sweat the small stuff because it matters. Let us show you how we can help by contacting us at services@infragistics.com.

Learn More

Announcing the new WPF XamDataGrid Control Configurator

$
0
0

If you're a customer of our Infragistics Ultimate UI for WPF controls, then you are probably already aware of our innovative new control configurators.  Configurators enable Infragistics customers to more easily learn and discover the control APIs because as properties or collections are changed at design-time, these changes are immediately reflected in the Configurator UI. The Configurators also have customized property window categories that group properties by feature.  The Infragistics Control Configurators are a giant leap forward in Visual Studio design-time tooling, providing you with an unparalleled experience and feature set.  Simply put, the control configurators are the gold standard of excellence for a design-time development experience.

With our initial release of the control configurators we supported the following controls:

  • XamBulletGraph
  • XamCategoryChart
  • XamLinearGauge
  • XamPieChart
  • XamRadialGauge

Since our first release, we have had a large number of requests for a control configurator for our most popular, and most complex control in the Ultimate UI for WPF product; the xamDataGrid.  The wait is over!  We are excited to announce the immediate availability of the new xamDataGrid control configurator.

As you know, the Infragistics WPF XamDataGrid is a feature-rich, high performing data grid that meets the needs of demanding enterprise line-of-business applications.  For new users the API and vast feature set can be overwhelming.  With the xamDataGrid control configurator, we make it dead simple to bind your data, add your fields and field layouts, and turn the most important features on and off with the click of a button.  When you're done adding the features you want, you simply hit the "Apply & Close" button and all the code will be generated for you.

Your next question is probably, "How do I get it?"

If you have already installed the Infragistics Control Configurators then you don't have to do anything.  The Visual Studio extension will be updated automatically via the Visual Studio Marketplace.  If you haven't installed the control configurators yet, you can download and install them directly from within Visual Studio or by visiting the Visual Studio marketplace.

If you are a WPF line-of-business developer, we strongly encourage you to investigateUltimate UI for WPF. Feature-rich controls, outstanding support, and design-time Control Configurators for visually configuring your controls, and let us know what you think.

The Infragistics documentation for the Configurators is here:

The Infragistics YouTube videos for the WPF Configurators are here:

Expert Opinions: Server-Side Rendering and Standards

$
0
0

As the web continues to evolve in 2018, developers need to know whether to rely on client side or server side rendering—or whether there’s a middle-ground approach. Our SVP of Developer Tools, Jason Beres recently had a chance to sit down with Stephen Fluin, Developer Advocate on the Angular team at Google.  This is the third of three parts of the conversation including the future of Native apps vs. PWAs, this post about Server Side Rendering, and one more with the Angular team’s advice for Enterprise Developers.

Jason Beres: In your keynote at Angular Connect, you talk about the benefits of server-side rendering. If I'm looking at things like search engine optimization, is there a benefit to using server-side rendering versus pure client side, or is there a negative effect? 

Stephen Fluin: It always depends on your audience. You should look at the specific situation, but for example, the Google web crawler is able to run JavaScript. So Angular applications, if you have the right polyfills, they will index perfectly.

Follow your routes. Navigate across your application. Get all your content index,  all that stuff.

Other search engine crawlers don't necessarily run JavaScript. So if those other search engines are important to you, then that's going to be a driver towards server-side rendering.

But the other thing I would look at is; do you have a share button in your application or do your users want to copy and paste your URL's and put them on Twitter or Facebook? Because those kind of scrapers, those web crawlers that social media platforms have also don't run JavaScript.

So being able to share a link and then have them by a single HB-request get out the bulk of your content and the images and things like that increase the connection to those platforms. And so that kind of also drives you to server-side rendering.

Then the last piece about it from my perspective is that it increases the perceived performance. I say perceived performance because technically you're actually slowing down the process with server-side rendering. By server-side rendering for users, you're giving them a fully rendered version of the application by HTML, because then the browser has to parse and then it bootstraps JavaScript and runs the application on top of that. And ultimately that's I think what enterprises are looking for.

It renders the page and then it renders the page with it. So if I look at every millisecond of performance, it's actually slower.

But because it's increasing the perceived performance, that's usually what matters.

Beres: I think a lot of the world was all server side rendering, then we came to client side rendering the last five to seven years, and it's interesting that you guys are, not going back to, but introducing a server side option in your framework.

Fluin: Yeah. Exactly. And for me, I give a talk at another conference called "What's up with the Web," because I find this really fascinating to watch how there's been a pendulum swing back and forth between client and server and right now the pendulum is swinging, or has swung far toward the client because experience is so key.

Every millisecond that I delay or interrupt my users I'm losing engagement. I can't quite come up with the number off the top of my head, but it's something like if you disengage a user or if you have them wait for a loading screen for more than four seconds, it's like a 60 or 70% chance they're going to disengage and go task switch, think about something else.

And so whether you're serving your employees and you're losing their focus or whether you're serving customers and you're losing their sales, these are both a really big deal.

BeresA lot of the discussions we have as a vendor delivering solutions like component libraries is around questions like; “Where's the web going? What's the best decision to make?” And there really is no standard, but I believe the good thing about Angular is that you guys are providing a more complete, prescriptive framework that developers can get behind. It’s like, “We're here. It's ready. It's primetime.”

You said at Angular Connect, "Thank you but we're sorry," to the folks that were using the beta versions and the RC versions. I think that's the right approach because you're building that trust, but now that you're on Angular 5, we're seeing more growth in Angular. And really it's because of the prescriptive guidance that you're pushing that gives a little bit of certainty and standardization moving forward.

And ultimately that's I think what enterprises are looking for.

Fluin: Yeah, I mean we're seeing huge growth as well. There are tons of production applications that launch every day using Angular, which is kind of really exciting to see all of our hard work paying off, kind of Angular coming back to the main stream so to say after the Angular JS to Angular 2 switch.

When it comes to stability, I really think that's key for developers, but at the same time we have to balance that with innovation. I really like how we've positioned ourselves for the future where we can keep you developing applications the way you learn. So you learn Angular and then you write applications one way. And then we can kind of automatically take advantage of the web as it continues to progress for you.

And I'll give a couple examples of this.

WebAssembly is a really cool new technology, but you shouldn't actually be shipping WebAssembly today for a lot of use cases.

But, as the Angular team, we're in a really unique position where if at some point WebAssembly makes sense for how you should be delivering all web applications, we could actually flip a switch and then instead of compiling down to ES5, we could be shipping WebAssembly. Then depending on bootstrapping, handling all the connected piece, all the dom communication for you and because we've had this platform approach, we're really uniquely positioned to do that.

And another example is the shift around ES modules. So ES modules have been a spec standard for a while. But they didn't actually exist in the browsers until basically this year. Like WebAssembly, it's maybe not the best idea today to try and ship an application with ES 2015 modules for search quality and for other reasons. But when that does make sense, or if there's a way for us to ship an application that automatically opts the user's modern browsers into those sorts of things for performance gains, we can do that for you because we're the ones handling the build tool chamber, the ones handling the bootstrapping for you.

I'm really, really excited to see the web continue to evolve and Angular developers being able to just turn a switch on or getting, receiving all these benefits automatically by default.

Beres: How do you see WebAssembly evolving in the next few years?

Fluin: I don't know. I think it's really exciting. We've almost gotten to a point where JavaScript was the assembly of the web, but obviously, WebAssembly's far more performant. I think it's going to evolve dramatically in the next couple years as we, as people start trying to use it. As they encounter all of the issues of cross-project compatibility, run times ... kind of permissions issues. We're going to have to work through all those things before every application, every site can take advantage of it.

Beres: For specific verticals, like financial services where they're building internal apps where every nanosecond counts, and performance is the primary goal.  So if dev teams can use any technology that will improve any type of performance, it could be interesting for them but I was intrigued when I saw WebAssembly a couple years ago at Google IO, and it's interesting to see that it's slowly making its way up the ladder, right.

Fluin: Yep. Exactly.

Beres: I mentioned Material earlier and there was a lot of talk about Material at Angular Connect. How do you see Material evolving or have do you see its use by Angular and other platforms over the years and is Material something that you guys are focused on? Or are you focused on other design languages as well?

Fluin: Sure. The Angular Material team is kind of focused on two things. First, they are focused on taking Google's Material Design philosophy and manifesting that philosophy as a set of usable components that give you the Material Design aesthetic kind of out of the box. If you add Material to your project, it's going to feel like a Material application. And that's really important for a lot of teams to have that from Google because we came up with Material design, we ship Angular, so having a default, “hey, I don't want to do any time thinking about my design.”

Beres: Like clarity. Use it and you get what you expect.

Fluin: Yep. So, Material ends up serving as kind of a great default, so to say. But then the other half of what they're doing is the CDK or the component depth kit which is designed to enable other people to build fantastic component libraries. It's really important to me at least that we have a healthy ecosystem of design philosophies, of approaches to component, of enterprise-grade solutions that solve the different problems. Material is never going to solve everyone's problems.

And so having us providing tools that help other component authors and vendors move faster, provide better quality user experiences, it's really their second mission.

I think if we look forward five years from now, that team is maybe still somewhat focused on Material, but they're also responsible for making all of the other component libraries successful.

Beres: What I hear a lot from our customers is, “Is it Material based? Does it work with Material?” So I think Material is getting that traction anyway because it's a beautiful stylized library, it has a beautiful look and feel.

Fluin: It feels very consistent across platform.

###

We’d like to thank Stephen Fluin for his time in this interview, and invite you to check out more of what he has to say over at the Angular Blog. To learn more about Infragistics’ support for Angular, check out our Ignite UI for Angular page. ICYMI- Here's part one of the conversation, and part three is available now.

Simplifying ViewChild and ContentChild in Angular

$
0
0

In this blog post, we will learn about ViewChild and ContentChild in Angular.

Essentially ViewChild and ContentChild are used for component communication in Angular. Therefore, if a parent component wants access of child component then it uses ViewChild or ContentChild.

Any component, directive, or element which is part of a template is ViewChild and any component or element which is projected in the template is ContentChild.

ViewChild and ViewChildren

If you want to access following inside the Parent Component, use @ViewChild decorator of Angular.

  1. Child Component
  2. Directive
  3. DOM Element

ViewChild returns the first element that matches the selector.

Let us assume that we have a component MessageComponent as shown in the below listing:

import { Component, Input } from '@angular/core';
@Component({
    selector: 'app-message',
    template: `<h2>{{message}}</h2>`
})
export class MessageComponent {
    @Input() message: string;
 
}

We are using MessageComponent inside AppComponent as shown in below listing:

import { Component, OnInit } from '@angular/core';
@Component({
    selector: 'app-root',
    template: `
  <div>
  <h1>Messages</h1>
  <app-message [message]='message'></app-message>
  </div>`
})
export class AppComponent implements OnInit {
    message: any;
    ngOnInit() {
        this.message = 'Hello World !';
    }
}

In application, you will get the output as below:

Here, MessageComponent has become child of AppComponent. Therefore, we can access it as a ViewChild. Definition of ViewChild is:

The Child Element which is located inside the component template”,

Here MessageComponent is located inside template of AppComponent, so it can be accessed as ViewChild.

export class AppComponent implements OnInit, AfterViewInit {
    message: any;
    @ViewChild(MessageComponent) messageViewChild: MessageComponent;
 
    ngAfterViewInit() {
        console.log(this.messageViewChild);
    }
 
    ngOnInit() {
        this.message = 'Hello World !';
    }
}

We need to do following tasks:

  • Import ViewChild and AfterViewInit from @angular/core
  • Implement AfterViewInit life cycle hook to component class
  • Create a variable with decorator @ViewChild
  • Access that inside ngAfterViewInit life cycle hook

In the output console you will find reference of MessageComponent, also if you can notice that __proto__ of MessageComponnet is set to Object. 

Now let us try to change value of MessageComponent property

ngAfterViewInit() {
    console.log(this.messageViewChild);
    this.messageViewChild.message = 'Passed as View Child';
}

Here we are changing the value of ViewChild property, you will notice that value has been changed and you are getting output as below:

However, in the console you will find an error: “Expression has changed after it was last checked

This error can be fixed two ways,

  1. By changing the ViewChild property in ngAfterContentInit life cycle hook
  2. Manually calling change detection using ChangeDetectorRef

To fix it in ngAfterContentInit life cycle hook you need to implement AfterContentInit interface

ngAfterContentInit() {
    this.messageViewChild.message = 'Passed as View Child';
}

Only problem with this approach is when you work with more than one ViewChild also known as ViewChildren. Reference of ViewChildren is not available in ngAfterContnetInit life cycle hook. In that case, to fix the above error, you will have to use a change detection mechanism.  To use the change detection mechanism:

  1. Import ChangeDetectorRef from @angular/core
  2. Inject it to the constructor of Component class
  3. Call detectChanges() method after ViewChild property is changed

You can use manual change detection like shown in below listing:

constructor(private cd: ChangeDetectorRef) {}
 
ngAfterViewInit() {
    console.log(this.messageViewChild);
    this.messageViewChild.message = 'Passed as View Child';
    this.cd.detectChanges();
}

Manually calling change detection will fix “Expression has changed after it was last checked,” error and it can be used with ViewChildren also.

To understand ViewChildren, let us consider AppComponent class created as shown in below listing:

import { Component, OnInit } from '@angular/core';
 
@Component({
    selector: 'app-root',
    template: `
  <div>
  <h1>Messages</h1>
  <app-message *ngFor="let f of messages" [message]='f'></app-message>
  </div>`
})
export class AppComponent implements OnInit {
    messages: any;
    ngOnInit() {
        this.messages = this.getMessage();
    }
    getMessage() {
        return [
            'Hello India',
            'Which team is winning Super Bowl? ',
            'Have you checked Ignite UI ?',
            'Take your broken heart and make it to the art'        ];
    }
}

We are using MessageComponent inside a *ngFor directive hence there are multiple references of MessageComponent. We can access it now as ViewChildren and QueryList as shown in the listing below:

@ViewChildren(MessageComponent) messageViewChildren: QueryList<MessageComponent>;
ngAfterViewInit() {
    console.log(this.messageViewChildren);
}

To work with ViewChildren and QueryList, you need to do following tasks:

  • Import ViewChildren , QueryList , AfterViewInit from @angular/core
  • Make reference of ViewChildren with type QueryList
  • Access ViewChildren reference in ngAfterViewInit() life cycle hook

In the output, you will get various reference of MessageComponent as ViewChildern as shown in the image below:

Now let us try to update properties of ViewChildren as shown in the listing below:

ngAfterViewInit() {
    console.log(this.messageViewChildren);
    this.messageViewChildren.forEach((item) => { item.message = 'Infragistics'; });
}

As you see, we are iterating through each item of ViewChildren and updating each property. This will update property value but again you will get the error, “Expression has changed after it was last checked” as shown in the image below:

You can again fix it by manually calling change detection like ViewChild. Keep in mind that we do not have ViewChildren reference available in AfterContentInit life cycle hook. You will get undefined in ngAfterContentInit() life cycle hook for ViewChildren reference as shown in the listing below :  

ngAfterContentInit() {
    console.log(this.messageViewChildren); // undefined 
}

However, you can manually call change detection to fix error:  “Expression has changed after it was last checked”

 To use a change detection mechanism

  1. Import ChangeDetectorRef from @angular/core
  2. Inject it to the constructor of Component class
  3. Call detectChanges() method after ViewChild property is changed

You can use a manual change detection like shown in below listing:

@ViewChildren(MessageComponent) messageViewChildren: QueryList<MessageComponent>;
constructor(private cd: ChangeDetectorRef) {
}
ngAfterViewInit() {
    console.log(this.messageViewChildren);
    this.messageViewChildren.forEach((item) => { item.message = 'Infragistics'; });
    this.cd.detectChanges();
}

In this way, you can work with ViewChild and ViewChildren.

ContentChild and ContnetChildren

Let us start with understanding about ContnetChild. Any element which is located inside the template, is ContnetChild.

To understand it let us consider MessageContainerComponent.

import { Component } from '@angular/core';
@Component({
    selector: 'app-messagecontainer',
    template: `
    <div>
    <h3>{{greetMessage}}</h3>
    <ng-content select="app-message"></ng-content>
    </div>
    `
})
export class MessageContainerComponent {
    greetMessage = 'Ignite UI Rocks!';
}

In this component, we are using Angular Content Projection.  You can learn more about content projection here

Any element or component projected inside <ng-content> becomes a ContentChild. If you want to access and communicate with MessageComponent projected inside MessageContainerComponent, you need to read it as ContnetChild.

Before we go ahead and learn to use ContentChild, first see how MessageContainerComponent is used and MessageComponent is projected,

import { Component, OnInit } from '@angular/core';
@Component({
    selector: 'app-root',
    template: `
  <div>
  <app-messagecontainer>
  <app-message [message]='message'></app-message>
  </app-messagecontainer>
  </div>`
})
export class AppComponent implements OnInit {
    message: any;
    ngOnInit() {
        this.message = 'Hello World !';
    }
}

As you see in the above listing that in the AppComponent, we are using MessageContainerComponent and passing MessageComponent to be projected inside it. Since MessageComponent is used in MessageContainerComponent using content projection, it becomes ContentChild.

Now, you will get output as shown below:

Since, MessageComponnet is projected and being used inside template of MessageContainerComponent, it can be used as ContentChild as shown in the below listing:

import { Component, ContentChild, AfterContentInit } from '@angular/core';
import { MessageComponent } from './message.component';
 
@Component({
    selector: 'app-messagecontainer',
    template: `
    <div>
    <h3>{{greetMessage}}</h3>
    <ng-content select="app-message"></ng-content>
    </div>
    `
})
export class MessageContainerComponent implements AfterContentInit {
    greetMessage = 'Ignite UI Rocks!';
    @ContentChild(MessageComponent) MessageComponnetContentChild: MessageComponent;
    ngAfterContentInit() {
        console.log(this.MessageComponnetContentChild);
    }
}

We need to do the following tasks:

  • Import ContnetChild and AfterContnetInit from @angular/core
  • Implement AfterContnetInit life cycle hook to component class
  • Create a variable with decorator @ContnetChild
  • Access that inside ngAfterContnetInit life cycle hook

 In the output console you will find a reference of MessageComponent, also if you can notice that __proto__ of MessageComponent is set to Object. 

 

You can modify the ContentChild property inside ngAfterContentInit life cycle hook of the component. Let us assume that there is more than one MessageComponent is projected as shown in the listing below:

import { Component, OnInit } from '@angular/core';
@Component({
    selector: 'app-root',
    template: `
  <div>
    <app-messagecontainer>
    <app-message *ngFor='let m of messages' [message]='m'></app-message>
    </app-messagecontainer>
  </div>`
})
export class AppComponent implements OnInit {
    messages: any;
    ngOnInit() {
        this.messages = this.getMessage();
    }
    getMessage() {
        return [
            'Hello India',
            'Which team is winning Super Bowl? ',
            'Have you checked Ignite UI ?',
            'Take your broken heart and make it to the art'        ];
    }
}

In the output, you will get many MessgeComponent projected as below:

Now we have more than one ContentChild, so we need to access them as ContentChildren as shown in the listing below:

export class MessageContainerComponent implements AfterContentInit {
    greetMessage = 'Ignite UI Rocks!';
    @ContentChildren(MessageComponent) MessageComponnetContentChild: QueryList<MessageComponent>;
    ngAfterContentInit() {
        console.log(this.MessageComponnetContentChild);
    }
}

To work with ContentChildren and QueryList, you need to do following tasks:

  • Import ContentChildren , QueryList , AfterContentInit from @angular/core
  • Make reference of ContnetChildren with type QueryList
  • Access ContentChildren reference in ngAfterContentInit() life cycle hook

 In the output, you will get various reference of MessageComponent as ContentChildren as shown in the image below:

You can query each item in ContentChildren and modify property as shown in the listing below:

ngAfterContentInit() {
    this.MessageComponnetContentChild.forEach((m) => m.message = 'Foo');
}

In this way, you can work with ContentChildren in Angular.

Summary

ViewChild and ContentChild are two very important features of Angular. It is used to access Child Component in the Parent Component.

Any directive, component, and element which is part of component template is accessed as ViewChild. Whereas, any element or component which is projected inside <ng-content> is accessed as ContentChild.

Like this post?

If you like this post, please share it. In addition, if you haven’t checked out Infragistics Ignite UI for Angular Components, be sure to do so! They’ve got 30+ material based Angular components to help you code speedy web apps faster.

Webinar Recap: Introduction to Angular for ASP.NET Web Forms Developers

$
0
0

This week I held a webinar for the APAC region, introducing Angular and Infragistics' offerings to ASP.NET Web Forms Developers.

In the webinar, I shared insights for browser market share and device type market share. I was shocked when I saw the actual number for market share for Internet Explorer, aka IE. I remember when IE was a dominant back in early 2000's.

These facts obviously tell you that you need to support multiple browsers, multi-devices across platforms. and it encourages ASP.NET Web Forms Developers to move on Modern Web App Development.

Desktop Browser

Desktop browser share

Device Type

Device Type Marketshare

source: NETMARKETSHARE

At Infragistics, we made a decision to invest in Angular because we believe Angular is one of the best JS frameworks for developing enterprise Line of Business modern web applications. Now we are offering 30+ Material UI based, 100% Angular components. With these components, you can create rich Angular apps by using Grid, List, Calendar and so on. Ignite UI for Angular is also free for non-commercial use and source code is available at GitHub. We also provide CLI tool that you can speed up your development whether you use Ignite UI for Angular or Ignite UI for JavaScript.

In case you weren't able to join us live, we've made a recording of the webinar and the presentation deck available below:

www.youtube.com/watch

I also briefly covered an Overview of Angular Architecture. I recommend anyone who is looking to get further into the topic watch a getting started angular webinar performed by DJ, my colleague and a specialist for Modern Web Development for your next step:

Next Steps

Ignite UI for Angular

Embedded analytics are powerful for apps – why do you need them?

$
0
0

The apps you create, whether for mobile or desktop, generate huge amounts of data, both from user input and information collected passively. If your app can make use of this data in way that creates value for the end user, your app will be more "sticky" -- a key differentiator in a highly competitive market. Many app developers are now providing such features as standard in their tools. But should independent software vendors (ISVs), systems integrators (SIs) or companies building internal apps build them in-house, or should they buy them? This post is the first in a series that explores how to get more value out of the data your apps create, whether to buy or build, and the most important factors to weigh if you choose to buy.

SaaS models have changed the industry 

The proliferation of software-as-a-service (SaaS) subscription-based business models has changed what people expect from ISVs and SIs. Cloud computing has revolutionized how people pay for software and has altered the relationship they have with vendors.  

 Today, users tend to pay a subscription on a regular basis and receive constant support and updates, resulting in consequences for development houses: 

  • Retention is the measure by which success is definedThe industry’s standard of success is measured by churn rate  the number of users who cancel their subscriptions or simply stop using an app. 
  • Customer satisfaction is more important than ever: Most ISVs and SIs embed analytics as a way of adding value and increasing customer satisfaction. They rarely charge a premium for these additional features and need their deployment to be as economical as possible.  
  • There is constant pressure to improve and differentiate the app to reduce churn: In an age of free trials where users often try before they buy, the apps that succeed will be those that are stickier  the ones that give users more value the more they use the app. 

 At the same time, these apps are also creating data, which presents a major opportunity for growth that’s waiting to be realized.  

The data opportunity 

Individual apps collect large quantities of unstructured data on the back end. Every time a user interacts with your app, this information can be stored. But to be useful, this data needs to be converted from meaningless numbers to something users can understand. Embedded analytics tools can convert this information into visualizations that appear in the user interface.  

 The proliferation of generated data from apps and the need to continually add app value have caused app providers to explore embedded data visualizations as a means to retain customers, reduce churn, and differentiate.  

Embedded Data Visualizations as a Solution 

What are embedded data visualizations? 

Embedded data visualizations make complex information comprehensible by presenting it visually. They collect the data that users generate via an embedded analytics processor, and then make it accessible in the form of maps, pie charts, picture, and graphs. And because they’re built into the application itself, embedded visualizations make it easier for the user to view data and gain insights real-time and in context, removing the need to navigate away from the app. 

Customer benefits of embedded analyticsEmbedding analytics provides end users with insights. Users expect their apps to help them work smarter and make better decisions. When the app offers this additional valuable content, it becomes “stickier,” a useful part of their everyday life or work.  

  • In the B2B market: A task management app shows the end user how they spend their time at the office. By providing embedded visualizations, this kind of app offers insights into how they could use their time better. For instance, a simple chart can tell them that they are spending over a third of their time in unproductive meetings.  
  • In the consumer market: A consumer fitness app that tells someone how many calories they’ve burned today compared with yesterday is much more motivating. The more data is collected about the user, the more sticky the app becomes. Users become less likely to switch to another app because your app contains information collected over time that’s useful for them to see – such as their long-term progress toward a fitness target. 
  • Inside your own business applicationsAn integrated dashboard that pulls in data from your ERP and CRM systems gives users the information they need to make decisions quickly, without having to click through disparate applications.  

Developer benefits of embedded analytics 

Today’s app developers are competing in a crowded market. With all this availability, end users have little patience for apps that fail to bring them any particular value. If an app provides only short-term worth, users are likely to uninstall it fast; this is as true in the enterprise app space as it is in the consumer market.  

Users are keen for apps that continue to provide them with real, lasting value. Increasing numbers of developers are turning to embedded data visualizations as a means of providing this kind of value, differentiating their app and reducing churn. 

Now that you have a clearer idea of what embedded analytics can do for you, the next question is: Buy or build? The next post in this series breaks down the pros and cons of both. For a full decision tree on building vs. buying embedded analytics, go here. And if you're ready, drive insights and better business decisions by adding powerful analytics to your next app with ReportPlus Embedded


Webinar Recap: Learning Advanced Angular Component Concepts

$
0
0

I hosted a webinar on Advanced Angular Component Concepts for India region on the 19th of January. This webinar covers:

  1. Content Projection
  2. ViewChild and ViewChildren
  3. ContentChild and ContentChildren
  4. Dynamic Component Creation

For your benefit, we went ahead and wrote articles on the topics covered in the webinar.  You can read them in the blogs linked above.

You can watch a recording of the webinar below:

https://youtu.be/IZeZiUDDwkk

And there you have it! If you like this post, please like it and share it. In addition, if you haven’t checked out Infragistics Ignite UI for Angular, be sure to do so! They’ve got 30+ material based Angular components to help you code speedy web apps faster.

Webinar: Introduction to XAML (WPF) & Data Binding for Modernizing Desktop Applications

$
0
0

NOTE: This webinar occurs on February 27th at 11 AM JST (GMT +9), for members of our APAC-region audience. Please find local time below:
3:00 PM (NZDT) GMT+12:00 (Auckland)

1:00 PM (AEDT) GMT+10:00 (Sydney)
11:00 AM GMT+9:00 (Seoul, Tokyo)
10:00 AM GMT+8:00 (Beijing, Hong Kong, Kuala Lumpur, Manila, Singapore, Taipei)
9:00 AM GMT+7:00 (Bangkok, Hanoi, Jakarta)

I am hosting a webinar to introduce XAML technology for Windows Forms developers!

Webinar Agenda:

Have you tried utilizing XAML or WPF for your desktop applications? Have you ever thought of the benefits these UI controls could have for your app development?

I will present the benefits of using XAML (WPF) in your LOB apps and why it’s important for developers to learn them. I will also showcase Infragistics’ WPF UI Controls and how to utilize them for maximized productivity.

In this webinar, you'll learn:

  • An overview of XAML technology and platform as of January 2018
  • The benefits of adopting XAML technology
  • Offerings from Infragistics’ LOB WPF controls and tools
  • Next steps moving forward

This webinar is best for:

  • Windows Forms developers looking for the benefits on moving to XAML
  • Developers looking to get started on programming in XAML
  • Developers who would like to use Infragistics WPF UI controls

I have been working with a lot of Japanese companies who are trying to adopt XAML for 10 years. During the time I was getting questions similar to "Why should I move to WPF?".
In this Webinar, I would like to share mu opinion as well as suggest what steps to make you successful for your next XAML project.

Register Now!

Four Ways to Get the Support You Need for Your Business's Digital Transformation

$
0
0

The story is nothing new. You have big goals and even bigger plans to transform your business, but never the resources. There's never enough time or money, and your backlog only seems to get longer.

At Infragistics, we have spent nearly 30 years helping businesses like yours take their application development to the next level. We have the tools that will help your developer teams get the jobs done more quickly, with experiences that will delight your stakeholders, no matter if they are internal users or outside consumers. And we have experts who will help you and your team take those first steps, no matter where you are in your digital transformation.

We are proud to share a collection of offers that allow you to take advantage of our experts and the decades of expertise packed into our software together. We are currently focused on helping to solve problems in four major areas.

User ExperienceTargeted at customers looking to jumpstart a UX practice, this offer is ideal for organizations without a formal UX function. The one-week consulting plus product training engagement:

  • Teaches rapid prototyping & remote usability testing
  • Provides secure on-premises or cloud-hosted team workspaces
  • Specific project consulting services & product training
  • Includes product license for Indigo Studio Enterprise or On-Prem

Unlock Data InsightsQuickly and cost-effectively transform your business data into a competitive advantage with the embedded BI product and services PowerBI, Tableau, and Salesforce don’t want you to find out about:

  • Hands-on workshop and advanced guidance for embedded BI
  • Create, modify, publish, & distribute dashboards in your apps
  • Product training & services to scale up to 20 users
  • Low cost, scalable pricing model

Angular & JavaScript BootcampThis offer is designed to accelerate and support development teams in moving their existing or building new applications for the modern Web, including:

  • Angular masterclass
  • Ignite UI for Angular & JavaScript deep dive & best practices
  • Hands-on labs & workshops
  • Take-home courseware & Ignite UI subscriptions with 3 years of new features, updates, & support

Modernize Desktop ApplicationsMany of our customers rely on their existing desktop applications, they are the backbone of their organizations. We can show how updating these apps will make an organization more productive:

  • Conduct a UX analysis & design review
  • Interaction model recommendations & go-forward planning
  • Visual styling analysis & style guide completion
  • Expert Analysis & Code Review of You
  • Full licenses of Infragistics UI for WPF with 3 years of new features, updates, & support

Connect with us to:

  • Learn more about our products & services
  • Schedule an on-site "Lunch & Learn" with our experts
  • See if you qualify for a no-cost Proof-of-Concept

Preview: OpenFin + Infragistics = Better Apps and Experiences for Financial Services

$
0
0

This week our team braved the storm in the Northeastern US to attend FinJS NYC. Infragistics is sponsoring the full slate of FinJS events in Europe, and NYC  through the end of 2018. Launched by OpenFin in 2016, FinJS has featured talks from JavaScript inventor, Brendan Eich, as well as tech industry leaders from Microsoft, Facebook, and major financial firms. 

While there, our SVP of Developer Tools, Jason Beres showed off new developer tools for the financial services industry that will be coming soon with our 18.1 release of Infragistics Ultimate. For those of you who weren't able to make it to the event, we wanted to share Jason's talk.

https://youtu.be/2otQBgGOXb8

We are really excited to be a part of the events, and to share our latest tools for this important vertical market. As Jason said in our recent press release:

"The FinJS events draw thought leaders and the top application developers from organizations in the capital markets. Over the past two decades, the lion share of capital market applications have used our Windows Forms and WPF Grid and Chart controls to deliver a superior user experience (UX), real-time visual indicators, and rich data analysis.  We are excited to sponsor the FinJS community and deliver native Angular and HTML 5 grids and charts designed for the demands of global financial markets."

We think the video is really useful but to really learn about how really get the most out of our charts and controls, check out to our Ignite UI for JavaScript, Ignite UI for Angular and Infragistics Ultimate UI for WPF product trials. Then contact sales our sales team for a demo or to request a custom sample that will help you focus on what you do best.

Webinar Recap: Getting Started on Xamarin.Forms with Powerful Tools from Infragistics Ultimate UI

$
0
0

I held a webinar for the APAC region: Getting Started on Xamarin.Forms with Powerful Tools from Infragistics Ultimate UI.

I explained Xamarin and Xamarin.Forms Overview, Pros and Cons, and then demonstrated Productivity Tools below:

Xamarin.Forms - Pros & Cons

One question I received in the webinar was the performance difference between Native apps vs Xamarin/Xamarin.Forms. In the webinar, I commented there should be overhead. 
I spent some time after the webinar and found an interesting article.

altexsoft - Performance Comparison: Xamarin.Forms, Xamarin.iOS, Xamarin.Android vs Android and iOS Native Applications

It seems there are "some" performance gaps between Native vs Xamarin/Xamarin.Forms, but as the article mentioning, a human can notice delay above 500 ms.
Most of the results in the article are smaller than the threshold and I would say it's still worth to choose Xamarin or Xamarin.Forms for your native mobile app development framework.

In case you missed the webinar, you can download the presentation here.

Getting Started on Xamarin.Forms with Powerful Tools from Infragistics Ultimate UI

In addition, the video is available at Infragistics YouTube Channel.

https://youtu.be/luVW7wa19zg

At the last, Productivity tools from Infragistics are available at Visual Studio Marketplace for free. 

Visual Studio Marketplace - Infragistics

I confirmed with our Product Development team that we are going to update the tool in April so that the latest stable version of Licensed NuGet feed (18.1.5) will be supported by our Toolbox. You can continue to use 17.2 builds now. There are tutorials and videos available for productivity tools.

Next Steps:

  1. Download the free 30-day trial of Ultimate UI for Xamarin
  2. Watch video tutorials for Productivity Tools
  3. Try Write-fast, Run-fast tutorials

You can also download the sample I created in the webinar from the bottom of this entry. It is created by AppMap, then used Infragistics Toolbox to add our XamDataGrid, then used Control Configurator to set the source of grid and features.

Let's get started!

Ultimate UI for Xamarin

Viewing all 2223 articles
Browse latest View live