Quantcast
Channel: Telerik Blogs
Viewing all 5208 articles
Browse latest View live

What's New for Vue in the R3 2018 Release of Kendo UI

$
0
0

Get up to speed on what's new in the Kendo UI for Vue R3 2018 release, including WCAG 2.1 compliance, new components, themes and more.

To ensure that folks aren't overwhelmed with the full list of updates coming out from the Kendo UI bundle, in addition to a summary post I wanted to extract the changes into blog posts for each framework that we support. So, with that I present you with the updates to our Vue.js components in R3 2018!

WCAG 2.1 Compliance

A big announcement for R3 2018 is that the Vue.js components are now fully WCAG 2.1 compliant! This is huge news for anyone looking to ensure that their applications are as accessible as possible. The great benefit here is that it's all taken care of out-of-the-box without having to sacrifice anything from a user experience perspective.

Vue Gets New Components

With R3 2018 we are getting two new components for Vue, specifically the MultiColumnComboBox and the ArcGauge components.

MultiColumnComboBox

The name hints at what this is, but essentially this is a data table within a ComboBox.

MultiColumnComboBox

This component shares features with our existing ComboBox component, which means that immediately you get access to the following feature set:

  • Server filtering
  • Virtualization
  • Grouping
  • Templates
  • Keyboard Navigation
  • Cascading MultiColumnComboBoxes

ArcGauge

ArcGauge

As you can see above, the ArcGauge component provides an elegant way to display a value without the extra fluff that may come from other data visualizations. Quick and straight to the point.

Updates to Existing Vue Components

The Vue.js TreeList component is getting a lot of attention this release with some of the top-voted features being implemented for R3 2018. This includes:

  • Batch/In-Cell Editing
  • Client-side Paging
  • Multi-column Headers
  • Keyboard Navigation

I recommend jumping over to our Vue TreeList documentation to see more about these features!

The Grid also received a few top-voted features:

  • Group Summaries available in group headers
  • Support for window.matchMedia in Grid columns
  • API to programmatically change column width

The Vue Grid documentation will showcase these additions in action.

Another component to mention here is the Conversational UI component that received the new toolbar feature. This was brought in due to popular demand and allows end-users to add in images, voice, and other items in to their chat component. This expands interaction capabilities past simple text, and gives developers the flexibility to add in their own custom functionality.

conversational-ui-toolbar

Material Theme Comes to Vue

With the R3 2018 release the Material theme, based on Google's Material Design, is now officially supported with the Kendo UI wrappers for Vue! We followed the guidelines closely so you should be able to add this in to any application that may already be using Material Design. Of course, this also allows you to use our components as an easy way to make any new application adhere to Material Design.

jquery-material

Major Update to Vue Docs

One thing that I want to shout out is the huge effort that our support and engineering team went through with our Vue documentation. With the R3 2018 release we have added over 200 new demos within our Vue documentation. The goal is to ensure that developers will not have to mix-and-match resources when picking up the components and can instead focus on one single area to learn everything about Kendo UI and Vue!

We Want to Hear from You

I say this in all my posts, but it's always important - make your voice heard! Comment in the section below, or submit something to our feedback portal. If you feel like we missed anything with this release, or if you have any ideas for new additions that you'd like to see in the future, definitely use these pages to ensure we hear about it.

Want to See the Updates in Action?

There's quite a lot in here, and it was only through the lense of making you aware of the updates that occurred. If you want to see this (and more) in action, then join myself and my colleagues for the LIVE Kendo UI Webinar happening on September 27th at 11 a.m. ET! Seats are limited to make sure to reserve yours today!

Save My Seat


New in Telerik UI for Xamarin R3 2018: Scheduling, Charts and More

$
0
0

Our goal is to make your Xamarin development as productive as possible with best in class UI components and features for as many use cases as we can. The latest release packs 8 new components and lots of upgrades.

The third release for 2018 of Telerik UI for Xamarin is loaded with new features. We introduce Scheduling capabilities, Donut and Financial charts, a brand new AutoComplete control, Expander and Accordion components, and Border and Checkbox controls - not to mention the official version of the TreeView component! Let's dig a little deeper into each of these new updates.

New Scheduling Capabilities

The Calendar is a rich component supporting Day, Week and Month views. Now it is enhanced with MultiDay View with WorkWeek support, CurrentTime Indicator and more, allowing you to a create variety of scheduling scenarios such as the one below:

 The MultiDay view comes with variety of customization options such as:
  • Number of days shown
  • Start time
  • End time
  • Whether the weekends are shown
  • Whether the current time indicator is shown
  • Timeline interval

Other improvements we're cooking up for scheduling include recurring appointments, CRUD operations, and more... so stay tuned.

Financial Charts

With the new additions to RadChart now you have more power to visualize your data. We have added OHLC and Candlestick series along with a number of built-in financial indicators, ranging from a simple moving average to a complex Bollinger bands indicator. With these, you can present a variety of financial information and even complement it with useful instruments to make it easier to grasp the data or to analyze it.

Donut Chart Series

Based on your demand, we are introducing the Donut chart. Similar to the Pie chart, it helps visualize differences between data points.

Donut Chart 

New and Improved AutoCompleteView

We reviewed all the feedback that we received about one of our most used components, took the benefits of Xamarin.Forms 3.0 and created a completely new component. This new component is now more intuitive and has more features than RadAutoComplete. Meet RadAutoCompleteView and see how it compares to the current control:

Properties, Events and Methods

AutoCompleteView

AutoComplete

Watermark

Watermark

Watermark

Modes

-

SuggestMode

 

DisplayMode

DisplayMode

 

CompletionMode

CompletionMode

Filtering

FilteredItems

FilteredItems

Clear Button

IsClearButtonVisible

IsClearButtonVisible

No Result

NoResultMessage

NoResultMessage

 

NoResultTemplate

-

SearchThreshold

SearchThreshold

SearchThreshold

Show Suggestion

ShowSuggestionView

ShowSuggestionView

 

SuggestionViewHeight

SuggestionViewHeight

 

SuggestionViewBackgroundColor

SuggestionViewBackgroundColor

Styling

FontFamily

FontFamily

 

FontSize

FontSize

 

-

FontWeight

 

FontAttributes

-

 

TextColor

TextColor

Tokens Support

ShowMoreItems

-

 

ShowMoreTemplate

-

Data Binding

ItemsSource

ItemsSource

 

ImagePath

ImagePath

 

TextSearchPath

TextSearchPath

SuggestionItem

SuggestionItemTemplate

SuggestionItemTemplate

 

SuggestionItemTextColor

SuggestionItemTextColor

Events

FilteredItemsChanged

FilteredItemsChanged

 

SuggestionItemSelected

SuggestionItemSelected

 

TextChanged

-

Remote Search

LoadingTemplate

-

Text

Text

Text

Token Style

-

TokenStyle

 

-

SelectedTokenStyle

Methods

ShowSuggestions

HideSuggestions

-

 
I want to highlight that we have enabled one of the most requested scenarios with the control, namely Remote Search.

It is still Beta, however it is ready to become part of any Xamarin forms app, so give it a try and please be sure to share your feedback with us.

AutoCompleteView TokensAutoCompleteView Suggestions

Expander & Accordion

Screen size makes it hard to fit everything you want to show on a mobile device. With the new Expander and Accordion components, you can save real estate while still allowing more data to be presented, and you can also create more sophisticated scenarios.

Although they have some similar UI these two components have different purpose – use Expander to display single piece of content, use Accordion if you need to have multiple items, but only one of them expanded. Combine both if you need more options to hide and show content.

 

Border and CheckBox

If you missed our SP release, do not worry - now you have the chance to enjoy these two primitives, which can help any Xamarin Forms developer – Meet RadBorder and RadCheckbox.

Checkbox image

Screen Templates

Creating login and feedback gathering screens are two very common scenarios in a mobile app. With the introduction of the built-in login and app feedback screens it is now super simple to add these features to your application with ease.

We've covered plenty of scenarios for you by default, such as login with username and password, using a provider such as Facebook or Twitter and using PIN or fingerprint. 

TreeView Component is Now Official

The TreeView component is now feature complete with new capabilities, and it is ready to enhance your mobile hierarchy visualization. It is now ready with:

  1. LoadOnDemand
  2. Expand/Collapse API
  3. XAML only setup enabled
  4. MVVM support

 

Other Updates

Telerik UI for Xamarin supports the latest and greatest Xamarin.Forms 3.1, plus we have added several features to Conversational UI and RadListView too. For a full list of the release additions, please refer to the Release Notes for R3 2018.

I hope I managed to give you an exciting overview over the new bits! If you want to see them in action,

Download Free Trial

To see the new release in action, please join us on the Telerik UI R3 2018 webinar, on October 2, 2018 at 11 a.m.

Save My Seat

We'd love to hear how this all works for you, so please let us know your thoughts by visiting our Feedback portal or by leaving a comment below.

Crystal Theme, MultiColumnComboBox Control & More in Telerik UI for WPF R3 2018

$
0
0

The R3 2018 releases of Telerik UI for WPF and Telerik UI for Silverlight come with a brand new, modern theme, a highly requested MultiColumnComboBox control, plus plenty of other improvements.

Let's dive right in to reveal some of the highlights of the release.

MultiColumnComboBox: Beta (WPF)

I’m happy to introduce the beta version of the brand new RadMultiColumnComboBox control for WPF. This is the type of control that will allow you to save screen real estate while also providing a fully functional GridView control to users with a single click on the dropdown button. This control is very useful for looking up a record in large amount of data, as it benefits from the advanced search functionality of RadGridView.

Here is a list of some of the key features for the beta version:

  • Selection modes – Single and Multiple
  • Interactive selection boxes (AutoCompleteBox like)
  • Complex clause filtering (quotes, negative clauses, multiple word clauses)
  • Customizable filters
  • Customizable RadGridView in the drop down
  • Matches highlighting
  • Custom keyboard and mouse navigation
  • Text for empty selection
  • Editor update delay
  • Resizing at run-time
  • Design time support
  • Open drop down when typing
  • Automation support level 1

We hope you'll enjoy RadMultiColumnComboBox,and please do share your feedback in the comments below or in our feedback portal. Now is the best time to give this control a try and let us know if you need any additional functionality, so we can consider it for the official release of the control.

Crystal Theme (WPF)

One of our commitments as UI components vendor is to always bring new beautiful theming options for your desktop applications. Following the Fluent Theme (from R1 2018), we are now introducing a Mac OS inspired theme, delivering the well-known look and feel to your WPF apps. Apple has been a trendsetter with their clean UI, and with the Crystal theme you will be able to bring a similar look and feel to your own apps.

You can see this theme in action on a handful of popular controls below:

As with our other recent WPF themes, you can easily customize the theme colors to suit your taste with the Color Theme Generator for WPF! For more details about all the features of the theme, please check out this help article.

FileDialogs: Network Locations (WPF)

This was the most voted feature for our FileDialogs – to add support for browsing network locations. Now it is live with this release, so go ahead and check it out! I hope this feature will unleash your productivity even further when using the FileDialogs for WPF. For more details take a look at the article from our help documentation here.

Image Editor: Selection (WPF)

Using the new selection feature, you will be able to deliver a better experience and higher productivity to your users when dealing with images. The control now provides a few built-in selection types (as well as the option to implement your own selection geometry), allowing the user to select a certain area of the image and apply effects to it.

