Set Layout for Views in MVC Areas

By | ASP.NET, ASP.NET Core, MVC | No Comments

Here’s a quick tip follow up for my last post on working with MVC Areas with ASP.NET Core. When I visited the pages in the new Admin area I created, it was obvious that they were not picking up the layout and style from the other pages in the site:   To fix this I needed to add the Layout property to the View:

Alternatively, you can create a file named _ViewStart.cshtml with just the layout definition and place it in the Views folder for the Area. This approach will make all views automatically use the defined template. This…

Read More

Is an 80 Character Code Line Length Still Relevant?

By | C#, CSS, JavaScript, TypeScript, Visual Studio | One Comment

If you’ve spent any time reading about coding standards on the internet, you’ve probably come across the suggestion to limit lines of code to 80 characters and wondered if it’s still relevant today. The advise to limit lines to 80 characters is often connected to the historical limit of 80 characters in terminal windows. But what if your team is not subject to this constraint? Are there still any benefits to adopting this limitation? I tried living with it for a while and here are my takeaways. Growing pains Indentation When I first set out to try this style out,…

Read More

MVC Areas with ASP.NET Core

By | ASP.NET, ASP.NET Core, MVC, Web | One Comment

Areas in MVC allow you to separate your web application into segments, each with their own set of Controllers and Views, for better organization and intuitive access via routing. I decided to play with this MVC Areas feature in ASP.NET Core and thought I’d share my experience in case it might help others using this feature. My first attempt to use this was to simply add the Areas folder to the root of my application, with a subfolder called Admin with the associated folders for Controllers, Models, and Views: I added a simple AdminController to simulate a separate Administration section…

Read More

Quick Tip for Showing JSFiddles in Your WordPress Blog

By | Blogs | No Comments

I know for a fact I have shared this tip with colleagues multiple times over the last year, because it always seems to be just tricky enough to trip someone up when writing a WordPress blog post that would benefit from a live JSFiddle in an iframe. And I realize that there are plugins for this also, but you might not have access to them, or maybe you just want a simple solution.

Read More

Kendo DataSource: Grouping then Sorting

By | Kendo UI, Telerik | No Comments

It seems that Kendo DataSource (and, thus, the Kendo Grid) cannot do both Grouping and Sorting. When sorting is defined without grouping, then everything works fine. But, when records are grouped, then the sorting within each groups does not work at all. Consider this simple example:

The sorting is all over the place! One workaround (there are probably many more) is to perform a sort AFTER the DataSource has already grouped the data. For a data-bound Kendo Grid, this can be done in the DataBound event handler. However, there is a Chicken-and-Egg situation when doing this: performing a .sort()…

Read More

Test Sending Email Without an SMTP Server

By | .NET, ASP.NET, C#, Microsoft, Tools | 2 Comments

When working on a project, I had the need to locally test the sending and formatting of an email from an application. The only downside is that I don’t have an SMTP server on my workstation, and I wasn’t about to start setting up IIS with all that ceremony. Luckily there are a couple tools that can help with this problem. Neptune The first tool I tried was Neptune. It doesn’t have source code available, but if you need a way to see if an email has been sent, it will show up with a notification in the system tray. You…

Read More

What’s it Like to Take an Online Proctored Microsoft Certification Exam?

By | Microsoft | No Comments

Each year for the past several years, I have set a personal goal to get developer certified or trained in something new. Sometimes that is a Microsoft Exam, sometimes it is some other certification, such as Kendo UI certification. In previous years, I have had to travel to a test center to take certain Microsoft Exams, but the test center closest to me closed in 2014. The next closest location is over 2 hrs away, which was pretty much a deal breaker for me, and I had almost given up this year on meeting my goal for 2016. But, instead I decided to try something new: an Online Proctored Microsoft Certification Exam.

Read More
Scout Promise

A Brief Introduction to Promises

By | JavaScript | No Comments

It took me a while to get used to working with Promises in JavaScript. I fundamentally knew how the jQuery Deferred object worked from years ago, so some of the concepts were familiar to me. But, the beauty of the newer Promise implementations is in how it really cleans up your code by breaking it up into blocks that can then be chained and executed asynchronously. Consider the following:

