imageMicrosoft has released a new Facebook SDK Version 3.0 (other than their old not-so-great one) and it looks to have not just updated APIs but also wide range of features supported in many application types.

Quoting a related blog post from c|net “The web services report” blog:

http://news.cnet.com/8301-13515_3-10393823-26.html

Microsoft on Monday released a software development kit for Facebook that allows developers to create Facebook applications for Silverlight and Windows Presentation Foundation. This should expand the reach of Facebook in third-party applications as well as make Silverlight and WPF more viable platforms for developers looking to build social applications.

clip_image001

A screenshot showing off the NewsFeed control for WPF.

(Credit: The Silverlight Team Blog)

The SDK comes complete with samples and tools to develop Facebook applications in ASP.NET, Silverlight, WPF, and WinForms. It also features the source code for the API, components, controls, and samples.

There are currently other libraries available that allow Facebook developers to develop with other technologies, such as JavaScript, PHP, ActionScript, and the iPhone. There are a variety of others as well, which can be seen here, but these are the ones that Facebook officially provides support for.

Microsoft, as you may remember, invested $240 million in Facebook back in October 2007. Many called this move more of a strategic play to keep Google and Yahoo from getting a stake in the company. The release of this SDK is a part of Facebook and Microsoft’s ongoing partnership.

If you’re interested in taking a look, you can download the SDK here.

 

Check out the SDK Overview at:

www.microsoft.com/facebooksdk

 

Quoting from homepage:

The toolkit is comprised of the following core assemblies:

  • Facebook.dll: This is the main assembly that will be used by all applications. This has all the logic to handle communication with the Facebook application. This assembly also has specific support of XAML applications (Silverlight and WPF) to enhance the Facebook platform to make databinding and data caching easier.
  • Facebook.Silverlight.dll: This is the Silverlight version of the main assembly that will be used by all Silverlight applications. This has all the logic to handle communication with the Facebook application. This assembly also has specific support of XAML applications to enhance the Facebook platform to make databinding and data caching easier. The REST API in this assembly is Asynchronous only.
  • Facebook.Web.dll: This assembly should be used by Canvas applications. The main functionality supported in this assembly is to encapsulate the handshake between the Facebook application and a canvas application (both FBML and IFrame)
  • Facebook.Web.Mvc.dll: Provide a support building canvas applications using ASP.NET MVC. Separated from Facebook.Web.dll to avoid all developers from needing to install the MVC bits.
  • Facebook.Winforms.dll: This assembly provides support for writing Facebook applications using Winform technology. This provides a Component that wraps the API to make it easier to use from Winforms. This also contains some user controls to help display Facebook data easily.

To get started we recommend you download the SDK and refer to the "How to" guides and the Facebook Developer Wiki to get familiar with these new resources.

  1. Download the SDK.
  2. Refer to the detailed instructions on the Facebook Developer Wiki. Here are some important links to use as a starting point.

Facebook SDK Version 3.0 Notes

ASP.NET Development
ToolKit Content Folder
Facebook Platform
Other Platforms

Have fun,

 

, , , , , , , , ,

I was going to put this on twitter but it’s a bit longer to tweet.

Last week I shared some videos on Google Reader and twitter from Microsoft’s MSDN Chopsticks video website. If you don’t know it, it’s a VERY nice videos website with much content on very interesting topics and very recent products as well as different experience levels of content.

http://www.microsoft.com/belux/msdn/nl/chopsticks/

Today, some other friends on twitter noticed the Chopsticks site and were wondering why it doesn’t allow downloading the videos (you can only view them online).