ImageSelection

ChartView3D: Line Series (WPF)

If you are fan of data visualization components, you will surely appreciate our new cool LineSeries3D. The line series visualizes three dimensional data represented by a line shape. For more details, feel free to check out the following link.

 

PdfViewer: Bookmarks (WPF)

The newest addition to the features of the RadPdfViewer this release is Bookmarks support. Bookmarks, also known as Outlines, are a tree-structured hierarchy that is shown by the viewer as a table of contents separated from the actual content in a side pane. Importing and showing documents with such a structure was one of the most highly requested features for the control.

The implementation entailed the creation of a whole new satellite control to the RadPdfViewer: RadPdfViewerNavigationPane. It can be easily added to the existing configuration with just one line of XAML:

<telerik:RadPdfViewerNavigationPaneRadPdfViewer="{Binding ElementName=pdfViewer, Mode=OneWay}"/>

Voilà, the result can be seen in the screenshot below:

Other Features and Improvements

These are just the highlights. We have made plenty of other improvements and additions in numerous controls. You can find some of the new things below, and for a full list of the goodies of this release please refer to the R3 2018 Release Notes.

  • Docking (WPF) – Now the unpinned Pane can exceed the screen boundaries through the CanAutoHideAreaExceedScreen property (link).
  • GridView (WPF) - Added SelectedBackground property of GridViewRow (link) and GridViewCell (link) and CurrentBorderBrush property of the GridViewCell (link).
  • Menu (WPF) - Implemented IsMainMenu property (link).
  • ToolBar – Added AutoHideOverflowButton property to automatically hide the overflow button when not needed (link).
  • PivotGrid – Added functionality to hide particular Subtotals through code and through ContextMenu of PivotFieldList (link).
  • ImageEditor (WPF) – Zoom to mouse pointer (link).
  • TreeView – Added IsSelectable property of RadTreeViewItem in order to be able to prevent the selection through UI (link).
  • MaskedInput – Japanese and Chinese IME input improvements.
  • Many improvements in PdfViewer, Sreadsheet and RichTextBox. These include adding the SYMBOL field to our list of supported fields and extensive changes to the DocumentPosition and DocumentSelection API.

Redesigned Documentation Sites

I am also extremely happy to announce the new redesign of the documentation sites for Telerik UI for WPF and Telerik UI for Silverlight, which have been rethought to provide a better user experience that allows you to be more productive and find the information you need even faster. Make sure to check them out and if you have any feedback – please drop us a line

Sign Up for the Webinar

To see the new release in action, please join us on the Telerik UI R3 2018 webinar, on October 2, 2018 at 11a.m.

Save My Seat

Share Your Feedback

Feel free to drop us a comment below sharing your thoughts. Or visit our Feedback portals about UI for WPF/Silverlight and Document Processing Libraries and let us know if you have any suggestions or if you need any particular features/controls.

Try out the latest:

UI for WPF  UI for Silverlight

In case you missed it, here are some of the updates from our last release.

A Modern Release for Telerik UI for WinForms in R3 2018

$
0
0

A modern Hamburger menu, Crystal theme, Agenda view in RadScheduler and Fluent inspired Demo application come in this very modern R3 2018 release of Telerik UI for WinForms.

Ready to dive into all the new updates in the latest release? Let's begin.

modernized-demo-app

The R3 2018 release of Telerik UI for WinForms is packed with new features and improvements. Our flagship demo application has a completely new look and it is also redesigned to support screens on high DPI. The new release features the Hamburger menu, a new Crystal theme, Agenda View in RadScheduler, the RadFormConverter and more. We also worked hard to address more than 120 public feedback items.

Hamburger Menu

The Hamburger Menu is a UX paradigm incorporating a collapsible navigation pane and a sidebar menu. It is used in the modern Windows 10 applications such as Groove, Mail and Calendar. The pane works as a top-level container of other controls added to the form. We decided to implement it inside the RadPageView and add a new view to it, the Navigation View. The new view also supports four different display modes covering various use cases: Auto, Minimal, Compact, and Expanded

  • Auto: This mode switches between the other modes depending on the available free space.
  • Minimal: With this mode the pages items are displayed in popup, only the header and the hamburger button are visible.
  • Compact: This mode displays only the icons of the pages items.
  • Expanded: Displays both the icons and the text of the items.

hamburger-menu

Crystal Theme

The Crystal theme is the latest addition to our themes pack. We know that staying fresh and modern with your applications is really important, so a new theme is a logical addition to the suite. Go ahead and test it in the all-new demo application or inside the ThemeViewer tool.

crystal-theme

Agenda View

We are happy to introduce the Agenda View in RadScheduler. This feature has been requested by you, our users, as a result of our survey - so please, if you have great ideas, be sure not to miss the next survey. As to the Agenda View itself, it provides a convenient UI for presenting a large number of appointments in a grid-like interface. It can be operated in a similar way as the other views in the RadScheduler, and it is also added to the scheduler navigator control.

agenda-view

Fluent Inspired Demo Application

We also put great effort into our demo application. Now it has an awesome new design naturally inspired by the latest design threads around Fluent and supporting high DPI. Besides bringing in the latest UI and UX paradigms, the demo app can also serve the purpose of an example for achieving an auto-sizing layout. This is really important when your application scales under higher DPI.

Old Demo App vs Fluent Inspired Demo App

old-demo-vs-new-demo

Other Top Hightlights

RadFormConverter

The RadFormConverter is a Visual Studio component which can be dragged straight from the toolbox. It is a powerful tool for converting standard forms to RadForm and RadRibbonForm. Once the standard form has been converted to a RadForm the first thing you should try is any of our awesome themes, e.g. the Crystal one.

radformconverter

Polar Marked Zone Annotation

We have updated our popular RadChartView control with a new marked zone annotation compatible to the Polar area. It is now possible to mark certain areas of the view port and denote significant values way with arc segments.

 

marked-zone-annotation

A Ton of Other Improvements

We added a lot of new features in this release, but still worked hard to address more than 120 items logged on our public Feedback Portal. Make sure to also check the release notes for a complete list of what's changed.

Try it Out

You can download and try the latest version of Telerik UI for WinForms to explore all the new features and themes.

Download Free Trial

To see the new release in action, please join us on the Telerik UI R3 2018 webinar, on October 2, 2018 at 11 a.m.

Save My Seat

We'd love to hear how this all works for you, so please let us know your thoughts by visiting our Feedback Portal or by leaving a comment below.

DataGrid and Calendar MultiDay View Improvements in Telerik UI for UWP R3 2018

$
0
0

Our latest official release of Telerik UI for UWP features more options in the MultiDay view of the Calendar, nested PropertyName support, major bug fixes for the DataGrid and more.

Building on the improvements introduced in the Calendar in our previous release, we have continued to improve its scheduling capabilities. At the same time, we also focused on another major control of the Telerik UI for UWP suite – the DataGrid.

Let me provide you with some more information about the improvements we made for the DataGrid control and Calendar’s scheduling capabilities.

Weekend Visibility Support in the Calendar

We are extending the scheduling capabilities of the MultiDay view with the ability to exclude/include weekends from the timeline. Bringing that additional configuration to the control extends the way the MultiDay view is visualized with a more convenient visualization of appointments to the end user.

CalendarWeekendsVisible

Nested PropertyName in the DataGrid

Using the PropertyName of the DataGridColumns is a major functionality that allows you to visualize the desired value of the business object. We have extended this functionality to provide the ability to easily bind and visualize more complex type of objects – for example binding of an object to a property. To do that, simply use dot notation when specifying the column PropertyName: 

NestedPropertyName

Watch the Webinar and Learn More

To see the new release in action, please join us on the Telerik UI R3 2018 webinar, on October 2, 2018 at 11a.m.

Save My Seat

Try it Out and Share Your Feedback

Take a look at the open source UI for UWP project when you have a chance. There you can share your feedback or add your own contributions. We highly appreciate any contributions that will help us improve the controls, so please share your thoughts and ideas! You can download a trial and get support directly from our site as well.

New Features and Improvements in Telerik Reporting R3 2018

$
0
0

We are excited to announce some great new features in the latest release of Telerik Reporting, with improved visualizations, PDF/A exporting and more. Read on to see everything that's new in R3 2018.

It's time to share all the latest improvements in Progress Telerik Reporting, including data consolidation within Pie Charts, PDF/A exporting, the ability to email reports from the report viewers, a better display of missing values in the Line and Area Series of the Graph, and finally many bug fixes.

In this blog post I will elaborate on the important improvements and bug fixes we have introduced in the 2018 R3 release.

Pie Charts Data Consolidation 

We've increased the data representation of pie charts by consolidating insignificant data into a single slice.

1

With the R3 2018 release, we've made it easier to represent pie chart data in an easily consumable form. Report authors can now consolidate small slices in pie or bar charts wherever applicable, so that chart visualizations don’t get cluttered.

2

PDF/A Export

You can now utilize this highly-compatible version of the PDF format to match end-users' requirements.

3

PDF is the most used export format in Telerik Reporting. In our third release of 2018, we’ve added support for the PDF/A ISO-standardized version of this format, specialized for use in archiving and long-term preservation of electronic documents. It is self-contained in terms of needed assets (e.g. fonts, encryptions, annotations), ensuring that the document will look exactly as-is on any machine.

4

Email Report from The Report Viewers

End-users are now empowered to directly initiate an e-mail that includes the viewed report as an attachment.

5

With R3 2018, we’ve enhanced the end-user experience by allowing users to easily compose a new email message containing the generated report as an attachment. That eliminates the need to export and save the file on the system prior to sharing via e-mail.

6

Correctly Display Missing Values in Graph’s Line and Area Series

The Graph item now correctly represents the data points with missing values in line and area series in a Cartesian coordinate system. This allows you to configure the appearance and styling of the segments as needed.
7

Eliminated Bugs

As always, we've worked hard to eliminate bugs and make Telerik Reporting as smooth and stable as we can. For the full list of all the bug fixes, check the release notes for Telerik Reporting and Telerik Report Server.

Try it Out and Share Feedback

We want to know what you think—you can download a free trial of Telerik Reporting or Telerik Report Server today and share your thoughts in our Feedback Portal, or right in the comments below.

Start your trial today: Reporting TrialReport Server Trial

Tried DevCraft?

You can get Reporting and Report Server with Telerik DevCraft. Make sure to downloaded a trial and check it out, or learn more about all our DevCraft bundles. DevCraft gives you access to all our toolsets, allowing you to say “no” to ugly apps for the desktop, web or mobile.

Localization, Single Sign-On & More in Telerik Report Server R3 2018

$
0
0

Telerik Report Server R3 2018 comes with lots of new features and exciting improvements for users and implementors – it’s all here for you to explore and learn.

Our fall release of Telerik Report Server is already live and brings extended localization support, enhanced scheduling and alerts, mail templates for external users, new version of REST APIs, configurable deployment tools and a custom login provider for single sign-on scenarios. Along with the many improvements gained from Telerik Reporting, it is certainly a thing not to miss. Check the list of the main features we implemented for R3 2018 below.

Localization of Telerik Report Server Manager

The Report Server localization is finally complete, as we've now exposed all the necessary text resources to enable localization capabilities for all strings in the Report Server management UI. Developers can now customize or translate texts in both the Report Management and Report Designer applications. This feature is especially valuable when Report Server needs to be deployed in different languages for better targeting its audience.

