Category Archives: Silverlight - Page 2

Rich Internet Application Technology Comparison: AJAX, Flash, Silverlight

Today at .Net Developers Journal was posted this interesting article by Judy Lee. Check it out here as Judy makes fast comparison of these products related to their projects. At the bottom is the final conclusion table.
Today, RIA technology is widely used, also referred to as Rich Internet Clients (RICs). RICs provide the usability, responsiveness, and reuse of client/server applications with the deployment, manageability, and availability of a traditional Web application. Many websites are using DHTML and AJAX technology in HTML pages. Another very popular technology is Flash. How about Silverlight, though?

RIAs offer the flexibility and ease of use of an intelligent desktop application, and add the broad reach of traditional web applications with an entirely new kind of web experience that is engaging, interactive, lightweight, and flexible.

DHTML and AJAX

We used DHTML and AJAX technology in HTML pages in some of our .NET outsourced projects. However, we encountered problems of browser incompatibility. (For example, DOM is quite different in IE and in Safari.)

Although it is possible to make this kind of web application work in all browsers, it will take the developer much time and it is very difficult to maintain when the browsers update.

Flash

Another very popular technology is Flash, it doesn’t have any browsers compatibility problems, but it’s very hard to integrate with .NET. Integrating Flash demands that .NET developers make a special effort, and since our specialty is .NET software outsourcing, Flash is not the best choice for us.

Silverlight

Silverlight is a cross browser technology, so there’s no browser compatibility problem. Plus it integrates with .NET very well, so it is easier to use and develop. Silverlight does not have controls at present, but in version 2.0, many controls will be released for Web designers. Those controls will make Web development easier and faster.

Based on the features supported by Silverlight (see our chart below) more web page elements and properties can be controlled than DHTML&AJAX. Silverlight also offers a good user experiences.

ajax Rich Internet Application Technology Comparison: AJAX, Flash, Silverlight

Source

Free Microsoft Press e-books!

Once again Microsoft brings some knowledge to the masses icon smile Free Microsoft Press e books! This time its free e-books. All the headings speak for them selfs and with few words these books are MUST HAVE for every developer. Only few chapters are included in pdf’s as you are encouraged to buy them! Here is the content:

ms linq cvr Free Microsoft Press e books!Introducing Microsoft LINQ
by Paolo Pialorsi and Marco Russo

ISBN: 9780735623910

* Chapter 1: LINQ Introduction
* Chapter 2: C# Language Features
* Chapter 3: Visual Basic 9.0 Language Features
* Chapter 4: LINQ Syntax Fundamentals
* Chapter 5: LINQ to ADO.NET
* Chapter 6: LINQ to XML

ms ajax cvr Free Microsoft Press e books!Introducing Microsoft ASP.NET AJAX
by Dino Esposito

ISBN: 9780735624139

* Chapter 1: The AJAX Revolution
* Chapter 5: The AJAX Control Toolkit

ms silverlight cvr Free Microsoft Press e books!Introducing Microsoft Silverlight 1.0
by Laurence Moroney

ISBN: 9780735625396

* Chapter 1: Silverlight and User Experience
* Chapter 5: Programming Silverlight with JavaScript

Log into Microsoft Press home page for more info here

Microsoft to push Silverlight to business users this week

logo Microsoft to push Silverlight to business users this weekThis is BIG! This was about to happen sooner or later – Microsoft puts his Silverlight plug-in into the updates section as ‘optional’ update. Mary Jo Foley writes more about that here. Here is a part of her post:

But this week — specifically on January 22 — Microsoft will make its Adobe-Flash-alternative Silverlight available via WSUS, as well as via Microsoft Update (MU). In order to have Silverlight 1.0 pushed to users, admins will need to select it; it will be an optional, not automatic, download.

The Silverlight product family will include installers and updates for the Silverlight browser plug-in for Microsoft Internet Explorer and Mozilla Firefox, according to the Microsoft Update Product Team blog.

Read the whole post here

Silverlight 1.1 Tools Alpha for Visual Studio 2008

