All Posts By

Josh Morales

Josh Morales

Josh loves all things Microsoft and Windows, and develops solutions for Web, Desktop and Mobile using the .NET Framework and everything in the Microsoft Stack. He has several apps in the Windows and Windows Phone stores, and also works with the Apps for Office API to create custom solutions for Microsoft Office and Office 365. His other passion is music, and in his spare time Josh spins and produces electronic music under the name DJ SelArom.

Articles

Google-Cloud-Platform-Authorization

Authenticating Your C# Application for the Google Cloud Platform – Part 1

By | Cloud Platform | No Comments

This is post 4 of 14 in the series “Google Cloud for the .NET Developer” The new C# libraries for the Google Cloud Platform, available on NuGet, make it easy to get started adding these features to your platform. However, before you can use them, you obviously need to authenticate your application for access. Google uses OAUTH 2.0 as the protocol for authentication In this post we’ll discuss the different scenarios you may encounter, and the different options available for authorizing your application. Server to Server Authentication If you are building an application that is leveraging GCP infrastructure as its…

Read More
Google-Cloud-Platform-Nuget-Pacakges

C# Support for the Google Cloud Platform

By | Cloud Platform | One Comment

This is post 3 of 14 in the series “Google Cloud for the .NET Developer” At the end of the day, like most APIs you encounter in the wild, Google services are exposed as standard REST endpoints. If you know how to create, authenticate, and issue an HTTP request, you have everything you need to add Google’s extensive list of services (including the Google Cloud Platform) to your applications. However, most developers prefer to spend their time focused on the implementation of their application, and would rather skip mucking around with boilerplate code to create raw HTTP requests, serialize requests and…

Read More
aspnet-core-area-view-viewstart-layout

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
asp-net-core-area-index-view

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
sitefinity-feather-designer-preload-message

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
sitefinity-config-key-value-pair

Simple Key-Value Sitefinity Configuration with NameValueCollection Property

By | News, Sitefinity | One Comment

Sitefinity allows you to easily create a custom configuration setting for storing and managing properties for your site. For the most part, you simply need to inherit from ConfigSection and add your properties. Once registered your settings will be automatically added to the backend Sitefinity Configuration page (Administration > Settings > Advanced). The documentation for this feature explains that there are several different types of properties supported, including simple types (like bool, string, etc.), as well as custom types that you can create by inheriting from ConfigElement and even collections for managing those custom types. However, one additional property type…

Read More
captcha-required-message

Client-side validation of Sitefinity CAPTCHA MVC Feather Form Field

By | MVC, Sitefinity | No Comments

In the current 9.1.6110 release of Sitefinity, there is a known issue with the Sitefinity CAPTCHA MVC form field that prevents it from firing the client-side validation. If the user leaves the CAPTCHA field blank, the form will still submit (either a full post-back or via AJAX, depending on the settings of the form), and the user will see a generic “Entry not valid” error message. It would probably be better to catch this right away via client-side validation. Fortunately, using Feather, we can easily override the CAPTCHA template to enable this. We simply need to change the input field…

Read More
view-model-typescript-file

Case-sensitive File Naming for NativeScript TypeScript Source Files

By | Android, iOS, JavaScript, NativeScript, TypeScript | No Comments

When working with NativeScript it’s important to pay attention to the casing of filenames for your JavaScript source files, especially when working with TypeScript. When importing classes, interfaces, or other exported TypeScript items from other files, you must make sure that the letter casing in the reference matches the actual source file. More specifically, the letter casing of your reference needs to match the casing of the actual JavaScript (.js) files that will ultimately be loaded by the NativeScript runtime. After all, TypeScript ultimately gets compiled to JavaScript, and you want to make sure everything lines up! To demonstrate this,…

Read More
sitefinity-status-page-200

Sitefinity Status Page HTTP Response Codes

By | Sitefinity | No Comments

When working with the new Web Services module or WCF services in Sitefinity, you want to be able to allow the requesting clients to properly respond to and handle a failed request. This is generally simple enough, as a failed request would usually be accompanied by an HTTP status code that indicates something went wrong. The status can be reviewed by the client and handled appropriately based on the status code (such as 404 for not found or 500 for a server error). To demonstrate this let’s look at this sample code, which uses the Web Services module API to…

Read More
Sitefinity 9 for Developers Book

Sitefinity 9 for Developers

By | Sitefinity | No Comments

We at Falafel Software are excited to announce the release of the updated Sitefinity 9 for Developers book, available for immediate purchase in the Falafel Store. This update includes an exclusive new chapter covering the new Web Services module introduced in Sitefinity 9, useful for building and managing API services for your Sitefinity content. As a result of this new update, the Web Services chapter has been entirely rewritten to offer a developer-focused look at its use, configuration, as well as helpful tips and tricks and even gotchas to watch out for when getting started. Despite the introduction of this…

