Blog

Using X-Editable with Ember JS

November 12, 2014 by Damien White

In a couple of apps I’ve worked on, we’ve used the jQuery plugin X-Editable for entering values instead of bulky textboxes. X-Editable works nicely with Bootstrap and pops-up an editor in order to fill in a value. If you aren’t familiar with X-Editable, I encourage you to check out their demos. Figure 1 shows a simple screenshot of what a typical pop-up looks like.

Figure 01: X-Editable Popup Form
Figure 01: X-Editable Popup Form

Figure 2 shows that X-Editable can also do inline forms if you choose instead of a popup.

Figure 02: X-Editable Inline Form
Figure 02: X-Editable Inline Form

X-Editable works great, but what if you want to use it with Ember? That’s where I ran into a problem. You see, X-Editable changes the value that you have for you. We don’t want that. We want it to flow through Ember so everything is properly bound. Let’s start with how we might accomplish this goal. Read More »

Setting Up Foundation and FontAwesome with Ember-CLI

October 02, 2014 by Damien White

If you followed along with my previous posts on Ember CLI, you were able to setup Emblem and CoffeeScript as well as Sass and Compass with Ember CLI. In this post we’ll start using some styling libraries, like Zurb Foundation and Font-Awesome.

Laying the Foundation

We already have Bower and a bower.json file from Ember CLI, so adding a Bower dependency is easy.

bower install --save foundation
Read More »

Setting Up Sass and Compass with Ember-CLI

September 04, 2014 by Damien White

If you followed along with my previous post on Ember CLI, you were able to setup Emblem and CoffeeScript with Ember CLI. Now let’s move on to some styling with Sass. Well, SCSS and Compass.

Setting Up Sass

Sass is super easy to setup thanks again to Broccoli:

npm install --save-dev broccoli-sass

Now you can change the styles/app.css file to app.scss. Restart your server and you’re now using SCSS.

Read More »

DLL Hell Strikes Again

August 10, 2014 by Damien White

I was working on an old MVC4 project that was running on .NET 4. I couldn’t upgrade it to 4.5 because this app runs on a Windows 2003 server and .NET 4.5 doesn’t support Windows 2003. Thus, I was stuck targeting good old .net 4. Not the end of the world, or so I thought. I then went to upgrade Kendo UI for MVC by Telerik. I used the MVC 4 version of Kendo since I’m using MVC 4 and that’s just the logical thing to do. I built and got a warning that prevented me from using the Kendo.Mvc DLL.

The primary reference "Kendo.Mvc, Version=2014.2.716.440, Culture=neutral,
PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL" could not be resolved
because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=4.5.0.0,
Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the
".NETFramework,Version=v4.5" framework. This is a higher version than the currently
targeted framework ".NETFramework,Version=v4.0"
Read More »

New Framework, New Sites

July 26, 2014 by Damien White

It’s been long overdue, but both the Visoft main site and our blog have moved off of WordPress. We are now using Jekyll to statically generate both sites. This allows us to host our sites just about anywhere as Jekyll spits out plain old HTML, JavaScript, and CSS. Aside from a static site, Jekyll allows us to cleanly use Markdown for our posts. We were using Markdown with WordPress and while it worked ok, it would occasionally mess up our content. No longer is this the case with Jekyll.

Read More »

Setting Up Ember CLI with Emblem and CoffeeScript

July 24, 2014 by Damien White

I’ve been using Ember CLI for various projects. Two things that I like to do right out of the gate is to enable CoffeeScript (instead of JavaScript) and Emblem JS (instead of Handlebars templates). Both of these tasks are pretty easy thanks to Broccoli.

Start by creating a new Ember CLI application:

ember new <my_app>

CoffeeScript

Now let’s get CoffeeScript working, it’s as easy as installing a Broccoli component

npm install --save-dev broccoli-coffee
Read More »

Logitech Ultrathin Keyboard Mini Review

June 26, 2014 by Damien White

I figured I haven’t done a product review in a long time, so here we go!

I’m lucky enough to own both an iPad and iPad Mini. At times the Mini is more convenient, and I like using a real keyboard, so I decided to try the Logitech Ultrathin Keyboard Mini (Figure 01). I ended up getting it for around $20 on Amazon, so I figured it was worth a gamble.

Figure 01: The Logitech Ultrathin Keyboard Mini
Figure 01: The Logitech Ultrathin Keyboard Mini

I’m writing this review using the keyboard on my lap, like a mini laptop. There is a magnetized slot that holds the iPad Mini at an angle. The magnet is pretty strong as I’m able to pick up the iPad and have the keyboard stay where it is (Figure 02).