report-server-localization

Improved Scheduled Tasks and Data Alerts

We enabled the delivery of a batch of reports in a single e-mail as a result of successfully executed scheduled task or data alert. Configurable mail templates for external subscribers for a certain task or alert are also a valuable addition. These line-of-business features will improve the user experience of report server subscribers, making report delivery to their mailboxes easier.

scheduled-tasks-multiple-reports

REST APIs Version 2

Integrating the server with the clients’ applications using our REST APIs is getting more and more popular. We realized there are some aspects of the APIs that should get improved and extended. With R3 2018, we introduce our Report Server REST APIs version 2, giving developers even more flexibility when managing the server programmatically within their applications. Hate writing C# plumbing code to call web API endpoints? We’ve got you covered, as we're also releasing a C# client for all API endpoints.

restapi

Pre-configured Report Server Deployment Tools  

Deploying a preconfigured Report Server instance along with its assets can be a challenging task. To help you, our developer clients, we have prepared a set of tools that allows easy, command-line based Report Server installation and assets import, prepared from the development copy of the Report Server. These functionalities will be useful in continuous deployment scenarios, where the target storage needs to be regularly updated.

deployment

Single Sign-On Experience with Custom Login Provider 

A Single Sign-On takes place when the Report Server Manager needs to be accessed as a part of another web application - usually an enterprise web application or company business portal. In these cases, the users that have already authenticated themselves against the company application should not be forced to enter their credentials again to login to Report Server Manager. Instead, they must be seamlessly and securely logged-in when the browser gets redirected to the Report Server URL from the calling web application. Now Report Server provides a Single Sign-On experience through the configurable Custom Login Provider.

sso

Since Report Server employs the Reporting engine for processing and rendering the reports, it also benefits from the Telerik Reporting enhancements introduced in R3 2018 - sending emails directly from report viewers, PDF/A export, data consolidation for pie charts, improved representation of null values in Graph item and many more. You can take a look at the full list of the new features in Telerik Reporting here.

Improved Stability

For a detailed list of all the fixes that are a part of this release, check out the current Report Server release notes.

Try it Out and Share Feedback

We want to know what you think—you can download a free trial of Telerik Reporting or Telerik Report Server today and share your thoughts in our Feedback Portal, or right in the comments below.

Start your trial today: Reporting Trial Report Server Trial


Tried DevCraft?

You can get Reporting and Report Server with Telerik DevCraft. Make sure you’ve downloaded a trial or learn more about DevCraft bundles. DevCraft gives you access to all our toolsets, allowing you to say “no” to ugly apps for the desktop, web, or mobile.

JustMock is Ready to Rock with Even More Supported C# Features in R3 2018

$
0
0

The JustMock R3 release is now live, bringing support for C# 7 features "ref return values and ref locals," "local functions" as well as "named parameters" and mocking of non-public property setters.

If you have struggled with how to test a method that returns a reference, or the local function defined in a method, then this is the blog post you should read. Read on to see everything that's new in the Telerik JustMock R3 2018 release.

Ref Return Values and Ref Locals

If you have followed the development of C# language you couldn’t miss the introduction of “ref return values and ref locals.” Testing this feature in the code is often related to the word struggle. The R3 2018 release makes the testing as easy as writing several lines of code. Consider the following methods that should be tested:

internalclassFoo
{
    privatestaticint[] array = { 1, 2, 3, 4, 5, 6 };
 
    publicrefintGetRefReturnInstanceWithArgs(refintp)
    {
        refintlocal = refarray[0];
        local += p;
 
        returnreflocal;
    }
     
    privatestaticrefintGetRefReturnPrivateStaticWithArgs(refintp)
    {
        refintlocal = refarray[0];
        local += p;
 
        returnreflocal;
    }
}

One of the intriguing parts of testing this code is how a value considered ref return can be created and returned instead of the original value. JustMock introduces a dedicated delegate for handling such a scenario and a helper class LocalRef which simplifies its usage. Check the following code to see a test example of how the ref return value is created and used:

[TestMethod]
publicvoidMockRefReturnInstanceMethodWithArgs()
{
    // Arrange
    intexpectedValue = 12;
    var sut = Mock.Create<Foo>();
    LocalRefHandle<int> localRef = LocalRef.WithValue(expectedValue);
    Mock.Arrange(sut, s => s.GetRefReturnInstanceWithArgs(refArg.Ref(Arg.AnyInt).Value))
        .Returns(localRef.Handle)
        .OccursOnce();
 
    // Act
    intparam = 10;
    refintresult = refsut.GetRefReturnInstanceWithArgs(refparam);
 
    // Assert
    Mock.Assert(sut);
    Assert.Equal(expectedValue, result);
}

And what about when the method is private or even private static? It should be a lot harder to test it, right? Not at all.

We are following the already known approach of mocking nonpublic API with the Mock.NonPublic expectation. But for the sake of avoiding confusion about which exact arrange method in the nonpublic expectation should be used, we extracted the required logic in a separate interface named INonPublicRefReturnExpectation.

Check the following test example:

[TestMethod]
publicvoidMockRefReturnPrivateStaticMethodWithArgs()
{
    // Arrange
    intexpectedValue = 12;
    Mock.SetupStatic<Foo>();
    LocalRefHandle<int> localRef = LocalRef.WithValue(expectedValue);
    Mock.NonPublic.RefReturn.Arrange<Foo, int>("GetRefReturnPrivateStaticWithArgs", ArgExpr.Ref(1))
        .Returns(localRef.Handle)
        .OccursOnce();
 
    // Act
    var privateAccessor = Mock.NonPublic.MakeStaticPrivateAccessor(typeof(Foo));
    intparam = 10;
    refintres = refprivateAccessor.RefReturn.CallMethod<int>("GetRefReturnPrivateStaticWithArgs", Arg.Ref(param).Value);
 
    // Assert
    Mock.Assert<Foo>();
    Assert.Equal(expectedValue, res);
}

As I said, several lines of code for a test following the Arrange, Act, Assert (AAA) testing pattern and the struggle is over. If you need more information you could check out our documentation article on the subject.

Local Functions

Local Functions is another feature of the C# language that developers get excited to use when they first hear about it. But then they take a step back after stumbling over the question of "how to test a local function?" The reason is simple. Until now there was no effective and maintainable way of testing local functions.

Telerik JustMock is now the first tool that provides support for testing and mocking local functions in reliable manner. Now to the more practical part. How exactly I can write my tests? Consider the following class that should be tested:

internalclassFoo
{
    publicintGetResult()
    {
        return100 + GetLocal();
        intGetLocal()
        {
            return42;
        }
    }
}

To mock this simple local function, I would need information about the name of the class, the name of the owner method and the name of the local function. Here is what the test would look like:

[TestMethod]
publicvoidTestBasicScenario()
{
    //Arrange
    var sut = Mock.Create<Foo>(Behavior.CallOriginal);
    Mock.Local.Function.Arrange<int>(sut, "GetResult", "GetLocal").DoNothing();
 
    //Act
    var result = sut.GetResult();
 
    //Assert
    Assert.AreEqual(100, result);
}

You can see that the mock is created with the call original behavior. This is required for the owner method GetResult to execute the original code.

This was the most basic case, but what about if an overload that takes parameters and has a local function as well is added later to the code? Consider the following overload:

publicintGetResult(intparam)
{
    returnparam + 100 + GetLocal();
    intGetLocal()
    {
        return200;
    }
}

Well in this case another test should be written for the second overload with providing information about the types of its parameters. Here is what the test would look like:

[TestMethod]
publicvoidMockGetResultParams()
{
    //Arrange
    var sut = Mock.Create<Foo>(Behavior.CallOriginal);
    Type[] containingMethodParamTypes = newType[] { typeof(int) };
    Mock.Local.Function.Arrange<int>(sut, "GetResult", containingMethodParamTypes, "GetLocal").Returns(42);
 
    //Act
    var resultParams = sut.GetResult(10);
 
    //Assert
    Assert.AreEqual(42, resultParams);
}

JustMock now supports also directly executing a local function. Simply use the Call method in the IFunctionExpectation interface. Consider the following class that should be tested:

internalclassFoo
{
    privateboolIsEven(intvalue)
    {
        boolisEven = (value % 2 == 0)? true: false;
        returnisEven;
    }
 
    publicvoidMethod()
    {
        boolresult = LocalFunction(10);
        boolLocalFunction(intvalue)
        {
            returnIsEven(value);
        }
    }
}

And here is what the test would look like:

[TestMethod]
publicvoidCallLocal()
{
    //Arrange
    var sut = Mock.Create<Foo>(Behavior.CallOriginal);
    Mock.NonPublic.Arrange<bool>(sut, "IsEven").Returns(false);
 
    //Act
    var result = Mock.Local.Function.Call(sut, "Method", "LocalFunction", 14);
 
    //Assert
    Assert.Equal(false, result);
}

If you're wondering, JustMock supports also local functions used in private and static methods and classes. For more information you could check our documentation article.

Mocking Non-Public Property Setters

If you have used some unpleasant workaround to mock a non-public property setter than I have good news for you. You can safely delete it. We have introduced the ArrangeSet method in the INonPublicExpectation interface accessible through the Mock class to help you test those private setters. Just take a look at the following test example to get a better understanding of the concept.

Here is the private property that would be tested:

publicclassFoo
{
    privateintIndex { get; set; }
}

And here is what the test should look like:

[TestMethod]
publicvoidMockNonPublicPropArrangeSet()
{
    // Arrange
    intexpectedValue = 20;
    var sut = Mock.Create<Foo>(Behavior.CallOriginal);
    var privateAccessor = Mock.NonPublic.MakePrivateAccessor(sut);
    Mock.NonPublic.ArrangeSet(sut, "Index", 12).DoInstead(() => privateAccessor.SetProperty("Index", expectedValue));
 
    // Act
    privateAccessor.SetProperty("Index", 12);
    intres = (int)privateAccessor.GetProperty("Index");
 
    // Assert
    Assert.Equal(expectedValue, res);
}

Named Parameters

Named parameters has been a feature of C# for a long time now and it is quite popular among developers. Therefore, a while back we introduced support for mocking instance methods accepting named parameters. But we hadn't implemented support for mocking static methods accepting named parameters. This is now done, and it is as simple as arranging a normal static method. Check the following test example:

Here is the class and the method that would be tested.

internalclassFoo
{
    publicstaticvoidStaticAction(intparam1 = 0, intparam2 = 0, intparam3 = 0)
    {
        thrownewNotImplementedException();
    }
}

And here is what the test should look like:

[TestMethod]
publicvoidTestStaticMethodAcceptingNamedParameters()
{
    // Arrange
    Mock.SetupStatic<Foo>();
    Mock.Arrange<Foo>(() => Foo.StaticAction(param2: 2, param1: 3)).OccursOnce();
 
    // Act
    Foo.StaticAction(3, 2);
 
    // Assert
    Mock.Assert<Foo>();
}

Check Out the Latest Version and Share Your Feedback

Make sure to try the latest version of JustMock and get back to us with your feedback. It is already available for download in your account.

Not a JustMock customer? Feel free to download a free 30-day trial.

Start My JustMock Trial

Watch the R3 Release Webinars

To see all the latest changes and updates across our new release in action, please join us on the Telerik UI R3 2018 webinar, on October 2, 2018 at 11 a.m.

