Welcome!

Artificial Intelligence Authors: Liz McMillan, Zakia Bouachraoui, Pat Romanski, Yeshim Deniz, Elizabeth White

RSS Feed Item

AjaxWorld Talk: Building Rich Internet Applications Using Microsoft Silverlight 2

It was another fun day AjaxWorld.  I had a good time during my talk Silverlight 2

 

Silverlight is a cross-browser, cross-platform, cross-device.  Plug-in for building and delivering the next generation of .NET based media experiences and rich interactive applications for the Web.

Silverlight does not require Windows, .NET or IIS on the server. 

image

Silverlight 2 just shipped a few days ago, and already we have some great customers going live.

 

NBC Olympics  - NBC hosted the Olympics live on nbcolympics.com and served up 1.3 billion page views, 70 million video streams, and 600 million minutes of video content - making it the largest ever media event on the web.  Users visiting the site spent an average of 27 minutes on the site when they watched a video - an unprecedented number for online traffic.

Notice the use of immediate seek to anywhere in the stream and adaptive streaming that gives you just the right bit-rate content for your connection.

image

Democratic National Convention - In August, the Democratic National Convention was streamed live using Silverlight, and broadcast a 2Mbit live video feed of the event and speeches - receiving outstanding feedback from audiences watching it.

This video was delivered live to millions of viewers all over the world at higher quality and bit rate than traditional TV.  Now, all the content is available for viewing on demand. 

image

Hard Rock  - The folks at Hard Rock have the world's  largest collection of Rock-and-roll memorial in the world.  They hired the good folks at vertigo to build.  Notice how the gigabytes of images are easy to zoom into and pan around.  All streaming download of images... 

 image image

 

Health Care Demonstrator - This is an example app that shows how to build a great line of business application with Silverlight. 

image

 

Quake Game - Check out this very cool Quake game in Silverlight.  Look at the frame rate... even in full screen!

image

 

Next I showed the latest progress on Moonlight with a Linux openSUSE 11.0 VPC (thanks Miguel!)

image

image

image

 

Next, I built a very simple Silverlight 2 application in Eclipse using the Eclipse Tools for Silverlight

First we create a new Silverlight project in Eclipse.

image

Now, we just drag the button from the toolbox in Eclipse

image

Notice we get autocompletion in the source view in Eclipse

image

Then we can easily handle the click event in Eclipse

image

Then in code view, we get auto completion and error reporting in C# in Eclipse.

image

 

 

 

Next I built a simple Silverlight 2 application from scratch in the free VS2008...

For this demo, I only used freely available tools... In particular everything I show works in Visual Studio 2008 Web Developer Express and the Silverlight Tools for Visual Studio 2008

Download the complete sample.

File, New Project

image

Next you can select what server side project to associated your Silverlight app with.  Notice you can even have one dyamically generated for you.  Also, notice you don't need .NET on the server, in fact you can deploy Silverlight from a Linux server.. all you need is http. 

image

image

Notice the client and web project in the same solution and the Xaml view and the preview view. 

image

Notice the great Xaml intellisense. 

 

image

Now we get to write client side C# code... we can even do breakpoints, etc. 

private void btn1_Click(object sender, RoutedEventArgs e)
{
    btn1.Content = "Oach!";
}

Now, check out the server project, it includes ClientBin with a Silverlight.xap file that includes our clientside code... The cool thing is this is just a zip file... so you can see inside it easily. 

image

 

Run it and check it out!  works perfectly.

image

 

But this is Silverlight, let's see if we can make it a little more sexy.  Let's open it up in Express Blend. 

image

Notice Blend is built for Designers...

image

Let's make the design surface a little bigger then do some gradients

image

and finally a motion path..

image

The great thing is the project just refreshes in VS

image

Now we need to get some real data into this app. 

First we add a datagrid (we put it and the button in a StackPanel)

<StackPanel>
 <Button x:Name="btn1" Width="100" Height="50" Content="Push Me!" Click="btn1_Click" Margin="49,73,0,0" d:LayoutOverrides="Width, Height" VerticalAlignment="Top" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5">
     <Button.RenderTransform>
         <TransformGroup>
             <ScaleTransform/>
             <SkewTransform/>
             <RotateTransform Angle="-49.157"/>
             <TranslateTransform/>
         </TransformGroup>
     </Button.RenderTransform>
 </Button>
 
 <data:DataGrid  Name="datagrid1"></data:DataGrid>
<StackPanel>