Figure 02: Picking up the iPad with the Keyboard in the magnetic slot
Figure 02: Picking up the iPad with the Keyboard in the magnetic slot
Read More »

The “Ultra Intuitive” WCF Test Client

April 30, 2014 by Damien White

Did you know that Visual Studio includes a WCF Test Client? No? It’s very useful for testing out various services, especially SOAP ones. RESTful services are much easier to test as you just need a browser, but SOAP requires some sort of client.

Browse to the following path (note, this is Visual Studio 2013, adjust the 12.0 to whatever version you have):

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE

Once you’re there look for the icon shown in figure 1.

Figure 01: WCFTestClient.ext Icon
Figure 01: WCFTestClient.ext Icon

Now, while this is a useful tool, it’s so unintuitive, it’s not funny. One of the stumbling points has to do with Arrays so let’s look at this example.

Fun With Arrays

Connect to a service, and you’re given a tree-view of the methods that you can call on the service. So far, so good. If you click on a method, then you’re given the opportunity to add test values and then execute it to get the result. But wait, what do we have here? Our service takes an array of ints, what’s this weird length=0 stuff. Oh, of course we don’t have any items yet (Figure 02).

Figure 02: The Curious Length
Figure 02: The Curious Length
Read More »

My RubyGem Release Workflow

March 31, 2014 by Damien White

When going through and doing a release for ruby_odata, I had a workflow problem that resulted in extra, unneeded, work. I originally posed the question going on three years ago now (wow). You’d think I would remember the solution, but I find that I keep looking for my StackOverflow post where I answered my own question. I figured that was a sign that I should add to the Visoft blog. Before we get to the problem, here’s my basic release workflow for my RubyGems.

Git, Bundler, and RubyGems

I use git for source control whenever I can. The project that I was working on was ruby_odata, my Ruby “wrapper” to interface with Microsoft OData Services. I used to be a huge Microsoft “fanboy” as you know, and have turned very critical of them as of a few years ago. That said, OData Services is really a pretty cool thing. It was magical to be able to have an Entity Framework model, and easy expose it over the web by just adding one service file. Sorry, I digress.

Ok, where were we? Oh yes, git. In addition to git, I like using @nvie‘s gitflow. It makes branching fun. It’s a simple tool, that allows you to issue commands like git flow release start v0.1.6 and that will start a new git branch, and change you over to that release branch. You make all of your changes, checking them in as you go along, then you can run git flow release finish v0.1.6 and gitflow will add a tag of v0.1.6 and merge everything into your master and develop branches. Nothing you couldn’t do manually of course, but gitflow makes it a snap.

Read More »

Lights, Camera, ActionBlock!

February 28, 2014 by Dave Marini

The TPL Dataflow library available from the NuGet Package Manager is a great way to manage in memory asynchronous data processing. It’s especially useful in producer/consumer situations because it greatly simplifies the amount of ceremonious code required to manage and synchronize multiple asynchronous processes happening in parallel. Last but not least, the library is written on top of the Task Parallel Library introduced in .NET 4.0, so it makes judicious use of Task and Task<T>, which as of .NET 4.5 can be awaited using the new async/await keywords. You could just say that it’s awesome-sauce in a NuGet Package. While the library offers a number of classes that have different specialties, there is one class that I believe to be the rockstar of the group: ActionBlock<T>.

ActionBlock Jackson

Basically the ActionBlock class takes in an Action<T>, which will serve as the code that will be run for every item passed to the block. So if I wanted to email “Hello” to a number of email addresses, I can represent that like so:

var emailer = new ActionBlock<string>(email =>
{
    using (var smtpClient = new SmtpClient("myhostserver"))
    {
        var message = new MailMessage
        {
            From = new MailAddress("dave@somecompany.com"),
            Subject = "Hi",
            Body = String.Format("Hello {0}!", email)
        };
        message.To.Add(new MailAddress(email));
        smtpClient.Send(message);
    }
});
emailer.Post("person1@place.com");
emailer.Post("person2@place.com");
emailer.Complete();

Here I’m defining my ActionBlock and passing in an anonymous delegate that will send an email to the provided email address. After the block is initialized, I can call the Post method to send items into the block to be processed. The Post method is synchronous and returns a boolean that indicates whether the item was accepted by the block for processing. If you want to send data to the ActionBlock asynchronously you can call the SendAsync method, which returns a Task<bool>, and await it’s return. When we’re done posting data to the ActionBlock and we don’t expect to post any more, we call the Complete method on the ActionBlock. This method indicates that no more data will be posted and allows the ActionBlock to finish up any running threads and end itself gracefully.
Read More »