This afternoon from Microsoft released an updated version of the Silverlight 1.1 Tools Alpha that works with the final release of Visual Studio 2008. You can download it for free here.
silverlight Silverlight 1.1 Tools Alpha for Visual Studio 2008
The tools alpha refresh released today has the same feature-set as the Silverlight Tools Alpha add-on which was previously available for Visual Studio 2008 Beta2 (it has simply been updated to work with the final VS 2008 release). This feature-set includes basic Silverlight 1.1 project system support, XAML markup editing and intellisense support, debugging support, Expression Blend project compatibility, and VB and C# code-behind intellisense. You can find quickstart tutorials that detail how to use these features here.

The next public preview of Silverlight will include a ton of new runtime features, as well as a significantly enhanced VS 2008 tooling support. Scott Guthrie will be blogging more details about this shortly.

250+ Tools and Resources For Coding the Web

We’re all living on the web, and we all seem to be starting our own websites, so it’s time we all learned the languages that make it run. The guys at Mashable.com have gathered over 250 resources to help you get going.

This list is aggregated from previous Mashable posts.

 250+ Tools and Resources For Coding the Web

The list is quite extensive and features many ajax libraries, loading indicators etc so its best to be viewed at the original place.

Silverlight в ASP.NET уеб сайт

Въведение

Silverlight е нова технология от Майкрософт предназначена за разработването на RIA. Тя се вгражда във всеки браузър като плъг-ин и е платформено независима. В тази статия ще покажа как се вграждат Silverlight проект в ASP.NET сайт.

Какво е необходимо

Като за начало изтеглете и инсталирайте новата версия на VS 2008 бета 2 от тук. Повече за новостите във Visual Studio 2008 бета 2. За да разработвате Silverlight приложения, също така ви е необходимо и Silverlight Tools Alpha. След като ги инсталирате, опцията за Silverlight проект ще стане активна в VS.
За да виждаме резултата в браузър ни е необходимо Silverlight runtime/plugin 1.1 Alpha

Идеята

Silverlight е базиран на Xaml, което е XML базиран език за UI елементи. С помоща на Xaml е възможно разграничаването на визуалните елементи от програмната част. Това се реализира чрез ‘code-behind’ концепция позната ни от ASP.NET. На всеки Xaml файл съществува C# файл, който съдържа програмната логика за управлението на графичните елементи.
Когато създаваме Silverlight проект използвайки темплейт от VS 2008, някои файлове се генерират автоматично с образователна цел. Xaml файлът е интегриран в примерена HTML страница. В тази статия ще ви покажа как да извадите Xaml от HTML страницата и да го интегрирате в ASP.NET страница.

Проектите

1. Silverlight проекта
Ако сте инсталирали всичко правилно трябва да видите следният екран когато изберете от менюто File -> New Project:

1 Silverlight в ASP.NET уеб сайт

Проекта ще бъде създаден след като натиснете OK. Следните страници са създадени по подразбиране:
- Page.xaml: това е страницата в която описвате UI елементите
- Page.xaml.cs: тук пишете програмната логика. Обикновен C# код
- Silverlight.js: това е javascript файл с който създавате Silverlight контрола в HTML/ASPX страницата за да показвате Xaml съдържанието.
- TestPage.html: HTML страницата която съдържа Silverlight контрола

2. ASP.NET сайтът
Трябва да добавим и асп проектът към общия solution. Add -> New Web Site.

3. Добавяме Silverlight към уеб сайта
Натискаме с десния бутон на прокта на уеб сайта и от падащото меню избираме Add Silverlight Link.

2 Silverlight в ASP.NET уеб сайт

Това беше първата стъпка. Следващата е да разгледаме HTML страницата за да разберем кой код е отговорен за генерирането на Silverlight контрола в testpage.html:

<head>
    <title>Silverlight Project Test Page </title>
 
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript" src="TestPage.html.js"></script>
 
</head>
 
<body>
    <div id="SilverlightControlHost">
        <script type="text/javascript">
            createSilverlight();
        </script>
    </div>
</body>
</html>

