Keynote – ASP.NET vNext and you
Speaker: Scott Hanselman
ASP.NET will run anywhere (Mac and Linux). Web server will be included.
New free SKU of Visual Studio. Community edition will replace Express.
ASP.NET and modern web
- Totally modular (dependency injection built in)
- Faster development cycle
- Seamless transition from on-premises to cloud
- Choose your editors and tools
- Open source with contribution
- Cross-platform
- FAST
Framework (CoreCLR) is packaged together with application, not shared, safe to deploy.
Split between .NET Framework (Full CLR) and .NET Core (Core CLR). Core CLR is open sourced and cross-platform.
Project file (project.json) is replacing both web.config and nuget package file).
It’s possible to reference ASP.NET is source form and debug it.
VS supports Bower (client-side package manager) and Grunt (client side build tool).
Demo: packaging ASP.NET application together with framework, move to different computer and run it from there.
Demo: run ASP.NET application on Mac. Omnisharp.net – cross-platform .NET IDE.
Resource: microsoft.github.io – portal to Microsoft open source
Session: Adding Offline support to mobile apps which using Azure mobile services
Speaker: Robert Green, technical evangelist at Microsoft
Review of Azure Mobile Services
Add offline support
- SQLiteStore
- Synchronization context
- Pull, push, purge
- Conflict resolution
Sync table
- local table that tracks local changes
- Only works with entities with string ids
GetSyncTable
- Requires SQLite (nuget package)
- Requires SQLiteStore package
- Use GetSyncTable instead of GetTable, this way offline support will be enabled.
- Need to add a column with version number to the entity
Demo: using sync table from windows store app and windows phone app
- Table.PullData() is loading data from server (Azure) to local table and it’s also pushing offline changes to the server, doing full synchronization, but just for that table.
- SyncContext.Push() is uploading all local changes to server
- Table.Purge() is cleaning the local table. It’s not recording a deletion operation.
Conflict detection
- Create sync handler to handle conflicts. Demo.
- Default sync handler fails if there are conflicts
Session: Modern app diagnostic with Glimpse with ASP.NET
Speaker: Anthony van der Hoorn
Web application diagnostic tool
Glimpse could be downloaded as nuget package
Diagnostics is one of the hardest thing to do
40-60% of time spent debugging
- Current approach
- Debugging and diagnostic didn’t change in last 20 years
- Debugging tool are too low level
- Runtime is dynamic it could be hard to match request with execution flow
- Context is important
- Important questions
- How to educate people about what’s going on in application
- How do we know if framework is running as expected
- Glimpse
- Trace.axd for 21st century. Shows at the bottom of the page
- Aggregate request data
- Bridge client and server
- Framework-level insights
- Free, open source
- Built as HttpModule
- Glimpse demo
Glimpse can display:
- Server configuration settings
- Server environment
- Request, as received by the server
- Session
- Http varuables
- Trace
- Execution timeline with performance data
- Metadata
- Route data
- Views, MVC engine decision tree
- SQL execution with performance data
- Overall timeline, what’s happening when
- Inspec Ajax requests
- Dashboard display
Resource: http://getglimpse.com
Session: Building Persistent HTML5 applications
Speaker: Craig Shoemaker
Resources: http://bit.ly/ws-idx
Client-side persistence options
- Cookies.
- Old, good, suppoted by every browser
- Work for smaller pieces of data, ids
- Web storage
- Fne for smaller pieces of data
- Offline caching
- Doesn’t store data, stores pages and resources
- IndexedDB
- Document database, noSQL
- Can persist JSON
- Key/value. Value is an object
- Web SQL – dead-end, not supported
IndexedDB
Even lifecycle:
- Open request
- Pass a database version
- On upgrade needed, if new version is available, Then do DB upgrade.
- Success event
- May raise error
Need to “normalize API”, i.e. translate vendor-specific API names
Close DB before deleting.
Have to have a transaction
Chrome dev tools allow to inspect IndexedDB
Can do cursor
Can create index and search by index
Stable standard, no difference between browsers
Can create keys, keys can autoincrement or GUID
See http://bit.ly/ws-idx for example of indexDB abstraction
Web Storage
Aka DOMStorage, SessionStorage, LocalStorage
Also key/value pair
Storage limit is 5Mb (2.5Mb, because of unicode).
Sandboxed
Data remain on client
no databases, no versioning
sessionStorage vs localStorage – sessionStorage is not persistent
“storage” event, can subscribe
Session: Building Custom Monitoring, fast (using Glimpse)
Speaker: Anthony van der Hoorn, Glimpse
Demo: instrumenting MVC app for Glimpse.
Create a class extending AspNetTab.
Application is not modified by added instrumentation.
No need to format data, glimpse takes care of data representation.
If needs to access session in AspNetTab then need to override ExecuteOn to set OnEndSession
Possible to specify custom layout for tab.
defaultRuntimePolicy=”Off” – will not do anything
Implement IRuntimePolicy to enable Glimpse only for specific cases (like for specific users, user groups)
RuntimePolicy.PersistResults = record only, not display
Implement IResource to create custom data provider