The ability to support Windows, Mac and Linux would not have been possible without the work done by James Wilkins and Christian Bernasko. James Wilkins created the V8.NET library and when it was first released it supported only Windows. Christian Bernasko then took V8.NET and modified it to make it work with Mono on Linux and the Mac. The TypeScript addin is using V8.NET binaries built by Christian from his port of V8.NET.
Please note that this is an alpha release and because V8.NET uses a native library it can cause Xamarin Studio or MonoDevelop to terminate if a bug is encountered.
- TypeScript compilation on save or build.
- Code completion.
- Find references.
- Rename refactoring.
- Go to declaration.
- Errors highlighted as you type.
- Code folding.
The addin supports:
- Xamarin Studio MonoDevelop 5 and above.
- TypeScript 1.4
- Linux, Mac and Windows.
Installing the addin
The addin is currently available from MonoDevelop’s Add-in Repository in the alpha channel. By default the alpha repository is not enabled so you will have to enable it before you can find and install the addin.
In Xamarin Studio open the Add-in Manager and select the Gallery tab. Click the repository drop down and if Xamarin Studio Add-in Repository (Alpha Channel) is not displayed then click Manage Repositories…. In the window that opens tick the check box next to Xamarin Studio Add-in Repository (Alpha Channel) and then click the Close button.
Back in the Add-in Manager dialog click the Refresh button to update the list of addins. Use the search text box in the top right hand corner of the dialog to search for the addin by typing in TypeScript.
Select the TypeScript addin and then click the Install… button.
Note that if you are using Linux 32 bit then you should install the TypeScript Linux 32 bit addin. The other TypeScript addin listed supports Linux 64 bit. Hopefully in the future it will be possible to support both Linux 32 bit and 64 bit using the same addin.
Now that the TypeScript addin is installed let us create a TypeScript file.
To add a TypeScript file open the New File dialog, select the Web category and select Empty TypeScript file.
Give the file a name and click the New button.
Note that currently the TypeScript file needs to be included in a project. Standalone TypeScript project files are not supported. TypeScript files can be added to any .NET project.
When editing the TypeScript code you will have code completion when you press the dot character.
Code completion also works when you type the opening bracket of a function.
Go to Declaration
The text editor’s right click menu has three TypeScript menus: Go to Declaration, Find References and Rename.
The Go To Declaration menu option will open the corresponding definition in the text editor.
Find References will show the references in the Search Results window.
Selecting the Rename menu option in the text editor will open the Rename dialog where you can type in a new name and click OK to have it updated.
Note that currently on Linux the Rename dialog will only be displayed if the keyboard shortcut F2 is used. Selecting the context menu will not show the Rename dialog on Linux but will work on Windows and on the Mac.
Errors in your TypeScript code will be highlighted as you are typing in the text editor.
Code folding is supported for TypeScript classes, modules and interfaces.
Code folding by default is disabled. To enable code folding open the Preferences dialog and in the Text Editor section select the General category, then tick the Enable code folding check box.
There are more compiler options available in the project options in the Build – TypeScript category.
That is the end of our quick look at TypeScript support in Xamarin Studio and MonoDevelop.
The source code for the addin and for the V8.NET engine that works on Mono are available on GitHub.
Hot buzzword of the day is Wearables. We at XHackers are ready to create a buzz. Lot of us when we hear the word – Wearables, we think of Apple Watch, Android Wear, Microsoft Band, Google Glass or even Fitbit. But history of wearables dates back to 1961!
In 1961, a MIT Professor, Edward Thorp, whom we call the Father of Wearables, created and successfully used a first wearable computer to cheat at Roulette which gave them 44% edge over the game 🙂 Since then, we had calculator watches (how many of you remember Casio watches 😉 ), digital hearing aids, Nike+, Go Pros, Fitbits and similar clones.
And then one day, Google announced “Project Glass” with a mission statement –
We think technology should work for you – to be there when you need it and get out of your way when you don’t.
It was exciting! With the annoucement of GDK(Glass Developer Kit), Android developers could write native Google glass apps using the Android SDK. This opened up plethora of opportunities for developers into the Wearable Computing market. Parallely, came slew of watches powered by Android called Android Wear. If you didn’t know – Xamarin has been supporting Google Glass & Android Wears ever since. Some exciting news about new watches are making rounds.. watch out! (pun intended).
Microsoft too joined the party by annoucing a cool looking wrist band called Microsoft Band. To our surprise, it came in with full support on all the leading phone Operating Systems like iOS, Android along with it’s very own Windows. With the release of Band SDK for all platforms and Xamarin’s same day support, it’s now seamless to integrate with iOS and Android apps. What we hear is, very soon Cortona which used to work only on Windows Phone, will now work on iOS and Android too – which will open up more avenues for apps to integrate voice in their apps.
Apple Watch was one of the most exciting annoucements from Apple! As you may know, WatchKit has been in preview for quite some time now. Recently after WatchKit’s official release, and the actual Watch yet to hit the Apple stores, nothing stops developers to make their apps ready for the D-Day.
With Xamarin platform, it’s now a reality for C# developers to write a cross platform code across all the major wearable platforms. Not just write code for Apple Watch, Google Glass, Android Wears, or Microsoft Band but also share a good amount of code among them.
So are you excited to learn how to build your wearable apps on all these platforms in C#?
Here’s your opportunity to peek into the wearable app development world. Come and learn more about Xamarin and how to program for Wearables in our upcoming meetup.
What we plan to cover –
- 09:45 AM – 10:15 AM : Quick introduction to Xamarin, Xamarin Forms – Pooran
- 10:15 AM – 10:45 AM : Getting started with Microsoft Band –Vidyasagar
- 10:45 AM – 11 AM : Break
- 11 AM – 11:45 AM : Apple Watch concepts –Pooran
- 11:45 AM – 12:30 PM : Android Wear concepts – Vidyasagar
See you there!
Blog Credits : Pooran
Xhackers Core Team
GREAT! How do I enable it?!
You can edit the linker settings under project properties; iOS build for iOS and Android options for Android.
Anything else I should know
- Link all assemblies which means that all code is subject for linking
- Link SDK assemblies only which means that only Xamarin Core assemblies will be linked. Default for deploy to actual devices.
- Dont link which means, well, don’t link… Default for deploy to simulators/emulators.