Save My Seat


Invest In Your Digital Products Up Front or You’ll Pay for Them Forever

$
0
0

It can be tempting to delay investing in great user experience design up front, but there are large hidden costs to cutting this corner.

You’re all set to make a slam-bang digital product. You want it to be your organization’s next big hit. It better be, because users aren’t exactly raving about your current offerings. You must deliver in a tight budget. Naturally, an oppressive deadline looms.

The way you see it, you don’t have time or money for luxuries like user testing or observation. The same goes for personas or prototypes. Strategic investigation? Forget it. You’re going to need to cut all fancy corners. You’ve got the user wish list and a team of developers ready to roll. Time to dive right into code. They can Agile the remaining requirements along the way. Someone can make the new app look pretty just before launch, or even just after.

When a product is hard to use, your organization faces real costs.

We get it. These shortcuts feel like the right thing to do and, at least initially, they save money. But in reality, they only buy you one thing: bad user experience. And a product with bad user experience will cost you forever.

Long-Term Costs of Bad UX

When a product is hard to use, confusing, or badly designed, your organization faces real costs, some of them obvious and others less apparent.

Increased Training Budget
Many companies try to make up for their hard-to-use digital products by training people to use them. The more complex the interface, the longer training takes and the more often it must be repeated.

Increased Support Costs
Poor usability taxes your customer support systems, especially your call center. Poor user experience will generally lead to increased call volume and longer support calls. All help channels (chat, text, email, etc.) will experience this cost.

Expensive Fixes
By the time a product is live, interface design decisions are set in stone. Any problems are exceedingly expensive and difficult to reverse, even if a fix would make an app much easier to use. Either you spend significant money, or do nothing at all.

Wasted Development Time
Taking the cheaper way means cutting requirements corners. Slipshod planning results in sites and apps that require huge amounts of development time for patches and maintenance to keep them functional. Quality suffers and usability remains a nightmare.

Molasses Efficiency
If the frontend of your digital product is hard to use, you can bet the administrative backend will be at least doubly bad. When a supposedly thirty-second update takes ten minutes, you’re seriously cutting into your team’s productivity and racking up huge opportunity costs.

Brand Erosion
Your brand is defined by the experience people have with you. When someone has a frustrating user experience with your app, they don’t blame the app, they blame you. They assume your brand doesn’t respect them enough to consider their time and sanity.

Lost Customers and Market Share
Your customers hate frustrating, unnecessarily complicated sites and apps. They will do anything they can to avoid them. Eventually, your bad UX will drive users away – subscriptions, sales, conversions, revenue, and user engagement of all kinds will plummet. This will allow your competitors to gain an advantage from which you may never be able to recover.

These Costs Never Go Away

Over time, the costs of bad UX will far outweigh the initial investment you could have made in a thoughtful, intentionally designed digital product.

 Invest in a site or app that serves your users and can stand the test of time.

And the day will come when you just can’t make one more patch or temporary fix. The product will lose viability and it will be long before you were ready to invest in something new. At that point you’ll have to make your choice again: go the cheap route and start this expensive cycle over, or invest in a site or app that truly serves your users and can stand the test of time.

Thinking About Investing in Digital Products

Think of your digital products the same way you would any other major project away from work. Let’s take a significant home improvement project: Say your kitchen truly, deeply needs to be remodeled. Floors are falling apart, cabinets are dry rotting, pipes are leaking, and nothing works the way it should. You’ve let it go too long and it must be fixed, now. Sound like any of your apps?

Perhaps you take what seems to be the least expensive and easiest route – you choose the handyman with the cheapest rate or maybe you do it yourself even though you have limited plumbing or carpentry experience.

As things begin to break, you’ll pour time and money into fixing them.

A new kitchen completed this way may work initially, but problems are looming. That shiny new floor may look wonderful, but if no one replaced the rotten subfloor, it’s just a matter of time before it falls apart again. Your freshly painted cabinets are hiding dry rot that’s still underneath. Your pipes don’t leak anymore, but that temporary seal would never pass an inspection.

As things begin to break again, you’ll pour time and money into fixing them, probably multiple times, especially if you keep choosing the cheaper and easier repair options. In a few years, you’ll have wasted more time and money than if you’d simply done it right the first time.

Sites, Apps, and Your Kitchen

This is exactly how many companies approach creating and evolving digital products. Just like our poor crumbling kitchen, their websites, apps, and software require constant upkeep and attention. They’re riddled with hidden or not-so-hidden problems, all of which could be avoided with stronger up-front investment.

Thoughtful Products Save (and Make) Money

Investing in good user experience will do more than prevent disaster. It will better ensure project success, help you meet business goals, and save your company significant money.

Long-Term Advantages of Good UX

Reduced Training Time
Products with a strong user experience require little training. If your site or app serves users excellently, they might not even need to be taught how to use it.

Reduced Support Costs
Happy customers who accomplish tasks easily don’t need to call you for help. Call centers and customer support team costs come right from the bottom line. Imagine what your organization could do with more efficient support delivery.

Higher Product Quality
Going through the trouble of building a user-centered digital product means you’ll focus on other important things like performance, security, forms, and testing. If you address these areas at the beginning, you’ll never see the rampant and expensive problems they can cause later.

More Effective Use of Development Resources
You won’t break the bank maintaining well-planned digital products. What’s more, they’ll stand the test of time. You’ll evolve and expand your site or app more easily in response to users’ needs and changing market conditions – taking care to go through the proper planning and strategy steps for each new addition, of course.

Greater Internal Efficiency
If your digital product is user friendly and you’ve paid due attention to making administration interfaces intuitive as well, your team will spend far less time making updates. They will waste less time doing their job. They will also tear out far less of their hair.

Brand Enrichment
When an app makes someone’s life easier, they recommend it to others. They become repeat customers, possibly even loyal ones. They buy more. They post to social networks. They wear the T-shirt.

More Customers and Greater Market Share
People love simple, straightforward sites and apps. When something is easy to do and emotionally satisfying, people tend to do more of it. They subscribe, they buy, they contact, they engage with your product. You become the competitor that pulls ahead in the market.

Project Success
Intentional user experience strategy can help you make the product the big hit it needs to be. The right planning reduces project risk. It ensures users can complete the right tasks easily and that those tasks align with your business goals.

Stretch to Invest in Great UX

The price tag that comes with thoughtful user experience strategy can feel a little uncomfortable at first. After all, training or hiring team members to build expertise, spending more time on project planning, hiring consultants, interacting with users in real life – all these things cost money up front.

But the real project sticker shock comes when you cut corners. Poorly designed sites, apps, or software consume budget month after month and year after year for as long as they’re around. Stretch your budget up front. Invest in the user-driven route. It will pay off big time in the long run.

If you're looking for a set of developer tools that can help you improve your user experience quickly, check out Kendo UI. For more on why, feel free to take a look at recent interviews by my colleagues Dean and Bekah for their take on Kendo UI as a valuable toolset and an effective force multiplier for UX design.

Announcing DevReach 2018

$
0
0

Software is eating the world. Our lives have billions of problems - or billions of opportunities, based on how you look at it. Software solutions drive much of modern economies and developers have a huge opportunity to shape the quality of human lives. While cloud computing fabric and artificial intelligence may shape our tomorrow, the onus will be on developers to craft humane solutions that enrich lives.

Developers learn best from each other and need to stay on top of the latest technologies. Sharing success and failures is how we learn to architect elegant software solutions. Towards this bigger goal of developer education, we're proud to announce DevReach 2018.

The Why

We're planning on making DevReach 2018 an event for you to remember - the best software developer conference in Central & Eastern Europe. Why, you may ask? 2018 marks the 10 year anniversary of DevReach. We've been putting on DevReach conference for a decade now and yes, that is a big deal. DevReach 2018 promises top notch content, networking amongst the best minds and whole lot of fun. Come join us - you won't want to miss this.

Anniversary

The What

Ok, let's break down the promise of DevReach 2018 - here it is in a nutshell:

  • 3 workshops
  • 3 inspiring keynotes
  • 42+ technical sessions
  • 1 awesome attendee party

DevReach begins this year with a pre-conference day - so you get more out of the time you invest in joining us. Two veterans of our industry - Jim Holmes and David Neal, will host a leadership workshop. This is your opportunity to explore your potential and get hands-on experience that will help you take the next step in your career.

We all need to make our tech industry as welcoming as possible for everyone - and a big part of that entails empowering women. We'll be hosting two hands-on workshops driven by wonderful smart developers - VueVixens and ngGirls. Come join us to code your imagination and let sky be the limit.

Each of the two main conference days at DevReach will kick off with future-facing keynotes, with Richard Campbell and Patricia Realini sharing their tech vision. Then starts the amazing lineup of high quality technical sessions from our stellar speaker lineup - throughout the day to immerse our heads in hardcore software solutions. Here's a smattering of what to expect:

  • The latest developer trends across web/mobile/desktop
  • .NET ecosystem updates
  • AR/VR with .NET
  • The state & future of JavaScript for web & mobile
  • The latest tooling in the web stack
  • Serverless computing
  • AI/ML, Bots & IoT
  • UX best practices

And this year, we'll close out DevReach with a bang - an inpiring closing keynote by David Neal.

We would not be able to pull off DevReach without the support of our wonderful sponsors - a big thank you from the bottom of our hearts. Did we mention cool swag, yummy food and gourmet coffee to power your days at DevReach? DevReach promises to provide a welcoming environment for all and respect for diversity - in both humans and technologies. Bottom line - come learn, network and have fun with some of the smartest developers, designers and thinkers from all over the world.

Where & When

Here's how DevReach 2018 will pan out - packing much awesome in 3 days:

Nov 12

Progress Sofia office

Vue Vixens/ngGirls workshop (AM)
Leadership workshop (PM)

Nov 13

Arena Mladost

Morning keynote and breakout tech sessions

Nov 14

Arena Mladost

Morning keynote, breakout tech sessions and closing keynote

Hotel Grami

Evening attendee party

That's it. Feeling inspired and want to come join us? Get all details and register @ devreach.com. See you at DevReach 2018 in Sofia - come celebrate developers with us!

Improve Your Debugging Skills with Chrome DevTools (Part 2)

$
0
0

Have you mastered the way to inspect the generated HTML and applied CSS? Do you feel confident in debugging JavaScript in the browser? I hope yes, because in this post we cover some advanced techniques using the Chrome DevTools, which will further improve the skills we obtained in Part 1.

As we learn the new skills, we will experiment with some basic examples with the Kendo UI widgets and, at the end of this post, you will find a real-life example to practice your newly obtained skills with the help of the jQuery Grid.

In This Article

Intelligent Code Completion and Auto-Complete

Intelligent code completion and auto-complete are popular features in IDEs that improve developer productivity. In Chrome 68, the DevTools team decided to incorporate similar features into the Console. Specifically, Eager Evaluation, Auto-Complete After Function Execution and Argument Hints.

Let's assume the following function to see how these features work:

function test(yourValue) {
  return {
    value: yourValue,
    multiplied: yourValue * 3
  };
}

Eager Evaluation

Here is what Chrome DevTools will display in the Console with the Eager Evaluation enabled:

This feature enables expression evaluation of code in the Console, provided the expression does not have side effects (i.e. execution does something other than returning a value). You can read more about side effects from the question, JavaScript closures and side effects in plain English? on Stack Overflow.

