WIA06-IS The Orchard Project – An interactive discussion on delivering.NET-based open source applications and components – Bradley Millington
This could be one of the most unknown release sessions of all of TechEd. In fact, the code for Orchard was released to Code Plex yesterday, so today is the first time Bradley Millington from the team is speaking publicly about it. Although he didn’t want to make a big deal of it. It is, after all, a project in its very early stages.
Orchard is an open source project with a Microsoft team of seven people. It is a platform for content management and more. You can easily compare it to WordPress, and think of it as a “WordPress killer”, but those are my words and nothing that Bradley referred to at all. However, it is pretty easy to see the similarities with WordPress although far far far from the feature set (as of today).
There are of course open source content management systems for the .NET platform, but I find this very interesting since it is coming from Microsoft and therefore has potential for being important. I felt this was the most interesting project of all the projects presented in one form or the other (commercial or otherwise) at this year’s TechEd. Lets hope it will live a long and happy life.
Some notes from Bradleys talk:
- Project will accept contributions “soon”.
- Step one is a cms, and it’s likely to be the successor to Oxite.
- Currently the team is working on: CMS Pages, Drafts, Publishing, Media Management, Users, Roles and LiveWriter compatibility.
- Working in 3-week iteration cycles, at the tail of 2nd iteration now.
- Please comment on specifications on Code Plex.
- For now, focusing on admin and not so much the front end.
- Using MVC 2 Preview 2, uses “area” feature.
- A web page consist of zones with content.
- Other content types than web pages will be introduced.
- Question raised about how zones will work with LiveWriter.
- Looking at using Lucene for search.
- Extension model within 6 months.
- Send feedback to ofeedbk@microsoft.com.
- Public mailing list is coming.
- Uses NHibernate for ORM, and Sqlite is the default database (MSSQL supported).
- Uses TinyMCE as the html editor. Not much customization yet.
- Used MEF (Managed Extensibility Framework) in prototyping but didn’t like it. Has built a custom lightweight IOC container. MEF was too explicit in demanding import and export attributes. Not as convention based as wanted.
- Question about multi-tenant, and the team is looking at that also.
- Question about how close this could be to SharePoint – far away but certainly valid question.
- Used to run on Mono, but a new dependency [according to attendee] made it fail. Will probably be resurrected on Mono.
Final verdict: this session was great!
DEV306 F# for Parallel and Asynchronous Programming – Don Syme
Another fast and beatifully performed demo of F# by Don Syme. Not that much discussion about the F# language (all correct according to the session description), but I think he stilled managed to give everyone a short introduction to F# in the more general sense also. Some code snippets was very briefly looked at and although I didn’t understand everything he went through, I liked the pace and the content.
A few notes:
- Don Syme was involved in the generics work on the .NET platform.
- F# keywords are: simplicity, economics, parallel.
- Comparing F# to C#: C# has more noise than signal.
- .NET 4 has introduced tuples [which was used in the demo].
- “I sometimes think of F# as a strongly typed Python”
- Whitespace matters in F#.
- (1,2,3) |> show is equivalent to show(1,2,3) [approx]
- let! (pronounced let-bang) for asynchronous assignments.
Final verdict: this session was good.
DEV01-DEMO Microsoft Visual Studio Team System 2010 Team Foundation Server: Become Productive in 30 Minutes – Brian Randell
In under 30 minutes Brial Randell manages to install Team Foundation Server on a client operations system such as Windows 7. Brian is very entertaining in his presentation and makes a good case for using TFS on your laptop or otherwise “disconnected” (from central server) development machine.
No specific notes from this session.
Final verdict: this session was good.
DEV204 Unit Testing Best Practices – Roy Osherove
Unfortunately Roys guitar was broken so we didn’t get to hear him sing one of his songs. On attendee left after this breaking news story – no, just kidding. Roy is very competent and highly knowledgeable in his field, which is unit testing (and more, I’m sure!). He calmly and thoughtfully presents his views and tips when doing unit testing in your projects. Nothing earth shattering here (either), but still very good advice to think about in your daily development life.
- All your tests must be: trustworthy, maintainable and readable.
- “TDD works because it starts with a failed test”
- “Unit tests are small use cases for your code”
- Do test reviews, not just code reviews.
- Beware: don’t mix unit testing with integration testing.
- Use separate folders in your projects for unit and integration tests.
- Roy uses TestDriven.NET.
- Good code coverage is usually 95-100% but coverage in itself is not enough, the goal must be to have good tests.
- Roy is using Resharper in the demos.
- Test check: change if conditions to constant true (or false), some tests should fail!
- Avoid test logic (if, for etc). Tests should only be a bunch of calls – no logic. An if statements in a test method probably means you should have two test methods in stead.
- Don’t repeat production logic in your tests.
- Use hard-coded values in tests (not DateTime.Now).
- Don’t remove old tests. Add in stead of change, if possible.
- “Range tests are not unit tests”
- Don’t run a test from another test.
- Avoid multiple asserts in a single test. Unless testing the same concept.
- No magic numbers in your arguments, use constants in stead where the name clearly indicates why that number is used in the test.
- Naming your test methods: What is under test? What is the scenario? What is the result?
- Naming sample: Add_LessThanZero_ThrowsException.
- Use simplest values when testing. If any integer will do the test, don’t use “123″, but rather “0″ or “1″.
- Roy performs test reviews on his blog – for further reading.
Final verdict: this session was good.
WIA404 Data Driven Microsoft ASP.NET Web Forms Applications Deep Dive – Jeff King
Jeff King delivers yet another solid walk through of new features in ASP.NET web forms for .NET 4.0. Quite a few things has happened. Better JavaScript integration, usage of ADO.NET data services and more. The templating story has improved. You can now template field types and/or individual fields.
Some classes and/or methods that Jeff showed (look them up to learn more):
- EnablePersistedSelection
- SortedAscendingCellStyle
- EnableDynamicData(typeof(xyz))
- Look at field templates (int, string etc) placed in ascx-files.
- MetaDataType, ScaffoldColumn, Display, DataType, Range (for validation)
- MetaModel
- ContentTypeName
- DynamicDataManager, DynamicField, DynamicEntity
- Page templates – for the entire application
- Routing, url routing module (as in MVC), dynamic route.
- QueryBlockExtender, QueryExtender, SearchExpression, ControlParameter
- DomainDataSouce control after .NET 4.0.
Final verdict: this session was good.