Category

Web

ConfigSource Your Rewrite Rules

By | .NET, ASP.NET, Web | 2 Comments

When your Web.Config Gets too Big Maintaining a web.config in your ASP.NET application can quickly get out of hand. It contains the bulk of your web application’s settings and configurations, and even the fresh, out-of-the-box version is several hundred lines long. If you have a set of IIS URL Rewrite Rules to maintain in the same file, the web.config can become immense. This is where using configsource can come in handy. Benefits of ConfigSource In my view there are some large advantages to separating your list of rewrite rules out from the web.config file into a separate, configsource-appointed config file….

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
Ghost

Ghost Inspector

By | Ghost Inspector, Testing, Web | No Comments

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

Getting Started With Electron and TypeScript

By | Desktop, Electron, JavaScript, TypeScript, Web | 2 Comments

What is Electron? ElectronJS is a cross-platform app framework that allows you to leverage existing knowledge of JavaScript, HTML, and CSS to build apps for Windows, OSX, and Linux using a shared codebase. It is based on Node.js and Chromium and is used by many popular apps such as Visual Studio Code, Slack, and the Atom editor. If you haven’t already, install the Electron Prebuilt package from npm:

What is TypeScript? TypeScript is a typed superset of JavaScript that compiles into plain JavaScript. It is an easy way to simplify large complex JavaScript codebases or ensure integrity when working…

Read More

Working with HTTP – An Introduction to Angular 2

By | Angular 2, HTML5, JavaScript, Microsoft, News, Web | No Comments

This is post 8 of 9 in the series “An Introduction to Angular 2” In a previous article, we discussed RxJs and how we can use it with Angular2. In this post, we will take a closer look at HTTP and some of the key differences in using HTTP with Angular 2 vs Angular 1. Background jQuery came up with a very intuitive way of dealing with HTTP requests (XMLHttpRequest (XHR) and JSONP). It introduced a $.ajax() method which takes a request configuration and returns a promise. Many JavaScript frameworks followed the path of jQuery and Angular 1 was no different. While similar…

Read More

An introduction to Angular 2 – Series

By | Angular 2, AngularJS, Web, WebUI | No Comments

This is post 1 of 9 in the series “An Introduction to Angular 2” At Falafel Software we like to stay engaged with the community and share our knowledge around topics that are current and interesting. Tomorrow we will be starting a series on topics about Angular 2 to help developers get started. The topics will be: Angular 2 Language Options Bootstrapping Angular 2 Writing your First Component in Angular 2 Databinding and Expressions Creating and Injecting Services Understanding the role of rx/js and observables Directives in Angular 2 Angular 2 and Http Angular 2 Routing Explained Loading Components on Demand…

Read More

Web-Based Testing: Scripting and Handling Page Differences

By | Android, iOS, Mobile, SmartBear, TestComplete, Testing, Web | 3 Comments

This is post 3 of 31 in the series “31 Days of Mobile Testing with TestComplete” Scripting Virtual Browsers In our last episode, we recorded a web-based test using the drop down list of Virtual Browsers from the Record button. If you want to just script up front, use the TestComplete VirtualBrowsers Item() to get a virtual browser info object, then call Run() to kick off the virtual browser. You can pass a URL to Run() if you want to navigate in the same step.

Note: VirtualBrowsers.Item() and its big cousin Browsers.Item() don’t return browsers, but objects that allow…

Read More

Mobile Testing Approaches

By | Android, iOS, Mobile, SmartBear, TestComplete, Testing, Web | 4 Comments

This is post 1 of 31 in the series “31 Days of Mobile Testing with TestComplete” TestComplete has three basic mobile testing approaches: web based, image based (black box) and open applications (white box). Let’s take a quick tour, weigh the trade-offs and see which approach works best for you. Web-Based Testing If your mobile app is actually run from a browser within the device as a web page, then web based testing is your weapon of choice. You can automate virtual browsers to display as if they were running on iPhone, iPad, Windows, Android, Blackberry or any custom device….

Read More

31 Days of TestComplete Mobile

By | Android, iOS, Mobile, SmartBear, TestComplete, Testing, Web | 2 Comments

31 Days of TestComplete Mobile During January, I’ll explore TestComplete mobile testing and share the experience. We’ll talk about how TestComplete tests apps for smart devices: web-based tests for responsive web sites, image-based testing, testing instrumented apps, emulating user actions, and a lot more. Here’s the topic line-up so far: Introduction and Testing Approaches Web-Based Testing: Testing Responsive Web Sites Web-Based Testing: Scripting and Handling Page Differences Web-Based Testing: Configuring Custom Browsers Preparing Android Devices Using the Mobile Screen Preparing iOS Devices Testing Android Apps on Emulators Image Based Testing Handling Image Variations Using Mobile, Device and Desktop Objects Open Apps Introduction Instrumenting Android Apps…

Read More

node.js integration in VS 2015 – Day 19 – 31 Days

By | node.js, Visual Studio, Web | 4 Comments

