0

Creating a JavaScript application on top of ASP.NET MVC is becoming more common these days. Rightfully so, especially with the new Web API addition to MVC 4. The clear separation between client-side and server-side is an elegant architecture indeed!

Retrieving collections and objects from MVC is simply a matter of calling the REST URL via AJAX. The result will give you a serialized JSON object that JavaScript adores. This is great for interactions from the user. What about the case of initializing your JavaScript application? Back in the days, we would use an .INI file to store our application configurations. ...

Full story

16

Nine years ago (On May 15th 2003), I had the pleasure and honor of starting Falafel Software from my garage in San Jose, CA.  It has been an amazing and blessed ride so far.  Happy Birthday Falafel! and Congratulations to all Falafel Team Members all around the globe.  I also would like to thank our partners Telerik and SmartBear for our important relationships and most of all our valued friendship.

It is amazing to see how many projects have been completed over the years in so many verticals (medical, military, hospitality, financial, educational and many others) with great success!  I ...

Full story

0

Microsoft TechEd Europe 2012 has chosen Falafel Software’s flagship mobile application, “EventBoard”, as the official conference companion for the event in June. 

Spanning 5 days and packed with over 1000 educational opportunities, TechEd is the premier European Microsoft technology education event, and this year navigating the event will be a breeze with EventBoard. Thousands of attendees will abandon the paper program and use EventBoard to plan out their day, navigate the show floor and stay connected. 

We like to think that TechEd Europe’s selection of EventBoard was an easy decision to make. EventBoard utilizes some of Microsoft’s latest and greatest ...

Full story

2

Ever since Sitefinity 4 was released, developers were coming up with new approaches to include JQuery libraries and plugins in their Sitefinity websites.  The unpleasant fact is that their JavaScript code did not work under all circumstances.

To make your plugins or libraries load in good order, your JavaScript code has to work when:

  • You are anonymously browsing the Sitefinity website.
  • You are editing your website in the back-end.
  • You are browsing the website in Edit mode.

Sitefinity makes heavy use of JQuery and other Javascript libraries in its own administrative UI. Sitefinity loads jQuery when you are working inside ...

Full story

0

After coding in a structured environment like Java or C#, JavaScript just seems a little freaky. Like HTML, JavaScript has hung out with a bad crowd of browsers and learned beastly habits. As JavaScript matures, best practices are emerging that bring JavaScript in line with "respectable" languages. Two of the big guns for making JavaScript safer are the "use strict" directive and the JSLint code quality tool.

Use Strict

Add "use strict" to the first line of a function to disallow some of the flakier aspects of JavaScript and make it easier for JavaScript engines to optimize. The example below ...

Full story

0

Last week I found myself debugging an issue with Apple Push Notifications service (APNs) on one of our development servers, and learning a bit about APNs certificates and Windows Server 2008 R2 with IIS 7.5 in the process.

 

My first task was to try to isolate why the push notifications weren't received by our iOS devices, so I started on my local development machine.  I installed the certificates into my personal certificate store, stepped through the notification code, and sure enough I heard my iPad chirping telling me the notifications were being received.  It turned out that the certificates ...

Full story

0

On April 25th 2012, Telerik announced the acquisition of their first Enterprise level Service company, NimblePros.  The press release can be read here.

We are very excited for our friends at NimblePros and Telerik and wish to congratulate them and wish them well on

this initiative to increase the level of in-house support for Telerik’s enterprise level customers.

 

With the tremendous success Telerik has been enjoying worldwide and phenomenal growth, selling the products was not enough for major Fortune 500 companies everywhere that require a solid commitment and hand holding for architecture advice as well as implementation ...

Full story

2

JavaScript variables have inherent Boolean values (typically referred to as "truthy" and "falsy"). Interpreting these values can lead to semantic train wrecks like those in this snippet:

 

 1:  console.log("any string" ==  true);  // false
 2:  console.log("any string" ==  false);  // also false
 3:  console.log("" ==  false);  // true
 4:  console.log(null == undefined);  // true
 5:  console.log(NaN == NaN);  // false
 

Let's start with a few ground rules:

-undefined and null are equal to each other and nothing else.
-NaN does not equal any other value, including itself.
-Comparing two values triggers ...

Full story

2

Today, Falafel Software, the premier Consulting & Training company for Sitefinity worldwide, released a new version of its book “Sitefinity 5 Nuts & Bolts”.

 

The book is released for FREE for ALL of our current Sitefinity 4 Nuts & Bolts’ customers.  Just log into your account and download the new 5.0 book.
For all new customers purchasing the new Sitefinity 5.0 book, you will receive the 4.0 book as well plus all the source code for all the samples, modules and widgets.

Get your copy today and start enjoying the new Sitefinity 5 product while discovering many many new ...

Full story

0

It's best practice to declare all variables at the top of functions. Why? In JavaScript, a variable can be used before it is defined. JavaScript automatically hoists every var declaration to the top of the function. Take a look at this example where variable "volume" is declared after its used in a logging statement:


function playTune(){    
    console.log("Volume is " + volume);
    var volume = 1;
}
  
playTune(); // outputs "Volume is undefined"



The log prints "Volume is undefined", exactly the behavior you'd expect for a declared, but uninitialized variable. While the declaration is moved ...

Full story

0

The Problem

I recently discovered that the default Silverlight DateTime format is different on MacOS than it is in Windows.

 

On Windows

windows

 

On MacOS

mac

 

There are a couple of differences, but the most noticeable is that time zone offset at the end of the time that shows on the Mac. On my computer the time zone offset shows as “-4:00” because I’m generating a DateTime in local time, which for me is currently Eastern Daylight Time (EDT), or 4 hours behind Coordinated Universal Time (UTC).

 

The application is following the best practice of storing all DateTimes ...

Full story

0

You’ve probably heard it before: “Exceptions are expensive!” Maybe if you’re like me, you heard it but you didn’t believe it, not really. How bad could they be? Well, I was recently forced face-to-face with the reality of this saying, and I’m here to tell you, exceptions are expensive!

In my case, I was using a generic helper method that called Convert.ChangeType(). This method can throw, among other things, a FormatException if the input object is not in a format that can be converted to the requested type. Unfortunately, this particular class does not provide a way to check whether ...

Full story

0

I know, that title was a mouthful. Today I was posed with the challenge of writing a regular expression that would match an input that repeated the same word multiple times. Of course, it’s easy to write a regular expression that returns multiple matches of a single word, but it’s a little more challenging to write one that matches only once. Here is the sample input string we’re going to work with: “Just keep swimming. Just keep swimming. Just keep swimming, swimming, swimming.” The repeated word is “swimming”, and we only want to match inputs that repeat it 5 times ...

Full story

0

There are some instances where the the obstructive Silverlight Toolkit BusyIndicator might not be the right choice for your application. BusyIndicator pops up a control on top of all other controls that shows a message and a graphical animation. I wanted to create a more passive control that doesn’t pop up a control but it still disables all the controls on the page and shows a message on the page.

First I started by creating a User Control. Within this control I added a TextBlock and an Image that I’ll use to set some busy text and an animated image. ...

Full story

0

log4net is a proven and simple means of enabling logging in your .NET application.  There are lots of resources available to walk you through the standard setup process, but I will give some steps for more advanced scenarios with multiple projects in a .NET solution.

One Config File, Multiple Projects

 In most circumstances, it is nice to be able to share a global log4net configuration file for all of the projects in your solution.  This way, you can make changes in one place and the next time you build, it will take effect for all logging in your project.

To ...

Full story

0

MVVM (Model-View-View Model) is a programming pattern similar to MVC that you can use to decouple the model and the view from business logic. There are many articles on the internet about what MVVM is so I’m not going to talk about that. In this article I want to concentrate on the most basic MVVM application, understanding it, and how to move on from there.

This example doesn’t have a Model. More than likely when building even the simplest application you will need access to data. If you create an Entity Framework (ADO.NET Entity Data) Model, this would indeed be ...

Full story

1

When working with regular expressions, you will quickly come across these terms. Matches are usually easy to understand, but Groups and Captures can be a bit trickier to understand. I’m going to explain them with a simple and concrete example. Let’s start with this regular expression pattern:

(?<AreaCode>\d{3})-(?<Triplet>\d{3})-(?<Quadruplet>\d{4})
 
We’ll run it against this text: 555-867-5309. We’ll get back one Match containing several Groups, each Group having one Capture. A Match represents one complete, successful match between the regular expression pattern and the input text. ...

Full story

0

Here is a little cross platform gotcha that might save you some time, it certainly has bitten my colleagues a few times….

If you have a .NET WCF REST service, then it will by default use the DataContractSerializer. Now, imagine you have an iOS, Android or maybe a HTML client, calling that API with a JSON payload (or an XML payload), and hand constructing the HTTP payload. On the server (receiving) side, you see that some of your object properties are NULL, even though you can clearly see them being sent in Fiddler. You double check the spelling and capitalization ...

Full story

0

Regular Expressions are a super powerful, widely available, high performance way to parse text into useful parts for further processing or validation. However, developing them can be difficult because the syntax is terse and difficult to read (resulting in the commonly repeated joke that regular expressions are write-only), and Visual Studio does not come with any built-in tools to aid in testing and developing them. I am going to share a tool and a few pieces of advice that I have found useful in my own development efforts in the hopes that they will be of use to others out ...

Full story

0

Today, we are proud to announce that the final bits of the conversion of blog.falafel.com are finally in place and the blog site is better and faster than ever.  The final issue that stumped us for the last 10 days was the inability to use LiveWriter to publish blog posts to Sitefinity 5.  After serious GUID debugging, Fiddler and Wireshark sessions, we were able to pin point that the conversion from Sitefinity 3.7 to 5.0 caused a problem regarding the assignment of ONE of the Blogs (MINE Smile) as far as owner assignment between the OpenAccess37MembershipProvider and the Default one ...

Full story