The process is kicked off at the bottom with a call to doSomething() . Notice that doSomething()  calls fetchSomething() , and all that fetchSomething()  does is return the results of someHttpClient.get() . But, in…

Read More

Web API Route Design for Non-CRUD Routes

By | ASP.NET, Web API | 2 Comments

Introduction I’ve been finding myself thinking a lot about route design for the web APIs I’ve been building lately. For your basic CRUD (Create, Read, Update, Delete) controllers, everyone knows that the POST HTTP verb maps to create/insert; GET maps to read/select; PUT maps to update; and DELETE maps to–brace yourself–delete. But what about routes that represent things beyond these fundamental but basic data manipulations? I’ve done a bit of reading and thinking about the subject, and these are a distillation of the lessons I’ve learned. URLs represent resources I mean, it’s right in the name: Uniform Resource Locator. But what…

Read More

How I Optimize My Focus and Productivity

By | Tools, Work | No Comments

Whether you work in an office or from your home, distractions can be a huge problem. They yank you out of the nearly trance-like state of focused productivity and bring you crashing back into your body in meatspace. Some distractions are external, and I think it’s common sense for most people to defend against these sorts of distractions by trying to mitigate them. Phone calls interrupting you? Silence your phone. Distracted by email and/or chat notifications? Mute them during certain hours and check them only at specific times. Distracting noises or conversations nearby? Wear some comfortable noise-suppressing headphones and play something…

Read More

Building Mobile UI Tests using REPL

By | Android, Testing, UITest, Xamarin | No Comments

This is post 4 of 4 in the series “Xamarin Test Cloud” Building Mobile UI Tests using REPL REPL builds a list of methods to automate a mobile app for use in a UI test. The typical workflow starts with the tree command to list elements in the current view. Next, app methods wait for elements, enter text, tap buttons and so on. Then the copy command saves your REPL activity to the clipboard. Finally, you paste REPL commands into your test method. Once you paste the REPL output, you can clean it up and add assertions.

The screenshot shows the Android emulator on the left, and…

Read More

Sitefinity Feather Designer Tip: Updating Fields Programatically

By | AngularJS, Sitefinity | 2 Comments

I recently needed to create a custom designer for a Sitefinity MVC Widget that would allow a property to be filled in programatically (such as clicking an option in a list).  Populating the field was simple enough using jQuery, and here is a very simple example demonstrating the desired behavior:

Clicking the button does indeed did populate the message property: However, when I saved the changes, the output of the widget message property was still blank: It turns out that this makes sense, because the widget designer is using Angular JS to bind its properties back to the widget, and…

Read More
Xamarin UITest Word Cloud

Mobile Testing in the Xamarin Test Cloud

By | Android, Android, C#, iOS, Testing, UITest, Visual Studio, Xamarin, Xamarin Test Cloud | No Comments

Mobile UI testing requires the same power as web UI testing. Certainly we need the basics: identify on-screen elements, automate, and make assertions. But that’s not going to be enough for teams building mobile apps under rapidly changing conditions; not with hundreds of new, evolving technology combinations. So what are the new rules? Here’s what we need, right-out-of-the-box…

Read More
UISegmentedControl Text Color Change

Xamarin Quick Tip – Changing the UISegmentedControl Text Color

By | C#, iOS, Xamarin | No Comments

In iOS, the UISegmentedControl is a popular control. It allows you to present your data in an organized, tabbed fashion. When a segment is selected, the text on the segment is changed to the Background Color of the control, this text can sometimes become lost and difficult to read. To get around this problem, this post will show you how to change the UISegmentedControl Text Color when a segment is selected. UISegmentedControl Color Properties The UISegmentedControl has some direct color properties, I will outline the most important ones here. First we have the Tint Color, which is used as the…

Read More

Ghost Inspector

By | Ghost Inspector, Testing, Web | One Comment

