4. Searching
Looking up words in an index
Factors Affecting Search:
Precision – How well the system can filter
Speed
Single, Multiple Phase queries,
Results ranking,
Sorting,
Wild card queries,
Range queries support
5. Indexing
Sequential Search is bad (Not Scalable)
Index speeds up selection
Index is a special data structure which allows rapid
searching.
Different Index Implementations
- B Trees
- Hash Map
6. Search Process
Quer
y
Doc Doc
s s
Indexing API
Hit
Inde s
x
7. Lucene
High-performance, full-featured text search engine library
Written 100% in pure java & C#
Easy to use yet powerful API
Jakarta Apache Product. Strong open source community
support.
8. Why Lucene?
Open source (Not proprietary)
Easy to use, good documentation
Interoperable - Ex: Index generated by java can
be used by VB, asp, perl application
Powerful And Highly Scalable
Index Format
Designed for interoperability
Well Documented
Resides on File System, RAM, custom store
9. Indexing With Lucene
What type of documents can be indexed?
Any document from which text can be fetched and extracted
over the net with a URL
Uses Inverted Index
The index stores statistics about terms in order to make term
based search more efficient.
http://lucene.apache.org/lucene.net/
11. Silverlight
Overview
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
12. Silverlight is a .NET technology
Server Desktop
& Services
.NET
Devices,
Browser Mobile
Silverlight extends your .NET
Reach.
13. A Brief History of Silverlight
MIX 07 Sep 07 MIX 08 Oct 08
Silverlight 1.0 Silverlight 1.0 Silverlight 2 Silverlight 2
Beta Beta
Silverlight 1.1
Alpha
MIX 09 Jul 09 PDC 09 Spring 10
Silverlight 3 Beta Silverlight 3 Silverlight 4 Silverlight 4
Beta
17. Silverlight 4
Elevated Trust Printing Webcam / Mic
Rich Text & Input Localized to 41
HTML Hosting Improvements Languages
18. Presentation Core – Graphics
2D Graphics
Vector based
Standard shapes and Paths
Masking and clipping
Transformations: skew, rotate, scale, translate, matrix
Animation Basics
Time-based
Support linear, discrete and spline animation
Animatable property types:
Double, Color, Point
Animations and graphics can be defined using XAML or code
19. Declarative Programming Through XAML
Extensive Application Markup Language
Toolable, declarative markup
Code and content are separate
Compatible with Windows Presentation Foundation
XAML C# VB.NET
<Button Width="100"> OK Button b1 = new Button(); Dim b1 As New Button
<Button.Background> b1.Content = "OK"; b1.Content = "OK"
LightBlue b1.Background = new SolidColorBrush b1.Background = New _
</Button.Background> (Colors.LightBlue); SolidColorBrush(Colors.LightBlue)
</Button> b1.Width = 100; b1.Width = 100
20. Databinding
Two way data binding from User interface to business
objects
Notification via INotifyPropertyChanged
DataContext is inherited via Visual Tree
From XAML
<TextBlock Text="{Binding Nasdaq.Points, Mode=OneWay}"/>
Binding binding = new Binding("Nasdaq.Points");
From binding.Mode = BindingMode.OneWay;
code
TextBlock tb = new TextBlock();
tb.SetBinding(TextBlock.TextProperty, binding);
21. Networking
Asynchronous HTTP requests
GET/POST
Access to most headers, cookies,
Uses browser networking stack
Caching, authentication, proxy , compression
22. Web Services
SOAP 1.1
Basic profile
A few restrictions (e.g. SOAP Faults not supported)
Asynchronous invocation
Follows cross-domain policy restrictions
Generated proxies support data binding
23. Sockets
TCP only
Asynchronous API
No explicit bind and no listen/accept support
Restricted ports ( 4502-4534)
Cross Domain based on provisioning server
void Connect(AddressFamily family)
{
SocketAsyncEventArgs connectArgs = new SocketAsyncEventArgs();
connectArgs.RemoteEndPoint = new DnsEndPoint(
Application.Current.Host.Source.Host, 4502);
connectArgs.Completed += new
EventHandler<SocketAsyncEventArgs>(OnConnectCompleted);
socket = new Socket(family, SocketType.Stream,
ProtocolType.Tcp);
if (!socket.ConnectAsync(connectArgs))
OnConnectCompleted(socket, connectArgs);
}
25. Isolated Storage
Stream based access to a private file/directory structure
Patterned after .NET Framework IsolatedStorage classes
Read and write string or binary data
Store is per application XAP
Application code to request size increase
User prompt to accept quota increase
Quotas fall into predetermined size slots
Code must initiate increase size call from within user
input/event
27. Tooling
Server Vista
Desktop
Server, Services
XAML
Designer Developer
Look, behavior, brand, Function, deployment, data,
and emotional connection security, operational integrity
Media
& RIA
28. Silverlight and WPF
Silverlight is related to WPF
Plus a few extra web features and its own codecs
Reuse strategy
Same skills
Same tools
Same XAML and UI
Silverlight code should run on WPF with minor changes
29. Silverlight and .NET: Better Together
Highly productive development framework
Multi-language support
Latest developer innovations (e.g. LINQ, Generics)
AJAX integration
Great tools
Visual Studio
Expression Studio
Cross-platform & cross-browser plugin
Works with Safari, Firefox, Google Chrome and Internet Explorer
Mac OS X and Windows
Any web server
Fast, easy install process
Securely extends your web browser’s sandbox
Off-line storage, OpenFileDialog, Sockets, cross-domain