Monthly Archives

September 2014

Open GL Hello Triangle with Xamarin

By | .NET, Android, Blogs, C#, Fun, Mobile, Multi-Device, News, Xamarin | No Comments

In my last post I shared that I was beginning a new task of learning to develop with Xamarin. What would I tackle for my first projects? It’s not enough for me to do a simple hello world app. I’ve got to go with what I’m interested in. Back in 2012, I did my first post on this blog about XNA 3D graphics. In that post I shared the fact that I first started my 3D graphics exploration starting back in the mid 90’s with OpenGL. So, I’m going to explore the world of 3D graphics in Xamarin centered on…

Read More
Falafel Blog

Microsoft OCR Library

By | .NET, Blogs, C#, Fun, Microsoft, Multi-Device, News | 2 Comments

Microsoft recently announced that their OCR Library for Windows Runtime has been released as a NuGet package. This library enables you to add text reading capabilities to your Windows Phone 8/8.1 and Windows 8.1 Store apps. I wanted to get a simple working example up and running and found it to be quite easy and functional. I created a basic Windows 8.1 Store app. The XAML for the main page is listed below.

The code behind has only one event handler for the button click and because this is just a simple working example contains all of the code necessary…

Read More

Office 365 Small Business: Where’s the App Catalog?

By | Microsoft, Office365 | 2 Comments

Office 2013 (i.e., Excel, Word, Outlook, and PowerPoint) has a new lightweight HTML/JavaScript-based app model that allows developers to write content or task pane apps and deploy to a public store (where they can be discovered and purchased by Office users around the world). Apps are inserted into a document from the INSERT ribbon (using the “Apps” or “My Apps” button), which opens a dialog to browse for the app either from the public store, or from an App Catalog in your organization. Your organization’s App Catalog is a dedicated site collection that runs in SharePoint 2013 (or a SharePoint Online tenancy). Apps that…

Read More
Google Polymer and Web Components

Creating Web Components with Google Polymer

By | JavaScript | 3 Comments

Google Polymer is more than just a polyfill for Web Components. It has an ambitious agenda for pushing the Web Components specifications forward and lead the web development community in that area. In this post, we will explore what Google Polymer has to offer: polyfills, a framework, and pre-built elements. Although the polyfills portion will go away once browsers catch up to the Web Components spec, what is left behind is an interesting framework and suite of components.

Read More

Determine Device Platform using Kendo UI Mobile

By | JavaScript, Kendo UI, Mobile | One Comment

If you love using Kendo UI, I strongly encourage you to take a look at all that Kendo UI Mobile has to offer. Working in a Kendo UI Mobile application has been so fun, and at every turn I find something I expect to be so difficult, but Kendo has made it so easy!

Here’s another example: the object. I came across this when I wanted to determine the device platform to do some specific UI changes just for Android devices. It was so much easier than I expected.

Read More

Entity Framework and Enum Flags

By | .NET, C# | 2 Comments

If you have ever had the need to store one or more possible values in a single field, you may have used the [Flags] attribute on an enum in C# which would look something like this:

The numeric values that we assign are important, because it allows us to do bit-wise operations on the number.  The values themselves can easily be calculated by raising 2 to the power of a zero-based sequence of numbers.  So this: 2⁰, 2¹, 2², 2³, 2⁴, 2⁵, 2⁶ yields this (yes, 2 to the zero power is one): 1, 2, 4, 8, 16, 32,…

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

Three steps to use jQuery UI in ASP.NET MVC 5

By | MVC | 19 Comments

Many developers struggle to work with jQuery UI in an ASP.NET MVC application. In this post, I will show you three steps required to start working with jQuery UI in an ASP.NET MVC application. At the end of the post we will take a look at working with the autocomplete widget. The following three steps will let you work with jQuery UI in an ASP.NET MVC application: Step 1: Add the jQuery UI Reference Add the jQuery UI reference into the project using the NuGet manager. Once this is done, you should find the reference added in the Content folder…

Read More

Work with ASP.NET MVC 5 Areas from different projects

By | MVC | 14 Comments

While working on an ASP.NET MVC 5 application, I came across a requirement to use an Area from one project in another project. For example: I have a project A and a project B. I need to use an Area which is part of project B inside of project A. In this post I will discuss how this can be achieved. To start with, let us say I have an MVC project AreaDemo with the structure as follows: Right now there is one area DataAnalysis in the project. To demonstrate multiple areas, I have created multiple ActionLink in the layout…

Read More
Page Selector

Sitefinity: Page Selector Field for Multisite

By | .NET, C#, News, Sitefinity | No Comments

Multisite is a great feature in the Sitefinity, which helps you centrally manage multiple sites using one administration panel. Few days ago I was working in a same environment where I needed to add a Page Selector field to a custom module built using Module Builder. But we needed to make Page Selector field to show pages from the current site. As it takes a rootNodeId (GUID for root page node) so it shows same pages under provided id. So, we needed to make it dynamic so that it would load pages from the current site.

Read More
MVVM Projects

Falafel2Go and MVVM

By | News, Xamarin | 12 Comments

When we decided to rewrite Falafel2Go, we quickly decided to do so with Xamarin Forms. One of the many advantages of Xamarin Forms is how quickly you can write the software. Among the other advantages are that it supports XAML and databinding. We thus made the somewhat obvious choice to use the MVVM pattern