Ghost Inspector for Web UI Testing Sometimes you need a knife, not a Swiss-army knife. Too many bells and whistles can actually get in the way. For example, our web portal testing requires a recorder to handle straight-forward scenarios: clicking, entering text, and checking state. We also need a way to augment recordings for more complex scenarios. Most web testing tools can get you this far. But we also need tests to run in the cloud, right out of the box. We want test results sent via email or Slack without jumping through hoops (and certainly without writing custom interfaces). And finally, we want test…

Read More
iPad and iPhone

Xamarin Quick Tip : Identifying if a device is an iPad or an iPhone using UserInterfaceIdiom

By | C#, iOS, Xamarin | No Comments

If you simply need to determine whether the device using your application is an iPad or iPhone in Xamarin.iOS without additional ceremony, look no further. The UserInterfaceIdiom can be used to solve this problem. Identification of the Device Type using UserInterfaceIdiom In order to identify the device type using the application. The following code can be used:

The UserInterfaceIdiom property will return any of the following enum values: CarPlay Pad (iPad) Phone (iPhone) TV Unspecified Alternatives for a more granular Device Identification If you require a more granular approach to device identification, such as distinguishing between the specific models of each…

Read More

Access IIS Express from a Remote Device

By | IIS Express, Mobile | 2 Comments

I recently came across a situation where I needed to access IIS Express from a remote device.  There a lot of blogs and Stack Overflow posts relating to this that involve updating binding elements in the IIS Express config and I tried a dozen or more of them with no luck.  I finally came across iisexpress-proxy and worked great!  You can check out the repo on Github for full details, but it in short it is an npm package that allows you to simply enable remote access to IIS Express via the command line with no dependencies othar than Node.js….

Read More

Falafel Software Awarded Progress NativeScript Preferred Partner

By | News | No Comments

Falafel Software is proud to be awarded NativeScript Preferred Partner by Progress. Our preferred partner status is related to our work building mobile applications with NativeScript and our service to the NativeScript community. NativeScript Preferred Partners are trusted and reliable companies from around the world with proven track records of delivering result driven projects and services. NativeScript Preferred Partners contribute to the NativeScript developer community and showcase innovative projects. With Falafel Software as a NativeScript Preferred Partner, you can rest assured that we are the right partner for your mobile project.  

Read More

Trip Report: Intro to Google Cloud Platform

By | Cloud Platform, Google | One Comment

Intro I recently had the opportunity to attend a day of training on the Google Cloud Platform (GCP) at the Google offices in Chicago. Being an overview, the content didn’t dip too deeply into any one topic, but gave a decent survey of the available services. Here’s a condensed summary of what we learned. Infrastructure and Application Services There are three main offerings in this category of services. First of all, there is the straight-up infrastructure of Google Compute Engine, which is simply a virtual machine in the cloud. You can choose from a variety of Linux and Windows operating…

Read More

How to Build the NodeMCU Firmware using BoUoW

By | ESP8266, IoT, Linux, Windows | No Comments

This is post 13 of 13 in the series “IoT with the ESP8266” The Windows 10 Anniversary Update includes the Windows Subsystem for Linux, as I had mentioned in a previous post. The Bash shell (succinctly named “Bash on Ubuntu on Windows”, or BoUoW if you’re actually trying to search for information) permits native Linux ELF64 binaries to run on Windows. It’s pretty clever, but a little limited in areas. So, I wondered: since Linux is the preferred first-class build environment for ESP8266 firmware, can I build the NodeMCU firmware using BoUoW? Let’s find out! First, you will need to activate the feature and install BoUoW….

Read More

Add A Small LCD Display To Your Raspberry Pi

By | IoT | One Comment

Recently, I needed to put together a Raspberry Pi-based solution to run a Node.js app. I didn’t need Windows IoT Core or X-Windows – just a Linux TTY would do. But, I also wanted to include a LCD display to eliminate the need for a HDMI monitor.  Was it possible? Selecting and Configuring Display Hardware A quick search of the internet reveals many 3.5 inch screens for the Raspberry Pi. In fact, there are many different screen sizes available, but the 3.5 inch matches the footprint of the Pi itself. These are typically TFT displays with an SPI interface that plug into the Pi’s…

Read More