This is post 19 of 31 in the series “31 Days of VS2015 Tricks and Treats” node.js Ask, “what is node.js?” and one will receive a range of answers with the typical being, Node.js is an open-source, cross-platform runtime environment for developing server-side web applications. — Wikipedia That really doesn’t tell one much and node.js’s usefullness is far broader so I’ll give a thumbnail working description. node.js applications are written in JavaScript or one of the supersets such as TypeScript which compile to JavaScript and are typically run within the node.js runtime. The node.js runtime is available on most OS’s…

Read More

Exploring Multi-Photon and Particle Cloud Functionality with a Useless Machine

By | .NET, Blogs, C#, Fun, Hardware, IoT, Microsoft, Mobile, Multi-Device, News, Photon, Visual Studio, Web, Windows, Windows Universal Apps | 2 Comments

There are many ways for Particle Photons to interact with each other. Even more ways for other devices and apps to interact with Photons through the Particle Cloud. To explore these capabilities, I created a useless machine. My useless machine is made up of two Photons. Photon 1 “falafel_1” has a photo resistor and a green LED. Photon 2 “falafel_2” also has a photo resistor and a green LED. However, Photon 2 also has a servo motor and a second red LED. The servo motor is mounted so that when it is rotated to 90 degrees, it covers both photo…

Read More

Stop the Shake When Adding a Border on Hover

By | CSS, HTML5, Web | 4 Comments

A common scenario on a web page is to add a border around a clickable element when it is given focus.  Unfortunately this can cause a visible “shake” of the element and of any content below it when the border is displayed and when it is removed. Here is an example: Luckily there is an easy fix for this which is to include a transparent border on the element from the start. Here are the resulting CSS classes:

And now hovering over the image doesn’t “shake” the layout at all.

Read More

ngrok: Public URLs for your Dev Machine

By | Tools, Web | One Comment

I realize that I may be late to the party on this one, but in case anyone else didn’t know, ngrok is a fantastic tool for web developers. If you ever find yourself needing to provide access to your development server to someone outside your local network, or if you are working on an application that uses webhooks or mobile devices, ngrok might be the perfect tool for you. In short, ngrok will provide you with a reverse proxy that makes your local development machine accessible to the Internet, even if you are behind a NAT or firewall. So long, port…

Read More

Data Annotations & Entity Type Configuration

By | .NET, C#, News, Web | 3 Comments

We can replace Data Annotations with Entity Type Configuration to make our classes look clean and simple. Majority of developers prefer using View Models for CRUD operations leaving no reason to have Data Annotations defined in our model classes. This article will show you how to replace Data Annotations with Entity Type Configuration when using Entity Framework Code-First.

Read More

Fixing the Back Button: A Simple SPA Behavior using Location Hash

By | JavaScript, Multi-Device, SPA, Web | 3 Comments

Introduction Using a SPA framework, like AngularJS, is overkill for a simple one-page website. But, suppose that single web page has pseudo-navigation needs, like a dialog that opens in response to the user clicking a button. This represents a state transition, and clicking the back button in the browser (or on an Android or Windows Phone) should serve to close the dialog, not navigate to the previous page in the browser’s history stack. But, unfortunately, that’s not how web browsers behave. SPA frameworks make use of the Location Hash as a way to maintain state transitions without actually leaving the current page. Each state is…

Read More

Highlight a field with CSS

By | Web | 2 Comments

I recently had a scenario in a web application where we needed to draw the user’s attention to a text field after some other event occurred.  It wasn’t an error, so it didn’t have to be anything that stuck around for long.  The best solution I found was to use CSS to briefly highlight the input field and then gradually fade out.  Once the user’s attention was drawn to it, there was no need to keep the field highlighted. The CSS itself is quite straightforward (and a little more redundant when you add the browser-specific rules).  Here is the CSS…

Read More

Kendo Grid Hierarchy with Shared Column Headers

By | Kendo UI, Web | 5 Comments

The Kendo Grid is one of the most complex and configurable widgets in the Kendo framework.  One of the options is to use a hierarchical grid which allows you to display data in a master/detail or parent/child configuration.  The default layout will give you an expand/collapse button with a child grid that has its own columns and headers, as displayed in the Hierarchy Grid Demo: But what if your parent and child grids have the same columns and you want to show the child columns in line with the parent row?  Fortunately, we can do this with a little JavaScript and…

Read More

It Takes a Lot of Chutzpah to Run QUnit and Jamsine Unit Tests in Visual Studio

By | ASP.NET, JavaScript, News, Testing, Tools, Web | One Comment

It’s never easy to unit test your code well, but to unit test your JavaScript code in Visual Studio takes Chutzpah. And I don’t mean it takes audacity in the classic Yiddish sense of the word, either. I mean it requires a Visual Studio extension called Chutzpah which can help you automate running your Jasmine, QUnit, or Mocha unit tests for your ASP.NET projects in Visual Studio. Chutzpah supports the two most recent versions of Visual Studio–VS 2012 and VS 2013–and it works with all types of ASP.NET projects. It’s really very simple to install. You can use the Extensions and Updates… option from the Tools…

Read More