Today, I spent some time hooking up EventBoard to EventPoint, and the solution turned out to be so compact I felt a blog coming on…

EventPoint has a nice REST API that can return JSON or XML. I wanted JSON. I had a demo conference set up, and also an API Key. First, I set about exploring the API, using the Chrome HTTP Dev Client, which is my new best friend. It is kind of like Fiddler in a browser, and allows you do do GET, PUT, POST etc, set HTTP headers, see the return values in JSON, ...

I was teaching a class today at HP, and demonstrating how to implement Search suggestions for in app search. The pattern is easy: you hook an event, and in the event, return any matches. Here is an example:

  var sp = SearchPane.GetForCurrentView();
  sp.SuggestionsRequested += OnSearchPaneSuggestionsRequested;

// ...  



void OnSearchPaneSuggestionsRequested(object sender, SearchPaneSuggestionsRequestedEventArgs args) { args.Request.SearchSuggestionCollection.AppendQuerySuggestions( (from t in App.ViewModel.ConferenceInfos where t.Name.StartsWith(args.QueryText, StringComparison.CurrentCultureIgnoreCase) select t.Name).Take(5)); }

Every year, October kicks off a very busy season at Falafel : “Conference Season”. Multiple members of the team travel across the country and around world to share their expertise on a number of technologies. All Falafel Software team members spend their days, and often their nights, helping design and build cutting edge solutions for our customers. Their technical presentations draw from these real world experiences and are assembled, practiced, and presented in what little spare time they have. That’s why we call them “Rock Stars”.

This weekend at Silicon Valley Code Camp, Falafel’s entire team from around the ...
I was working on a Silverlight application with a WCF RIA Services middle-tier recently when the need arose for us to add an HTML/Javascript front-end in addition to the existing Silverlight one. I knew Microsoft offerd WebAPI services that are specially geared toward being consumed by Javascript clients, but the team wanted to leverage the existing work we'd done on the middle-tier in RIA Services if possible.

So the question was, could I publish my existing RIA domain service in a way that is Javascript-friendly? WCF RIA Services exposes its domain services in a binary-format by default. Javascript works better with a ...
What if I were to tell you that you can build modular client-side applications in Sitefinity and also not worry about JavaScript dependencies or conflicts? This should be music to your ears if you do any JavaScript development in Sitefinity.

First thing is you need to have solid understanding of what the Asynchronous Module Definition (AMD) is. Essentially, it is a standard for defining self-contained modules that loads dependencies asynchronously on demand. I suggest you take 10 minutes to read my blog post about this with examples. This will permanently change the way you think about JavaScript development. Once ...
John Waters is at it again. The Falafel Software President and CTO has been spreading the Windows 8 love all over the country. This Saturday you can catch him teaching the Windows 8 Unleashed event at the Hacker Dojo in Mountain View, California.

Windows 8 Unleashed is a free event and a great opportunity for experienced .NET developers and novices alike. You'll listen. You'll learn. You'll build....and you might even win some money in the hack-a-thon.

To learn more and register, visit : http://win8unleasheddojo.eventbrite.com/
So you have seen the light and ready to make the jump into ASP.NET MVC. But wait! You are not ready to migrate a million lines of code from your legacy Web Forms application? No problem. You can easily integrate MVC 4 into your existing Web Forms application and gradually phase out the legacy stuff over time.