Както се вижда, контрола е създаден с javascript функция, която се съдържа в Silverlight.js. Това което трябва да направим е да добавим този файл към асп сайта. После създаваме нов javascript файл, който ще съдържа в себе си кода от testpage.html.js

// JScript source code
 
//contains calls to silverlight.js, example below loads Page.xaml
function createSilverlight( xamlPage )
{
    Silverlight.createObjectEx({
        source: xamlPage,
        parentElement: document.getElementById("SilverlightControlHost"),
        id: "SilverlightControl",
        properties: {
            width: "100%",
            height: "100%",
            version: "1.1",
            enableHtmlAccess: "true"
        },
        events: {}
    });
 
    // Give the keyboard focus to the Silverlight control by default
    document.body.onload = function() {
      var silverlightControl = document.getElementById('SilverlightControl');
      if (silverlightControl)
      silverlightControl.focus();
    }
 
}

С малка промяна(добавен параметър) кодът изглежда по следния начин:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Integrating Silverlight in aspx</title>
 
    <script type="text/javascript" src="Silverlight.js"></script>
    <script type="text/javascript" src="XamlPageCreation.js"></script>
 
</head>
<body>
    <form id="frmMain" runat="server">
    <div id="SilverlightControlHost" >
        <script type="text/javascript">
            createSilverlight( 'Page.xaml' );
        </script>
    </div>
    </form>
</body>
</html>

Какво ще показваме?

Засега имаме работещ ASP.NET/Silverlight пример който не показва нищо. Нека направим TextBlock със съобщение потребителя да избира файлове. При кликване на TextBlock-а се отваря FileBrowse диалог и след селекция на няколко файла, техните имена се показват в TextBlock контрола.

<Canvas x:Name="parentCanvas"
        xmlns="http://schemas.microsoft.com/client/2007" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        Loaded="Page_Loaded" 
        x:Class="SilverlightSamplePrj.Page;assembly=ClientBin/SilverlightSamplePrj.dll"
        Width="400"
        Height="400"
        Background="#EEEEEE"
        >
 
  <TextBlock x:Name="txtFileName"
             Canvas.Top="5" Canvas.Left="5" 
             Foreground="Black"
             Text="Click for OpenFileDialog"
             MouseLeftButtonDown="OnClick"/>
 
</Canvas>

Ето и кода в C# файла:

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
 
namespace SilverlightSamplePrj
{
    public partial class Page : Canvas
    {
        public void Page_Loaded(object o, EventArgs e)
        {
            // Required to initialize variables
            InitializeComponent();
        }
 
        public void OnClick(object o, MouseEventArgs e)
        {
            txtFileName.Text = "";
            string NL = Environment.NewLine;
            OpenFileDialog ofDlg = new OpenFileDialog();
            ofDlg.EnableMultipleSelection = true;
            if (ofDlg.ShowDialog() == DialogResult.OK)
            {
                foreach (FileDialogFileInfo fdFileInfo in ofDlg.SelectedFiles)
                {
                    txtFileName.Text += fdFileInfo.Name + NL;
                }
            }
        }
    }
}

Заключение

Това е достатъчно за начало, очакваме следващите версии на Silverlight където се надяваме да има предефинирани контроли плюс куп други възможности който да утвърдят Silverlight като Технологията за RIA.

Silverlight 1.0 Released and Silverlight for Linux Announced

Today Microsoft announced the release of Silverlight 1.0, the fully supported version of its cross-browser, cross-platform plug-in for delivering the next generation of media and rich experiences on the Web. Over here you can get started with it.
Also always is good to hear from the core developers so here is what Scott Guthrie says about that:

Silverlight 1.0 and Expression Encoder 1.0 Released

