Ruby Development Kit

DevKit Overview

The DevKit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows.

Simply download, double-click, choose an installation directory, run the Ruby install helper script, possibly tweak a config.yml file for your system specifics, and you’re ready to start using native Ruby extensions.

DevKit Background

One of the challenges many Ruby on Windows users have is how to easily use native RubyGems from the community such as the rdiscount orcurb gems. In many cases this isn’t a problem because the extension author has provided a binary gem compatible with the users Ruby environment. In other cases, only the extension source code is available in the gem and the user is expected to have a “sane” environment installed and configured in order to build and use the native gem. A “sane” environment typically means a system with make, gcc, sh and similar *nix build tools installed.

This expectation of a “sane” build environment is not always true for Windows users and is the primary reason why the DevKit was created. The DevKit, based upon MSYS and MinGW components, is an easy-to-install and easy-to-use solution for quickly setting up a “sane” build environment, enabling you to use most native RubyGems developed by the Ruby community.

We use the DevKit internally for the RubyInstaller project. The DevKit is used to build MRI Ruby and the required dependencies needed to deliver the RubyInstaller for Windows. Many community members also use the DevKit as their “foundation” toolkit for building other native software.

The DevKit is currently available for download as a self-extracting archive and a Windows installer is in development.

Continue reading

Mobile enabled web apps with ASP.NET MVC 3 and jQuery Mobile

In my previous blog posts, I have demonstrated a simple web app using ASP.NET MVC 3 and EF Code First. In this post, I will be focus on making this application for mobile devices. A single web site will be used for both mobile browsers and desktop browsers. If users are accessing the web app from mobile browsers, users will be redirect to mobile specific pages and will get normal pages if users are accessing from desktop browsers. In this demo app, the mobile specific pages are maintained in an ASP.NET MVC Area named Mobile and mobile users will be redirect to MVC Area Mobile.

Let’s add a new area named Mobile to the ASP.NET MVC app. For adding Area, right click the ASP.NET MVC project and  select Area from Add option. Our mobile specific pages using jQuery Mobile will be maintained in the Mobile Area.

 

Continue reading

How To: Add Mobile Pages to Your ASP.NET Web Forms / MVC Application

Applies To

  • ASP.NET Web Forms version 4.0
  • ASP.NET MVC version 3.0

Summary

This How To describes various ways to serve pages optimized for mobile devices from your ASP.NET Web Forms / MVC application, and suggests architectural and design issues to consider when targeting a broad range of devices. This document also explains why the ASP.NET Mobile Controls from ASP.NET 2.0 to 3.5 are now obsolete, and discusses some modern alternatives.

Contents

  • Overview
  • Architectural options
  • Browser and device detection
  • How ASP.NET Web Forms applications can present mobile-specific pages
  • How ASP.NET MVC applications can present mobile-specific pages
  • Additional resources

For downloadable code samples demonstrating this white paper’s techniques for both ASP.NET Web Forms and MVC, see http://aspnetmobilesamples.codeplex.com/.

 

Continue reading

Simulate Popular Mobile Devices for Testing

You can download emulators for popular mobile devices and browsers by following these links

Device or Browser Emulator / Simulator
Windows Phone 7 Windows Phone Developer Tools RTW

This includes Visual Studio 2010 Express for Windows Phone. It also integrates with Visual Studio 2010 if you already have it installed.

Windows Mobile 6.5.3 Windows Mobile 6.5.3 Developer Tool Kit

Note that to give the phone network access, you also need the VPC Network Adaptor included in Virtual PC 2007 . To connect IE on the phone to your Visual Studio development server, see Kiran Patil’s blog post .

Windows Mobile 6.1 Emulator images for Visual Studio 2005/2008
Android Android SDK homepage
Opera Mobile / Opera Mini Latest versions: Opera Developer Tools home

Opera Mini 4.2: Online Java-based simulator

iPhone / iPod / iPad iBBDemo2 iPad / iPhone Simulator

There’s no true iOS emulator for Windows. iBBDemo2 is an unofficial 3rd-party utility that simulates Mobile Safari’s screen dimensions and user agent string.

Mozilla Fennec Firefox for Mobile homepage

Follow the link under the heading Download Firefox for mobile to your desktop computer.

Note that if you want to view your application on a real mobile device (which is the only option for fully testing iPhone or iPad, since there’s no true emulator for Windows) you’ll need to host your application in IIS or IIS Express. You can’t easily use Visual Studio’s built-in web server for this, because it won’t respond to requests from other machines.

 

Reference : http://www.asp.net/Mobile/device-simulators

Mobile Device Detection and Redirection with 51Degrees.mobi

Introduction

This article explains approaches for ASP.NET mobile development to determine if an HTTP request is coming from a mobile phone and then redirecting the request to a page optimized for a mobile browser. This has been created using the version 0.1.10.3 of the 51degrees.mobi foundation API.

Please note these instructions will require changes to assembly names, namespaces and file names to work with the latest version of the 51degrees.mobi foundation API.

Method 1: Using ASP.NET to detect the user agent

Use ASP.NET to detect the user-agent adding server-side browser detection and redirection to your website using the ASP.NET platform is quite easy. This code should be inserted into the Page_Load event of the web form code behind file (e.g. default.aspx.cs). To enable this site-wide, just add it to the Page_Load event of the Master Page file.

            string strUserAgent = Request.UserAgent.ToString().ToLower();

            if (strUserAgent != null)
            {
                if (Request.Browser.IsMobileDevice == true || 
                    strUserAgent.Contains("iphone") ||
                    strUserAgent.Contains("blackberry") || 
                    strUserAgent.Contains("mobile") ||
                    strUserAgent.Contains("windows ce") || 
                    strUserAgent.Contains("opera mini") ||
                    strUserAgent.Contains("palm"))
                {
                    Response.Redirect("DefaultMobile.aspx");
                }
            }

 

Continue reading

what is WURFL?

WURFL stands for Wireless Universal Resource FiLe. It is formerly a FOSS (which stands for Free and Open Source Software) community effort focused on the problem of presenting content on the wide variety of wireless devices. WURFL is a set of proprietary API’s and an XML configuration file which contains information about device capabilities and features for a variety of mobile devices. Until version 2.2, WURFL was release under an “open source / public domain” license[1]Prior to Version 2.2 device information was contributed by developers around the world and the WURFL was updated frequently reflecting new wireless devices coming on the market. In June 2011, the founder of the WURFL Project, Luca Passani, and Steve Kamerman, the author of Tera-WURFL, a popular high-performance PHP WURFL API, formed ScientiaMobile, Inc to provide commercial mobile device detection support and services, and is the driving force behind WURFL.[2] As of August 30, 2011, WURFL is licensed under a dual-license model, using the AGPL license for non-commercial use and a proprietary commercial license.

History

At the end of 1999 the first WAP phone was launched in Europe, followed by many others in the following months. By 2001 it became clear that WAP devices exhibited significant differences in the way they handled WAP content. The implication of this was that mobile developers found it difficult to support the increasing numbers of devices; the cost of application development, cost of testing and the cost of the very devices made WAP development expensive as compared to web development. Eventually, some developers realized that they could leverage the open-source model for their efforts. Luca Passani and Andrea Trasatti joined forces to build a community around a shared repository of device capability information, which they named WURFL. Over the years the project has gained followers and supporters from different geographical regions and with different backgrounds. The first basic API was in PerlJava and PHP libraries appeared shortly afterward, soon followed by a better.NET FrameworkPerl version, Ruby, and, more recently, PythonXSLT and C++.

Continue reading