1. daniel.fisher@devcoach.biz
Daniel Fisher | CTO
devcoach ®
daniel.fisher@devcoach.biz
http://www.lennybacon.com
Der Einzige Vortrag dieser Konferenz, der
nichts mit User Interfaces zu tun hat…
Silverlight als Clientseiteiger Datencache in AJAX
Anwendungen
2. daniel.fisher@devcoach.biz
Über mich…
Daniel Fisher | CTO & Software Architect
MCP, MCTS, MCPD…
Mit-Gründer und Geschäftsführer von
www.devcoach®.com | www.staticdust.net
Mit-Gründer und Vorstand von
www.just community.de e.V.
Mit-Gründer und Leiter von
INETA Usergroup www.NetUG-NiederRhein.de
Mitglied im Microsoft
Community Leader & Insider Program (CLIP)
Connected Systems Advisory Board
8. daniel.fisher@devcoach.biz
Die Realität
Fakt 1:
• Web/AJAX-Anwendungen verringern das pro Request
übertragene Daten-Volumen
Fakt 2:
• Web/AJAX-Anwendungen erhöhen die Anzahl der
Requests eines einzelnen Seiten-Aufrufs.
Mehr Requests + Mehr Date-Zugriffe
!= Mehr Performance
15. daniel.fisher@devcoach.biz
HTML DOM Integration
Silverlight apps are browser apps
Interacting with the browser host
• Interact with HTML elements and script objects from
.NET-Code
• Interact with exposed .NET-Objects from javascript-
Code
16. daniel.fisher@devcoach.biz
Exposing a .NET Object
[Scriptable]
public void Search(string Name) { ... }
WebApplication.Current.
RegisterScriptableObject(
"EntryPoint", this);
17. daniel.fisher@devcoach.biz
Accessing a .NET Object from Javascript
var control =
document.getElementById(
"SilverlightControl");
control.Content.EntryPoint.Search(
input.value);
19. daniel.fisher@devcoach.biz
Local Storage
Cookies on steroids
Provides unlimited space of app specific local
storage
Can be expanded per app by prompting the user
Uses .NET IsolatedStorage APIs
20. daniel.fisher@devcoach.biz
Isolated Storage
using (var isf =
IsolatedStorageFile.GetUserStoreForApplication())
{
using (var fsm =
new IsolatedStorageFileStream(
filename, FileMode.OpenOrCreate, isf))
{
using (var sw = new StreamWriter(fsm))
{
sw.Write(content);
sw.Flush();
OnBytesWritten(fsm.Length);
}
}
}
27. daniel.fisher@devcoach.biz
The presentation content is provided for your personal information only. Any commercial or non-commercial use of the presentation in full or of any text or graphics
requires a license from copyright owner. This presentation is protected by the German Copyright Act, EU copyright regulations and international treaties.