Tip: You have such an evaluation also when you open the Source tab while in debug mode and you hover or highlight an expression

Auto-Complete After Function Execution

This feature relies upon Eager Evaluation and the same limitation applies due to that—no auto-complete is available if the function has any side effects.

Tip: Save the result of the function in a variable (see Get IntelliSense for the Client-Side Object) and execute the function in the Console to verify the result

Then use the Console API and save the expression to a variable as var lastEvaluatedExpression = $_;.

Argument Hints

This feature provides a pop-up that displays the eligible arguments you can pass when you write the code to invoke a function in the Console or open/hover over its brackets.

Access Selected Elements and Executed Expressions Easily

In the previous section, I referenced a variable, $_ without explaining what it does. It isn't magic; it's part of the built-in command line API. Chrome DevTools will assign objects and expressions to a list of pre-defined variables. For example, the expression, 40+2 will evaluate to 42. For convenience, I may wish to access this result without having to remember a variable name or the expression that created it, or spending 7.5 million years calculating it. With Chrome DevTools, you can now simply use the $_ variable.

The command line API in Chrome DevTools saves some objects and expression results to predefined variables. Other useful shortcuts the Console provides are $0, $1, $2, $3, and $4$0 references the last element selected in the Elements panel, $1 references the previous element, and so on. This can be very useful when you need to get a reference to the DOM element that represents a control or widget and you would like to quickly check its available members.

Let's try this out with the PanelBar demo for Kendo UI, where we'll access and toggle the first item:

Tip: Chrome DevTools can help you with the HTML and DOM changes your application does and give you a hint how you can optimize it (see Blazing Fast List Rendering in Angular)

Inspect Auto-Hiding Tooltips and Elements

Tooltips can be tricky to inspect because they disappear after a period of time. Inspecting other kinds of auto-hiding elements—like those that are displayed through a user interaction (i.e. mouse click and drag)—can be just as difficult. Historically, I've had to use some ugly code to reference and inspect them. Enter setTimeout() and the debugger.

The responsibility of setTimeout() is to execute a specific logic after a given period of time. Another feature is that it reorders the execution of the functions. This comes in handy when you need to execute a function after some quick animations (see Why is setTimeout(fn, 0) Sometimes Useful?).

Once we better understand what happens when we use setTimeout(), we can combine its power with the debugger statement so that we can activate the debug mode when the auto-hiding element is shown without worrying that it will disappear if we blink.

The animation below shows how we can inspect the tooltip by evaluating setTimeout(function(){debugger; }, 3000) in the Console:

This image (above) features the drawing API and jQuery Tooltip widget of Kendo UI.

Tip: To log the currently-focused element once it is changed paste the following code in the console: window.focusedelement; setInterval(function(){ if(window.focusedElement != document.activeElement){window.focusedElement = document.activeElement; console.log(document.activeElement)}})

To clear the interval, reload the page or use clearInterval():

Advanced Debugging with Chrome DevTools

Let's explore other approaches to break the page execution and check the current values of the variables.

DOM Change Breakpoints

These break when the structure or attributes of the selected DOM element change, or it is removed via JavaScript. To toggle this feature: right-click on the element in the Elements panel, hover Break in the context menu and choose "subtree modifications", "attribute modifications" or "node removal".

XHR/Fetch Breakpoints

These break when the request URL contains the string configured for the breakpoint. To toggle this feature: expand the XHR Breakpoints pane in the Sources panel, click the Add breakpoint button and enter the desired URL part.

Event Listener Breakpoints

These break when the desired mouse, keyboard, device, animation, etc. event is fired. To toggle this feature: expand Event Listeners Breakpoints in the Sources tab and check the desired (category of) events.

Exception Breakpoints

These break when a handled or unhandled exception is thrown. To toggle this feature: click the Pause on Exception button in the Sources tab; when these exceptions are enabled, an additional option to Pause on caught exceptions is available.

Once you get familiar with breakpoints, you might enable many and, at some point, it may turn out that you are skipping most of them. In this case, you can use one of the possibilities to continue the page execution uninterrupted:

  • Click the Continue button to show a dropdown and choose the Continue without interruption button
  • Close the Chrome DevTools quickly by pressing F12

The Sources tab has a few more panes that are worth mentioning:

  • Watch expressions tab: lets you monitor the values of variables or evaluations of expressions over time
  • Call Stack section: shows the execution path, in reverse chronological order, that brought the code to that breakpoint
  • Scope pane: shows you what local and global variables are currently defined

Execution Contexts in Chrome DevTools

Have you ever received a ReferenceError (saying that the function is not defined) while trying to execute an already declared function in the browser console? You are not alone, it happens to everyone.

One reason you receive such an error could be that the page containing the script is loaded in an <iframe>, thus in a different execution context. In short, an execution context is like a scope and every page, <iframe> or browser extension has its own execution context. You can toggle between the different contexts through the dropdown in the Console:

Some points about execution contexts:

  • Inspecting an element automatically switches the execution context to the page that contains the inspected element
  • To get the logs from all context in the Console, uncheck the "Selected context only" in the Console settings
  • On the right-hand side, you have a link to the file that executed the function responsible for the log

The contexts are clearly visible in the Kendo UI Dojo, which we will use to test the provided tips.

Example: Kendo UI jQuery Grid

You were waiting for this while reading, right? Here is the sample task that would involve most of our newly obtained skills.

Task: Use JavaScript to change the background of the floating element created when dragging a header in this Dojo example based on the Kendo UI jQuery Grid demo.

Try that yourself and if you need help, check the following hints:

By now, you should feel confident when working with Chrome DevTools—no CLI magic, auto-hiding elements or complex debugging scenarios can stand in your way. We've shed light on them all and defeated the dark side. Jokes aside, I hope this article was helpful and solved at least one difficult question you had—let me know. Do you know other tips and tricks? Please share (because you care) in the comments section below!

How to Use a jQuery Autocomplete UI Component in Your Web App

$
0
0

The Autocomplete component enables you to provide users with a list of options or suggestions based on what they type into a text field. This blog dives into the ins and outs of the jQuery Autocomplete component and shows you how to get started.

In the last episode of this series, we covered the `ComboBox`. This component allows you to select a single option from a list or enter a custom value. In this episode, we will learn about the jQuery `AutoComplete` component. This consists of a text field that displays a list of options based on what is typed into the field. It is also possible to make multiple selections and enter your own input. An `AutoComplete` is typically seen in search fields. When there is a large dataset to select from, like a store catalog, it is an added convenience to provide suggestions and filter the options for the user. Coming up, we will look at the how to use the jQuery `AutoComplete` component.

Basic Kendo UI AutoComplete 

To get started, you will need to create an `input` element and configure the list of options in the component’s API using an array or a remote data service. In the following example, we will use the `dataSource` property to add an array. Our array will represent products in a grocery store. Here is the implementation:

Kendo UI Autocomplete 

 

 
```html
 
<!DOCTYPE html>
 
<html>
 
  <head>
 
    <meta charset="utf-8">
 
    <title>AutoComplete</title>
 
 
 
    <script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
 
 
    <style>
 
      body { font-family: helvetica;}
 
    </style>
 
  </head> 
 
  <body>
 
    <input id="autocomplete"/>
 
    <script>
 
      $(document).ready(function(){
 
        $('#autocomplete').kendoAutoComplete({
 
          placeholder: 'Search products',
 
          dataSource: ['cookies', 'cheese', 'milk', 'donuts', 'avocados']
 
        });
 
      });
 
    </script>
 
  </body>
 
</html>
 
```

By default, you will only see the options when you begin typing into the field. The suggestions shown will be filtered by items that start with the text. This can be changed by setting the `filter` property to another option like `contains` or `endswith`. If there are no options that start with the text, a default message will appear. You can customize the view when there is no data by configuring the `noDataTemplate` property. If you type something in the field but then erase it, all of the options will show. If you want to select multiple options, you add the `separator` property.

Grouping Items in the AutoComplete 

Our data does not have to be a string of items. It can also be objects with multiple fields. Say we wanted to show extra information about the products in the suggestions. We will change our data to have a field for the text and one for the category of the product. Then we will group together items by category in the dropdown. To do this, we will first add a `dataTextField` so that the component knows which field in the data to use as the displayed text. Then, our `dataSource` will be changed to an object that now has a `data` field that contains our array, and a `group` field which specifies the field name in our data to group by. This is the updated code:

Kendo UI Autocomplete 

 

```js
 
dataTextField: 'label',
 
dataSource: {
 
  data: [
 
    {label: 'cookies', category: 'bakery'},
 
    {label: 'cheese', category: 'dairy'},
 
    {label: 'milk', category: 'dairy'},
 
    {label: 'donuts', category: 'bakery'},
 
    {label: 'avocados', category: 'produce'}
 
  ],
 
  group: {field: 'category'}
 
}
 
```

The appearance of the popup can also be customized. By default, the label for the groups will only show the name of the group. The top label for the group can be changed using the `fixedGroupTemplate`. This always shows the current group. If our list were longer, its value would change as we scrolled through other groups in the dropdown. The other groups are customized through the `groupTemplate` property. Each item in our data can also be rendered with custom HTML using the `template` property.

Summary

The jQuery `AutoComplete` component generates a list of filtered options that we can choose from based on the value of the text field. Previous components that we have reviewed share some similarities with the `AutoComplete` and each other. However, they differ in either their selection type and their editability. Below is a comparison of their features.

Component

Selection Type

Editable

AutoComplete

Multiple

Yes

ComboBox

Single

Yes

MultiSelect

Multiple

No

DropDownList

Single

No

 

Each of these components allows filtering and can be customized with templates. The difference in functionality is what will determine when and where you will use each one in your app. The `AutoComplete` is ideal for searching. A `ComboBox` is suitable when selecting numbers. The `MultiSelect` can be used for tagging. And a `DropDownList` can be used as a replacement for a select menu. In the next lesson, we will review the `MaskedTextBox`. The purpose of this component is to control the kind of data a user can enter in the text field.

Try Out the Autocomplete for Yourself

Want to start taking advantage of the Kendo UI Autocomplete, or any of the other 70+ ready-made Kendo UI components, like jQuery Grid or Scheduler? You can begin a free trial of Kendo UI today and start developing your apps faster.

Start My Kendo UI Trial

Angular, React and Vue Versions

Looking for a UI component to support specific frameworks? Check out the Autocomplete for Angular, the Autocomplete for React or the Autocomplete for Vue.

Resources

Visualizing the State of the Web

$
0
0

Recently, the folks at dev.to conducted its State of the Web Survey, which was completed by 1899 respondents. The results were shared online and a call to arms was put forth: State Of The Web Data - Call For Analysis! I took the challenge to visualize this data using Kendo UI:

SOTW Survey 2018 + kendoka-sitting-tiny

In this blog post, I'll show you how I built this page. In particular, I'll focus on two sections of the survey that I found to be the most interesting; a set of opinion statements and a series of yes/no questions. Both of these were built using Kendo UI, which provides the building blocks for creating rich data visualizations. At the end, I think you'll agree that it's fun to paint outside the lines.

Visualizing Opinion Statements

The State of the Web survey asked developers to provide opinions on a series of statements. For example:

Web innovation is outpacing native

Respondents were asked to provide their opinions on these statements by scoring them from 0 (disagree) to 10 (agree).