Then we go to the server project and add some data..  In this case an Entity Framework data model.   This let's us use LINQ to get access to the data rather than doing queries in code rather than in T-SQL. 

image

Select the employees tables we need then, you get this view in the designer.   Notice the Photo filed is too big to pass to the client, so we can just remove it here. 

image

Now let's add a web service to pass this to data to the client.  Let's add a Silverlight-enabled WCF service.

image

[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class NorthwindService
{
    [OperationContract]
    public IEnumerable<Employee> GetEmployees(string nameContains)
    {
        var db = new NORTHWNDEntities();
        var q = from emp in db.EmployeeSet
                where emp.FirstName.Contains(nameContains)
                orderby emp.LastName ascending
                select emp;
        return q.ToList();
    }

}

image

private void btn1_Click(object sender, RoutedEventArgs e)
{
    var client = new ServiceReference1.NorthwindServiceClient();
    client.GetEmployeesCompleted += 
        new EventHandler<GetEmployeesCompletedEventArgs>(client_GetEmployeesCompleted);
    client.GetEmployeesAsync("b");

    btn1.Content = "Oach!";
    Storyboard1.Begin();

}

void client_GetEmployeesCompleted(object sender, GetEmployeesCompletedEventArgs e)
{
    datagrid1.ItemsSource = e.Result;
}

Notice the column reordering, editable cells, sorting, etc. 

image

 

Hope you enjoyed it!  Here is the completed sample.

Read the original blog entry...

IoT & Smart Cities Stories
Dion Hinchcliffe is an internationally recognized digital expert, bestselling book author, frequent keynote speaker, analyst, futurist, and transformation expert based in Washington, DC. He is currently Chief Strategy Officer at the industry-leading digital strategy and online community solutions firm, 7Summits.
Digital Transformation is much more than a buzzword. The radical shift to digital mechanisms for almost every process is evident across all industries and verticals. This is often especially true in financial services, where the legacy environment is many times unable to keep up with the rapidly shifting demands of the consumer. The constant pressure to provide complete, omnichannel delivery of customer-facing solutions to meet both regulatory and customer demands is putting enormous pressure on...
IoT is rapidly becoming mainstream as more and more investments are made into the platforms and technology. As this movement continues to expand and gain momentum it creates a massive wall of noise that can be difficult to sift through. Unfortunately, this inevitably makes IoT less approachable for people to get started with and can hamper efforts to integrate this key technology into your own portfolio. There are so many connected products already in place today with many hundreds more on the h...
The standardization of container runtimes and images has sparked the creation of an almost overwhelming number of new open source projects that build on and otherwise work with these specifications. Of course, there's Kubernetes, which orchestrates and manages collections of containers. It was one of the first and best-known examples of projects that make containers truly useful for production use. However, more recently, the container ecosystem has truly exploded. A service mesh like Istio addr...
Digital Transformation: Preparing Cloud & IoT Security for the Age of Artificial Intelligence. As automation and artificial intelligence (AI) power solution development and delivery, many businesses need to build backend cloud capabilities. Well-poised organizations, marketing smart devices with AI and BlockChain capabilities prepare to refine compliance and regulatory capabilities in 2018. Volumes of health, financial, technical and privacy data, along with tightening compliance requirements by...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settlement products to hedge funds and investment banks. After, he co-founded a revenue cycle management company where he learned about Bitcoin and eventually Ethereal. Andrew's role at ConsenSys Enterprise is a mul...
To Really Work for Enterprises, MultiCloud Adoption Requires Far Better and Inclusive Cloud Monitoring and Cost Management … But How? Overwhelmingly, even as enterprises have adopted cloud computing and are expanding to multi-cloud computing, IT leaders remain concerned about how to monitor, manage and control costs across hybrid and multi-cloud deployments. It’s clear that traditional IT monitoring and management approaches, designed after all for on-premises data centers, are falling short in ...
In his general session at 19th Cloud Expo, Manish Dixit, VP of Product and Engineering at Dice, discussed how Dice leverages data insights and tools to help both tech professionals and recruiters better understand how skills relate to each other and which skills are in high demand using interactive visualizations and salary indicator tools to maximize earning potential. Manish Dixit is VP of Product and Engineering at Dice. As the leader of the Product, Engineering and Data Sciences team at D...
Dynatrace is an application performance management software company with products for the information technology departments and digital business owners of medium and large businesses. Building the Future of Monitoring with Artificial Intelligence. Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more busine...