Friday, November 28, 2014

Angular.js performance tip: Disabling Debug Data

While reading through the Angular.js documentation I stumbled over the following great performance tip:
By default AngularJS attaches information about scopes to DOM nodes, and adds CSS classes to data-bound elements. The information that is not included is:
As a result of ngBind, ngBindHtml or {{...}} interpolations, binding data and CSS class ng-class is attached to the corresponding element.
Where the compiler has created a new scope, the scope and either ng-scope or ng-isolated-scope CSS class are attached to the corresponding element. These scope references can then be accessed via element.scope() and element.isolateScope().
Tools like Protractor and Batarang need this information to run, but you can disable this in production for a significant performance boost with:
myApp.config(['$compileProvider', function ($compileProvider) {
$compileProvider.debugInfoEnabled(false);
}]);
If you wish to debug an application with this information then you should open up a debug console in the browser then call this method directly in this console:
angular.reloadWithDebugInfo();
The page should reload and the debug information should now be available.

For more see the docs pages on $compileProvider and angular.reloadWithDebugInfo.
Nice! Glimlach

Thursday, November 27, 2014

Team Foundation Best Practices Analyzer - "%TFSServerURLValidated% error

When running the Team Foundation Best Practices Analyzer, it failed immediately with the following message:

Cannot validate the URL provided The scan was generated using the corrected URL "%TFSServerURLValidated%".

BPA

I never seen this issue before. On the Internet I found some related blog posts here and here. But in my case the solution was a lot simpler: I ran the tool again with the ‘Run as Administrator’ option. This time everything was working as expected.

Wednesday, November 26, 2014

Upgrading to Caliburn.Micro 2.0

As Microsoft announced some new WPF features, I found a good excuse to do a WPF blog post Glimlach.

Recently I had to do some changes to an WPF application I built some time ago. While implementing the change, I noticed that a new version of Caliburn.Micro was available. I always loved Caliburn.Micro, it is still one of the best MVVM frameworks out there.

Now doing this upgrade wasn’t that hard but wasn’t a walk in the park either. Here are some of the problems I encountered:

  • Bootstrapper<T> no longer exists. Instead you have to inherit from BootstrapperBase.
  • Inside the Bootstrapper override the OnStartup method and call the DisplayRootViewFor<> method:

protected override void OnStartup(object sender, StartupEventArgs e)

          DisplayRootViewFor<IShell>(); 
}

  • EventAggregator.Publish now takes an action to marshal the event. You can still use the EventAggregator.PublishOnUIThread if you want the original behaviour.
  • Message.Attach should be renamed from clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro to clr-namespace:Caliburn.Micro;assembly=Caliburn.Micro.Platfor

Some other breaking changes can be found here: http://caliburnmicro.com/documentation/migrating-to-2.0.0

Tuesday, November 25, 2014

Integrating Google Analytics in your Single Page Application

If you want to learn the ins and outs of the Google Analytics API and understand how to integrate it inside a Single Page Application, try the ‘Poses by Khalil’ tutorial(for anyone wondering, Khalil is a cat).

‘Poses by Khalil’ is is a tutorial single page application (SPA) to show you how to track common interactions using the latest incarnation of Google Analytics, Universal Analytics.

image

Monday, November 24, 2014

Linq in your browser: underscore.js

While working on an Angular application, I ended in a situation where I had to add another tool in my toolbox: underscore.js. It not only offers over 100 functions that support functional helpers like map, filter, invoke — but also has a fluent API that allows to create LINQ style queries.

An example:

Friday, November 21, 2014

Angular.js ui-router: Focus on view

In an Angular.js application we are building, we use the great ui-router module as a replacement for the default ngRoute module.

From the documentation:

AngularUI Router is a routing framework for AngularJS, which allows you to organize the parts of your interface into a state machine. Unlike the $route service in the Angular ngRoute module, which is organized around URL routes, UI-Router is organized around states, which may optionally have routes, as well as other behavior, attached.

States are bound to named, nested and parallel views, allowing you to powerfully manage your application's interface.

It offers a lot more flexibility than ngRoute and is our default choice when building Angular.js applications.

This doesn’t mean that everything is perfect. Last week we got a bug from a user mentioning that the page scrolled down when loading the Angular.js application. We discovered that this is caused by the ui-route module which has autoscroll enabled by default.

Luckily it’s easy to change this, just add the following attribute to your ui-view location:

<div ui-view autoscroll="false"></div> 

More information about this attribute can be found here: https://github.com/angular-ui/ui-router/wiki/Quick-Reference#autoscroll

That’s it!

Thursday, November 20, 2014

Free ebook – Perspectives on Agile Software Testing

In celebration of the 10th anniversary of Selenium, the guys from Thoughtworks created a small ebook available for free:

It's been 10 years since Selenium was born and the industry has changed tremendously since then. In honor of Selenium's first decade, we put together some our greatest hits and new pieces on software testing.

How has testing evolved in the past decade? How do we adapt to the new challenges that mobile testing has to offer? Can testing in an agile environment lead to faster feedback?

Download this free e-book and read more about the big developments in testing methods and tools, while looking closely at the advent of mobile testing and what the future holds for QAs. 

The book can be downloaded here: http://info.thoughtworks.com/ebook-agile-software-testing.

Remark: Be aware that you have to register first.

image

Wednesday, November 19, 2014

Microsoft is going Open Source… for real!

The last years Microsoft is making more and more stuff Open Source. So last week at the Connect() event, it was no surprise when they announced that they have open sourced the .NET Core Runtime and Libraries.

If you still think that Microsoft isn’t serious about this whole Open Source move, have a look at their GitHub landing page and see the whole list of technologies and tools that they are creating in the open:

image

Tuesday, November 18, 2014

Windows Azure Readiness: Azure Website Migration Assistent

You have an existing web application running on premise and you are interested in moving to Windows Azure? Then go check out https://www.movemetothecloud.net/. In 3 steps this website will guide you through the process to get your website to the cloud.

Step 1. Install MS Open Tech Migration Assistant Tool

This small ClickOnce application should be installed on your local machine. It scans your local or remote IIS server for a bunch of information. Click on Install Tool to get going…

image

Step 2. Run the Readiness Assessment.

Once the installation has completed, the tool will start up and give you the option to either scan a local or remote IIS server.

image

Click Continue to start the scanning process.

image

It will scan through all your websites and give you a list with possible migration candidates. Check the ones you want to be evaluated and click Next.

image

A Readiness Report is generated. You can now upload this report by clicking Upload.

Step 3. Migrate your website.

If the report didn’t detect any issues, you can start the migration process by clicking Migrate. This will trigger Web Deploy that will do the hard work for you.

image

Monday, November 17, 2014

Connect() on demand(in case you missed it)

In case you missed all the announcements at Connect(), it’s time to lock yourself up in your room and start watching all the videos.

Connect

Friday, November 14, 2014

DevIntersection 2014 – Interviewing developers

At the moment I’m in Las Vegas attending DevIntersection. Next to all the technical sessions, there was a whole track dedicated to leadership.

InterviewInProgress

One of the sessions in the Leadership track was ‘Interviewing Developers’ by Billy Hollis. Here are some of the notes I made during the session:

  • Keep a professional attitude.
    • You are here to find the perfect match for your team not to get new friends.
    • Don’t try to become friends with the candidate. If you hire him (or her) you get time enough to get acquainted.
  • It’s a good idea to ask the candidate to send some code up front. This should not be a whole project but just some files the developer can share.
    • Unfortunately some developers work on proprietary projects and cannot provide any code.
  • Do a review of the application letter.
    • Chances are high that the candidate did write this letter himself, which could not be the case for his CV.
    • Don’t be merciful on spelling mistakes!
  • Do a full analysis of the CV.
    • Especially look at the project length and the time they stayed at the same customer(longer is better)
  • Listen to your first impression.
    • But don’t listen too much. :-)
  • Keep a neutral tone and posture during the interview.
    • People try to read your body language and change their answer accordingly.
  • Be aware for defensiveness
    • Development is a trial-and-error process. Making mistakes is part of our job. Look how the candidate handles mistakes and can learn from them.
  • Don’t make too much notes during the interview.
    • It distracts the candidate.
  • Ask open ended questions.
  • Avoid telephone interviews.
    • If it is not possible to see the candidate in person, use Skype(or a similar tool).
  • An interview should not take too long(not more than one hour).
    • After one hour, nature kicks in and the candidate will probably need to use the bathroom :-)

Billy also gave a whole list of sample questions which he asked not to share. So I will not add them here. If you want to know these questions, apply for a job at my company ;-)

Remark: Billy mentioned that he will probably create a Pluralsight course based on this talk, so watch out for it…

Thursday, November 13, 2014

DevIntersection 2014 – Visual Studio Announcements

At the moment I’m in Las Vegas attending DevIntersection. During the keynote by Steven Guggenheimer this morning, they shared some news about .NET and Visual Studio that was later repeated during the Connect conference.

Here are some of the highlights:

Enough announcements to keep us busy for a while…

More information can be found at:

Wednesday, November 12, 2014

DevIntersection 2014 – Cross platform mobile development and MacInCloud

At the moment I’m in Las Vegas attending DevIntersection. During the mobile development workshop I attended, the presenter mentioned MacInCloud, an online service to remote access a Mac in the Cloud.

I’m a cross platform mobile developer, why should I care?

If you are doing cross-platform development(with for example Xamarin), you’ll need a Mac sooner or later. Apple Licensing Terms doesn’t allow you to design and build your application on non-Apple hardware. So don’t think that creating a Virtual Machine and installing OS X on it, is a feasible solution.

Now you would think that the only option left is to buy a Mac, but Macs are expensive. Thanks to MacInCloud, you can use a Mac and only pay for the time you are using it.

image

Tuesday, November 11, 2014

DevIntersection 2014 - MobiZen

At the moment I’m in Las Vegas attending DevIntersection. During the mobile development workshop I attended, the presenter was using a great tool called MobiZen.

MobiZen allows you to share the screen of your Android device on your desktop or inside a web browser. You can even control your Android from your pc or laptop. This is the perfect tool not only during development but also when you want to demo some functionality to your client. And best of all, it’s free!

image

From the documentation:

Using your smartphone from your PC becomes a reality with Mobizen. Type using your keyboard, view photos and videos stored on your phone, and use mobile apps.

  • Photo: Share your special moments on a larger screen.
  • Music: The songs you listen to on-the-go can be enjoyed anywhere.
  • Videos: Watch videos and movies stored on your smartphone.
  • Files: Use drag and drop to transfer files between your smartphone and PC.

This will certainly become a new tool in my mobile development stack.

Friday, November 7, 2014

Free Azure and Office 365 Exams

To accelerate the adoption of their cloud technologies, Microsoft made the following MCP exams available for free:

  • 532: Developing Microsoft Azure Solutions
  • 533: Implementing Azure Infrastructure Solutions
  • 346: Managing Office 365 Identities and Requirements
  • 347: Enabling Office 365 Services

This offer is only valid until December 31, 2013 or while supplies last. So be quick and register for one or more of these exams.

image

Get your voucher here: http://borntolearn.mslearn.net/goodstuff/p/mcp.aspx

Good luck!