In total, 18 statements were scored with 11 different values for each (0-10, inclusive; excluding blank scores). Given the breadth of score values across a large number of statements, I felt the Grid was the best control to use in order to display this data in a meaningful way.

To begin, I tabulated these opinions into the following data structure:

// opinionData.json

[
  {
    "text": "Web innovation is outpacing native",
    "a0": 32,
    "a1": 10,
    "a2": 29,
    "a3": 39,
    "a4": 76,
    "a5": 286,
    "a6": 253,
    "a7": 401,
    "a8": 361,
    "a9": 131,
    "a10": 209,
    "Blank": 72
  },
  // other opinions and vote totals here...
]

Each opinion (text) is represented in an array with the total votes for each answer (a0 equals 0 or disagree, a10 equals 10 or agree). Afterward, I bound this data to a Grid with an element ID, opinionGrid:

$("#opinionGrid").kendoGrid({
  columns:  [
    { field: "text", title: "Opinion (0: Disagree, 10: Agree)" },
    { field: "a0", title: "0" },
    { field: "a1", title: "1" },
    { field: "a2", title: "2" },
    { field: "a3", title: "3" },
    { field: "a4", title: "4" },
    { field: "a5", title: "5" },
    { field: "a6", title: "6" },
    { field: "a7", title: "7" },
    { field: "a8", title: "8" },
    { field: "a9", title: "9" },
    { field: "a10", title: "10" }
  ],
  dataSource: { data: opinionData }
});

This configuration generates an informative but rather bland-looking Grid:

The Grid provides a number of built-in features like paging, sorting, and filtering. Enabling sorting is easy; simply set the sortable property to true and your users will be able to perform sort operations by clicking on the column header. Sorting by column, 10– indicating the most agreement with an opinion – we can see that many developers felt most strongly against online advertisements:

Unfortunately, sorting data is this manner doesn't tell the whole story. Other questions remain. For example, where are opinions clustered? Do the majority of developers agree or disagree with an opinion? Or, are they indifferent? The data – as it's presented here – doesn't hold much semantic weight.

Let's Add Some Color

The good news is that we can improve this situation by adding color to denote the value of a cell. This is accomplished by defining a row template for the Grid. This is a useful extensibility mechanism of the Grid that allows us to control the markup that's generated for each row. We can combine this feature with chroma.js to generate a scale of colors based on the value of each cell:

import chroma from "chroma-js";

const voteBackgroundColor = chroma.scale(["fff","66f"]).domain([min,max]);
const voteColumnColor = function (votes) {
                          return voteBackgroundColor(votes).luminance() > 0.5 ?
                                 "black" :
                                 "white";
                        };

$("#opinionGrid").kendoGrid({
  // ...
  rowTemplate: function (e, data) {
    var template = "<tr data-uid=\"" + kendo.guid() + "\">" +
                   "<td>" + e.text + "</td>" + // opinion column
                   "<td style=\"background-color:" + voteBackgroundColor(e.a0).hex() + ";" +
                               "color:" + voteColumnColor(e.a0) + "\">" + e.a0 + "</td>";

    // output other columns (e.a1, e.a2, etc.)

    template += "</tr>";
return template;
  }
});

I've used chroma.js to define a color scale function called voteBackgroundColor based on the minimum (min) and maximum (max) values in the Grid. (These are calculated elsewhere.) Low values are be represented by a lighter background (white) while high values are be represented by a darker background (blue). These values are generated through the hex() API and applied through the background-color style. The luminance() API of chroma.js is used for the voteColumnColor function to determine the color style for the cell. Brighter colors use black while dimmer colors use white. This provides a level of contrast for a better user experience.

As you can see, adding the color provides more insight into where scores are clustered around particular opinions. A quick glance at this data reveals some clustering for opinions like “I am satisfied with the state of A/B test tooling for the web” and “I dislike ads on the web.” If we ignore the data analysis and look more closely, we get a better sense of the overall appearance after using the luminance of the background color to determine the font color:

This is accomplished without impacting the functionality of the Grid. For example, we can still sort the data:

Calculating and Displaying Averages

Let's take this one step further by adding a column for displaying an average score for each row. This will allow us to determine the most/least supported opinions. If I calculate these values on-the-fly within the rowTemplate function, the Grid would not be able to sort them. That's because operations (like sorting) are conducted through the bound DataSource; not the control to which it's bound (i.e.Grid). Therefore, to preserve the sorting capabilities of the Grid, I must persist the average score in the bound data source:

// scores are 0-10 (inclusive)
function calculateAverages(opinions) {
  for (var i = 0; i < opinions.length; i++) {
    var avg = 0;
    for (var j = 0; j < 11; j++) {
      avg += j * opinions[i]["a" + j];
    }
    avg = avg / total;
    opinions[i].avg = avg;
  }
  return opinions;
}

Once the average score has been added to the bound data source, we can display it in the Grid like so:

$("#opinionGrid").kendoGrid({
  columns: [
    { field:  "avg", title:  "Avg" }
    // other columns here...
  ]
});

Here is the Grid sorted by an average column:

Wow. Developers really don't like ads on the web. They are also optimistic about the future of PWAs and feel that the web is improving for end-users. Conversely, they appear to disagree with the opinions, “the desktop web is typically slow and sluggish” and “I am satisfied with the state of A/B test tooling for the web”.

We can add some punch to the Grid by using the approach we used previously to color each cell based on its value. Here, we'll define another color scale function called fAvg based on the minimum (minAvg) and maximum (minAvg) average scores:

const fAvg = chroma.scale(["fff","999"]).domain([minAvg,minAvg]);

$("#opinionGrid").kendoGrid({
  // ...
  rowTemplate: function (e, data) {
    // ...
    var avgColumnColor = fAvg(e.avg).luminance() > 0.5 ? "black" : "white";
    template += "<td style=\"background-color:" + fAvg(e.avg).hex() + ";color:" + avgColumnColor + "\">" + e.a0 + "</td>";
// ...
  }
});

Here is the Grid with this change:

The data visualization capabilities support both SVG and the HTML5 <canvas> element.

Let's Add Sparklines For More Zing

A Sparkline is a small chart that you can embed into other controls like the Grid. It is super-economical in terms of screen real estate because it packs a lot of information into a tiny space.

Let's add another column to display a Sparkline for each row. We'll have to get a little creative to do this because the Grid has a rowTemplate defined. I'll create a function that will output the markup that's required to create a Sparkline in a declarative fashion (via data-* attributes):

function getSparkline(data)  {
  return "<td><div class=\"sparkline\"" data-chart-area=\"{background:'transparent'}\" data-role=\"sparkline\" data-series=\"[{type:'column',data:[" + data + "]}]\" data-series-defaults=\"{gap:0.1}\" data-theme=\"material\"></div></td>";
}

I'll add a handler for the dataBound event that fires for the Grid to initialize each Sparkline and generate the Sparkline through the rowTemplate function:

$("#opinionGrid").kendoGrid({
  // ...
  columns: [
    // other columns here...
    { } // add a column for the sparkline
  ],
  dataBound: function (e) {
    kendo.bind(".sparkline");
  }
  rowTemplate: function (e, data) {
    // ...
    template += getSparkline(opinions);
  }
});

Here's the result:

Despite its size, a Sparkline preserves the fidelity of the data by rendering content as SVG. Here's an example at a 500% zoom level:

The Sparkline can also render out to an HTML5 <canvas> element as well.

User Interactions

By default, rows are highlighted in the Grid when a user hovers over them. Since we've applied styles in each of the cells for the background color, this overrides the default behaviour. For example, if we hover over a row, the row's style is overridden by the ones we added earlier in the rowTemplate function:

Let's fix this behaviour with a style rule that highlights each row:

#opinionGrid tbody > tr:hover > td {
  background-color: #ffa !important;
  color: black !important;
}

I'm not a fan of using !important but it's necessary in this case to override the color styles applied earlier. With this change, individual rows will be highlighted when the mouse hovers over them:

Visualizing Yes/No Questions

Another section of the survey asked developers to provide yes/no answers to a series of questions. For example:

Does your team/project support IE 10 and under?

In total, 9 questions were answered (excluding blank scores) as yes or no with associated totals. A suitable approach for visualizing this data is to use the Grid in combination with a Sparkline to create a yes/no chart:

I was surprised to see that not many developers use WebP-formatted images in their web apps. I would have speculated that more developers are using the format these days. I suppose new image formats can take a lot of time to be adopted.

The configuration used to create this visualization is fairly simple:

$("#yesNoGrid").kendoGrid({
  columns:  [
    { field:  "Question"  },
    { field:  "No", headerAttributes:  { style:  "text-align:right;"  }  },
    { field:  "Yes"  }
  ],
  dataBound:  function  (e)  {
    kendo.bind(".yesNoSparkline");
  },
  dataSource:  { data: yesNoData, sort:  { field:  "No", dir:  "desc"  }  },
  rowTemplate:  function  (e, data)  {
    return  "<tr data-uid=\""  + kendo.guid()  +  "\">"  +
            "<td>"  + e.Question +  "</td>"  +
            getYesNoColumn("No", e.No,  "#f66")  +
            getYesNoColumn("Yes", e.Yes,  "#00b312")  +
            "</tr>";
  },
  scrollable:  false,
  sortable:  true
});

Here, we're using the same technique used to create the Grid in the previous section by defining a rowTemplate function. This uses a function called getYesNoColumn which is a helper function for generating the Sparkline:

function getYesNoColumn(vote, voteCount, color)  {
  var votePosition = voteCount >  400  ?  "insideEnd"  :  "outsideEnd";
  var voteLabelColor = voteCount >  400  ?  "#fff"  :  "#000";
  var reverse = vote ==  "No"  ?  ",reverse:true"  :  "";
  var textAlignment = vote ==  "No"  ?  " style=\"text-align:right;\""  :  "";
  return  "<td"  + textAlignment +  "><div class=\"yesNoSparkline\" data-chart-area=\"{background:'transparent',margin:0}\" data-value-axis=\"{max:1899"  + reverse +  "}\" data-role=\"sparkline\" data-plot-area=\"{background:'transparent',margin:0}\" data-series=\"[{color:'"  + color +  "',data:["  + voteCount +  "],labels:{color:'"  + voteLabelColor +  "',position:'"  + votePosition +  "',visible:true},stack:false,type:'bar'}]\" data-series-defaults=\"{gap:0,margin:0,spacing:0}\" data-theme=\"flat\" data-tooltip=\"{visible:false,shared:false}\"></div></td>";
}

This function is used to determine where to place the labels for each Sparkline widget that's generated in the Grid. Notice how the label is placed on the outside of the Sparkline if its value is too small to render inside it:

Go Have Some Fun!

Kendo UI provides the building blocks for creating rich visualizations of data. However, it doesn't limit you from getting creative. In fact, it's fun to paint outside the lines sometimes. As you've seen in this blog post, there's a lot of interesting ways to visualize data with Kendo UI.

You can check out the full survey data visualization I built with Kendo UI up on StackBlitz: SOTW Survey 2018. In the meantime, don't be afraid to have some fun with using Kendo UI for your data visualization projects!

Will Visual Studio 2019 be an Evergreen Release of Visual Studio?

$
0
0

What will future releases of Visual Studio look like? Have we already seen the final big versioned release from Microsoft?