Read More
HoloLens Room

Visualizing a Room Mesh with HoloToolkit for Unity

By | HoloLens, Unity | 2 Comments

This is post 5 of 5 in the series “HoloLens and Unity Playground” In today’s video we leverage the HoloToolkit-Unity library (available on GitHub) to enable a visual mesh that represents a room to be rendered in the HoloLens emulator. Since the emulator doesn’t actually visualize a real room around you (since you’re not actually inside one), this can help you to “see” where you are in this virtual space. We also use the Cursor Manager and Gaze Manager from this toolkit to display a cursor in the device for users to select and interact with holograms. Visualizing a Room…

Read More
hololens-techrewards-challenge

Launching a Unity Project in HoloLens

By | HoloLens, Unity | No Comments

This is post 4 of 5 in the series “HoloLens and Unity Playground” This video follows from the previous one created for the TechRewards challenge. This time we take that same project and discover what modifications are needed to open the same project in the Unity for HoloLens version, as well as deploy it as a 3D app to the emulator. Launching the TechRewards Unity Challenge Project in the HoloLens Although the audio quality is still weak (I promise the next video will be better!), I was able to leverage the Azure Media Services platform to actually transcribe the text….

Read More

Unity TechRewards Challenge Walkthrough

By | HoloLens, Unity | No Comments

This is post 3 of 5 in the series “HoloLens and Unity Playground” In this video I walk through the Build Code Challenge: Building Apps for Unity from TechRewards. TechRewards is a free program that awards points for completing code and app development challenges that help you build, grow, and enhance your developer skills with technologies including Windows, Azure, and yes even Unity. Now this video is not making use of the HoloLens (yet!), but since Unity is such an accessible tool for HoloLens development I thought this challenge was a great opportunity to get more familiar with the Unity…

Read More
Hololens-Emulator-Unity

Unity Step Zero: Launching a scene in the HoloLens Emulator

By | HoloLens, Unity, Windows | No Comments

This is post 2 of 5 in the series “HoloLens and Unity Playground” Now that we got the default HoloLens app template running successfully in the emulator, the next step is to get a project in Unity to do the same. Although you can certainly use DirectX and Direct3D to build HoloLens apps, Unity offers a much more approachable environment for unseasoned 3D developers like myself, especially with all the helpful resources available online. This video uses the sample Hololens project provided at Build to render a hologram in the emulator, and the Xbox One controller to navigate around it.

Read More
HoloLens-Emulator

HoloLens and Unity: A Shared Video Journey

By | HoloLens, Unity, Windows | No Comments

This is post 1 of 5 in the series “HoloLens and Unity Playground” Microsoft HoloLens is a new frontier for developers, especially for people like me who are used to building traditional, business or user oriented applications. But since HoloLens is also a Windows device, it’s exciting to know that at least some of my existing skills can be leveraged to create new, interactive experiences with this device. However, giving my limited (read: zero) experience with 3D development, I’m essentially at step zero, and that’s where we begin today. I’ve decided to record and share my experiences getting familiar with…

Read More

Build 2016 and the Upcoming Windows 10 Anniversary Goodies

By | Events, Microsoft, Windows | One Comment