Today we shipped the Silverlight 1.0 release for Mac and Windows. Silverlight 1.0 is focused on enabling rich media scenarios in a browser. Some of its features include:

  • Built-in codec support for playing VC-1 and WMV video, and MP3 and WMA audio within a browser. The VC-1 codec is a big step forward for incorporating media within a web experience – since it supports very efficiently playing high-quality, high definition video in the browser. It is a standards-based media format that is implemented in all HD-DVD and Blueray DVD players, and is supported by hundreds of millions of mobile devices, XBOX 360s, PlayStation 3s, and Windows Media Centers (enabling you to encode content once and run it on all of these devices + Silverlight unmodified). It enables you to use a huge library of existing video content and provides access to the broad ecosystem of existing Windows Media tools, components, vendors and hardware.
  • Silverlight also optionally supports built-in media streaming. This enables you to use a streaming server like Windows Media Server on the backend to efficiently stream video/audio (note: Windows Media Server is a free product that runs on Windows Server). Streaming brings some significant benefits in that: 1) it can improve the end-user’s experience when they seek around in a large video stream, and 2) it can dramatically lower your bandwidth costs.
  • Silverlight enables you to create rich UI and animations, and blend vector graphics with HTML to create compelling content experiences. It supports a Javascript programming model to develop these. One benefit of this is that it makes it really easy to integrate these experiences within AJAX web-pages (since you can write Javascript code to update both the HTML and XAML elements together).
  • Silverlight makes it easy to build rich video player interactive experiences. You can blend together its media capabilities with the vector graphic support to create any type of media playing experience you want. Silverlight includes the ability to “go full screen” to create a completely immersive experience, as well as to overlay menus/content/controls/text directly on top of running video content (allowing you to enable DVD like experiences). Silverlight also provides the ability to resize running video on the fly without requiring the video stream to be stopped or restarted.

Silverlight for Linux Support

Over the last few months we’ve been working to enable Silverlight support on Linux, and today we are announcing a formal partnership with Novell to provide a great Silverlight implementation for Linux. Microsoft will be delivering Silverlight Media Codecs for Linux, and Novell will be building a 100% compatible Silverlight runtime implementation called “Moonlight”.

Moonlight will run on all Linux distributions, and support FireFox, Konqueror, and Opera browsers. Moonlight will support both the JavaScript programming model available in Silverlight 1.0, as well as the full .NET programming model we will enable in Silverlight 1.1.

Link to Soctt’s article

VS 2008 JavaScript Intellisense for Silverlight

Thats an interesting post from Scott Guthrie’s blog about JavaScript Intellisense for Silverlight:

In addition to shipping VS 2008 and .NET 3.5 Beta 2 last week, my team also shipped the first release candidate of Silverlight 1.0 (it was a busy week at the office!). You can download the Silverlight 1.0 RC here.

I blogged about our Silverlight plans and roadmap a few months ago. This first Silverlight 1.0 release is focused on enabling rich media scenarios, and delivers high quality video and audio streaming and XAML based vector graphics and animation support in the browser. Silverlight is cross browser and cross platform, and can be easily added to any HTML page. Silverlight 1.0 supports a JavaScript programming model that makes it easy to integrate into an AJAX based page experience (note: Silverlight 1.1 will then add a cross-platform .NET framework programming model and enable RIA support).

JavaScript Intellisense for Silverlight 1.0

Over the last few weeks I’ve blogged about the new VS 2008 JavaScript Intellisense and VS 2008 JavaScript Debugging features in Beta 2. In addition to using these JavaScript tooling features when building pure HTML AJAX solutions, you can also now take advantage of them when targeting Silverlight 1.0.

Justin-Josef Angel earlier today released an awesome Silverlight 1.0 JavaScript Intellisense CodePlex Project that helps dramatically with this. It includes some nice annotated JavaScript helper methods that provide the ability to work with any XAML element in Silverlight with full intellisense in VS 2008.

To use it, simply add his JavaScript library to the top of your page:

step1 VS 2008 JavaScript Intellisense for Silverlight

You can then use Justin’s helper functions to take late-bound objects and indicate their JavaScript type:

step2 VS 2008 JavaScript Intellisense for Silverlight

This will then cause the VS 2008 JavaScript intellisense engine to automatically provide intellisense and syntax checking for you:

step3 VS 2008 JavaScript Intellisense for Silverlight

You can learn all about Justin’s library via his excellent tutorial post here. You can then download and participate in the codeplex project here.


read original