Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
signalr / SignalR Programming in Microsoft ASP.NET.pdf
Скачиваний:
65
Добавлен:
25.05.2015
Размер:
19.23 Mб
Скачать

FIGURE 7-4  Sending parameters to the service.

SignalR hosting in platforms other than Windows

It is a good idea to note that all the infrastructure on which we are building our services is based on open standards, in many cases with implementations distributed under very permissive licenses, which opens the door to the possibility of executing the applications on platforms other than Windows.

If we add this to the availability of multiplatform implementations of the .NET platform, it is possible to take SignalR applications to other popular operating systems where it would a priori seem impossible, such as Linux, BSD, or Mac OS X.

The Mono1 project was begun in 2001 by Ximian, a company started by Miguel de Icaza for the purpose of creating a multiplatform and open source implementation of Microsoft’s .NET Framework, based on the ECMA standard of C# and Common Language Runtime (CLR). Currently, Mono provides support, even at binary level, for a large number of features offered by version 4.5 of the .NET Framework, although there is obviously a slight delay in their implementation when it comes to the new features that continue to appear in the new versions of the .NET Framework. In fact, to access the most recent features, it is recommended that you download the source code from its repository at

1 Official website of the Mono project: http://www.mono-project.com

126 Chapter 7Real-time multiplatform applications

www.it-ebooks.info

GitHub2 and that you generate the specific binaries for the local computer by following the instructions provided.

At the time of writing, even the SignalR framework itself can be completely compiled on Mono.

The Readme.md file that we find on the main page of the repository in GitHub provides instructions to obtain a copy of the source code and compile it using the command line as shown in Figure 7-5.

FIGURE 7-5  SignalR compilation from the Linux command line with Mono.

2 Mono Project repository at GitHub: http://github.com/mono

 

Real-time multiplatform applicationsChapter 7

127

www.it-ebooks.info

It is also possible to debug or make modifications to SignalR by using MonoDevelop3, a multiplatform integrated development environment also created and distributed under the same open source premises as the Mono ecosystem. For this, in the SignalR source code, a solution file is included

(Microsoft.AspNet.Signalr.Mono.Sln), which we can open from this IDE to modify or compile the project, as shown in Figure 7-6. Obviously, projects that are very specific to the Microsoft platform, such as scalability adapters for SQL Server or Windows Azure, are not found in this solution.

FIGURE 7-6  Compiling SignalR from MonoDevelop.

The SignalR self-hosting server components can be successfully executed on Mono (see

Figure 7-7), but the same does not happen with the server based on ASP.NET/IIS, because the implementation of the latest version of the platform is not yet fully supported. Hopefully, this will change in the near future.

3 Official website of the MonoDevelop project: http://monodevelop.com

128 Chapter 7Real-time multiplatform applications

www.it-ebooks.info

Соседние файлы в папке signalr