Last week I had the truly great honor and privilege of attending my very first Microsoft Build conference. It was an incredible experience; surrounded by developers, creators, architects and dreamers who share the same passion for Windows and all things Microsoft. There were enough sessions, labs, and exhibits to fill the day ten times over, and of course not enough time to see them all! There were many fantastic announcements, which have certainly made the rounds on the web. I’m not going to try and duplicate that content (although if you are looking for a thorough recap, your best place…

Read More
Sitefinity-Downloads-Page-Latest

Quick Links to Sitefinity Resources

By | Sitefinity | No Comments

Whether you’re setting up your very first Sitefinity website or upgrading to the latest version, at some point you’re probably going to need to hunt down one or more of these items. Hopefully this post can serve as a quick guide (or reminder!) to where you can find these important Sitefinity Resources. Note: Things change so if any of this becomes out of date please let me know and I will update it as time goes on! Sitefinity Project Manager Direct Link: http://www.telerik.com/account/your-products/download-list.aspx?skucid=21 The Sitefinity Project Manager is the tool used to create new Sitefinity sites, as well as performing…

Read More
Windows-10-Custom-Trigger-Falafel2Go-Complete-Responsive-Layout

Windows 10 Development: Custom StateTriggers

By | Windows | 4 Comments

This is post 14 of 14 in the series “Developing for Windows 10” We’ve seen how the Windows 10 AdaptiveTrigger can help you create a dynamic responsive UI based on the height or width of the device or screen. However, this trigger is limited to a specific value for each dimension, and offers no way to respond to changes in the relationship between them, such as to determine the orientation or aspect ratio of the app. Fortunately, you are not limited to only the AdaptiveTrigger in Windows 10; you can create your own custom statetriggers based on virtually any property, even…

Read More
Windows-10-AdaptiveTriggers-Falafel2Go-Wide

Windows 10 Development: Responsive Design with AdaptiveTriggers

By | Windows | One Comment

This is post 13 of 14 in the series “Developing for Windows 10” In the previous post we looked at the basics of UI automation in Windows 10 apps using Blend to declare the XAML for Visual States. However, while last time we used event handlers in the code-behind of a page to trigger different states, this time we’ll see how to use the new AdaptiveTriggers in Windows 10 to let the application handle state transitions automatically. StateTriggers Each VisualState exposes a StateTriggers property, which is a collection of triggers that it uses to determine whether or not the state should be…

Read More
Windows-10-Visual-States-Sample-App

Windows 10 Development: UI Automation with Blend and VisualStateManager

By | Windows | One Comment

This is post 12 of 14 in the series “Developing for Windows 10” In our previous post we built a UniformGrid container for the ListView, resulting in an evenly-spaced, grid-like view for the main screen of Falafel2Go: This screen is actually made up of two such ListViews in a RelativePanel, allowing it to reposition the lists to support a landscape view, while still keeping the larger size for the featured Blog and Training activities. This layout switch happens automatically as the screen size changes (or, on a phone, if you rotate the screen to its side). Today we’ll see how we…

Read More
Falafel2Go-Windows-10-Desktop-Landscape

Windows 10 Development: Creating a UniformGrid Container

By | Windows | No Comments

This is post 11 of 14 in the series “Developing for Windows 10” This post describes the need for and implementation of a UniformGrid layout control that, when used with a ListView, allows the repeated elements to appropriately stretch to a consistent size to achieve a grid-like layout. Grid Layouts: Simple but Static In our last post we looked at the new RelativePanel control, which we used in the Falafel2Go app for Windows 10 to create a dynamic, responsive layout for the home screen:   You’ll notice that in most of the orientations, the Blog and Training elements are featured and…

Read More
Falafel2Go-Windows-10-Mobile-Landscape

Windows 10 Development: RelativePanel

By | Windows | No Comments

This is post 10 of 14 in the series “Developing for Windows 10” Another new control in the Windows 10 Developer toolbox is the RelativePanel, a layout container which enables flexible positioning between the elements it contains. Today we’ll take a closer look at this control and how we used it to build the UI of the Falafel2Go app for Windows 10. RelativePanel Positioning Using the RelativePanel, each element it contains can specify its position in relation to either another element, or docking to the container itself. By leveraging these position properties, you can easily create dynamic layouts in a…

Read More
Windows-10-SplitView-Groove-Music

Windows 10 Development: SplitView

By | Windows | One Comment

This is post 9 of 14 in the series “Developing for Windows 10” Now that we have a simple but solid foundation for a complete Windows 10 app, let’s take a tour through some of the brand new controls available on the platform. Today we’ll look at the SplitView control, which enables you to quickly create a consistent, intuitive navigation UI that can automatically adjust to different screen sizes and device platforms. SplitView The most common function of the SplitView control is to provide a familiar, responsive navigation structure to an application. As the controls name suggests, it consists of…

Read More
Windows-10-XAML-Behaviors-SDK

Windows 10 Development: MvvmLight NavigationService and the Behaviors SDK

By | Windows | 20 Comments

This is post 8 of 14 in the series “Developing for Windows 10” Following our last post, we now have a solid framework for our app to handle state and lifecycle. However, at this point we are still navigating the app directly from the code-behind of the Views, which ties the navigation to the platform code. In addition to cluttering up our code, this also restricts us from fully taking advantage of the cross-platform opportunities offered by MvvmLight. Today we’ll see how to centralize this navigation code, removing the platform-specific definition and moving from the code-behind to the ViewModels, allowing maximum reuse of code. We’ll…

Read More
Windows-10-Hub-App-Template

Windows 10 Development: Maintaining Application State

By | Windows | 3 Comments

This is post 7 of 14 in the series “Developing for Windows 10” We have so far created a simple app with two pages, that uses simple Frame navigation to go back and forth. However, the app is still missing one crucial feature: state management. When an app is suspended for whatever reason (such as being minimized on the desktop or navigated away from on the phone), it is up to the developer to maintain the current state so that it can be fully restored where the user left off. In this post we’ll look at a simple way we…

Read More