There are many articles and blog posts about this topic. However, most are outdated or take the loooong way. I have a simple, clean solution for you! Here it goes:

  1. Upgrade your Web Forms application to .NET 4 (and Visual Studio 2012 if ...

Falafel’s popular Sitefinity ShadowNav Widget has been updated with a few new features and enhancements.

 

Internationalization Support.

If a user with comes to your site and has a matching language code for a page in your ShadowNav, the menu will display in that language. If all your pages are not translated then there’s a possibility to get mixed languages in the ShadowNav.

 

Here is a sample of how it works and looks.

 

Pages in the system and their translations

image

Note that the default language is English and some pages have been translated into Spanish.

 

This is ...

Using Ajax.BeginForm in your MVC View gives you an easy way of doing a partial postback via an AJAX call.  In its simplest form, our view would look something like this:

@model MyProject.Models.Person
 
<div id="myForm">
    @using (Ajax.BeginForm(new AjaxOptions())
    {
        <fieldset>
            <legend>This is a demo form.</legend>
            @Html.LabelFor(model => model.Name)
            @Html.TextBoxFor(model => model.Name)
 
            <input type="submit" value="Save" />
        </fieldset>
    }
</div>

The BeginForm method has several overloads which allow you to pass in ...

MVC 4 bundles and minifies scripts and style sheets for best performance.  This clean framework has some great selling points:

  • Automatically uses minified versions when you're running in production but leaves everything uncompressed and easily readable when you're debugging.
  • Reduces the markup needed to declare JavaScript and style files. Yet you can still control the order that files load in.
  • Allows bundling by using wild cards and variables. This allows you to load all the "Kendo" JavaScript files, for example.

A new MVC 4 app will bundle scripts and styles for jQuery, Knockout and Modernizr automatically, but you can create ...

In this post, I would like to open your eyes to a new way of developing JavaScript applications. We will be building modular JavaScript code on an MVC architecture while also handling dependencies. With these techniques, you can join a new era of web development and stop coding like it's 1999!

Prince - 1999

Asynchronous Module Definition (AMD)

First, let us get some terminology out the way. The Asynchronous Module Definition, or AMD, is a mechanism for defining modules such that the module and its dependencies can be asynchronously loaded. In other words, JavaScript files and units of code can be loaded via ...

Learning a new programming language is a lot of fun, but it can be disorienting to not have all of your usual tools in your mental toolbox, so to speak.  We get used to using our familiar patterns and syntax, and even though the new language may be just as capable, it takes some getting used to in order to have the same level of productivity.  It’s been over a year since I started working on iOS apps in Objective C, and still I sometimes find myself searching for ways to write a block of code that I could write ...

JSONP Simplified

JSONP is used to get data from remote web locations without running afoul of web browser security restrictions. Browsers prevent access to methods and properties from other domains, with one exception: the <script> tag.  The <script> tag is allowed to reference JavaScript from anywhere. For example, your browser will have no trouble with this script reference, no matter what domain the page is running:

<script  src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>

Servers take advantage of this fact by returning JSON data wrapped in a JavaScript function. The link below asks flickr.com for some images in JSON format. Notice the last ...

Did you know in Razor markup you can do this:


<img src="~/Images/downarrow.gif" />
<a href="~/somehwere">Link</a>

And it will get auto-resolved on render, such as:


<img src="/MyApp/Images/downarrow.gif" />
<a href="/MyApp/somehwere">Link</a>

Another welcomed gem in MVC 4 :)

This technique might come in useful if you find yourself in a situation where you want to be able to execute untyped queries against the DB but don’t want to have to maintain two connection strings.

Parse the Provider Name and Connection String

Put this code into your partial ObjectContext class:

EntityConnectionStringBuilder _builder;
private EntityConnectionStringBuilder EntityConnStrBuilder
{
get
{
if (_builder == null)
{
_builder = new EntityConnectionStringBuilder(Connection.ConnectionString);
if (!String.IsNullOrWhiteSpace(_builder.Name))
_builder = new EntityConnectionStringBuilder(
ConfigurationManager.ConnectionStrings[_builder.Name].ConnectionString);
}
return _builder;
}
}

public string ProviderName
{
get { return EntityConnStrBuilder.Provider; }
}

public string ProviderConnectionString
{
get { return EntityConnStrBuilder.ProviderConnectionString; }...

In this article, I’m going to walk through the steps necessary to migrate a SQL Server 2008 DB to a server running SQL Server 2005 using only free tools or tools that come with SQL Server. The short description of the process is: Generate a script on SQL Server 2008, then run it on SQL Server 2005. However, there are a few potential pitfalls, and I’m going to show you what they are and how to circumvent them.

Generate Scripts on SQL Server 2008

Connect to the SQL Server 2008 server with Object Explorer. Locate the database and right-click on ...

When building a full-featured MVC web site (or any web site), it is likely that you will have lots of JavaScript and CSS resources.  In addition, when you are using 3rd-party libraries, you can often get "minified" versions of the files, but you may end up with a handful or even dozens of separate js files.  It is important to reduce the load times of these files as much as possible.  There are a few concepts that help speed up page loads:
  1. Minify files: remove unnecessary spaces and line breaks so the file size is as small as possible.
  2. Combine ...

Augmented Reality (AR) applications have been making headway into our lives. Probability the most recognized AR use is the yellow first down marker used on TV for most football games. AR apps have also been creeping into our phones. My current favorites are SkyMap and Wikitude. Being an engineer and scientist, I’ve always been interested in how things work. The inner workings of AR could not escape my interest, especially with access to such tools as our new smart phones. What makes AR possible in today’s new phones are the MEMS and GPS sensors. The MEMS sensor is used ...

See announcement by Scott Guthrie here. In a nutshell, Mobile Services allows you to add an Azure cloud backend to your mobile solution in minutes. Initially, support is for Windows 8, but will be expanded to Windows Phone, iOS and Android. There is built in support for structured storage (SQL), Push Notifications, Authentication (Windows Live ID initially, more to come, read Facebook etc., maybe ACS). The goal is to make it easy for non enterprise developers (i.e. primarily mobile developers) to create a robust cloud back end. I am very excited to dig deeper, expect talks and blogs on ...

With some elementary investigation you can browse to your user folder, then dig your way down to the local storage folder for a WinRT applcation in the Explorer.  The path to these Windows 8 Style apps (formerly Metro) is as follows:

c:\Users\{username}\AppData\Local\Packages\Microsoft.BingSports_8wekyb3d8bbwe


  

 It all makes sense, but what is that mess on the end of the application name?  Interestingly enough it is a hash for the publisher of the application.  There is a new Windows API which uses an internal and undisclosed algorithm to create a publisher hash, which when appended to the package name becomes the family name.  Family ...