Not a good night. After all my progress my Visual Studio 2012 Project for Accountable has bugged out and I get the following error:
Error 5 The name “LayoutAwarePage” does not exist in the namespace “using:Accountable.Common”. G:\Coding Projects\Visual Studio 2012\SAVED\Accountable\Accountable\BasicPage1.xaml 1 1 Accountable
Weird, as all I have been doing is adding new XAML Views to the project, them bamn, Visual Studio has bugged out. So I furiously last night tried the following:
Had a look on StackOverFlow and found post which didn’t help at all. I then logged my own here ONLY after trying the following triage on my Project:
Deleted the SUO (Hidden) file from the Solutions folder. No luck.
Removed my XAML Files, Classes (Models and ViewModels) and deleted the Common Classes and created a new XAML Basic Page. This causes the Project to reload the Common Classes (including LayoutAwarePage.cs). Rebuilt the Solution, no luck.
As you can see, not very helpful! So I’m now left with no option but to create the Project again, and add it bit-by-bit up from existing code. Hopefully the issue doesnt replicate BUT if it does, I might be able to isolate and provide more detail. For the time being I will keep the SO question open. If anyone else gets this issue, comment here or post on the SO question.
As you know I have had a bit of a nightmare over the last couple of weeks whereby my Accountable MVC4 version has come to a bit of a halt due to PC Upgrades etc. I didn’t want to stop while I was on a roll, so I started a Windows 8 Version, and what can I say, I LOVE C#/XAML! Such a powerful tool set plus having Blend included within Visual Studio 2012, makes UI Design easier. Im loving it so far, so even though I have my MVC4 code back, I have decided to continue. Here are some screenshots of Accountable Windows 8 Version:
Now I’m plugging in the input Views to create/edit transactions at the moment, which using the ViewModels and the powerful model binding facility, should be easily done.
This post is a little late as DDD10 was on the 1st September, but I have been extremely busy #cough# attending Gaga concerts and working late. (Yes I’m a big Gaga fan, what of it! :0) )
For anyone that doesn’t know, “DDD” simply means DeveloperDeveloperDeveloper and are community events which are (at the moment) free to the community and sponsored by various partners. Now just because they are free this definitely does not dilute the content on offer. Before I ramble on about the Sessions on offer, I would like to say what a marvellous job the organisers and speakers of the events do, to make these events so successful. You really do feel the passion from these guys and gals. Humbling to say the least.
This is my 2nd year attending the event (again held at Microsoft). This year i wanted to choose Sessions which are applicable to what im trying to achieve now, instead of what interests me from the title. So as I’m learning ASP.NET and MVC at home at the moment, i decided to focus the majority of my efforts around web technologies (where possible), so i chose the following Sessions:
As you can see a good mix of Sessions. Overall, I had an really good day, enjoying myself immensely and learning some stuff along the way. Big thanks to all everyone involved. So how did i find the sessions……
Keeping JS Sane – The first session of the day was run by an excitable Rob Ashton. The first thing I learnt was “Add Ponies”, which I presume is a reference to Rob’s fascination of “My Little Pony“?Lets set the scene – It is 9.30AM on a Saturday morning, I have been up since 4am and travelled from Durrington-By-Sea to Reading with my laptop bag and overnight bag. I’m tired and ratty but I was looking forward to the day ahead, until I’m bombarded with references to a kiddies toy. I sighed…. alot…. It is a shame, because Rob’s work on line is astounding and in any normal circumstances I’m sure he is a great guy to be around and a good laugh. The problem was the early morning and a ratty Gareth, who didn’t appreciated the finer side to Rob’s hyperactive start.I did learn a few things (considering I’m a JS nOOb that should of been a must), which i will investigate. Specifically using JSLint and Zombie client-side testing framework. I would like to point out though, that I met a (drunk) Rob at the after party and he is a very nice and witty chap and consumed at last count, 3 pizza’s at Pizza Express. Fair play to the chap!
ASP.NET Gone Wrong – So after the first session, i was hoping for more, and i got it. This session was presented by Stuart Leeks and Simon Ince from Microsoft. The presentation was around the 11 rules of MVC where people slip up. It was a well thought out and well presented session, with some solid code samples, and Stuart and Simon really worked well together. I took a lot from this presentation, and i will be thinking over the coming weeks on how i can use them to improve my coding using MVC. The rules are:
Controller Rule 1 – NO Business Logic in your Action Methods!
Controller Rule 2 – A good Action Method should only be approximately 15 lines of code.
Controller Rule 3 – Action Filters are your friend! Do not use a Base Controller to code generic functionality applicable to a Controller (Like Logging).
View Rule 5 – Always use strongly-typed Views. Don’t use the dynamic ViewBag or ViewData. Use ViewModels instead for this.
View Rule 6 – Minimise logic within Views.
View Rule 8 – Don’t use Base Vie. Create one per View. This is for maintainability purposes.
Model Rule 9 – Have a separate ViewModel for each View.
Model Rule 10 – Don’t use base ViewModels. If needed use Child Actions to perform generic functionality.
Model Rule 11 – Dont add any behavioural logic to the ViewModels.
Websocket’s and SignalR – This was another solid session by Chris Alcock, and another I’m glad I attended. It was a tough choice as Gary Short’s Raspberry Pi was on at the same time, and my inner-Nerd really wanted to attend. Chris though did an excellent job describing Websocket’s and its implementation within SignalR. Nice session with the following points of interest:
Websockets Protocol is currently on Version 13.
Browser support is: Firefox 11+, Chrome 16+ and IE10.
SignalR doesn’t just use Websockets, so can fall back to older protocols for browsers which doesn’t support Websockets.
Tip: Never create a SignalR folder in the root of your Visual Studio Project as this will break stuff.
Tip: Breakpoints can Timeout in SignalR Projects when debugging.
Performance and Scalability, The Stack Exchange Way – Another one of my favourite sessions. Marc Garvell presented some really interesting ideas using technologies he help build at Stack Exchange to locate performance issues that could be costly to them. It was a insightful presentation talking about Profiling using Miniprofiler which can be used in MVC projects. Its a single assembly which can be included, and you pepper it around your code-base to use its functionality. It can also be used in a production environment which is a nice feature. Another example was their Micro-ORM, Dapper, as a light-weight alternative to EF and LINQ-2-SQL.
Windows 8 using XAML and C# – I chose this session because i attended Kris Athi DDD9 presentation on WIndows Phone 7 Development and thoroughly enjoyed it. I wasn’t disappointed this time either. A good session on Windows 8 and its feature set like Notifications, Charms and Contracts etc, but nothing i didnt already know. Kris though knows what he is talking about and i was thoroughly impressed again on his talk. This is a good thing, because if he doing future talks, i will probably choose his session based on his skills alone and not the subject matter, so well done Kris!
Developing a Production Immune System – Out of all the sessions before DDD10 started, it was this one which i was looking forward to the most. I think i had a perception that this was going to be talking about creating systems to detect and fix issues automatically (as per the session brief), but it wasn’t. David Walker did warn us at the beginning of the presentation that he had picked a wide topic, and that he did. I didnt get anything from the presentation I’m afraid, which is testament to the fact with minus no notes to do with this talk! Sorry!
The Winner is….
So after 6 sessions, my top presentation goes too… well its a tie between ASP.NET MVC Gone Wrong and Performance and Scalability, The Stack Exchange Way. Both were really good solid presentations which I thoroughly enjoyed.
Overall though the day itself was marvellous and i think well received by all present. I will end by saying again a massive thank you to the organisers, sponsors and of course the speakers. DDD10 is what it is not because its free, but because of the community and the guys who take the time to organize it. Thank you 🙂
P.S. Pizza Express was brilliant as well and I met some lovely chaps as well.