HTML5, IE9/10, MVC, Mobile Apps, Tips & Tricks, and Entity Framework
So it’s always a bit crazy when a new version of a development tool gets released…even in beta form. It seemed like every session I attended on Day 2 involved VS 11 Beta. I was extremely disappointed and discouraged that I wouldn’t be able to learn what I came to learn if the rest of the week turned out the same.
Don’t get me wrong…very cool to see the new stuff coming out, but I came to VS Live to learn about VS 2010. I know 2010 has been out a while, but I only just recently obtained a copy and have started working in it. I never had a chance to use 2008. So I was very excited to get the chance to come to a conference about VS 2010 and learn some of the cool things I could now do.
I missed the Keynote at 8am which was on VS11…which was partly the reason for the frenzy on VS11 this day.
Sessions Attended:
- HTML5 and Internet Explorer: A Developer Overview (Ben Hoelting)
- Advanced ASP.NET MVC, HTML5, and the .NET Stack (Ben Hoelting)
- Chalk Talk: Visual Studio for Mobile Apps on iOS, Android and WP7 (Miguel de Icaza)
- Visual Studio 2010 and 11 Tips & Tricks (Amy Hartwig)
- Entity Framework Code First – Beyond the Basics (Sergey Barskiy)
HTML5 and Internet Explorer: A Developer Overview
In this session, Ben did a great job explaining the power of IE9/10 and HTML5, the features of today, and what the future will bring. He showed us some of the benchmarks for IE and took us on a test drive. Best session of the day!
We can use meta elements to pin sites to the task bar and provide users with notifications. With Windows 7 integration, we can add jump lists that will allow us to go directly to areas of our website. HTML5 gives us new tags, rich media & graphics support, CSS3, and better performance. Use modernizers to make HTML5 work on non-HTML5 compliant browsers.
The website http://caniuse.com/ has compatibility tables for support of HTML5, CSS3, SVG and more in desktop and mobile browsers.
A few of the cool features we now have available to us:
- Semantic elements like section, nav, article, aside, and hgroup
- Canvas – block element to draw 2d graphics in JS
- SVG (Scalar Vector Graphics) – 2d vector graphics in XML
- Video tag – this is not streaming video…user has to download entire video to play
- Audio tag – able to turn off play buttons
- Rounded corners – can achieve rounded corners by using the border-radius property
- 2d & 3d transforms (3d in IE10) -ms-transform: scale(2,2) rotate(30deg) [Chrome ignores –ms]
Windows 8 brings us the touch language. Today’s web was not designed with the finger in mind…but it’s coming soon. With touch, we will no longer have hover. We will need to ensure ample room around elements for fingers (average 11mm).
Related Sites:
- http://www.beautyoftheweb.com/Experience#/top
- http://waybackmachine.org
- http://ietestdrive.com
- http://www.benhblog.com
Advanced ASP.NET MVC, HTML5, and the .NET Stack
I stayed with Ben for his next session because I really wanted to see more on HTML5 and the description of the class sounded interesting. However, the session didn’t really match the description but was still a good session. I was hoping to see some coding, but his discussion was more high level and the use of add-ons, templates, and the Kendo UI framework.
He talked about the HTML5 Boiler Plate with MVC4…a template for HTML/JS/CSS and showed us some of the code which is in minified jQuery where all the whitespace is removed for good performance.
Not much discussion on MVC except to say that there are a lot of tutorials on the web – just look for them.
He touched briefly on Razor, Web Optimization Bundler, and Authorization Service. The Web Optimization Bundler will bundle all the content, CSS, and JS calls at once but only optimizes jQuery JS files.
Kendo UI and Knockout.js is what he came to talk about. Knockout.js is a JS library for using the MVVM pattern and can be a replacement for ASP.NET MVC. Some key features are databinding (including automatic UI updating), templating, and dependency tracking. The Kendo UI is a new set of HTML/JS based UI controls that provides templating and databinding, and has advantages over jQuery UI.
Expression Blend Super Preview allows us to view our sites in two browsers at once, and supports IE6-9 and Firefox. VS11 has an option to run in multiple browsers.
Related Sites:
- http://html5boilerplate.com/
- http://jqueryuivskendoui.com/
- http://knockoutjs.com
- http://www.kendoui.com
- http://expression.microsoft.com/en-us/dd565874
- http://www.asp.net/mvc
Chalk Talk: Visual Studio for Mobile Apps on iOS, Android and WP7
Sales pitch for Xamarin products…but I expected a sales pitch from a chalk talk session even though the description sounded otherwise.
Mono is an open source implementation of the .NET platform, and was created to bring Windows applications to Linux.
iOS – Apple disallows JIT compile. Mono has batch compile that Apple requires. To develop on iOS…must have MAC.
Android – Mono available for Windows and Mac (MonoDevelop) and uses JIT. Can open code and code in VS, but cannot run the app in VS…have to go back to MonoDevelop to run the app and test.
Related Sites:
- http://ios.xamarin.com/Documentation/Binding_New_Objective-C_Types
- http://code.google.com/p/btouch-library/
- https://github.com/xamarin/jar2xml
- http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981
- http://visualstudiogallery.msdn.microsoft.com/5e730577-d11c-4f2e-8e2b-cbb87f76c044
- http://code.google.com/p/monocross/wiki/MonoCross
- http://xamarin.com/apps
Visual Studio 2010 and 11 Tips & Tricks
Unfortunately, I didn’t stick around long in this session. This was pretty much all about VS11 and the changes in shortcuts between 2010 and 11. If anyone reading this did sit through this session, please leave a comment on any tips & tricks for VS2010 that she did speak about. She did hand out a flyer with VS11 shortcut keys…I plan on trying them in 2010 just see what happens!
Best tip I have…Resharper.
Entity Framework Code First – Beyond the Basics
All I can say for this session is that I was in over my head…no clue what he was talking about. I think I needed a basics class first since I have never used the Entity Framework. But here are my notes for those it may help.
Sorry I don’t have much context around my notes. I just jotted stuff down that sounded interesting so that when I do get into using Entity Framework I have some points to look up.
- Data cached in app domain after first use. Host in IIS – setting custom recycle schedule. Also, we can write a service to pose as first user.
- ctx.Entry(person).State = EntityStatus.Modified
- Don’t use the update function using Person.find(id) because it’s slower.
- Disable tracking People.AsNoTracking()
- Properties – no work to be done
- Methods – work will be done
- DBEntityEntry
- Complex type – wrapper for group of properties and not mapped to a table
- Explicit mapping – has column name
- One to one relationships must be explicitly configured
- WithRequired – property is required
- HasOptional – allows NULL
- Cascade delete bypasses SQL structures for logging the deletes
- DB Parameter / SQL Parameter
- Type Inference
- Generic Repository
- If write 0 records, get concurrency exception IsConcurrencyToken
- Migrations – enable using powershell
Related Sites:
- www.DotNetSpeak.com
- http://efcodefirstextras.codeplex.com/
- https://nuget.org/packages/EntityFramework.Extras
Looking back…this day taught me to look at provided documentation for sessions prior to deciding which sessions to attend.
Day 3 was a great day – will post notes soon…
Thanks for stopping by. Please leave a reply.