My bet is Yes. And by ‘Yes’ I mean that this is the last big marketing ‘hoopla’ touting the latest and greatest major release. I’d go as far as speculate that future versions, or maybe even the one slated for 2019 will be called simply - Visual Studio. 

Visual Studio Installer

While this does not mean the end of the world as we know it, it may cause some discomfort with traditional .NET developers for very valid reasons.

Let’s dig into the reasons why I think why this is likely to happen:

  1. In the past years Microsoft has gotten a lot more comfortable with smaller releases and continuous delivery. In fact, they have adopted DevOps in so many of their product teams that they even evolved their TFS and VSTS products to what they are now calling Azure DevOps (learn more about that here).
  2. Other names across the Microsoft Ecosystem are evergreen:
    1. Visual Studio Code is just Visual Studio Code (or even VS Code)
    2. Azure is just Azure
    3. Xamarin is just Xamarin
    4. Stepping outside of developer world, Edge is simply that – Edge. Office has also become Office 365. There may even be an idea behind the Redmond walls to name Visual Studio like that too – Visual Studio 365.
  3. Big-bang launches are very expensive, taxing on time and people and are very complex when you’re a global company. In a way, to a marketer, a rolling thunder of product releases is a blessing. One can easily piggy-back on the other big initiatives in the market (Microsoft Build and Ignite conferences).
  4. Visual Studio is almost completely modular these days. Since all the workloads and individual components can be updated independently, it not necessary to update the core Visual Studio application with major release numbers each cycle. Furthermore the modules themselves are often updated automatically in the same manner an evergreen Visual Studio would.

Modular Visual Studio

Yes, there are going to be releases, continuous deployment and the ‘dot’ versions that John Montgomery, Visual Studio Director of Program Management, hinted at his blog post about Visual Studio 2019. But probably not massive unveils like what we’ve seen in the past.

And now let’s consider what could be holding Microsoft back from such a decision.

It usually starts by someone asking – How about the Enterprise?  Many enterprises have IT policies on how many releases ‘behind’ a department can be before being forced to upgrade to the newer version.  Usually, this blanket policy decision has been made for security reasons – newer releases are seen as more secure, and generally come with security patches. This is actually what we’ve heard from our own customers, and one of the main reasons we’ve settled on three major annual releases, like our most recent one just last week. If there is a reason Microsoft keeps versioning big releases in annual increments, this may as well be it.

Have enterprises evolved through the increased use of open source, or even within the Microsoft ecosystem itself through tools such as Visual Studio Code or Azure? Have developers in enterprises wrangled away more control of their environments, and has the DevOps movement made us all love each other more? Maybe. I’d love to hear from you – let us know what you think either through the comments below or through the Twitter poll we created to see what our community says.

 

This Week’s Comic: The Modern Workplace


What's New in Vue Devtools 5.0 Beta

$
0
0

Debugging Vue apps just got better. Check out the features in the latest beta of Vue Devtools, including the new routing, performance and settings tabs.

Vue Devtools helps with inspecting Vue.js applications, and with the latest pre-release, 5.0 beta.1, there are interesting additions and improvements to Devtools. I've been really excited since I tried it out, and I'm eager to share with you the new features that were added.

This release comes with three new tabs: a Routing Tab, a Performance Tab, and a Settings Tab. It also allows editing of Vuex state from right inside the Vuex tab, which means a better debugging experience!

Let's get started by inspecting this HackerNews clone in Vue, and installing Devtools. Follow the instructions on that GitHub page to set up and start the sample project. Then add the Devtools Chrome extension or Firefox extension, depending on your preferred browser. With that set up, open the app in your browser, open your browser's Devtools and navigate to the Vue tab.

Routing Tab

The Routing tab records the Vue Router's history as you move across pages in your application, and also has a page to show you the routes defined for the application. Hovering over the Routing tab and selecting History will show the recorded history as you navigate through the application. Selecting Routes will show the routes defined for that application.

routing-tab.gif

Performance Tab

The Performance tab shows the analysis of the runtime performance of your app and shows you how long it took the different components in the app to render, as well as the frame rate. To inspect performance, we need to hit the record button at top left corner, then switch between the frame rate and the component render views by clicking one of the buttons at the top right corner.

perf-tab.gif

With Frames per second selected, we can see the frame rate being recorded as we navigate through the application. From the image above, you will notice that there are times when we get a low frame rate. This happened when we switched to a new route. It required fetching the items to display on the page, and rendering a subset of those items on the page. Its default is 20 items on a page. Hovering over the lines shows the frame rate per second. We also get icons above it, with markers R for route, and M for mutations. Hovering over them shows how many routes or mutations it had.

Clicking on the Component render button shows a list of components and how long it took each to render. You can see that the RouterLink component took the longest. Selecting a component shows more information on the right pane. It shows the total and average time it took for the different lifecycle events of that component. I find this valuable, as you can tell what is affecting performance and, therefore, fix accordingly.

Settings Tab

The Settings tab is where we customize options like the Devtools color, display density, and if it should use Pascal case or the original component name when displaying components.

settings-tab.png

Editable Vuex state

In the previous release, we already had the Vuex tab. It allowed us to inspect Vuex state mutations. In this release, we can edit Vuex state directly from Devtools.

edit-vuex-state.gif

From the screenshot above, you can see that when we changed the itemsPerPage to 2, it listed just two items on the list as we moved between pages. This gives us the benefit of changing state and seeing how the app responds.

That's A Wrap!

You've seen the new features in the latest release: the Routing, Performance, and Settings tabs. These are awesome additions, and I'm really looking forward to what's to come in the next beta. Use these tools to your advantage and give your users a better performing app while easily debugging your Vue.js application. And if you're looking for an awesome set of UI tools to improve the look, feel and performance of your Vue apps, don't forget to check out Kendo UI for Vue too.

JavaScript Standardization - An Interview with Jory Burson

$
0
0

An interview discussing JavaScript language standards and the Ecma TC39 committee with Jory Burson of Bocoup.

One of the great things about running events is that, from time to time, you get the opportunity to invite people you admire to speak. For me, that is the case with Jory Burson, who will be one of the day 2 keynote speakers at jsMobileConf in Boston this October 25-26.

Jory Burson

Jory is the standards liaison and former COO of Bocoup, a well-known web platform consultancy out of Boston. I first had the opportunity to meet Jory about seven years ago when I attended one of Bocoup's training courses. As I got to know her over the years, I saw her rise to leadership roles both within Bocoup and within Bocoup's advocacy work as their representative at Ecma International, the JS Foundation, W3C, and the MDN Product Advisory Board.

Jory will be discussing JavaScript's standardization efforts in Ecma TC39 at jsMobileConf, so I thought this was a good opportunity to discuss her background, how she got involved with web standards, and some of the work she's involved in within TC39.

Q: You have a bit of a unique background. Your bio says that you had jobs like teaching media literacy at Oklahoma State, managing restaurants and even raising cows. How did that background lead you to Bocoup and a focus on developer advocacy and open source?

I do have a strange background considering my role. That’s true of a lot of people in web development, and I think it’s a really good thing. We’re building tools, products & services for a LOT of different people, and coming at those challenges from a diversity of experiences, perspectives and ways of thinking just makes the experience sooo much better. To new developers, I’d like to say you never know when or where your life experiences are going to come in handy - please don’t erase or minimize that part of who you are as you go on your path!

I was very active in 4-H & FFA growing up - I showed pigs, cows, horses, and absolutely loved it. I made a ton of friends from all over; we helped each other take care of animals, learn, and compete as a team. This experience is definitely the root of my desire to be part of and contribute to a community.

There were a couple of summers, starting in about 1997, I would come in from the midday heat and go online to play this game about showing horses. You had to make a web page about these fictional horses, and people voted on it. It was really silly but I liked it. The better your page looked, and the better you could tell stories about these fake horses, the better you did.

I think a lot of us came to this field because some other passion or interest brought us here, and over time you learn to think of the platform as a tool rather than an entertainment device. I don’t know when I realized that exactly, but in journalism school I started thinking about how much our communications mediums were controlling our experiences, directly and indirectly. I wanted to be able subvert that, and I wanted to be able to express my own stories, but I didn’t understand enough about how it all worked. So I went to graduate school and studied communications.

My thesis work was on media literacy, which is how we produce, consume, access, and analyze messages and mediums. What I learned in the course of that study has helped me immensely in the years since, especially when it comes to connecting practice and theory. When I became a full-time faculty member I got to put a lot of those ideas together for undergraduates, helping them understand and work with the constraints of the web and other media. My main class was Electronic Communication - the students had to make a web page and blog, cover different kinds of stories, and embed all that media on their sites.

My partner got a job at a startup in Boston in 2011, so we made our big move from Oklahoma. I joined Bocoup to help run and grow a developer training business - my classroom experience and non-traditional background ended up being a great fit both culturally and for the role. Bocoup wasn’t put off by it at all - they really appreciate and celebrate different backgrounds, and encourage you to keep exploring what interests you. So I have them to thank for where I am today, too.

Q: Your talk at jsMobileConf focuses on standardization around JavaScript, which seems to have a long and complicated history dominated by politics of Microsoft and Netscape in the early years. Noticeably, there was a 10 year gap in published standards from 1999 to 2009. How do you think this complicated history impacts the current state of the language standard, if at all? Does politics still have as strong an impact on the process?

History absolutely matters. The first few editions of the language were about direct market competition - Netscape/Sun were looking to publish a JavaScript standard as a defensive strategy against Microsoft. Microsoft was looking to maintain its dominant position by pushing VBScript and JScript - they joined to keep things out of the language. ES1-ES3 codified pre-existing, shared bits between JavaScript and JScript, but a lot of the features and grammar questions remained contentious.

Today, the market has changed and the companies participating in TC39 have different business interests in the language than they did back then. They may still be competitors, but this isn’t really where they’re directly competing, and they’re here to help protect and invest in the web platform which supports their actual, competitive products.

The first JavaScript standard was published in less than a year, which is lightning fast for a consensus standard. The next two versions of the standard were also published fairly quickly. Then we entered two long periods of slow or no progress. A lot of turnover happened on the committee at that time, and a lot of developers started picking up things like ActionScript and Silverlight instead.

Today the committee has committed to a yearly release cycle, because we need and want to be responsive to the needs of developers and the changing landscape of the web. It’s a lot more like an open source project in terms of how its developed. On the other hand, that’s a pretty rapid pace of change for developers and we know it can be overwhelming to feel like you need to stay 100% on top of it at every release. So there’s an equilibrium to strike.

There are politics at play in any cooperative human effort. Today’s TC39 politics are different. We’re tackling culture change, policy updates, opening up process - the challenging human stuff that also makes a big impact on the spec. There are still debates on features, but it’s in everyone’s interest to protect the grammar, make it more secure, make it understandable, and there’s a lot of alignment on that.

Q: Starting with the massive update of ES6, now called ES2015, the process changed to a system of more consistent yearly specification update. Can you share some of how the new process works? Does the change in process impact thinking around new language features?

This process is actually one of the big differences between most open source projects and open standards efforts, and I think it’s pretty great.

TC39 currently has in-person meetings every 2 months. Throughout the year, delegates and community members work on different feature proposals or issues, and during the meeting they present on their progress, lead discussion, ask for feedback etc. If appropriate, they might ask to graduate their proposal to the next stage (there are 4 stages). If there are no objections, then the proposal goes forward. Once a proposal reaches stage 4, that means it will be merged in and published as part of the next official version of the spec. Until then, the whole thing remains a draft spec.

