<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Nick's Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/nicktrog/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/nicktrog/feed.xml</link>
    <description>All things technical about the Microsoft platform</description>
    <lastBuildDate>Mon, 13 Mar 2017 19:37:51 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Using hierarchical page navigation and MVVM in Xamarin Forms</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/using-hierarchical-page-navigation-and-mvvm-in-xamarin-forms</link>
      <pubDate>Fri, 10 Mar 2017 13:15:17 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/?p=1745</guid>
      <description><![CDATA[In this post I’ll explain how to use hierarchical page navigation in a Xamarin Forms application. To...]]></description>
      <content:encoded><![CDATA[In this post I’ll explain how to use <strong>hierarchical page navigation</strong> in a Xamarin Forms application. To demonstrate this, we’ll use the Xamarin Alliance template application, that we use in the <a href="https://xamarinalliance.com">Xamarin Alliance</a> program. This program consists of a set of coding challenges to get hands-on experience with Xamarin and Azure to build connected mobile applications.

If you’ve never used Xamarin before, make sure to check the <a href="https://github.com/msdxbelux/XamarinAlliance/tree/master/Challenge%201">first challenge</a> of the Xamarin Aliance, where you’ll set up your developer machine to get started. If you already have your developer machine set up, you can just <a href="https://github.com/msdxbelux/XamarinAlliance/tree/master/Challenge%201/src/XamarinAlliance">download the source code from the GitHub repo</a> to follow along.

Here you can see a screenshot of what we’ll be building - a main page that contains a list of Star Wars characters and a detail page that shows the details for the selected character.

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/xa_ch2_result.jpg"><img width="344" height="273" title="xa_ch2_result" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="xa_ch2_result" src="https://msdnshared.blob.core.windows.net/media/2017/03/xa_ch2_result_thumb.jpg" border="0" /></a>
<h3>Hierarchical Page Navigation</h3>
Xamarin Forms has multiple ways to implement page navigation:

<img width="616" height="205" src="https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/Images/page-types.png" />

In this post I’ll explain how to leverage hierarchical page navigation – for more details on other navigation experiences, you can check the <a href="https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/">online documentation</a>.

The hierarchical page navigation implements the page navigation as a stack, where you push pages onto a <a href="https://en.wikipedia.org/wiki/Stack_(abstract_data_type)">stack</a> to navigate forwards and pop off the last page on the stack to navigate backwards (LIFO – last in, first out).

To implement this navigation model, we make use of the <a href="https://developer.xamarin.com/api/type/Xamarin.Forms.NavigationPage/">NavigationPage</a> class, that allows navigating through a stack of <a href="https://developer.xamarin.com/api/type/Xamarin.Forms.ContentPage/">ContentPage</a> objects. Out of the box, the NavigationPage already adds some navigation UX to your application: a page icon, title and back button. And the nice thing is that Xamarin Forms makes sure this matches the specific paradigms of the different mobile OSes.

<img src="https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/navigation/hierarchical/Images/navigationpage-components.png" />

&nbsp;
<h3></h3>
<h3>Setting the main page</h3>
The first step in adding hierarchical page navigation to your app is to change the app’s main page to be a <strong>NavigationPage</strong> instead of a <em>ContentPage</em><strong> </strong>– this is done in the <strong>App.cs</strong> file:

[csharp]
public App()
{
// The root page of your application
MainPage = new NavigationPage(new CharacterListPage());
}
[/csharp]

&nbsp;

You notice that in the <em>NavigationPage</em> constructor we pass in a new instance of the <em>CharacterListPage</em> class to immediately set the root page for the app. The <em>CharacterListPage</em> is of type <em>ContentPage</em>.

[csharp]
public partial class CharacterListPage : ContentPage
[/csharp]

&nbsp;
<h3>Adding a detail page</h3>
So far we have a <em>NavigationPage</em> which has just a root page that is our <em>CharacterListPage</em>, showing the list of Star Wars characters. We now need to add a detail page for displaying the selected character. In addition, we need to implement the navigation from the root page to the detail page.

The detail page is of type <em>ContentPage</em> and can be created by adding a new item of type <strong>Forms Xaml Page</strong> and name it <strong>CharacterDetailPage</strong>:

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/xa_add_forms_xaml_page.jpg"><img width="469" height="326" title="xa_add_forms_xaml_page" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="xa_add_forms_xaml_page" src="https://msdnshared.blob.core.windows.net/media/2017/03/xa_add_forms_xaml_page_thumb.jpg" border="0" /></a>

&nbsp;
<h3>Navigate to the detail page</h3>
Our main page contains a <a href="https://developer.xamarin.com/guides/xamarin-forms/user-interface/listview/">ListView</a><em></em> of characters and upon tapping one of them, we need to navigate to the detail page, showing the details of the selected item. The first step to achieve this is to handle the <em>ItemSelected</em> event on the <em>ListView</em>. You could do this entirely programmatically in the code-behind <em>CharacterListPage</em> or use both XAML and code-behind.

To <u>programmatically</u> handle the event, update the constructor of the <em>CharacterListPage</em> (<strong>CharacterListPage.xaml.cs</strong>); in a second step we’ll add the actual event handler code to this file.

[csharp highlight="5"]
public CharacterListPage()
{
InitializeComponent();
// Programmatically handle the ItemSelected event on the ListView
characterList.ItemSelected += OnItemSelected;
BindingContext = viewModel = new CharacterListViewModel();
}
[/csharp]

&nbsp;

To <u>declaratively</u> handle the event in XAML, modify the <strong>CharacterListPage.xml</strong> file and add the <em>ItemSelected</em> attribute:

[xml highlight="5"]
&lt;ListView x:Name=&quot;characterList&quot;
          ItemsSource=&quot;{Binding Items}&quot;
          RefreshCommand=&quot;{Binding LoadItemsCommand}&quot;
          IsRefreshing=&quot;{Binding IsBusy, Mode=OneWay}&quot;
          ItemSelected=&quot;OnItemSelected&quot;
          IsPullToRefreshEnabled=&quot;True&quot;
          HasUnevenRows=&quot;true&quot;
     Grid.Row=&quot;1&quot;&gt;
          &lt;ListView.ItemTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;ViewCell&gt;
                      &lt;StackLayout HorizontalOptions=&quot;Start&quot; Orientation=&quot;Vertical&quot; Padding=&quot;15,5,5,15&quot; &gt;
                          &lt;Label Text=&quot;{Binding Name}&quot; Style=&quot;{StaticResource LabelHeaderStyle}&quot; /&gt;
                          &lt;Label Text=&quot;{Binding Biography}&quot; Style=&quot;{StaticResource LabelNormalStyle}&quot; /&gt;
                      &lt;/StackLayout&gt;
                  &lt;/ViewCell&gt;
              &lt;/DataTemplate&gt;
          &lt;/ListView.ItemTemplate&gt;
&lt;/ListView&gt;
[/xml]

&nbsp;

Regardless of how you handle the <em>ItemSelected</em> event, we still need to implement the event handler to perform the actual navigation action. In the <strong>CharacterListPage.xaml.cs</strong> file, we add the <em>OnItemSelected</em> event handler:

[csharp]
 
async void OnItemSelected(object sender, SelectedItemChangedEventArgs args)
{
    var item = args.SelectedItem as Character;
    if (item == null) 
    {
        // the item was deselected
        return;
    }
 
    // Navigate to the detail page
    await Navigation.PushAsync(new CharacterDetailPage(new CharacterDetailViewModel(item)));
 
    // Manually deselect item
    characterList.SelectedItem = null;
}
 
[/csharp]

&nbsp;

You notice that we first check if the selected item is not null – the reason for this is that the <em>ItemSelected</em> event is also invoked when an item <u>deselected</u> from the <em>ListView</em>.

To navigate to the detail page, we use the <em><a href="https://developer.xamarin.com/api/member/Xamarin.Forms.NavigationPage.PushAsync/p/Xamarin.Forms.Page/">Navigation.PushAsync</a></em> method, passing in a new instance of the detail page: <em>CharacterDetailPage</em>. The <em>PushAsync</em> method will push the detail page on the navigation stack so that it becomes the active page, sitting on top of the root page in the stack. To navigate backwards we’ll use the corresponding <em>PopAsync</em> method to remove the topmost page from the stack and make the previous page the active one.

How does the detail page know about the selected item? This is achieved by passing this information through the constructor of the <em>CharacterDetailPage</em>. In the next section, we’ll go into more detail about using MVVM. For now, know that conceptually we pass the selected item to the detail page.

&nbsp;
<h3>Using MVVM</h3>
<a href="https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel">MVVM</a> or Model-View-ViewModel is an architectural pattern that helps in separating the development of the user interface (XAML in our example) from the business logic that drives the user interface. The <em>Model</em> refers to the domain model and represents the state (e.g. Character or Movie in our example). The <em>View</em> refers to the presentation of the information contained in the models (in our example this refers to the XAML pages). Finally, the <em>ViewModel</em> is responsible for converting the data in the model in such a way that it can be represented by the views. It also acts as a mediator to organize the access to the backend logic – in our example we have a viewmodel for each of the two pages.

In our example the view and viewmodel communicate with each other by leveraging XAML based data-binding. For our viewmodels, which are basically just classes, to act as a data binding source, they need to implement a notification protocol: <strong><em>INotifyPropertyChanged</em></strong>. When the view then adds a data binding on the viewmodel, the view will be notified when data changes in the viewmodel and can update the display. You can read more about MVVM and data binding in Xamarin Forms in the <a href="https://developer.xamarin.com/guides/xamarin-forms/xaml/xaml-basics/data_bindings_to_mvvm/">online documentation</a>.

&nbsp;

In our example we have 2 viewmodels: <strong>CharacterListViewModel</strong> and <strong>CharacterDetailViewModel</strong>. To avoid code duplication across viewmodels, these classes derive from a <strong>BaseViewModel</strong> class, which in turn derives from <strong>ObservableObject</strong> class. The latter one implements a generic way to add <em>INotifyPropertyChanged</em> to all properties of a class. Check out the <a href="https://github.com/msdxbelux/XamarinAlliance/tree/master/Challenge%202">source code</a> for the actual imlementation of these base classes.

The <em>CharacterListViewModel</em> contains the <em>Items</em> collection of <em>Character</em> objects that the <em>ListView</em> in the root page will data bind on. In addition, you notice the <em>LoadItemsCommand</em> property; this is used for invoking a method by the view on the viewmodel through data binding. In this case, it is used for refreshing the <em>ListView</em>.

&nbsp;

[csharp]
 
public class CharacterListViewModel : BaseViewModel
{
    CharacterService service;
 
    public ObservableRangeCollection&lt;Character&gt; Items { get; set; }
    public Command LoadItemsCommand { get; set; }
 
    public CharacterListViewModel()
    {
        service = new CharacterService();
        Items = new ObservableRangeCollection&lt;Character&gt;();
        LoadItemsCommand = new Command(async () =&gt; await ExecuteLoadItemsCommand());
    }
 
    async Task ExecuteLoadItemsCommand()
    {
        if (IsBusy)
            return;
 
        IsBusy = true;
 
        try
        {
            Items.Clear();
            var items = await service.GetCharactersAsync();
            Items.ReplaceRange(items);
        }
        catch (Exception ex)
        {
            Debug.WriteLine(ex);
        }
        finally
        {
            IsBusy = false;
        }
    }
 
}
 
[/csharp]

&nbsp;

The viewmodel for the details page is very simple – through the <em>Item</em> property it exposes a single <em>Character</em> object, which is the item that was selected in the root page.

[csharp]
 
public class CharacterDetailViewModel : BaseViewModel
{
    public Character Item { get; set; }
 
    public CharacterDetailViewModel(Character item = null)
    {
        Title = item.Name;
        Item = item;
    }
}
 
[/csharp]

&nbsp;

Now that we have our viewmodels defined, we need to data bind the views to them. We do so by setting the <strong>BindingContext</strong> in the <em>ContentPage</em>s.

[csharp highlight="7"]
 
private CharacterListViewModel viewModel;
 
public CharacterListPage()
{
    InitializeComponent();
 
    BindingContext = viewModel = new CharacterListViewModel();
}
 
[/csharp]

&nbsp;

[csharp highlight="7"]
 
CharacterDetailViewModel viewModel;
 
public CharacterDetailPage(CharacterDetailViewModel viewModel)
{
    InitializeComponent();
 
    BindingContext = this.viewModel = viewModel;
}
 
[/csharp]

&nbsp;

In the XAML page we can then refer to the indivual properties of the viewmodel by using the <strong>{Binding}</strong> syntax:

[xml highlight="2-4,13-14"]
 
        &lt;ListView x:Name=&quot;characterList&quot;
                ItemsSource=&quot;{Binding Items}&quot;
                RefreshCommand=&quot;{Binding LoadItemsCommand}&quot;
                IsRefreshing=&quot;{Binding IsBusy, Mode=OneWay}&quot;
                ItemSelected=&quot;OnItemSelected&quot;
                IsPullToRefreshEnabled=&quot;True&quot;
                HasUnevenRows=&quot;true&quot;
                Grid.Row=&quot;1&quot;&gt;
            &lt;ListView.ItemTemplate&gt;
                &lt;DataTemplate&gt;
                    &lt;ViewCell&gt;
                        &lt;StackLayout HorizontalOptions=&quot;Start&quot; Orientation=&quot;Vertical&quot; Padding=&quot;15,5,5,15&quot; &gt;
                            &lt;Label Text=&quot;{Binding Name}&quot; Style=&quot;{StaticResource LabelHeaderStyle}&quot; /&gt;
                            &lt;Label Text=&quot;{Binding Biography}&quot; Style=&quot;{StaticResource LabelNormalStyle}&quot; /&gt;
                        &lt;/StackLayout&gt;
                    &lt;/ViewCell&gt;
                &lt;/DataTemplate&gt;
            &lt;/ListView.ItemTemplate&gt;
        &lt;/ListView&gt;

 
[/xml]

&nbsp;

[xml highlight="1,4,8"]
 
&lt;Image Source=&quot;{Binding Item.ImageUrl}&quot; /&gt;
&lt;StackLayout&gt;
    &lt;Label Text=&quot;Biography:&quot; Style=&quot;{StaticResource LabelHeaderStyle}&quot; /&gt;
    &lt;Label Text=&quot;{Binding Item.Biography}&quot; Style=&quot;{StaticResource LabelNormalStyle}&quot; /&gt;
&lt;/StackLayout&gt;
&lt;StackLayout Orientation=&quot;Horizontal&quot;&gt;
    &lt;Label Text=&quot;Gender: &quot; Style=&quot;{StaticResource LabelHeaderStyle}&quot; /&gt;
    &lt;Label Text=&quot;{Binding Item.Gender}&quot; Style=&quot;{StaticResource LabelNormalStyle}&quot;/&gt;
&lt;/StackLayout&gt;
 
[/xml]

&nbsp;

Now that we have the different pieces in place we can run the application. You should see something similar to the image below. In the main page you'll see the page title and icon and when you tap on one of the items in the list, you'll navigate to the details page. The details page also shows the page title, as well as a back button that allows returning to the previous page.
&nbsp;
You notice that we didn't have to implement any code to navigate back to the previous page. Is functionality is built into the <em>NavigationPage</em>, which provides the UI and implementation logic. If you want to provide an explicit way of navigating back, you'd have to invoke the <em>Navigation.PopAsync</em> method to do so.

&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/xa_ch2_result.jpg"><img width="344" height="273" title="xa_ch2_result" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="xa_ch2_result" src="https://msdnshared.blob.core.windows.net/media/2017/03/xa_ch2_result_thumb.jpg" border="0" /></a>


&nbsp;
<h3>Next steps</h3>
<ul>
 	<li>Download the completed source code from <a href="https://github.com/msdxbelux/XamarinAlliance/tree/master/Challenge%202">GitHub</a>.</li>
 	<li>Join the <a href="https://www.xamarinalliance.com/">Xamarin Alliance</a> coding challenges to learn more about building connected mobile apps.</li>
 	<li>Check out the free <a href="https://developer.xamarin.com/guides/xamarin-forms/creating-mobile-apps-xamarin-forms/">Xamarin Forms eBook</a>.</li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Configuring Visual Studio Code for PHP development</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/configuring-visual-studio-code-for-php-development</link>
      <pubDate>Thu, 11 Feb 2016 12:37:07 GMT</pubDate>
      <dc:creator><![CDATA[nicktrog]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2016/02/11/configuring-visual-studio-code-for-php-development/</guid>
      <description><![CDATA[Updated March 17, 2016: added a link to the PHP topic on the VS Code documentation center. Two weeks...]]></description>
      <content:encoded><![CDATA[<h5><strong>Updated March 17, 2016: added a link to the PHP topic on the VS Code documentation center.</strong></h5> <p><span style="font-size: small">Two weeks ago I was a speaker at the </span><a href="https://conference.phpbenelux.eu/2016/"><span style="font-size: small">PHP Benelux</span></a><span style="font-size: small"> conference, where I talked about </span><a href="https://aka.ms/azureml"><span style="font-size: small">Azure Machine Learning</span></a><span style="font-size: small">.&nbsp; For writing and debugging my demo PHP source code, I used Visual Studio Code. </span></p> <p><span style="font-size: small">In this blog post I’ll describe the steps for configuring VS Code for doing PHP development. For more details about how VS Code supports PHP, check out the <a href="https://code.visualstudio.com/docs/languages/php">PHP topic in the documentation center</a>.</span></p> <h1><span style="font-size: medium">TL;DR</span></h1> <ol> <li><a href="https://code.visualstudio.com"><span style="font-size: small">Download</span></a><span style="font-size: small"> and install Visual Studio Code</span>  <li><span style="font-size: small">Configure PHP linting in user settings</span>  <li><span style="font-size: small">Download and install the </span><a href="https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug"><span style="font-size: small">PHP Debug extension</span></a><span style="font-size: small"> from the Visual Studio Marketplace</span>  <li><span style="font-size: small">Configure the PHP Debug extension for XDebug</span> </li></ol> <p>&nbsp;</p> <h1><span style="font-size: medium">Download and install Visual Studio Code</span></h1> <p><span style="font-size: small">Visual Studio Code is Microsoft’s free, cross-platform lightweight code editor. While you </span><a href="https://code.visualstudio.com"><span style="font-size: small">download it</span></a><span style="font-size: small"> (it’s only a 42MB download), let’s look a bit closer at what I just said… </span></p> <ul> <li><span style="font-size: small"><strong>Free</strong>: indeed, VS Code is entirely free, no gotchas.</span>  <li><span style="font-size: small"><strong>Cross-platform</strong>: VS Code is available for Windows, Linux and OS X</span>  <li><span style="font-size: small"><strong>Lightweight code editor</strong>: as opposed to Visual Studio, VS Code is not a full-fledged IDE but a code editor. It’s a code editor with a number of powerful features you might also find in an IDE, such as intellisense, debugging and Git source control integration.</span> </li></ul> <p><span style="font-size: small">And by the way, VS Code is also <strong>open source</strong> – you can contribute to the sources or submit issues in the </span><a href="https://github.com/microsoft/vscode"><span style="font-size: small">GitHub repository</span></a><span style="font-size: small">.</span></p> <p><span style="font-size: small">Once you have </span><a href="https://code.visualstudio.com"><span style="font-size: small">downloaded</span></a><span style="font-size: small"> the installer package, set it up on your machine. You can find the detailed instructions </span><a href="https://code.visualstudio.com/Docs/editor/setup"><span style="font-size: small">here</span></a><span style="font-size: small">. You should now be able to open a command prompt and launch Visual Studio Code and start editing all files in a folder.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image358.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb329.png" width="512" height="279"></a></p> <p><span style="font-size: small">If you open a file with the .php extension, Code will recognize this file as a PHP file. Alternatively, you can manually change the file type through the Language Mode button at the bottom right of the editor or by pressing Ctrl+K and M keyboard sequence.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image359.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb330.png" width="511" height="348"></a></p> <p>&nbsp;</p> <h1><span style="font-size: medium">PHP out-of-the-box experience</span></h1> <p><span style="font-size: small">VS Code supports many </span><a href="https://code.visualstudio.com/docs/languages/overview"><span style="font-size: small">languages</span></a><span style="font-size: small"> out of the box, and PHP is one of those languages. Note that more languages are supported through VS Code extensions in the </span><a href="https://marketplace.visualstudio.com/#vscode"><span style="font-size: small">Visual Studio Marketplace</span></a><span style="font-size: small">. For PHP we provide syntax coloring, bracket matching and code snippets.</span></p> <p><span style="font-size: small">As you start typing code in a PHP file, you’ll notice that you get syntax coloring, bracket matching and IntelliSense as you type.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image360.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb331.png" width="507" height="362"></a></p> <p>&nbsp;</p> <h1><span style="font-size: medium">Configure PHP linting</span></h1> <p><span style="font-size: small">By default, VS Code will perform PHP linting to validate your code when you save your file.&nbsp; To do so, it is using the php executable.&nbsp; As you use VS Code for the first time, you’ll get an error message that the PHP executable cannot be found.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/CannotValidate.png"><img title="CannotValidate" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="CannotValidate" src="https://msdnshared.blob.core.windows.net/media/2016/10/CannotValidate_thumb.png" width="578" height="59"></a></p> <p><span style="font-size: small">As mentioned in the message, you need to specify the path the PHP executable on your machine.&nbsp; This is done in the settings file (VS Code has different levels of settings files, for more details check out the </span><a href="https://code.visualstudio.com/docs/customization/userandworkspace"><span style="font-size: small">documentation</span></a><span style="font-size: small">). In this case, we’ll configure the PHP settings globally for the user.</span></p> <p><span style="font-size: small">Open the user settings through the command panel: press F1 &gt; type ‘user’ &gt; press Enter.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/UserSetting-cmd.png"><img title="UserSetting cmd" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="UserSetting cmd" src="https://msdnshared.blob.core.windows.net/media/2016/10/UserSetting-cmd_thumb.png" width="498" height="134"></a></p> <p><span style="font-size: small">You will now get two JSON documents: the leftmost document are the default settings, on the right hand side you find the user settings. In the user settings you can override the default settings. For enabling PHP linting, we have 3 settings. </span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/UserSettings.png"><img title="UserSettings" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="UserSettings" src="https://msdnshared.blob.core.windows.net/media/2016/10/UserSettings_thumb.png" width="482" height="299"></a></p> <p><span style="font-size: small">To configure the path to the PHP executable you specify it in the user settings file:</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/UserSettingsDone.png"><img title="UserSettingsDone" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="UserSettingsDone" src="https://msdnshared.blob.core.windows.net/media/2016/10/UserSettingsDone_thumb.png" width="481" height="292"></a></p> <p><span style="font-size: small">Now you should see validation enabled for you PHP files. In the event of invalid PHP, you’ll see a red squiggly lines in your source code (in below code sample, a semi-colon is missing on line number 2).</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image361.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb332.png" width="480" height="232"></a></p> <p>&nbsp;</p> <h1><span style="font-size: medium">Configure debugging</span></h1> <p><span style="font-size: small">VS Code provides XDebug debugging support using the </span><a href="https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug"><span style="font-size: small">PHP Debug extension</span></a><span style="font-size: small"> (kudos to Felix Becker!). First, install the extension from the VS Code command panel: press F1 &gt; type ‘install ext’ and select ‘Install Extensions’. Then type ‘PHP Debug’ in the search box and install the extension. You will have to restart VS Code after installing the extension to activate it.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image362.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb333.png" width="487" height="141"></a></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/Install-Extension.png"><img title="Install Extension" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="Install Extension" src="https://msdnshared.blob.core.windows.net/media/2016/10/Install-Extension_thumb.png" width="490" height="213"></a></p> <p><span style="font-size: small">Note that this extension uses XDebug. Therefore you need to ensure that you have installed XDebug. You can download XDebug </span><a href="https://xdebug.org/download.php"><span style="font-size: small">here</span></a><span style="font-size: small"> (for Windows, you should get the <u>non-thread-safe 32-bit version</u>).</span></p> <p><span style="font-size: small">Then, update your php.ini file with the following settings. In my case, I have installed XDebug in the <em>ext</em> subfolder of the PHP install directory. If you installed XDebug elsewhere, make sure that <em>zend_extension</em> points to the correct location.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image363.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb334.png" width="494" height="251"></a></p> <p><span style="font-size: small">Make sure to point your webserver root to your project and each time you request a PHP file, XDebug will try to connect to port 9000 for debugging. </span></p> <p><span style="font-size: small">To start debugging, and navigate to the Debugging tab in VS Code.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image364.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;margin: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb335.png" width="244" height="238"></a></p> <p><span style="font-size: small">Then press the little gear icon to generate the launch.json file, which will allow VS Code to start the XDebug debugging session. Make sure to choose PHP as the debug environment.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image365.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb336.png" width="492" height="211"></a></p> <p>&nbsp;</p> <p><span style="font-size: small">To start debugging you can press F5 or click the green arrow in the Debugging tab. You can set breakpoints in your source code by selecting a line and pressing F9.</span></p> <p><span style="font-size: small">If you now hit the specific web page, VS Code will break into your source code at the specified breakpoint. You’ll then get information about variables, call stack, etc. in the left hand pane.</span></p> <p><a href="https://msdnshared.blob.core.windows.net/media/2016/10/image366.png"><img title="image" style="border-top: 0px;border-right: 0px;border-bottom: 0px;padding-top: 0px;padding-left: 0px;border-left: 0px;padding-right: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/2016/10/image_thumb337.png" width="494" height="239"></a></p> <h1><span style="font-size: medium">Conclusion</span></h1> <p><span style="font-size: small">Visual Studio Code provides great PHP language support out of the box, and with the PHP Debug extension you can now also debug your PHP code. And all this for free, and cross-platform.</span></p> <p><span style="font-size: small">There are more PHP extensions in the Visual Studio Marketplace for you to try out.</span></p>                    <p>&nbsp;</p> <p><span style="font-size: small">Links:</span></p> <ul> <li><span style="font-size: small">VS Code extensions: <a title="https://marketplace.visualstudio.com/vscode" href="https://marketplace.visualstudio.com/vscode">https://marketplace.visualstudio.com/vscode</a></span></li> <li><span style="font-size: small">More information about PHP support in VS Code: <a title="https://code.visualstudio.com/docs/languages/php" href="https://code.visualstudio.com/docs/languages/php">https://code.visualstudio.com/docs/languages/php</a></span></li></ul> <p><span style="font-size: small"></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Adding gulp to Visual Studio Online Builds</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/adding-gulp-to-visual-studio-online-builds</link>
      <pubDate>Thu, 05 Mar 2015 08:39:38 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2015/03/05/adding-gulp-to-visual-studio-online-builds/</guid>
      <description><![CDATA[At one of our Code in the Cloud camps someone asked me how they could integrate front-end build...]]></description>
      <content:encoded><![CDATA[At one of our <a href="https://msevents.microsoft.com/CUI/EventDetail.aspx?culture=en-US&amp;EventID=1032616402">Code in the Cloud camps</a> someone asked me how they could integrate front-end build tasks in the Visual Studio Online (VSO) build process. Lately we’ve been adding great support for gulp/grunt/bower into our Visual Studio IDE (check out <a href="https://www.hanselman.com/blog/IntroducingGulpGruntBowerAndNpmSupportForVisualStudio.aspx">this post from Scott Hanselman</a> to learn more). But I have to admit that I’d never included this in a VSO Team Build.  In this post I’ll show you how you can integrate a front-end build process in Visual Studio Online Build.

<strong>Disclaimer: </strong>the process described below is a demonstration of how you can integrate gulp into a Visual Studio Online Team Build process. This is by no means intended to be a best practice and to keep things simple, below scripts lack extensive error handling.

<strong>Update: </strong>in <em>clientcompile.bat</em>, use CD with /D option to also switch drive letter if needed (thanks Duncan!).

&nbsp;
<h3>Step 1: Creating a Visual Studio Online Team Project</h3>
<a href="https://www.visualstudio.com">Visual Studio Online</a> is Microsoft’s application lifecycle management solution in the cloud. It allows you to manage all aspects of you development process, from planning what needs to be done, to source control to manage your source code files, to hosted build infrastructure and even load test infrastructure. Visual Studio Online is free for teams of up to 5 members. In the context of this post, we’ll be using the source control repository and hosted build services of VSO.

Once you’re <a href="https://www.visualstudio.com/get-started/sign-up-for-visual-studio-online">signed up</a> for Visual Studio Online, you can create your first Team Project. In this blog post we’ll be using git-based source control; this will allow you to connect to the source code repository using any existing git client. Note that VSO source control can be used for any development technology and programming language.

To create a new Team Project, navigate to your VSO account (<a href="https://&lt;account&gt;.visualstudio.com">.visualstudio.com"&gt;.visualstudio.com"&gt;.visualstudio.com"&gt;.visualstudio.com"&gt;https://&lt;account&gt;.visualstudio.com</a>) and clicking the ‘New…’ link. Enter the details and press the ‘Create Project’ button.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/4721.image_33C36CC6.png"><img title="New Team Project" style="border-width: 0px" alt="New Team Project" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1524.image_thumb_116E67FE.png" border="0" height="139" width="176" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5672.image_60DAEA45.png"><img title="New Team Project details" style="border-width: 0px" alt="New Team Project details" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/7245.image_thumb_5B8C0394.png" border="0" height="230" width="244" /></a>

&nbsp;
<h3>Step 2: Setting up the Web Application project</h3>
To keep things simple, we’ll create a basic <a href="https://en.wikipedia.org/wiki/Lorem_ipsum">Lorem Ipsum</a> generator website using ASP.NET and Visual Studio, however you could use any other web technology.

Make sure that in Visual Studio you’re connected to the Team Project (from Team Explorer, Connect to Team Projects <a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3173.image_40563B44.png"><img title="image" style="border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0777.image_thumb_5B8E9445.png" border="0" height="27" width="32" /></a> , and then Select Team Projects…). In Team Explorer, click the Home button and press the New… link to create a new solution that is added to source control. Now create an empty ASP.NET Web Application project.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/4011.image_0FC2BD8C.png"><img title="Blank ASP.NET project" style="border-width: 0px" alt="Blank ASP.NET project" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0652.image_thumb_45C73C99.png" border="0" height="177" width="244" /></a>

Secondly, add an HTML file ‘<em>index.html</em>’ to the project. As you press the ‘Submit’ button, the <em>generateLoremText</em> JavaScript function is invoked. This function is included in a separate JS file, which will minimize using gulp.
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">1: <span style="color: #0000ff">&lt;</span>!DOCTYPE html<span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">2: <span style="color: #0000ff">&lt;</span><span style="color: #800000">html</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">3: <span style="color: #0000ff">&lt;</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">4: <span style="color: #0000ff">&lt;</span><span style="color: #800000">script</span> <span style="color: #ff0000">src</span>=<span style="color: #0000ff">"js/lorem.min.js"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">5: <span style="color: #0000ff">&lt;/</span><span style="color: #800000">head</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">6: <span style="color: #0000ff">&lt;</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">7: <span style="color: #0000ff">&lt;</span><span style="color: #800000">h1</span><span style="color: #0000ff">&gt;</span>Lorem Ipsum Generator<span style="color: #0000ff">&lt;/</span><span style="color: #800000">h1</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">8:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">9: <span style="color: #0000ff">&lt;</span><span style="color: #800000">p</span><span style="color: #0000ff">&gt;</span>How many paragraphs do you need (1-100):<span style="color: #0000ff">&lt;/</span><span style="color: #800000">p</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">10:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">11: <span style="color: #0000ff">&lt;</span><span style="color: #800000">input</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">"countInput"</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">"number"</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">12:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">13: <span style="color: #0000ff">&lt;</span><span style="color: #800000">button</span> <span style="color: #ff0000">type</span>=<span style="color: #0000ff">"button"</span> <span style="color: #ff0000">onclick</span>=<span style="color: #0000ff">"generateLoremText()"</span><span style="color: #0000ff">&gt;</span>Submit<span style="color: #0000ff">&lt;/</span><span style="color: #800000">button</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">14:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">15: <span style="color: #0000ff">&lt;</span><span style="color: #800000">p</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">"validationText"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">p</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">16:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">17: <span style="color: #0000ff">&lt;</span><span style="color: #800000">hr</span> <span style="color: #0000ff">/&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">18:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">19: <span style="color: #0000ff">&lt;</span><span style="color: #800000">p</span> <span style="color: #ff0000">id</span>=<span style="color: #0000ff">"loremText"</span><span style="color: #0000ff">&gt;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">p</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">20:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">21: <span style="color: #0000ff">&lt;/</span><span style="color: #800000">body</span><span style="color: #0000ff">&gt;</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">22: <span style="color: #0000ff">&lt;/</span><span style="color: #800000">html</span><span style="color: #0000ff">&gt;</span></p>
&nbsp;

Now add a folder ‘<em>js</em>’ to the project, which will contain our client-side JavaScript code. Then add a new JavaScript file ‘<em>lorem.js</em>’ to this folder. The script is fairly easy and self-explanatory.
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">1: <span style="color: #0000ff">function</span> generateLoremText() {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">2: <span style="color: #0000ff">var</span> count, validationText, loremText;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">3:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">4: loremText = "<span style="color: #8b0000"></span>";</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">5: validationText = "<span style="color: #8b0000"></span>";</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">6:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">7: count = <span style="color: #0000ff">document</span>.getElementById("<span style="color: #8b0000">countInput</span>").value;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">8:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">9: <span style="color: #0000ff">if</span> (<span style="color: #0000ff">isNaN</span>(count) || count &lt; 1 || count &gt; 100) {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">10: validationText = "<span style="color: #8b0000">Invalid input</span>";</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">11: } <span style="color: #0000ff">else</span> {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">12: loremText = createLoremText(count);</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">13: }</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">14:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">15: <span style="color: #0000ff">document</span>.getElementById("<span style="color: #8b0000">validationText</span>").innerHTML = validationText;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">16: <span style="color: #0000ff">document</span>.getElementById("<span style="color: #8b0000">loremText</span>").innerHTML = loremText;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">17: }</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">18:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">19: <span style="color: #0000ff">function</span> createLoremText(count)</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">20: {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">21: <span style="color: #0000ff">var</span> loremText = "<span style="color: #8b0000"></span>";</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">22:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">23: <span style="color: #0000ff">for</span> (i = 0; i &lt; count; i++)</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">24: {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">25: loremText = loremText + "<span style="color: #8b0000">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>";</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">26: }</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">27:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">28: <span style="color: #0000ff">return</span> loremText;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">29: }</p>
&nbsp;

The project structure should now look something like this:

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8203.image_438D448E.png"><img title="Solution Explorer structure 1" style="border-width: 0px" alt="Solution Explorer structure 1" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3833.image_thumb_77C16DD4.png" border="0" height="118" width="133" /></a>

&nbsp;
<h3>Step 3: Configuring gulp for your web application</h3>
We’re going to use <a href="https://gulpjs.com/">gulp</a> to perform our front-end build tasks; you could just as well integrate with grunt or bower. As mentioned before, Visual Studio already provides grunt/gulp/bower integration in the IDE, however this will run these build tasks on the developer machine and not as part of our centralized build process.

There are basically 2 approaches for customizing the Visual Studio Team Build process:
<ul>
 	<li>Create a custom Team Build template to include activities for invoking the front-end build tasks.  The team at MS OpenTech has created a <a href="https://msopentech.com/blog/2014/06/30/use-grunt-manage-javascript-builds-tfs/">custom build template</a> and corresponding activities to invoke Grunt as part of your Team Build.</li>
 	<li>Alternatively, the default Build templates in TFS and Visual Studio Online now have the possibility to invoke pre and post build scripts. In this script you can then invoke the grunt/gulp/bower commands.</li>
</ul>
In this blog post we’ll take this second option as it allows to quickly extend the default build process without the overhead of creating a custom build template.

To achieve this, we are going to add 3 files to our Web Application project:
<ul>
 	<li>gulpfile.js: contains the gulp script describing all build tasks that need to be performed.</li>
 	<li>package.json: contains the list package dependencies for the gulp script</li>
 	<li>clientcompile.bat (note: you can also use PowerShell): batch script that install the dependency packages and then invokes the gulp command</li>
</ul>
Your project structure should now look like this:

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3252.image_479A2311.png"><img title="Solution Explorer structure 2" style="border-width: 0px" alt="Solution Explorer structure 2" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8176.image_thumb_29BB9F10.png" border="0" height="136" width="128" /></a>

The <em>gulpfile.js</em> file contains the different gulp tasks – if you require plugins, make sure to add the necessary dependencies in the <em>package.json</em> file. Below script will minimize (uglify) our <em>lorem.js</em> script and rename it to <em>lorem.min.js</em>.

You’ll notice that I’m passing in a parameter (<em>PATH</em>) that defines the output path for the minimized script – I’m using the <em><a href="https://www.npmjs.com/package/yargs">yargs</a></em> gulp plugin for this.  This path will resolve to the <em>‘_PublishedWebsites/…’</em> folder on the Team Build drop location.
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">1: 'use strict';</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">2:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">3: <span style="color: #0000ff">var</span> gulp = require('gulp'),</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">4: rename = require('gulp-rename'),</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">5: uglify = require('gulp-uglify'),</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">6: argv = require('yargs').argv;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">7:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">8: <span style="color: #0000ff">var</span> DEST = argv.PATH;</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">9: <span style="color: #0000ff">if</span> (!DEST) { DEST = '.'; }</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">10:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">11: gulp.task('<span style="color: #0000ff">default</span>', <span style="color: #0000ff">function</span>() {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">12: <span style="color: #0000ff">return</span> gulp.src('**/js/lorem.js')</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">13: <span style="color: #008000">// This will minify and rename to lorem.min.js</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">14: .pipe(uglify())</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">15: .pipe(rename({ extname: '.min.js' }))</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">16: .pipe(gulp.dest(DEST));</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">17: });</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">18:</p>
&nbsp;

Our <em>package.json</em> file will contain the necessary packages to be installed:
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">1: {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">2: "<span style="color: #8b0000">name</span>": "<span style="color: #8b0000">GruntVSO</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">3: "<span style="color: #8b0000">version</span>": "<span style="color: #8b0000">1.0.0</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">4: "<span style="color: #8b0000">description</span>": "<span style="color: #8b0000">Grunt VSO integration sample</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">5: "<span style="color: #8b0000">main</span>": "<span style="color: #8b0000">index.js</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">6: "<span style="color: #8b0000">author</span>": "<span style="color: #8b0000">Nick Trogh</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">7: "<span style="color: #8b0000">license</span>": "<span style="color: #8b0000">MIT</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">8: "<span style="color: #8b0000">repository</span>": { "<span style="color: #8b0000">url</span>": "<span style="color: #8b0000">https://github.com</span>" },</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">9: "<span style="color: #8b0000">readme</span>": "<span style="color: #8b0000">Grunt VSO integration sample</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">10: "<span style="color: #8b0000">dependencies</span>": {</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">11: "<span style="color: #8b0000">gulp</span>": "<span style="color: #8b0000">^3.8.11</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">12: "<span style="color: #8b0000">gulp-rename</span>": "<span style="color: #8b0000">^1.2.0</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">13: "<span style="color: #8b0000">gulp-uglify</span>": "<span style="color: #8b0000">^1.1.0</span>",</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">14: "<span style="color: #8b0000">yargs</span>": "<span style="color: #8b0000">^3.4.5</span>"</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">15: }</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">16: }</p>
&nbsp;

Finally the <em>clientcompile.bat</em> file will invoke the different pieces of the front-end build process:
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">1: <span style="color: #0000ff">REM</span> Script arguments</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">2: <span style="color: #0000ff">REM</span> [1] project source <span style="color: #0000ff">folder</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">3: <span style="color: #0000ff">REM</span> [2] output <span style="color: #0000ff">folder</span></p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">4:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">5: <span style="color: #0000ff">REM</span> Create the npm <span style="color: #0000ff">folder</span> <span style="color: #0000ff">in</span> the user profile to <span style="color: #0000ff">fix</span> a bug <span style="color: #0000ff">with</span> npm <span style="color: #0000ff">on</span> Windows</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">6: MKDIR C:\Users\buildguest\AppData\Roaming\npm</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">7:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">8: <span style="color: #0000ff">REM</span> <span style="color: #0000ff">Set</span> the working <span style="color: #0000ff">folder</span> to the project source <span style="color: #0000ff">folder</span> to correctly install npm</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">9: packages locally</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">10: CD /D "<span style="color: #8b0000">%TF_BUILD_SOURCESDIRECTORY%%1</span>"</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">11:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">12: <span style="color: #0000ff">REM</span> Install all dependencies through npm</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">13: <span style="color: #0000ff">CALL</span> npm install</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">14:</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #fbfbfb">15: <span style="color: #0000ff">REM</span> Invoke gulp, passing <span style="color: #0000ff">in</span> the output <span style="color: #0000ff">folder</span> <span style="color: #0000ff">for</span> the minimized JS scripts</p>
<p style="font-size: 10px;font-family: consolas,'Courier New',courier,monospace;width: 100%;margin: 0em;background-color: #ffffff">16: <span style="color: #0000ff">CALL</span> node_modules\.bin\gulp --PATH "<span style="color: #8b0000">%TF_BUILD_BINARIESDIRECTORY%\%2</span>"</p>
&nbsp;

The batch script takes 2 input parameters, which will provide in our Team Build Definition.  The first parameter defines the path to the sources of our Web Application project on the build server.  The second parameter defines the output folder to write our minimized JavaScript file to.  Both input parameters are relative paths and are made absolute based on TFS Build environment variables.

The first step in the script (line 6) creates a folder for npm in the user profile – this is a workaround for a bug with the npm installation on Windows. On line 11, the node package manager is then invoked to install all dependencies locally (in the <em>node_modules</em> folder); it takes our <em>package.json</em> file into account for this.

After installing the packages, we can now invoke gulp and pass in the output path for the minimized files (using ––PATH).

Make sure to commit and push your changes into source control once ready.

&nbsp;
<h3>Step 4: Setting up a team build</h3>
The final step to be done is set up our Team Build for our Web Application – this is achieved by creating a new build definition.  The build definition describes the different steps that make up our build process: getting our sources from source control, compilation, invoking our front-end build tasks, and finally copying the output to the drop folder.

To create a new build definition, go to Visual Studio, navigate to the Team Explorer and open the <em>Builds</em> section.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3716.image_2B8BF4D7.png"><img title="Team Explorer Builds" style="border-width: 0px" alt="Team Explorer Builds" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/6864.image_thumb_7B64AA13.png" border="0" height="178" width="177" /></a>

This view shows the existing build definitions and also shows past build execution results. Create a new build definition by clicking the ‘New Build Definition’ link. In the Trigger tab you can choose to setup a manual build or continuous integration build.

To invoke our script for front-end build tasks (<em>clientcompile.bat</em>), we need to configure the build process. Open the ‘Process’ tab and expand section ‘5. Advanced’ inside the Build section. Specifically we’re going to provide the ‘Post-build script’ information. The script will be executed on the build infrastructure after the source code has been compiled, hence post-build.

For the script, navigate to the <em>clientcompile.bat</em> file. For the script arguments, we need to provide 2 values, as described above:
<ol>
 	<li>The relative source code folder for our project: <strong>\WebApplication1\WebApplication1</strong></li>
 	<li>The relative output folder: <strong>_PublishedWebsites\WebApplication1</strong> (if you choose ‘SingleFolder’ for output location, Team Build copies all output for a Web Application to the _PublishedWebsites folder on the drop location.</li>
</ol>
<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8473.image_2403161B.png"><img title="Build definition process details" style="border-width: 0px" alt="Build definition process details" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1452.image_thumb_659D5267.png" border="0" height="113" width="393" /></a>

&nbsp;

This is the only configuration we need to perform on our Build Definition to invoke our JavaScript build tasks. All we need to do now is queue a new build, or perform a source code modification in case of continuous integration. You can queue a build by right-clicking on the build definition.

Once our build has completed, we can check the output of the build by downloading the contents of the drop location. You do so by right-clicking the build result in Visual Studio and choosing ‘Open in Browser’. On the Build output details page you can then download the output of the build.  In addition, you can view a detailed output of the build process in the ‘Diagnostics’ tab.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3073.image_4E71D7E9.png"><img title="Build results" style="border-width: 0px" alt="Build results" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/7380.image_thumb_4BCBACE9.png" border="0" height="191" width="324" /></a>

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1460.image_4991B4DE.png"><img title="Build result diagnostics" style="border-width: 0px" alt="Build result diagnostics" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2476.image_thumb_000266E1.png" border="0" height="98" width="362" /></a>

When you download the build output zip file, you will find the <em>lorem.min.js</em> file inside the <em>js</em> folder. Opening the file in Visual Studio or a text editor shows the minimized contents of the original <em>lorem.js</em> file.

<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1346.image_21EDC965.png"><img title="Minimized outcome" style="border-width: 0px" alt="Minimized outcome" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2350.image_thumb_31243232.png" border="0" height="59" width="363" /></a>

&nbsp;
<h3>Summary</h3>
As you can see, using the pre and post build scripts you can very easily integrate custom logic into a Visual Studio Online Team Build process. By adding your front-end build process into your central build/continuous integration process, you can have the same repeatable and controlled process for both server-side and client-side builds.

In a next post I’ll explain how you can include front-end build tasks into your Azure Websites continuous deployment process.

&nbsp;
<h3>Additional Resources</h3>
<ul>
 	<li>Come join us for a Code in the Cloud developer camp to learn more about Visual Studio or attend one of our other <a href="https://aka.ms/devbesmart">developer camps</a>.</li>
 	<li>Check out our free online trainings in Microsoft Virtual Academy
<ul>
 	<li><a href="https://www.microsoftvirtualacademy.com/training-courses/fundamentals-of-visual-studio-online">Fundamentals of Visual Studio Online</a></li>
 	<li><a href="https://www.microsoftvirtualacademy.com/training-courses/using-git-with-visual-studio-2013-jump-start">Using Git with Visual Studio 2013</a></li>
</ul>
</li>
 	<li>Get your <a href="https://www.visualstudio.com">free Visual Studio Online account and free Visual Studio Community IDE</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Using Azure Search from PHP</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/using-azure-search-from-php</link>
      <pubDate>Fri, 09 Jan 2015 03:45:31 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2015/01/09/using-azure-search-from-php/</guid>
      <description><![CDATA[Updated March 2, 2016: Source code for this post is available on GitHub.
Updated March 3, 2015:...]]></description>
      <content:encoded><![CDATA[<p><strong>Updated March 2, 2016: Source code for this post is available on <a href="https://github.com/ntrogh/Azure-PHP-samples/tree/master/azuresearch-php">GitHub</a></strong><strong>.</strong></p>
<p><strong>Updated March 3, 2015: Azure Search is now </strong><a href="https://azure.microsoft.com/blog/2015/03/05/azure-search-is-now-generally-available/"><strong>generally available</strong></a><strong> &ndash; updated pricing tier info and API version info.</strong></p>
<p><strong>Updated February 14, 2016: Fix dead links.</strong></p>
<p>I recently had to present at a local <a href="https://www.php-wvl.be/">PHP meetup</a> where I gave an introduction to Microsoft Azure. As part of this I worked out some sample code on how to <strong>integrate the </strong><a href="https://azure.microsoft.com/en-us/services/search/"><strong>Azure Search</strong></a><strong> service in a PHP website</strong>. With Azure Search you can easily integrate sophisticated search capabilities into your websites or applications without having to deal with all the hassle for maintaining a search index.</p>
<p>In this post we&rsquo;ll create a simple PHP website that lists hotels and allows for searching them based on different criteria. The website supports free text search, auto-completion, and faceted search.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5100.image_26E0CB5A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/5100.image_5F00_26E0CB5A.png"><img style="background-image: none; display: inline;" title="Azure Search in PHP" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/6153.image_thumb_37EA1A9F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/6153.image_5F00_thumb_5F00_37EA1A9F.png" alt="Azure Search in PHP" width="408" height="314" border="0" /></a></p>
<h6>TL;DR</h6>
<p>Azure Search provides a <a href="https://msdn.microsoft.com/en-us/library/dn798935.aspx">REST-based API</a> to perform index management (creating, populating, &hellip;) as well as to perform queries on the search indexes.&nbsp; In the PHP website you can leverage this REST API to add search capabilities to the site.</p>
<p>Perform the following steps to do so:</p>
<ol>
<li><strong>Create a free Azure Search service instance</strong> in the Azure Preview portal. The process is described in the following <a href="https://azure.microsoft.com/en-us/documentation/articles/search-create-service-portal/">post</a>.</li>
<li><strong>Invoke the Azure Search REST API</strong>, for example using the <a href="https://phphttpclient.com/">Httpful</a> PHP library or <a href="https://php.net/manual/en/book.curl.php">curl</a>, passing in the api-key of the instance created in the previous step, and passing in a search term you got from user input.</li>
<li>Display the search results from the <strong>resulting JSON output</strong>.</li>
<li>Additionally, you can further leverage the REST API to also provide <strong>auto-completion</strong> and <strong>facetted search</strong>.</li>
</ol>
<p>&nbsp;</p>
<h5>Getting Started</h5>
<p><strong>Creating the Search service and index</strong></p>
<p>As a first step in working with the Azure Search service, you need to create a new Azure Search instance. As an Azure subscriber you have access to a free shared, multi-tenant Search service. The Azure Search functionality is made available through the <a href="https://portal.azure.com" target="_blank">Azure portal</a>, or using a <a href="https://msdn.microsoft.com/en-us/library/dn798935.aspx" target="_blank">REST API</a>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3554.image_04D729B9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/3554.image_5F00_04D729B9.png"><img style="display: inline; border-width: 0px;" title="Search pricing tiers" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1832.image_thumb_7F884307.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/1832.image_5F00_thumb_5F00_7F884307.png" alt="Search pricing tiers" width="244" height="216" border="0" /></a></p>
<p>Once you have a Search service up and running, you can start creating an index. This search index defines the fields a document is made of, the fields that you can search on or that can be used for suggestions, as well as attributes that control the query behavior (e.g. scoring profiles, sorting, etc).&nbsp; To interact with the search service you can use the</p>
<p>You can run DotNetHowTo in the &lsquo;<a href="https://github.com/Azure-Samples/search-dotnet-getting-started" target="_blank">Getting Started</a>&rsquo; GitHub repo to setup your Search instance, create an index and populate the index with documents.</p>
<p><strong>Adding basic search to our website</strong></p>
<p>To create the search index and populating it with data you have used the Azure Search REST API using <a href="https://www.telerik.com/fiddler" target="_blank">Fiddler</a>, <a href="https://www.getpostman.com/" target="_blank">Postman</a> or any other REST client of your preference. For integrating the search functionality in the PHP website, we&rsquo;ll be also be using the REST API.</p>
<p>To implement the basic search functionality, allowing a user to search the list of hotels, we need to issue a <a href="https://msdn.microsoft.com/en-us/library/dn798927.aspx" target="_blank">Search request</a>, which is a GET request on our index:</p>
<p><code>GET /indexes/<strong>[index name]</strong>/docs?[query parameters]</code></p>
<p>Using the <strong>search</strong> query parameter, we can specify the text to be searched for. When you create the search index, you indicate which fields are <em>searchable</em>. By default, all searchable fields in the index will be searched.</p>
<p>Note that with every REST call you are required to always specify the <strong>api-version</strong> parameter. If you don&rsquo;t specify this parameter, you&rsquo;ll get an HTTP 400 error with the cryptic &ldquo;An error has occurred&rdquo; message.</p>
<p>Below code sample shows how it&rsquo;s done from PHP &ndash; in this sample I&rsquo;ve also added sorting based on the baseRate field using the <strong>$orderby</strong> parameter.</p>
<p><span style="color: #9b00d3;">$term = <span style="color: #000000;">"</span><span style="color: #c0504d; background-color: #ffff00;">&lt;</span><span style="color: #c0504d; background-color: #ffff00;">search term&gt;</span><span style="color: #000000;">";</span><br />$searchUri</span></p>
<pre> = "</pre>
<p><span style="color: #c0504d;">https://<span style="background-color: #ffff00;">&lt;your service&gt;</span>.search.windows.net/indexes/<br /> hotels/docs?<strong>search</strong>=<span style="color: #9b00d3;">$term&amp;</span><span style="color: #c0504d;">\$orderby=baseRate<br /> &amp;</span><strong>api-version</strong>=2015-02-28</span></p>
<pre>";

</pre>
<p><span style="color: #9bbb59;">// Invoke the Search REST API </span><span style="color: #9b00d3;">$response</span></p>
<pre> = \Httpful\Request::get(</pre>
<p><span style="color: #9b00d3;">$searchUri</span></p>
<pre>)
    -&gt;addHeaders(</pre>
<p><span style="color: #4bacc6;">array</span></p>
<pre>('</pre>
<p><span style="color: #c0504d;">api-key</span></p>
<pre>' =&gt; '</pre>
<p><span style="color: #c0504d; background-color: #ffff00;">&lt;your search key&gt;</span></p>
<pre>'))
    -&gt;expectsJson()
    -&gt;sendIt();</pre>
<p>Once you have invoked the Search service, the results will be provided as a JSON document. We can now retrieve the search results from the body, in the <strong>value</strong> field:</p>
<blockquote><span style="color: #4bacc6;">foreach</span>
<pre>(</pre>
<span style="color: #9b00d3;">$response</span>
<pre>-&gt;body-&gt;value </pre>
<span style="color: #4bacc6;">as</span><span style="color: #9b00d3;">$result</span>
<pre>)
{<br />   </pre>
<span style="color: #9b00d3;">$formattedPrice</span>
<pre> = </pre>
<span style="color: #4bacc6;">sprintf</span>
<pre>("%.2f", </pre>
<span style="color: #9b00d3;">$result</span>
<pre>-&gt;baseRate);<br />   </pre>
<span style="color: #4bacc6;">echo</span>
<pre> "</pre>
<span style="color: #9b00d3;">$result</span>
<pre>-&gt;hotelName </pre>
<span style="color: #9b00d3;">$result</span>
<pre>-&gt;rating </pre>
<span style="color: #9b00d3;">$$formattedPrice</span>
<pre>";
}    
</pre>
</blockquote>
<p>For our sample website, this now allows the user to specify a search term, which will be used to search the list of hotels, match the term in the hotelName, description, category and tags searchable fields.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1524.image_4F41B0AF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/1524.image_5F00_4F41B0AF.png"><img style="background-image: none; display: inline;" title="Basic search" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5165.image_thumb_6D22C561.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/5165.image_5F00_thumb_5F00_6D22C561.png" alt="Basic search" width="244" height="102" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Providing search suggestions using auto-completion</strong></p>
<p>In addition to searching the index, we can assist the user by providing search suggestions. This is achieved using the <strong><a href="https://msdn.microsoft.com/en-us/library/dn798936.aspx" target="_blank">Suggestions REST API</a></strong>. This API will leverage the fields in the index that were marked as <em>suggestions</em> (e.g. hotelName and description).</p>
<p>The basic structure for the Suggestions API is the following:</p>
<p><code>GET /indexes/[index name]/docs/<strong>suggest</strong>?[query parameters]</code></p>
<p>At a minimum you need to provide the <strong>search</strong> parameter, which is the text to use to suggest queries, and which must be at least 3 characters. As mentioned, don&rsquo;t forget to also specify the <strong>api-version</strong> parameter.</p>
<p>In below code sample, we&rsquo;re providing the user with the hotel name and description as search suggestion. Put below code snippet in a separate file (e.g. gethotelautocomplete.php); this file can then be bound to the <em>autocomplete</em> event of the search input field on the web page.</p>
<p><span style="color: #9b00d3;">$searchUri</span></p>
<pre> = "</pre>
<p><span style="color: #c0504d;">https://<span style="background-color: #ffff00;">&lt;your service&gt;</span>.search.windows.net/indexes/<br /> hotels/docs/suggest?<strong>search</strong>=<span style="color: #9b00d3;">$term<br /> </span><span style="color: #c0504d;">&amp;</span><strong>api-version</strong>=2015-02-28</span></p>
<pre>";

</pre>
<p><span style="color: #9bbb59;">// Invoke the Search REST API </span><span style="color: #9b00d3;">$response</span></p>
<pre> = \Httpful\Request::get(</pre>
<p><span style="color: #9b00d3;">$searchUri</span></p>
<pre>)
    -&gt;addHeaders(</pre>
<p><span style="color: #4bacc6;">array</span></p>
<pre>('</pre>
<p><span style="color: #c0504d;">api-key</span></p>
<pre>' =&gt; '</pre>
<p><span style="color: #c0504d; background-color: #ffff00;">&lt;your search key&gt;</span></p>
<pre>'))
    -&gt;expectsJson()
    -&gt;sendIt();</pre>
<p><span style="color: #9b00d3;">$json</span></p>
<pre>=</pre>
<p><span style="color: #4bacc6;">array</span></p>
<pre>();</pre>
<p><span style="color: #9b00d3;">$suggestions</span></p>
<pre> = </pre>
<p><span style="color: #9b00d3;">$response</span></p>
<pre>-&gt;body-&gt;value;
    
</pre>
<p><span style="color: #4bacc6;">foreach</span></p>
<pre>(</pre>
<p><span style="color: #9b00d3;">$suggestions</span><span style="color: #4bacc6;">as</span><span style="color: #9b00d3;">$suggestion</span></p>
<pre>)
{
    $json[]=</pre>
<p><span style="color: #4bacc6;">array</span></p>
<pre>(
        'value'=&gt; </pre>
<p><span style="color: #9b00d3;">$suggestion</span></p>
<pre>-&gt;hotelName,
        'label'=&gt; "</pre>
<p><span style="color: #9b00d3;">$suggestion</span></p>
<pre>-&gt;hotelName (</pre>
<p><span style="color: #9b00d3;">$suggestion</span></p>
<pre>-&gt;description)"
        );
}</pre>
<p><span style="color: #4bacc6;">echo</span></p>
<pre> json_encode(</pre>
<p><span style="color: #9b00d3;">$json</span></p>
<pre>);
</pre>
<p>To bind the above autocompletion logic to the search field, add following Javascript code to the search web page:</p>
<blockquote><span style="color: #9bbb59;">&lt;!-- Autocomplete script, the search field has 'term' as ID --&gt;</span>
<pre>&lt;</pre>
<span style="color: #c0504d;">script</span><span style="color: #ff0000;">type</span>
<pre>="</pre>
<span style="color: #4bacc6;">text/javascript</span>
<pre>"&gt;
        $(document).ready(</pre>
<span style="color: #4bacc6;">function</span>
<pre>(){
            $("</pre>
<span style="color: #c0504d;">#term</span>
<pre>").autocomplete({
                source:'</pre>
<span style="color: #c0504d;">/gethotelautocomplete.php</span>
<pre>',
                minLength:</pre>
<span style="color: #c0504d;">3</span>
<pre>            });
        });
&lt;/script&gt;
</pre>
</blockquote>
<p>With the above code you should now have autocompletion functionality added to the site. As soon as you type 3 letters or more, the search service Suggestions API is invoked and results are provided to the user:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/7840.image_013BE1EB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/7840.image_5F00_013BE1EB.png"><img style="background-image: none; display: inline;" title="Search suggestions" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3058.image_thumb_7C592E2E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/3058.image_5F00_thumb_5F00_7C592E2E.png" alt="Search suggestions" width="277" height="81" border="0" /></a></p>
<p>&nbsp;</p>
<p><strong>Adding faceted search to the website</strong></p>
<p>Now that we basic search functionality added to our website, we can take it one step further, namely by adding <strong>faceted search</strong>. With faceted search you can search for documents in your index using categories. For example, for each hotel in our index we have the base rate for a room per night.&nbsp; Using faceted search we can specify price ranges for this base rate and then search for all hotels that match a specific price range. When creating the search index you can specify which fields can be used as facets.</p>
<p>To implement faceted search we leverage the basic Search REST API. First you need to specify which facets you want to retrieve using the <strong>facet</strong> query parameter. In the search results you will then get the document count for each facet value.</p>
<p>In below example we indicate that we want to use facets for rating, category and baseRate. For the baseRate field we specify the price ranges: 0-100, 100-200, 200-500, 500-1000 and &gt;1000.</p>
<p><span style="font-family: Courier New;">GET /indexes/hotels/docs?search=&amp;<strong>facet=rating&amp;facet=category&amp;facet=baseRate,values:100|200|500|1000</strong>&amp;api-version=2015-02-28</span></p>
<p>To filter based on a given facet value, for example retrieve the hotels in a given price range, we use the <strong>$filter</strong> query parameter. In below example, we retrieve the hotels within the price range 100-200.</p>
<p><span style="font-family: Courier New;">GET /indexes/hotels/docs?search=&amp;facet=rating&amp;facet=category&amp;facet=baseRate,values:100|200|500|1000&amp;<strong>$filter=baseRate gt 100 and baseRate le 200</strong>&amp;api-version=2015-02-28</span></p>
<p>Below code sample shows how this is done in our PHP website:</p>
<p><span style="color: #9b00d3;">$term = <span style="color: #000000;">"</span><span style="color: #c0504d; background-color: #ffff00;">&lt;</span><span style="color: #c0504d; background-color: #ffff00;">search term&gt;</span><span style="color: #000000;">";</span><br />$searchUri</span></p>
<pre> = "</pre>
<p><span style="color: #c0504d;">https://<span style="background-color: #ffff00;">&lt;your service&gt;</span>.search.windows.net/indexes/<br /> hotels/docs?search=<span style="color: #9b00d3;">$term&amp;</span><span style="color: #c0504d;">\$orderby=baseRate<br /></span></span><span style="color: #c0504d;"> <strong>&amp;facet=rating<br /> &amp;facet=category<br /> &amp;facet=baseRate,values:100|200|500|1000<br /></strong></span><span style="color: #c0504d;"><span style="color: #c0504d;"> &amp;</span></span><span style="color: #c0504d;">api-version=2015-02-28</span></p>
<pre>";

</pre>
<p><span style="color: #9bbb59;">// Invoke the Search REST API </span><span style="color: #9b00d3;">$response</span></p>
<pre> = \Httpful\Request::get(</pre>
<p><span style="color: #9b00d3;">$searchUri</span></p>
<pre>)
    -&gt;addHeaders(</pre>
<p><span style="color: #4bacc6;">array</span></p>
<pre>('</pre>
<p><span style="color: #c0504d;">api-key</span></p>
<pre>' =&gt; '</pre>
<p><span style="color: #c0504d; background-color: #ffff00;">&lt;your search key&gt;</span></p>
<pre>'))
    -&gt;expectsJson()
    -&gt;sendIt();</pre>
<p>The facet information (which facet values and document count per value) is available in the resulting JSON in the <strong>@search.facets</strong> property of body.</p>
<blockquote><span style="color: #9b00d3;">$propname</span>
<pre> ="</pre>
<span style="color: #c0504d;">@search.facets</span>
<pre>";                        
</pre>
<span style="color: #9b00d3;">$facets </span>
<pre>= </pre>
<span style="color: #9b00d3;">$response</span>
<pre>-&gt;body-&gt;</pre>
<span style="color: #9b00d3;">$propname</span>
<pre>;</pre>
<span style="color: #9b00d3;">$ratings</span>
<pre>=</pre>
<span style="color: #9b00d3;">$facets</span>
<pre>-&gt;rating;
</pre>
</blockquote>
<blockquote><span style="color: #4bacc6;">foreach</span>
<pre>(</pre>
<span style="color: #9b00d3;">$ratings</span><span style="color: #4bacc6;">as</span><span style="color: #9b00d3;">$rating</span>
<pre>)
{
   </pre>
<span style="color: #9b00d3;">$ratingValue</span>
<pre> = </pre>
<span style="color: #9b00d3;">$rating</span>
<pre>-&gt;value;<br />   </pre>
<span style="color: #9b00d3;">$ratingCount</span>
<pre> = </pre>
<span style="color: #9b00d3;">$rating</span>
<pre>-&gt;count;
}</pre>
</blockquote>
<p>You can then display these facet values and counts in the website. As you drill further into facets, the document counts will be updated to reflect the selected filters. For example, as you select the hotels with a rating of 4, you&rsquo;ll notice that the number of categories is also adjusted.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8171.image_3CF58CB3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/8171.image_5F00_3CF58CB3.png"><img style="background-image: none; display: inline;" title="Faceted Search" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2248.image_thumb_19C82201.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/2248.image_5F00_thumb_5F00_19C82201.png" alt="Faceted Search" width="362" height="315" border="0" /></a></p>
<p>&nbsp;</p>
<h5>Conclusion</h5>
<p>In this article we&rsquo;ve gone through adding <strong>search as a service</strong> using Azure Search to your PHP website.&nbsp; In a matter of minutes you can get started and provide your users with a complex search functionality. And as your site gets more traffic, you can easily <strong>scale out </strong>your search service.</p>
<p>Make sure to get started with the Azure Search service and also try out the other application, data and infrastructure services in the Microsoft Azure platform. You can <a href="https://azure.microsoft.com/en-us/pricing/free-trial/" target="_blank">get started for free</a> on Azure or activate your <a href="https://azure.microsoft.com/en-us/pricing/member-offers/msdn-benefits/" target="_blank">MSDN Azure benefits</a>.</p>
<p>Additional resources can be found here:</p>
<ul>
<li><a href="https://azure.microsoft.com/en-us/documentation/services/search/" target="_blank">Azure Search documentation</a></li>
<li><a href="https://azure.microsoft.com/en-us/develop/php/" target="_blank">Azure PHP Developer center</a></li>
</ul>]]></content:encoded>
    </item>
    <item>
      <title>Game On! March 13: Learn to build a Unity game in 12 hours</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/game-on-march-13-learn-to-build-a-unity-game-in-12-hours</link>
      <pubDate>Mon, 03 Mar 2014 14:58:46 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2014/03/03/game-on-march-13-learn-to-build-a-unity-game-in-12-hours/</guid>
      <description><![CDATA[Traditionally writing 3D or 2D games was not for the faint of heart. It took in-depth knowledge in...]]></description>
      <content:encoded><![CDATA[<p>Traditionally writing 3D or 2D games was not for the faint of heart. It took in-depth knowledge in math, physics, computer graphics, etc. to even build the simplest of games that had some level of realism to them. Long story short: game development <em>was</em> hard.</p>  <p>What if you could develop a game, that you can <strong>deploy across multiple platforms in less than 12 hours</strong>? With the Unity game engine from Unity technologies, you have a cross-platform game engine with a built-in integrated development environment (IDE) that enables simplified and rapid development of games. Such things as physics, cameras, lighting, 3D, etc. are all handled by the game engine, allowing you to focus on your game play.</p>  <p>A lot of popular games have been developed with Unity, many of which are available on Windows 8 and Windows Phone. Just last week, we ran our first Unity porting lab in MIC Genk where we helped game developers port their existing Unity games to the Windows platform.&#160; In a matter of hours we had several of these games, originally targeted at iOS or Android, running on a Windows device!</p>  <p>If you’re new to game development or Unity, we invite you to <strong>join our ”Unity for Newbies” workshop on March 13</strong>, where we’ll teach you hands-on how to create a game in Unity and how to publish it to the Windows (Phone) Store.&#160; So, by the end of the day you could have your game ready to be published!</p>  <p><a href="https://msevents.microsoft.com/cui/EventDetail.aspx?culture=nl-BE&amp;EventID=1032574762&amp;IO=pHgiJ13cc5HUAzaE0EEKgA%3d%3d"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5282.image_38CF9D93.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/5282.image_5F00_38CF9D93.png" width="137" height="137" /></a></p>  <p>Do check our other developer trainings online on <a href="https://aka.ms/devbesmart">https://aka.ms/devbesmart</a> or join the <a href="https://www.microsoftvirtualacademy.com/">Microsoft Virtual Academy</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Running Powershell Web Jobs on Azure websites</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/running-powershell-web-jobs-on-azure-websites</link>
      <pubDate>Wed, 22 Jan 2014 13:49:48 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2014/01/22/running-powershell-web-jobs-on-azure-websites/</guid>
      <description><![CDATA[Update: Web Jobs now natively support PowerShell scripts.&#160; You can upload a zip file containing...]]></description>
      <content:encoded><![CDATA[<p><strong>Update: Web Jobs now natively support PowerShell scripts.&#160; You can upload a zip file containing a .ps1 file and it will be executed without further configurations.</strong></p>  <p>Just last week we <a href="https://weblogs.asp.net/scottgu/archive/2014/01/16/windows-azure-staging-publishing-support-for-web-sites-monitoring-improvements-hyper-v-recovery-manager-ga-and-pci-compliance.aspx">announced</a> a series of new features for the Windows Azure platform.&#160; One of those features is Web Jobs support for Windows Azure Web Sites.&#160; Web Jobs enable you to run custom jobs on your web site, either on-demand, scheduled or continuously.&#160; However, some people have already wondered why there is <a href="https://www.windowsazure.com/en-us/documentation/articles/web-sites-create-web-jobs/">no support for Powershell scripts</a> (.ps1).&#160; In this post I’m going to show how you can use <strong>Powershell scripts to run as a Web Job on Windows Azure Web Sites</strong>.</p>  <h4>Setting up an Azure Web Site</h4>  <p>The first step is to quick create an empty Azure Web Site – for the purpose of this post, we don’t need actual web content. So, just create an Azure Web Site through the <a href="https://manage.windowsazure.com">Azure Management Portal</a>.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2158.image_127D8707.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/2158.image_5F00_127D8707.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3162.image_thumb_56544C0F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/3162.image_5F00_thumb_5F00_56544C0F.png" width="556" height="342" /></a></p>  <p>Once the site is created (amazing it takes less than 10 seconds!), you should now see the ‘Web Jobs' (preview) section.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8802.image_45DBDB14.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/8802.image_5F00_45DBDB14.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0815.image_thumb_62E489DC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/0815.image_5F00_thumb_5F00_62E489DC.png" width="564" height="177" /></a></p>  <p>In this post, we’re going to be using a very basic PowerShell script to be executed on the Web Site – the script will just retrieve the list of actively running processes on the server by invoking the <strong>Get-Process</strong> cmdlet.</p>   <h4>Verifying it doesn’t work</h4>  <p>Of course we want to push our luck and upload a .ps1 file to create a Web Job. When you do this, the operation will fail and you’ll be presented with the following error message in the portal:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1030.image_00596B9A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/1030.image_5F00_00596B9A.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/3426.image_thumb_08DCCAE4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/3426.image_5F00_thumb_5F00_08DCCAE4.png" width="573" height="92" /></a></p>  <h4>Running a PowerShell Web Job</h4>  <p>We now have validated that we cannot use a PowerShell script to create a Web Job, but how can we achieve this?&#160; As you may know, Powershell can be <a href="https://technet.microsoft.com/en-us/library/hh847736.aspx">invoked from the commandline</a>, by means of <strong>PowerShell.exe</strong>.&#160; This is exactly what we’re going to do to use PowerShell as a Web Job. </p>  <p>First step is to create a Windows command file (.cmd or .bat) which will invoke PowerShell.exe and providing it our PowerShell commands. This is the contents of our ListProcessesPS.cmd file:</p>  <p><strong><font face="Courier New">PowerShell.exe -Command &quot;&amp; {Get-Process}&quot;</font></strong></p> <strong><font face="Courier New"></font></strong>  <p>After zipping up this file we can now create a Web Job through the Azure Management portal: </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2870.image_6687C61B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/2870.image_5F00_6687C61B.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/4786.image_thumb_4F5C4B9D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/4786.image_5F00_thumb_5F00_4F5C4B9D.png" width="306" height="303" /></a></p>  <p>The Job is created successfully and we are ready to launch it. Once the Last Run Result shows ‘Success’ we can view the outcome of the Job by navigating to the logs.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/6457.image_7147AE21.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/6457.image_5F00_7147AE21.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1373.image_thumb_79CB0D6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/1373.image_5F00_thumb_5F00_79CB0D6B.png" width="520" height="94" /></a></p>  <p>Below screenshot shows the outcome of running the PowerShell command on our Azure Web Site! </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/4380.image_3E7A385E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/4380.image_5F00_3E7A385E.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0458.image_thumb_5B16B431.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/0458.image_5F00_thumb_5F00_5B16B431.png" width="522" height="313" /></a></p>  <h4>Using a separate PowerShell script – Take 1</h4>  <p>Of course, this solution is not optimal if you have multi-line, complex PowerShell scripts.&#160; Ideally we want to be able to create a PowerShell script file that is separate from the command script. Looking at the <a href="https://technet.microsoft.com/en-us/library/hh847736.aspx">PowerShell.exe command-line reference</a>, there is a parameter that allows us to invoke a PowerShell script, namely the <strong>–File</strong> parameter. So we adapt the command script accordingly:</p>  <p><strong><font face="Courier New">PowerShell.exe -File Get-Processes.ps1&#160;&#160; </font></strong></p>  <p>We then create a <strong>zip file containing both the ps1 and cmd files </strong>and upload it to create a new Web Job. However, when you run the Web Job, we don’t get the outcome we expected. We receive an error file, which indicates that the PowerShell script we’re trying to execute is not digitally signed and therefore cannot be executed. </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5287.image_6642CF2C.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/5287.image_5F00_6642CF2C.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/6201.image_thumb_3C625AF7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/6201.image_5F00_thumb_5F00_3C625AF7.png" width="531" height="232" /></a></p>  <h4>Using a separate PowerShell script – Take 2</h4>  <p>Reverting back to the PowerShell.exe command-line reference, another command-line parameter comes to the rescue to get around this digital signature issue: –<strong>ExecutionPolicy</strong>. We update the Windows command file as follows:</p>  <p><strong><font face="Courier New">PowerShell.exe -ExecutionPolicy RemoteSigned -File Get-Processes.ps1</font></strong></p> <strong><font face="Courier New"></font></strong>  <p>What’s happening here is that we tell PowerShell to run all local scripts and only require a digital signature for scripts that are being downloaded from the Internet. </p>  <p>We update the zip file with the updated Windows command file and the PowerShell script and create a new Web Job.&#160; When running the Job, we finally get the expected results!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8231.image_72D30CF9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/8231.image_5F00_72D30CF9.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/5047.image_thumb_4B2F2180.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/5047.image_5F00_thumb_5F00_4B2F2180.png" width="532" height="250" /></a></p>  <h4>Conclusion</h4>  <p>As you’ve seen, there is actually a way to run PowerShell scripts as Web Jobs on Windows Azure Web Sites. You currently need to invoke it through an intermediate Windows command file instead of natively supporting .ps1 files, but in the end we got a workable solution.</p>  <p>Did you know that you can try Windows Azure for <a href="https://www.windowsazure.com/en-us/pricing/free-trial/">free</a>?</p>]]></content:encoded>
    </item>
    <item>
      <title>Are you ready to Build?</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/are-you-ready-to-build</link>
      <pubDate>Mon, 23 Dec 2013 14:43:32 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2013/12/23/are-you-ready-to-build/</guid>
      <description><![CDATA[The one constant in this technology world is change.&#160; Technology changes at an amazing pace and...]]></description>
      <content:encoded><![CDATA[<p>The one constant in this technology world is <strong>change</strong>.&#160; Technology changes at an amazing pace and it’s not trivial to <strong>keep up</strong> with this as a developer. </p>  <p>Only six months ago we were in San Francisco for Build 2013. Since that time we have released Windows 8.1 to the public, we launched Surface 2 and the Xbox One, Visual Studio 2013 and Visual Studio Online further improved the developer process, and with the Windows Azure, we’re seeing an ongoing rythm of new features and improvements being added to the platform. At the same time, developers have built and are building many great apps that make these platforms shine through innovative, compelling and immersive user experiences. </p>  <p>More than ever, it’s an <strong>amazing time to be a developer</strong>; on the other hand, keeping up with these technology advances is not an easy task. Which is why <strong>we’re coming back to San Francisco on April 2-4 for our Build 2014</strong> developer conference.</p>  <p><a href="https://www.buildwindows.com/"><img style="margin: 0px auto 9px; float: none; display: block;" border="0" alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/80/54/4857.b14_announce.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-80-54/4857.b14_5F00_announce.png" width="394" height="248" /></a>Build 2014 will again be THE place to be to <strong>learn what’s next</strong> for Windows, Windows Phone, Windows Azure, Visual Studio and much more. Check also Steve Guggenheimer’s <a href="https://blogs.technet.com/b/microsoft_blog/archive/2013/12/13/mark-your-calendars-announcing-build-2014.aspx">announcement</a>.</p>  <p>So, mark your calendar for <strong>registration, which opens on January 14 at 9am Pacific Time </strong>on <a href="https://www.buildwindows.com">www.buildwindows.com</a>. Be sure to follow us on Twitter through the <a href="https://twitter.com/search?q=%23bldwin&amp;src=hash">#bldwin</a> hashtag.</p>  <p>Hope to see you all in San Francisco at Build 2014 and in the meantime, keep building those great apps for Windows!</p>]]></content:encoded>
    </item>
    <item>
      <title>Superhackathon is back on November 15: Bigger, Better, Bolder</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/superhackathon-is-back-on-november-15-bigger-better-bolder</link>
      <pubDate>Thu, 24 Oct 2013 01:08:11 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2013/10/24/superhackathon-is-back-on-november-15-bigger-better-bolder/</guid>
      <description><![CDATA[With the general availability of Windows 8.1, the official launch of Surface 2, the announcement...]]></description>
      <content:encoded><![CDATA[<p><a href="https://www.microsoft.com/nl-be/msdn/superhackathon/"><img title="superhackathon_728x90" style="display: inline; background-image: none;" border="0" alt="superhackathon_728x90" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/2870.superhackathon_728x90_1FDD26B8.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/2870.superhackathon_5F00_728x90_5F00_1FDD26B8.jpg" width="455" height="68" /></a></p>  <p>With the general availability of <a href="https://blogs.windows.com/windows/b/bloggingwindows/archive/2013/10/17/windows-8-1-now-available.aspx">Windows 8.1</a>, the official launch of <a href="https://blog.surface.com/b/surface/archive/2013/10/21/surface-2-and-surface-pro-2-are-now-available.aspx">Surface 2</a>, the announcement of <a href="https://blogs.windows.com/windows_phone/b/windowsphone/archive/2013/10/14/announcing-our-third-windows-phone-8-update-plus-a-new-developer-preview-program.aspx">Windows Phone 8 Update 3</a>, the timing is perfect for you to show off your app development skills!&#160; Continuing a great tradition, on <strong>November 15th</strong> we are organizing our <strong>second Superhackathon</strong>.</p>  <p>At the Superhackathon you can come to develop apps; you can come by yourself or bring your developer and designer friends to form a killer app team. And if you’re stuck or have technical questons we’ll have <strong>technical experts onsite </strong>to help you out.</p>  <p>To honor all your hard work, there will be <strong>many great prizes </strong>for you to win: Surface Pro 2, Nokia Lumia 1020 and 925, and many other gifts. At the end of the day you can take the stage and <strong>show off your app</strong>. Of course, no need to bring your sandwiches – we’ll have <strong>breakfast, pizza, coffee and drinks </strong>to keep your energy levels up!</p>  <p>So where is the action? A ‘super’ hackathon worthy, we’re organizing this event across the entire country.&#160; You can join us from 8:08 in the morning until midnight at <strong>four different locations</strong>: Brussels, Genk, Mons and Kortrijk.</p>  <p>Find out all the <a href="https://www.microsoft.com/nl-be/msdn/superhackathon/">details and registration info here</a>, and join us for a full day of coding, fun and great prizes!</p>]]></content:encoded>
    </item>
    <item>
      <title>Apps made in Belgium: new in the Store #7</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/apps-made-in-belgium-new-in-the-store-7</link>
      <pubDate>Wed, 16 Oct 2013 00:34:31 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2013/10/16/apps-made-in-belgium-new-in-the-store-7/</guid>
      <description><![CDATA[It’s time for our 7th blog post in our series of new Belgian Apps and it’s been a pretty big...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0572.clip_image002_thumb2_6DE2A988.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/0572.clip_5F00_image002_5F00_thumb2_5F00_6DE2A988.png"><img title="clip_image002_thumb2" style="margin: 0px; border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="clip_image002_thumb2" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/0358.clip_image002_thumb2_thumb_4CF1C792.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/0358.clip_5F00_image002_5F00_thumb2_5F00_thumb_5F00_4CF1C792.png" width="449" height="238" /></a></p>  <p>It’s time for our 7th blog post in our series of new Belgian Apps and it’s been a pretty big harvest again! If you missed the previous posts, you can find them <a href="https://blogs.msdn.com/belux">here</a>.</p>  <p>Personalize your device right now by <strong>installing these apps</strong>. And don’t forget to <strong>provide your feedback</strong> to the developers by <strong>rating them in the Store</strong> – this is an extremely valuable input to making these apps even better!</p>  <table cellspacing="0" cellpadding="2" width="469" border="0"><tbody>     <tr>       <td valign="top" width="233">         <h2>Windows Phone 8</h2>       </td>        <td valign="top" width="234">         <h2>&#160;</h2>       </td>     </tr>      <tr>       <td valign="top" width="233">         <p><a href="https://www.windowsphone.com/nl-be/store/app/radio-be/e76f1263-73fe-40a5-855a-a3476492af2b"><img alt="Radio.be" src="https://cdn.marketplaceimages.windowsphone.com/v8/images/c4b999a4-e0d2-4949-8ce9-591fd4273042?imageType=ws_icon_tiny" width="50" height="50" /></a> Radio.be</p>       </td>     </tr>   </tbody></table>  <table cellspacing="0" cellpadding="2" width="469" border="0"><tbody>     <tr>       <td valign="top" width="233">         <h2>Windows 8</h2>       </td>        <td valign="top" width="234">         <h2></h2>       </td>     </tr>      <tr>       <td valign="top" width="233">         <p><a href="https://apps.microsoft.com/windows/app/3add862c-acae-4eb5-8cc0-5f3fb1e2ca3c"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/195e351b-4510-4e90-84f3-8a030713912c/Icon.234726.png" /></a> La Première</p>          <p><a href="https://apps.microsoft.com/windows/app/0c1cb6b2-0b24-4459-90a9-b27ba2d28771"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/552f9edd-bf68-4308-9992-b33f1d338d69/Icon.236007.png" /></a> Austin Power Soundboard </p>          <p><a href="https://apps.microsoft.com/windows/app/09c23e12-5f02-4db2-8c2c-885041c0f059"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/4b792f19-1696-41b1-9b7e-4f450b3cf6c2/Icon.235585.png" /></a> FollowTrack</p>          <p><a href="https://apps.microsoft.com/windows/app/0bf184bb-3643-4250-a28f-30f5450d9d12"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/448017b5-94df-4d34-bc57-82393b45c3f0/Icon.225829.png" /></a> Share My IP</p>          <p><a href="https://apps.microsoft.com/windows/app/17322c03-a948-49bb-bb45-30486cd65895"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/111e3e56-82f1-49fb-b285-b00f50d51341/Icon.234540.png" /></a> ZIP Code Lookup</p>          <p><a href="https://apps.microsoft.com/windows/app/6b270533-e36d-4872-a76a-e7c9608533dc"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/c3b7f16c-d3ae-49ec-9629-fef65cffdb67/Icon.232684.png" /></a> WoonWerkVerkeer</p>          <p><a href="https://apps.microsoft.com/windows/app/3db780da-af6b-4880-bcde-951ddb58174b"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/553eb65f-02ec-40b3-9332-53c2c15af122/Icon.236761.png" /></a> Tiles Matching</p>          <p><a href="https://apps.microsoft.com/windows/app/5bc02649-e74e-47ad-9306-ef1ba4bf9e88"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/737f570c-96b4-4e5c-9639-894f3a667c73/Icon.236563.png" /></a> PassKeyper </p>          <p><a href="https://apps.microsoft.com/windows/app/59d9b563-97a4-4f78-8745-9c4f93471fce"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/fddbcf37-fb64-41d9-9f5f-ffd404df48a4/Icon.237660.png" /></a> SpellingsAdvies</p>          <p><a href="https://apps.microsoft.com/windows/app/fee1e949-c3eb-413d-aa7c-eb378772cf67"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/c1d5857e-334d-4098-8dbd-2e067e5b2c03/Icon.238883.png" /></a> Training Spotter </p>          <p><a href="https://apps.microsoft.com/windows/app/bb6c63ea-7df0-41d7-9e01-d18f08668f90"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/0433e081-9414-45b0-bdcd-22b11595beb6/Icon.241410.png" /></a> Neowin for Windows </p>          <p><a href="https://apps.microsoft.com/windows/app/edcf681f-5540-452d-bc64-58d2cf36c73e"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/54369d7d-bde4-43ed-8cad-a1ec2e299f66/Icon.241480.png" /></a> Garfield h8s mondays</p>          <p><a href="https://apps.microsoft.com/windows/app/44a0b791-9c3d-4a0f-a628-0912cc91f9b2"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/0964a4a2-4570-4ede-a910-74db1b29f848/Icon.241765.png" /></a> Escape the bubbles!</p>          <p><a href="https://apps.microsoft.com/windows/app/b5c437e1-d269-41a3-99a7-afa8256bcce5"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/b2ce7671-5023-4a46-9025-633f1377cde4/Icon.240952.png" /></a> De Redactie</p>       </td>        <td valign="top" width="234">         <p><a href="https://apps.microsoft.com/windows/app/30e5a9b8-7db5-4fab-bcd3-535ccf02e516"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/4ba57ca4-9f25-4766-83ac-cef592e4affa/Icon.241758.png" /></a> Hungover Owls</p>          <p><a href="https://apps.microsoft.com/windows/app/85feb3ef-b579-4054-b41b-948d5de9ae8f"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/bf2950c6-06b1-44b6-b814-4b67f8e54f13/Icon.243070.png" /></a> KimJongUnLookingAtThings</p>          <p><a href="https://apps.microsoft.com/windows/app/1e309116-e00b-4f3a-9e03-413c8af0490e"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/1263.image_1A2451CF.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/1263.image_5F00_1A2451CF.png" width="54" height="54" /></a> Nutrillion             <br /></p>          <p><a href="https://apps.microsoft.com/windows/app/9eff9ad2-1e7d-4aa7-b0d2-f8284ac9b868"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/e8dcd5fb-35da-4448-93da-6a2351dd475b/Icon.241800.png" /></a> Moustair&#160;&#160;&#160;&#160;&#160;&#160; </p>          <p><a href="https://apps.microsoft.com/windows/app/25794094-532e-4973-8a56-1c4ccd985d1b"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/d4d812ab-85f9-44f4-8772-5ea80ace55f6/Icon.243050.png" /></a> The Captains’ Mistress </p>          <p><a href="https://apps.microsoft.com/windows/app/b09c1f06-75a9-4156-8e9f-d0eaf41b7b4b"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/939179b4-6006-4efc-ae19-e7293a800c69/Icon.243401.png" /></a> Photos with an iPad&#160;&#160; </p>          <p><a href="https://apps.microsoft.com/windows/app/d8d00ebe-62cb-4077-815f-739f614ae17b"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/c3077b5f-d1c1-4c59-8e4b-66d637157d42/Icon.243893.png" /></a> Bioritme</p>          <p><a href="https://apps.microsoft.com/windows/app/3a1a21ad-fab9-4a38-9109-993a5c578b38"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/7635.image_6E7387D2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/7635.image_5F00_6E7387D2.png" width="54" height="54" /></a> Recipe Diary Free</p>          <p><a href="https://apps.microsoft.com/windows/app/01beabe3-048b-4ddf-b3f2-ab16a7efabff"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/bd3de438-ae2f-4fe5-9c1f-ccdabf66d302/Icon.241747.png" /></a> Brain Age Training</p>          <p><a href="https://apps.microsoft.com/windows/app/8baba86e-119b-4522-b90b-34657bfd408b"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/5b187977-5d3b-4c54-b18f-3ee8c2b80323/Icon.241741.png" /></a> What Siri Says&#160; </p>          <p><a href="https://apps.microsoft.com/windows/app/83a8f6a3-9701-41a6-a70e-da6f315f853e"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/b70a5023-09f8-463f-babc-11e2b91187f3/Icon.242837.png" /></a> Beer Color Camera </p>          <p><a href="https://apps.microsoft.com/windows/app/91434706-d3dc-4ad3-86de-a7f6ca516131"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/3af7f5a9-d9d0-4e5b-a32f-05308c4d8208/Icon.223550.png" /></a> TechApp </p>          <p><a href="https://apps.microsoft.com/windows/app/0ed9a756-718b-4c02-a79f-7476224959d5"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/23f1d7bb-09b4-4507-9e75-3dd1c17be051/Icon.242598.png" /></a> KimJongIlLookingAtThings </p>          <p><a href="https://apps.microsoft.com/windows/app/8e013c68-ebc3-4da7-94df-7a3d0a51f167"><img alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/faf346e2-9420-4981-990e-ad989ac4530f/Icon.241724.png" /></a> Oobama is checking your email</p>       </td>     </tr>   </tbody></table>  <p>Get inspired by these recently published Belgian apps and <b>build your own app</b>.<a href="https://msdn.microsoft.com/us-en/windows/apps/">Start here today</a></p>  <p>Or meet us at one of our many <a href="https://msdn.microsoft.com/nl-be/aa570302.aspx">developer camps</a>!</p>]]></content:encoded>
    </item>
    <item>
      <title>Stars of the Store</title>
      <link>https://docs.microsoft.com/archive/blogs/nicktrog/stars-of-the-store</link>
      <pubDate>Sat, 28 Sep 2013 04:22:23 GMT</pubDate>
      <dc:creator><![CDATA[Nick J Trogh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/nicktrog/2013/09/28/stars-of-the-store/</guid>
      <description><![CDATA[Over the last few weeks we have posted about new Belgian apps published to the Windows Store.&#160;...]]></description>
      <content:encoded><![CDATA[<p>Over the last few weeks we have <a href="https://blogs.msdn.com/b/nicktrog/archive/2013/09/17/apps-made-in-belgium-new-in-the-store-6.aspx">posted</a> about new Belgian apps published to the Windows Store.&#160; In this post we want to highlight a few ‘<strong>Stars of the Store</strong>’, great apps that have been in the Store for a while and have been updated recently.</p>  <p><a href="https://apps.microsoft.com/windows/app/531d5dc8-e4f9-4575-9e82-f30ab49148f6"><img title="image" style="margin: 0px 5px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/42/80/metablogapi/8176.image_0CFEDE8E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-42-80-metablogapi/8176.image_5F00_0CFEDE8E.png" width="50" align="left" height="51" /></a><strong>Yelo TV by Telenet </strong>– great for live watching your favorite TV shows, movies, etcetera or for managing and watching your recordings.</p>  <br />  <p><a href="https://apps.microsoft.com/windows/app/e0b7709a-a22b-4651-9bca-dd8f024efc64"><img style="margin: 0px 5px 0px 0px; border: 0px currentcolor; float: left; display: inline; background-image: none;" border="0" alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/a8f3885b-09b1-4238-a6d6-9707cae33cba/Icon.164867.png" align="left" /></a><strong>Aan Tafel by Truvo Belgium</strong> – you want to go out for a delicious lunch or candle light dinner but don’t know where to go? With this app you get to choose from 15000 Belgian restaurants, guided by reviews from chefs, critics or other customers.</p>  <p><a href="https://apps.microsoft.com/windows/app/53bd99b9-0011-4241-89b9-44be1df01f00"><img style="margin: 0px 5px 0px 0px; float: left; display: inline;" alt="Logo" src="https://wscont1.apps.microsoft.com/winstore/1x/1e3834bc-1dc1-4ae6-b7b3-85660c12a7a2/Icon.142548.png" align="left" /></a><strong>De Lijn by Cronos </strong>– so you’ve picked your restaurant and are looking for the nearest bus? With the De Lijn app you can plan your route, manage a list of favorites and also get a view on realtime timetable for your bus. Nice integration with geolocation and Bing Maps.</p>  <p>To make all these apps even better and help define upcoming features, <strong>rate the apps and provide your comments</strong>!</p>]]></content:encoded>
    </item>
  </channel>
</rss>