Read More

Sitefinity Feather an Introduction – FalafelCON slides and resources

By | Sitefinity | One Comment

I had a wonderful opportunity to talk about Sitefinity Feather at FalafelCON 2014. If you attended my talk and are looking for slides and code for the samples we covered in the talk, here they are PPT and CODE If you want to run the sample application locally: Please restore the database(FeatherDb.bak), upload your Sitefinity license file using the backend. And the credentials to get to Sitefinity’s backend for the sample app is admin / password . Venkata

Read More

Using AngularJS with Sitefinity – FalafelCON slides and resources

By | AngularJS, Sitefinity | No Comments

I had a blast at FalafelCON. I met some wonderful developers who are using Sitefinity and had very in-depth talks with most of them. I also had the privilege to talk about Using AngularJS with Sitefinity If you attended my talk and are looking for slides and code that we used in the talk to build a conference web and mobile app, here they are PPT and CODE If you want to run the sample application locally: Please restore the database (AngularDb.bak), upload your Sitefinity license file using the backend. And the credentials to get to Sitefinity’s backend for the sample app is admin…

Read More

Chrome Developer Tools: FalafelCON Notes and Resources

By | FalafelCON, Web | One Comment

FalafelCON 2014 was an excellent weekend and it was fun presenting on Chrome Developer Tools and walking through all the ways DevTools allows you to inspect, debug, and tune your web sites. If you attended the talk, you know that we spent all of our time in Dev Tools with very few slides, but here is the outline and notes for the talk along with resources that you can use to review all the topics and steps we covered: The Web Developers Toolbox – Chrome Dev Tools Outline

Read More

Free eBook|Learning to Master Cross-Platform Mobile Development with Xamarin

By | Mobile, Xamarin | 2 Comments

If you’re simply looking for a bit of guidance on creating a form or are looking to create a cross-platform mobile app in Xamarin, this ebook is for you. Falafel’s Xamarin expert and Master Consultant, Jesse Liberty, covers everything you need to become a Xamarin development master in his complimentary ebook. This ebook is based on his wildly popular blog post series “Learning Xamarin.” In this Xamarin ebook, you will learn: Everything you need to create forms The basics of storyboarding How to build out and edit the app in Xamarin If you need more than an ebook, get in-person…

Read More

Using AutoMapper: Getting Started

By | C# | 4 Comments

I have often seen developers use the LINQ SELECT statement to create a new instance of one class from an existing instance of another class. There are many scenarios when you may have to do this, for example: Creating the domain class instance from the entity class instance Creating the DTO class instance from the entity class instance  Creating the POCO class instance from the entity class instance etc. To do this, developers often use the select statement or manually convert a class object to another class object. Let’s look at an example: We have a class, Student:


Read More

Use Types from a Project without Referencing It

By | C#, News | 4 Comments

Most software applications are built with tight coupling and dependencies on infrastructure. These poor design choices often result in short term development speed at the expense of long term velocity – the cost of poor design choices are not felt until an application needs to change. Following the approach shown here, you can eliminate dependencies on infrastructure concerns from both your user interface layer and your core business layer, and enforce this design approach via the compiler.

Read More

Richard Campbell | FalafelCON Speaker Highlight

By | FalafelCON, Fun, Microsoft, Tools, Windows | No Comments

Richard Campbell is that guy we all know, and if we don’t we’re a little jealous of those who do. He’ll be dazzling FalafelCON with laughs and computer magic in the keynote, so don’t miss him. You can catch him and our other amazing speakers at FalafelCON 2014 in San Francisco on September 20-21! Who are you and what do you do? My name is Richard Campbell, and I’ve been a geek for a really long time. I’ve been a part of a number of technology businesses over the years. These days I consult with start-ups and larger enterprises, co-host .NET Rocks and…

Read More

Loading JavaScript and CSS Resources from Nested ASP.NET Partial Views

By | .NET, ASP.NET, News, Web | One Comment

The Problem When ASP.NET v4 was released, a cool feature from the beta was lost: the AssetsHelper class. Brock Allen has a great blog post explaining it and noting that it doesn’t exist in the RTM version. Basically, this helper class would allow you to emit some scripts and stylesheets from a partial view and have them bubble all the way up the tree of view elements to the layout where they would be displayed with all the other js and css files emitted by other parts of the view. For example, this partial view can render to assets:

And those assets can be…

Read More

FalafelCON Track Highlight: Web Development

By | .NET, ASP.NET, Azure, Microsoft, News | No Comments

Learn which tool sets and frameworks can help you solve your customers’ Web Development problems quickly and efficiently. Microsoft Technical Evangelist, David Giard, Microsoft MVP and Regional Director, Richard Campbell, and the Visual Studio Senior Product Manger, Kris Lankford, will be sharing everything you need to know about development with Microsoft technologies at FalafelCON. These expert practitioners will show you ways to leverage technologies like Entity Framework, Angular.js, and ASP.NET MVC to create powerful, flexible HTML5 systems. There will be more than 40 deep dive sessions and four tracks to choose from at FalafelCON, including Web, Mobile development and testing,…

Read More