At the November meeting, we feature-freeze. Nothing new gets in. Anything that was a stage 4 proposal before officially becomes part of the standard. The editors then get to work polishing the spec text, and in January we have a 90 day spec-text freeze for IPR clearance. In June, the Ecma General Assembly (the body of all delegates, not just those participating in TC39) votes to accept the standard as an “official” Ecma standard. So this coming November, the delegates will vote to accept the stage 4 proposals in to the new spec, and that will become ES2019.

Then the process begins anew!

The process does impact new features. For one, because it’s a yearly cycle, there’s less consequence if you don’t get something in - there’s always next year. On the other hand, that can lead to a lot of activity and pressure at the end of the year to get something finished. Another thing, that’s maybe not such a popular point of view: the committee really has to be able to say “No” - what we keep out of the language is maybe more important than what gets in. I think this process makes it a bit more psychologically safe for people to say no, because we can more easily think of a No vote as “Next Option” or “Not No, but Not Now.”

Q: I imagine that anyone motivated to participate in a standards body has a tendency to be highly opinionated. How does the group manage to make sure everyone gets heard and has a chance to participate?

The nature of standards work requires an opinion. What it doesn’t require is for those opinions to be so tightly held that they can not be changed. People who are able to hold strong opinions loosely and debate constructively are good candidates for standards work.

One of the challenges we have is that the size of the group has grown substantially, and we have lots of people who fit that type but maybe not enough time to hear from them all on a given topic. During a meeting, we use a home grown tool Brian Terlson made to help queue questions on a given topic. So it helps keep people from talking over each other and interrupting.

We also make heavy use of GitHub for communication between meetings. There’s an internal reflector for meta notes, meeting planning and so on which stays pretty active year-round.

Come hear Jory's keynote, "Standardizing JavaScript" at jsMobileConf in Boston on October 25-26.

Learn More about jsMobileConf

Custom Dynamic Targets in Load Tests

$
0
0

When creating load tests, dynamic targets make it easy to simulate real-life conditions closely. See how you can use Custom Dynamic Targets to maximize your testing effectiveness.

When recording a load test scenario it is a good practice to specify some parameters that are going to be used for future load test runs. Such parameters may include username, password, user ID or session ID, token etc. If you’ve already red my blog post about How to Run Customized Load Tests with Test Studio you should be familiar with the idea of simulating real-life conditions as closely as possible by using different recorded data for each user.

Telerik Test Studio makes this task a piece of cake with the help of the Dynamic Targets. For your convenience, they are automatically detected by Test Studio while recording, so you can get a value from the response body of the previous request and set it as a query parameter in any of the following requests.

Unfortunately, some dynamic values are not automatically detected, which is why we have introduced Custom Dynamic Targets. The idea behind the Custom Dynamic Targets is to provide an option to explicitly define the dynamic data from preceding request and post it to subsequent request.

To illustrate this in practice I have created a sample login page which uses a Request Verification token for logging in. It is issued from the server in the first response as you can see below:

Sample Login Page - Test Studio

The token is then reused in the Post Data of the POST request in step 14, where we are submitting login data in order to authenticate:

Sample Login Page 2 - Test Studio

If you execute your load test in this configuration the same Token will be used and the load test will fail, as this will prevent proper logging in.

This is where we use a Custom Dynamic Target, which will get the token issued from the server and will reuse it in step 14.

The response from the server where we need to get the token from looks like this:

Server Response

And we extract it as demonstrated below:

Adding Custom Dynamic Target - Test Studio

In the custom dynamic targets it is displayed like so:

A Custom Dynamic Target - Test Studio

With Custom Dynamic Targets you can reuse values from different parts of the source request’s response, not only from the body - from headers and cookies too. Test Studio provides different ways to get a value from the body of the request’s response such as Text, XML, JSON. Different extractors such as “Text Search,” “JSONPath,” “XPath” and “Regex” will help you extract the value from the body in various ways, depending on what you need.

Want to try all these great load testing features out and see how your system performs? Start a free trial today:

Try Test Studio

Happy testing!

Don't Hulk Smash Your Users

$
0
0

Web and app developers are not regular humans. You are superheroes. To provide a great UX, you need to understand that your users are mere mortals, regular people.

Hulk

It’s hard being a superhero.

Take The Hulk. The Hulk can lift 150 billion tons.* The Hulk can use his thunderclap to blast away enemies. The Hulk can heal himself in seconds. But! There are things The Hulk can’t do. The Hulk can’t go on dates, do needlepoint, or wash a water glass. He doesn’t do things regular people do. Because of that, it’s hard for him to relate to them.

The Hulk is concerned about fighting enemies, normal humans are concerned about fighting colds. Their worlds are just too far apart.

(Yeah, yeah, Bruce Banner lives with normal humans, but he’s an alter ego, not a superhero. Big difference.)

Where are you going with this?

It’s the same for people who build the web or make apps. You’re not a regular human, you are a superhero. You have powers normal mortals don’t have. You understand hover states. You understand hamburger menus. You probably understand Boolean logic. Sorry, no one normal understands Boolean logic.

Great, I’m a superhero. So what?

The problem is, your users are regular people. You can no more relate to what they need from your website or application than the Hulk can relate to figure skating. Things that are obvious to you are not obvious to your users. Things that are easy for you are difficult for them. Your pain points are galaxies away from their pain points. You can’t help any of that. It’s just how it is. And the ONLY thing that can help you get around it, is to make UX thinking part of your process.

What the heck is UX thinking?

UX thinking in one sentence: You have to accept that you are NOT your user. That means changing the way you approach projects. Expecting your users to use a site or app the way you would is like the Hulk handing someone in the crowd a freight train to hold. So when you make a site or app, you have to realize you’re not making it for you. Actually, you don’t even know the problem you’re trying to solve. Before you ever begin, you have to find out the problem your USERS have, and what they need to make it not a problem anymore. And to do all that, you can’t just make your own decisions and assumptions. Because you’re a superhero, you’ll end up assuming your users can hold the freight train.

For example:
Let’s say you’re building an app. For you, it’s something you have to get done by a specific launch date. Your pain points include challenging data, bugs, and meeting client expectations. Your users however, will use it to accomplish a task. Your users’ pain points have to do with bad user experience: confusing navigation, cryptic error messages, long paragraphs of content. Your users get frustrated just looking for something on a screen.

Yep, you would use Command/Control+F to find something on a screen. That might as well be ancient Sumerian gibberish to your users. They don’t understand keyboard shortcuts, or that search is even a functionality they can expect from their browser.

In order to create something truly helpful for your users, you have to give your digital product careful UX thought. And to do that, you have to understand and empathize with your users. Make their problems your problems, instead of the other way around.

You have to talk to real, everyday people.

The best way to identify the problem you’re trying to solve (and how to solve it) is to have your users show you and tell you. Interacting with your users is everything. If you don’t do it, you will never create good and usable products, and visitors will hate using your site or app. So here are a couple ways to get the most out of face time with users:

  1. Observe Users in Their Real Environment
    Watch real people try to accomplish the task your site or app is made to do. They aren’t going to go about it the same way you would at all. Observe them at work, or in the environment where they’re going to use your product. Ask them dispassionate, neutral questions about what’s awful and what’s great, what they never do and what they couldn’t do without. Let their answers guide you through the entire project.
  2.  

  3. Test Your Site or App
    Put real people in front of your product for some usability testing. Things that seemed obvious when you were in superhero mode building the thing will suddenly be difficult and arcane in front of users. Figure out how real people are trying to use your digital product and document the things that trip them up. Fix those, or Ultron destroys humanity.

If you doubt any of this will help, take our challenge: try it once. After you watch people attempt to do something online, you’ll change your mind. You’ll stop thinking that they’re superheroes like you, and your UX and UI problems will start to jump out at you. Many fixes will become obvious once you understand how your users really approach problems.

Constantly remind yourself that you are not your users. You have super digital powers. They are mere mortals, regular people. You can never assume you know their answer, or grasp their problem. The ONLY way to understand what your site or app has to solve and how it has to solve it is to talk to real users.

If we choose to ignore the people we’re building for, our products will be unusable. That will make people using our products angry. And you know what can happen when people get angry.

*If you’ve read Secret Wars #4 from 1984, you know we didn’t just make up a ridiculous number.

Hulk


Want to learn more? Find out some tips about making sure that your app presents a good User Experience in these interviews with Dean Schuster and Bekah Rice.

Scheduled Task and Data Alerts Enhancements in Telerik Report Server

$
0
0

Easy access to your data and reports helps you save time and be more productive - which is why that's a focus of ours with Telerik Report Server.

We all live in times where there are so many things we need to do, we often forget something important or that we need a little time for ourselves, to take a deep breath and see the wonderful world around us. In such a busy life, time management is of high importance. The need to optimize processes and tasks is something that we on the Telerik Report Server team understand, which is why we made it a goal to improve the Scheduling and Data Alert mechanisms of generating and sending reports, so that you can save time for what matters most.

Batch of Reports

The first big improvement that we made is the possibility to add more than one report to a Scheduled Task or Data Alert.

For example, you can create a task with a list of Dashboard reports, with Parameters from different years. When the task is executed, it will send you an email with all generated data and reports. One task, one email, and all the information needed - instead of creating a separate task for each year and receiving multiple emails.

Batch of Reports

With that improvement, it is only natural to make the Data Alert’s Rules more flexible, by giving you the ability to change the Data Alert Report, which defines the DataItem and the conditions which the report data should satisfy in order for the alert to get triggered. It is as easy as counting to three. Just open the edit window, navigate to the Rules tab and select the desired report.

Rules tab

Customizable Mail Templates

We know that each report has its list of subscribers, who will receive the created documents as mail attachments. Now, there are two types – an existing Report Server user or an external user represented by an e-mail. As an enhancement of the above, we added the ability to send different emails to both user types for each individual Scheduled Task / Data Alert.

Customizable mail templates

Furthermore, each email template is customizable by adding different report variables to the email template, which will be replaced automatically when the task or alert is executed:

Mail template variables

BONUS: A Hint for Webhooks

Apart from all those convenient improvements, I want to give you a little tip that will help you easily retrieve created documents from a Scheduled Task or Data Alert with Webhooks.

After configuring and adding a Webhook, you can listen for the Webhook notification on the provided URL, which is sent when the task or alert runs. Retrieve the rendered document ID from the notification data, which you can use to make a call to the Report Server API directly via the endpoint (Scheduled task or Data Alerts), or create a call using the Report Server API Client which would look like this:

rsClient.GetScheduledTaskDocument(documentId)

or

rsClient.GetDataAlertDocument(documentId)

Additional examples of using the API client can be found in our documentation.

Try it Out and Share Feedback

We want to know what you think—you can download a free trial of Telerik Reporting or Telerik Report Server today and share your thoughts in our Feedback Portal, or right in the comments below.

Start your trial today: Reporting TrialReport Server Trial

Tried DevCraft?

You can get Reporting and Report Server with Telerik DevCraft. Make sure you’ve downloaded a trial or learn more about DevCraft bundles. DevCraft gives you access to all our toolsets, allowing you to say “no” to ugly apps for the desktop, web, or mobile.

Viewing all 5208 articles
Browse latest View live