Well, there is a work around to download the videos though:

  1. Go to the video web page (you need to have Silverlight installed, and a .NET passport login, like Hotmail account).
    I’m using a sample here: “Using ASP.NET MVC Model Binder” http://www.microsoft.com/belux/msdn/nl/chopsticks/default.aspx?id=798
    image
  2. [Update: Skip this is step. Go to Step 3>1]
    If you hover on the video player, you find some icons/buttons that were not showing.
    1. Click the 2nd icon/button from the left, which has the tip “EMBDE”.
       image
    2. When you click it, it shows like this:
      image
    3. Extract the URL in the text following “Embed this video”
      In this example the text is:
      <iframe src="http://www.microsoft.com/belux/msdn/nl/chopsticks/player.aspx?id=798&e=1" frameborder="0" width="493px" height="385px" scrolling="no" marginheight="0" marginwidth="0" ></iframe>

      so the URL is: http://www.microsoft.com/belux/msdn/nl/chopsticks/player.aspx?id=798&e=1

  3. Go to the URL, when the page displays
    1. [Update: the next steps should work in the video page itself not having to get EMBED URL (skip previous STEP 2).
      If the video URL is not found yet, try STEP 2]

      show the source code of that page.
      In Firefox you do this by right clicking near the end of the page and choose “View Page Source” (if you right click up, it’ll show “Silverlight” instead)
      image
    2. In the source look for a line that starts with:
      <script type=’text/javascript’>Silverlight.InstallAndCreateSilverlight("1.0",document.getElementById("

      In this example the code is: (found near the end of the </form> tag)

      <script type=’text/javascript’>Silverlight.InstallAndCreateSilverlight("1.0",document.getElementById("SilverlightInstallPromptHost"),createPlayerSilverlight("http://mediadl.microsoft.com/MediaDL/WWW/B/belux/msdn/chopsticks/community/maartenballiauw-mvc-model-binder.wmv", "http://www.microsoft.com/belux/msdn/nl/chopsticks/default.aspx?id=798", true, true, 1, 538953 ));</script>

      This way you can extract the video URL as the value in between createPlayerSilverlight(" and it’s closing "), you should find (based on this example) the URL: http://mediadl.microsoft.com/MediaDL/WWW/B/belux/msdn/chopsticks/community/maartenballiauw-mvc-model-binder.wmv
      This is the video URL. Go put it ion your favorite download manager, and enjoy watching the video anytime.

I hope this is useful for somebody!

, , , , , ,

Official press release:

http://www.microsoft.com/presspass/press/2008/oct08/10-13Silverlight2PR.mspx

More information, resources, and download:

http://silverlight.net/GetStarted/

UPDATE:

Scott Guthrie’s announcement with –as usual- many important resources and interesting highlights/insights:

http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx

Scott Hanselman has an interesting announcement as well:

http://www.hanselman.com/blog/Silverlight2IsOut.aspx

 

,

This Sunday, I went to dotNETwork 5th gathering to see how interesting it would be to have some Silverlight fun followed by SOA and Patterns and Anti-Patterns goodness. It was a really fun day, and here comes its writing as I saw it.

Starting Out (No tech – you can skip)

The day started by meeting Mohamed Samy (the SOA guy, and my friend!) at 10 AM, getting some sandwiches (and coffee for me as I didn’t have sleep the night before), then, going to the buses place in El-Sekka club (as neither of us figured out how to go to the Canadian University). We tried to follow the first bus by his car (so that I could hopefully get a front row seat as for my eye sight issues), but we moved too late, got stuck at some traffic signal, and we simply lost the bus after we were already far from the original bus stop.

We tried to continue the way on our own using guidance from dotNETwork guys on the phone and trying to track the university signals. That was around 11 AM. Long story short, we arrived at the university around 12:45 PM, after going to so many places that look very different from each other, and false tries to meet with other guys from dotNETwork in any known place in this area (if “known place” can ever exist in it).

Thankfully, that was the only inconvenience of the day, yet, the only adventure as well.

Silverlight 2.0 – Yasser Makram

Yasser is really deeply technical guy, especially when it comes to Silverlight. He works for a company that does Arabization for Silverlight, so, you can imagine how deep he needs to be to get into that.

Clearly I reached his session 15 minutes late at least (given the session started later than it should). I found him discussing Silverlight competition with Flash, mentioning earlier acquisition Microsoft has made that did not help the competition, and why he thinks Silverlight will make it. He said there’re other things

The reasons he believes Silverlight is going make it is that Microsoft is playing well on many roads. For developer reach, it’s very clear having thousands of threads in Silverlight forums while still in BETA. For partners and component developers, there’re many controls, some are free, like Devexpress AgDataGrid, a very advanced grid control. In terms of showcase applications, there’re cool goodies like  Popfly and Silverlight Streaming service (which hosts any Silverlight application not just streaming media with up to 10 GB and streaming is free up to 5 TB of aggregated bandwidth). For public websites (which Microsoft relays on to spread installation of Silverlight). there`re many, like the upcoming Olympics in August 2008. I asked Yasser though whether there`re even rough numbers of how much of a percentage Microsoft expects for Silverlight market share, but he said there’s none.

XAML

Afterwards, Yasser moved from his exploratory Silverlight and PowerPoint slides to the XAML of a basic Silverlight demo, which remained until the end of the session. He briefly introduced XAML, and how every XAML tag is used to instantiate an object of a corresponding class. Also syntax for mapping CLR namespaces and assemblies to XAML namespaces for use with custom namespaces, and said some of them are in AssemblyInfo.

Then he talked about object properties. Those are expressed in XAML as attributes or sub elements for properties of complex (or custom) types. The element name is in format “ComplexTypeClassName.PropertyName”. Silverlight uses “Type Converters” to map the XAML element names (which are strings) to types of objects to instantiate them.

He also showed how VS has the ability to generate event handler method stubs for the events when you type the event name in XAML markup. Small thing we web developers miss with ASP.NET markup :D.

Controls: Data Binding & Layout

The next point was Markup Extensions, which syntax-wise are just other attributes that start with curly brackets “{}”, usage-wise similar to both “$” and “#” i build extensions and data binding in ASP.NET. They are used in builtin implementation for getting data from static resources, but you can use them for any data manipulation, even better (more extensible as per Yasser( than type converters. Talking about data binding, he stated how Silverlight 1.0 didn’t have any input controls or data binding. Silverlight 2.0 has bunch of those.

Silverlight in general has two types of controls, ‘simple control” and “content control”. Actually, most of built in Silverlight controls are content controls. A content control is a template based control, so, you can embed any other control in it even when you think you normally can just add plain text or nothing at all. an example is a tool-tip or a button, in Silverlight, you can for example put an entire grid inside the tool-tip!!

Data binding also works in fashionable way. You basically map the namespaces you need, create a “resource” (which is something like data source in ASP.NET as per my understanding), give it a key, and use that with the control you want to bind to. The last step is to fill the source with any enumerable (list of values). I asked Yasser how the data binding work, whether you have to call “DataBind” manually as in ASP.NET or it works automatically and bi-directionally as in win-forms, which Yasser said it does. Talking about data binding made him mention Devexpress grid as well which has more features than the basic built-in one like built-in sorting, paging, and inline-editing.

The next topic was Silverlight “Layout”. This is determined via a layout manager which as I understand defines how controls are sized (called “Measure”) and located/aligned together(called “arrange”). Three main layouts in Silverlight are the Canvas (sounded like absolute layout to me) the Grid layout (just a table layout), and the Stack Panel (where elements are stacked next to each other). He explained that you can always create your own layout manager by implementing “measure” and “arrange”.

Programmability

Silverlight has support for LINQ-To-Objects. Yasser presented how to use it to apply certain change to all controls of certain type contained in another parent control. I asked him about other 2 LINQ providers, he said LINQ-To-SQL is not supported, but LINQ-To-XML is. I asked him about creating customer providers, he said it is supported given the created provider is built to target CoreCLR (Silverlight CLR) of course.

Yasser also mentioned Isolated Storage (like temporary folder for caching or whatever), which he said we should only use as advanced alternative to cookies. For example in last MIX conference, there was a demo of an email application that used Isolated Storage for keeping a local cache of the email inbox. Note that the quota (max size) for the Silverlight application storage is 1 MB. The user can configure the quota size still of course.

Design

Of course talking about Silverlight wouldn’t be complete without mentioning developer/designer separation having developer using VS and designer using Expression Blend. He mentioned two design terms, styles, which are like property setters that are saved in application level file (while the developer works on the content file), and control templates, that have template contracts (the parts to inject controls in the template), states (like enable, disable, hover, …). He used Blend (in the designer, with no manual markup) to show how you can change completely what a control looks like or hat nested controls it contains.

Next topic was Animations. He said they can be specified in code (called “procedural”). It can be also defined in markup, he showed how those can be created in Blend with the story board designer (similar to time line in Flash I guess). Then mentioed a not about Flash procedural animation libraries being ported from Flash to Silverlight.

He also mentioned DeepZoom. This enables you to make as big picture as you want (he mentioned an example of 6 million pixels), and not download them at once, but zoom and download zoomed part only as needed.

Arabic Support

Silverlight has no support for Arabic right now. This is funny thinking that Silverlight has general good localization support. Yasser showed how you can put Silverlight in a page by JavaScript or an EMBED html tag, and how to pass “culture to it”. It recognizes Arabic and shows the Arabic characters but in reverse order and separated from each others.and from right to left just as if they were English (Yasser showed that via applying the culture on an application with a Calendar control – he mentioned it’s not extensible BTW).

Santeon, the company Yasser works for, has provided free Arabic support for Silverlight.Yasser explained why Arabic is hard to get. You could just reverse the order of all characters but how about numbers and mixed English and Arabic content ? There’s also the issue that the character looks different based on its place in the word, and in some fonts based on what character comes after it. Also word wrapping. Someone hold a side discussion why Microsoft although is known excellence in this in Windows didn’t just use that, and Yasser said any application that supports Arabic well is mainly using system service built into the operating system itself, while Silverlight implementation tries to be not use an OS specific services.

The Arabic support for Silverlight from Santeon is done by creating alternative controls to the ones built into Silverlight. A way I personally don’t like but understand it might be the only way to go. They give out their Arabic support at: http://silverlight.santeon.com.

Conclusion

Yasser is a very knowledgeable guy. He knows much about Silverlight coding and it makes sense as per his work in its Arabization. I think he could make the session last longer though and had much more to tell than he did :). Most of the guys felt he could have improved the way he gave the sessio, but in general it was a good session with a certain depth that I was not expecting to reach in a Silverlight session.

P.S.

I had a discussion with Yasser about Silverlight and DLR (Dynamic Language Runtime), and why there’s a CodePlex project called DynamicSilverlight if it’s included in Silverlight already. He said he didn’t know. We did not agree on him to send me further information or such, but he later found my blog and usedmy contact page to send me the following:

Hi Mohamed,
I have checked the Dynamic Languages SDK project on CodeProject, and I found out that this projects is used to host the following:
IronRuby Silverlight libraries
IronPython SIlverlight libraries
Chiron tool, which is a commandline tool used to package Dynamic Languages applications in XAP files (ZIP file with a manifest which is used to redistribute Silverlight 2 applications)
Source code for IronRuby, IronPython for Silverlight
Dynamic Languages Samples
The tools (Chiron), and the libraries are included in the distribution of Silverlight SDK (by default located at C:program filesMicrosoft SDKsSilverlight). So there is no need for confusion, the CodePlex project is not a separate project, as the libraries coming with Silverlight SDK is actually compiled from this CodePlex project.

He sent me his contact info, but I’m not putting them here without asking him of course! Thank you, Yasser.

He also sent me the following information about himself when he knew I was going to blog the event. It’s very interesting info, so, I’m sharing it here:

Hi Mohamed,
I have seen your blog and noticed that you will be blogging about yesterday’s session, and also noticed that in a previous post that you don’t know about me. So I though to briefly introduce myself to you, and specifically regarding Silverlight. I have been active in the Silverlight community since the beginning. I have been camping daily on the Silverlight official forums, reading threads and answering questions till I became the first to post over 1000 posts and have been ranked as the top contributor. In the last few months I have not been as active, but I still ranked as one of the top 5 contributors in SIlverlight community hall of fame
http://silverlight.net/community/recognition/hall-of-fame/ . I have worked on some Silverlight projects, including http://www.ddjsilverlight.com and http://www.nba.com . I am very glad to see bright developers like you in Egypt, after reading through your blog. Good luck and wishing you more success in the future.

Heading to SOA Patterns, OOPS, AntiPatterns (Coming in Part II)

The next session was very enjoying one as well as informative. I have had the honor to see Mohamed Samy putting the following touches on it before it happens, but seeing it in action was completely different. In order to not make you all wait until I finish that other long part, I’m publishing this part right now and will be sending about all the fun great SOA story in a separate part/post. I hope it’ll be as fun and informative to you as the session was to me.

Sorry for taking long to write. I’m already overwhelmed with investigating some other SOA related stuff :D :D :D, and some other less fancy stuff of course.

Stay Tuned !!

, ,

n587461065_1343848_971The 5th dotNETwork gathering will be: Saturday, June 28, 2008.

The agenda is as follows:

12:00 AM – 01:30: Delivering Rich User Experience Applications using Silverlight 2 by Yasser Makram

01:30 PM – 2:00 PM: Coffee Break

02:00 PM – 3:30 PM: Patterns and antipatterns of SOA by Mohamed Samy

03:30 PM – 4:00 PM: Lunch

 

It’ll be in: Canadian International College - Busses will be available at: Nady El-Sekka (11:00 AM – 11:30 AM).

The gathering being on Sunday not Saturday as usual makes it harder to attend it The gathering facebook event said by mistake it’ll be on Sunday, but it’ll be on Saturday normally like all other dotNETwork events.

Regarding the sessions

I do not know about Yasser, but Silverlight 2.0 is a fairly new topic and it’ll sure be interesting to come and see it. I think Yasser will bring us a lot of amazement!

For the SOA topic, I want you all to set high expectations starting now. Mohamed Samy is a Solution Architecture (VSTS) MVP who has worked in and talked about SOA patterns more than most people I have met in person as both a personal passion and a job responsibility as a Technical Architect in ITWorx. I know Mohamed in person and believe he’ll be delivering a rocking session. Do not miss that.

 

Related Resources

 

Update:

I’ve already started finished my writings. Here are the published blog posts:

, , , , ,