SharePoint Frameworks (SPFx) Impressions

Mike Berryman

With the push to move away from On-Premise SharePoint environments in favor of the Office 365 SharePoint environment, Microsoft has drastically changed the landscape of SharePoint development.  I’ve been a SharePoint developer since 2007 and making the jump to SharePoint Online has been the most jarring change yet.  Of course when SharePoint Online was first announced and as features have been introduced, I’ve played around with them in a strictly “Hello World” capacity, but as any developer will tell you, creating a “Hello World” project for play purposes is drastically different from actually creating a real-world-use project.

I recently got to create my first “real” SharePoint Framework Web Part and here are my thoughts, as someone coming from over 10 years of On-Premise SharePoint development.

Continue reading “SharePoint Frameworks (SPFx) Impressions”

Evaluating HTML5/Angular Data Grid

misc1I’m implementing sorting, filtering, and grouping for a data set to allow business users to look at information in various ways for more comprehensive data analysis. By using a pre-built component, time is saved by reducing development time for implementing the feature.  This is replaced by configuring and adding logic for the grid to work. I tried out a few different data grids to see how they might meet my needs:

UI-grid

  • Control selected/displayed columns
    • Must manually load / save user selected columns (implemented on other tables)
  • Column Filtering
    • If we limit the result set and do NOT use pagination, then we can use filters inside the grid:
      • Supports less-than and greater-than — need to be in separate inputs
      • Dates need to be typed in by hand (and need to specify format) or create a custom date filter
  • Saving/Loading Filters     
    • The filters store the column data like “grid.column[i].filters[0]” so it would be pretty easy to store that data to a database and then pre-populate back
  • Exporting
  • Pagination
    • Painful but possible with the filters and just passing them to the server and handling them individually
  • Printing
    • Export to pdf and print


Dev Express Grid

  • Control selected/displayed columns
    • This will be a manual process as well (combining this with the ‘visible’ properties on the columns)
  • Column Filtering
    • Again, we would want to NOT use pagination and just limit the result set
    • Contains built-in equality operators
  • Saving/Loading Filters
    • I’m having difficulty finding out how to do this.  It seems that this is close
  • Exporting
  • Pagination
    • They only have simple pagination samples, none containing filters
  • Printing
    • Export to excel and print
    • Export to pdf on server (or client)

Telerik KendoUI DataGrid

Note: although this seems like a fully-functional datagrid, it’s hard to find examples for angularjs.  It seems most are plain javascript.

  • Control Selected/Displayed columns
    • Must be handled manually (like all others)
  • Column Filtering
  • Saving/loading filters
  • Exporting:
    • Exports to PDF
    • Exports to Excel
  • Pagination
    • They only have simple pagination samples, none containing filters
  • Printing
    • Export to pdf and open then print

 

Printing seems to be the biggest issue across all three of these data grids. UI-Grid can do CSV and pdf in Chrome, DevX Grid can do Excel only). Up next, I’m looking to do the following:

Choosing the Right Front End Tools

Rick HerrmannRecently, I had the opportunity to meet with a client that was in the process of deciding on a front-end technology for their dev team to use.  They already did quite a bit of research and formed some opinions about different technologies, and wanted to get our opinion about the way they evaluated their options. One point I made early on in our discussion was that there is no one “right” answer to the question of “which tool(s) should we use?”.   Continue reading “Choosing the Right Front End Tools”

Angular Form Errors – A Declarative Solution

Rick HerrmannMost of Angular is different than Angular 1.x, but one of the idioms that stayed the same was the use of class names to identify form fields that had validation errors (e.g. ng-invalid, ng-dirty, ng-touched etc).  By checking for different combinations of these classes, you can tell which fields are invalid, have been modified (“ng-dirty”), and had focus at some point (“ng-touched”).  However, this had a tendency to lead to some rather verbose and messy view code just to show/hide a validation message:

Continue reading “Angular Form Errors – A Declarative Solution”

Angular 2 – Detecting Route Changes

Rick HerrmannI ran into a scenario the other day in an Angular 2 app I am working on where I needed to show the same page/route, but with different data and parameters. Without getting into the specifics of my app, the scenario was analogous to this:

I am viewing a page that shows customer contact details. The route pattern could be something like “/customers/:customerId/contact/:contactId”. On the customer contact detail page, we also show a list of links for other contacts with the same customer.

Continue reading “Angular 2 – Detecting Route Changes”

Decorators in TypeScript

3Decorators are an experimental feature of TypeScript and, to an extent, of JavaScript itself. They are a concept borrowed from Python, and a way to modify classes using higher order functionality.

The idea is that you pass the class/function/attribute through a function and the result becomes the class/function/attribute.

As an example, if you make a @final decorator and have the code…

Continue reading “Decorators in TypeScript”