Monday, April 13, 2009

Can you suggest a content management solution for my ASP .NET site?

A lot of choices out there - one 3rd party content management system we've used is N2CMS (http://n2cms.com/).

In particular we liked that:
  • it works natively with ASP .NET for quick integration with existing .NET pages
  • it uses ASP .NET user controls, allowing upgrade of existing controls on existing .NET pages
  • templates are based on the ASP .NET concept of master pages, allowing ASP .NET developers can ramp up quickly on the requirements of using the 3rd party.
  • free LGPL license
One possible disadvantage is capacity - I don't know if the solution could handle a very large amount of content (e.g. thousands of pages). It depends on the size of your web project.

If you've had experience with a good content management solution, by all means please add on to this thread.

Monday, April 6, 2009

How do you ensure an application is compatible with future web browsers?

For this one, we'll defer to 3 expert panelists from Macadamian: Aaron Olson, Gord P, and Jason Mawdsley.

Aaron: The best thing to do here is to be compatible with current browsers using as few browser-specific hacks as possible (ideally none).

Gord: Choose an explicit set of browser+minimum-version before any other compatibility scope is defined.
Be prepared to accept "reduced functionality" for IE6 users. If you don't do this, you will compromise the structure and maintainability of your templates

Also, isolate hacks in separate browser-specific CSS / JavaScript files.

Do not agree to full W3C compliance, but strive for it.

Jason: Sort of yes to what Gord said. IE6 is still a significant share of web hits. I am not sure what the percentage is now.

IE6 support WILL be painful, and will cause a lot of work and testing.

Design to W3C standards, and have QC validate all UI changes with Firefox plugins and fail any non-compliant changes.

Aaron: One final note about W3C compliance - be sure not to use any deprecated features of HTML. Certain tags and attributes have been replaced with better, modern equivalents, usually involving CSS.

There is what looks like a decent list here.

During development, use the strictly-compliant DTD - this can save you from having to go back and fix non-compliant sections later.

Gord's right - strive for compliance but don't insist on it.

Tuesday, March 31, 2009

How much time should I plan to upgrade to SQL Server 2005 from SQL Server 2000?

It depends. The upgrade should be pretty straightforward, but there are a few gotchas, especially with regard to functionality that Microsoft has dropped starting in SQL Server 2005. Do some searches through your existing code for any of the following:

System Tables
System tables such as "systables", "sysindexes", "syscolumns", etc. are no longer available in SQL Server 2005, and need to be replaced by catalog view equivalents (see here)

Deprecated Functionality
Various system functions and stored procedures have been deprecated in SQL Server 2005. While some of the deprecated functionality may still work, an effort must be made to port whatever deprecated functionality is found to the new recommended equivalents for SQL Server 2005.

Use as a reference the following lists of deprecated functionality and recommended replacements:
http://msdn.microsoft.com/en-us/library/ms143729.aspx
http://msdn.microsoft.com/en-us/library/ms144262.aspx

Legacy Data Access Technologies
Microsoft no longer supports many of the older data-access technologies allowed in SQL Server 2000, notably:
  • DB-Library
  • Extended SQL (E-SQL)
  • Data Access Objects (DAO)
  • Remote Data Objects (RDO)
These may not work with SQL Server 2005, and would need to be replaced with an equivalent supported technology (e.g. ADO .NET).

Depending on how many instances of these you find throughout your code, you should buffer your project time accordingly.

Wednesday, March 25, 2009

How can I keep an offline and online application in sync using .NET?

Microsoft provides a great framework to keep things synchronized called Microsoft Sync Framework.

"Microsoft Sync Framework is a comprehensive synchronization platform that enables collaboration and offline access for applications, services and devices. It features technologies and tools that enable roaming, sharing, and taking data offline. Using Microsoft Sync Framework, developers can build sync ecosystems that integrate any application, with any data from any store using any protocol over any network. "

The framework comes ready to use in many cases with sync providers for
  1. Sync Services for ADO.NET - Synchronization for ADO.NET enabled data sources
  2. Sync Services for File Systems - Synchronization for files and folders
  3. Sync Services for FeedSync - Synchronization for RSS and ATOM feeds
The beauty of MS Sync Framework is that it is completely agnostic of the communication protocol, business domain, or even data. You just tell it when to sync, and what to sync and it will tell you if anything needs to be synchronized. The framework will even synchronize the data for you, though you can provide custom conflict resolution rules.

Thursday, March 19, 2009

What localization framework should we use on a WPF project?

Microsoft recommends using a tool called LocBaml to localize the strings in your WPF application. We spent a lot of time trying to get LocBaml to work, and ended up dropping it, particularly because
  • Documentation for the tool from Microsoft is sparse. You have to rely on blog posts and articles like this
  • The tool appears to be a beta from Microsoft, and there are a number of known bugs. I haven't seen any indication of when they'll be fixed.
  • Using tool is a 10+ step process, and this process needs to be repeated frequently to update the localization. It involves command line operations, generating .csv files, etc. all of which is reported to be error-prone
A project developed in 2008 (under MS public license) called Extension: WPF Localization got a lot of favorable reviews on the web, so we decided to try that instead. It is simply 4 .cs files which provides a localization framework and dynamic language switching at run-time, among other benefits. The documentation and examples are also quite good. Until we hear updates on LocBaml, this is a framework we'll definitely re-use in future projects.

Tuesday, March 17, 2009

What tools can I use to test and ensure quality in C# code?

First, you need to define your priorities in terms of code quality, and specific metrics your code needs to meet. Do you want to detect and prevent code duplication? Code complexity? Or simply ensure a coding standard is followed?

Once you have your objectives and metrics planned, you could use these tools (which I've used on a past project):
Finally, it's important to plan time upfront in the project to tweak these tools so that they output just enough information that will be useful to the development team. FxCop for example can be quite verbose by default, and making sense of its output can be a challenge. The point is to provide an automated support to your team that they fits their needs - the extra days you invest to get the tools working just right will pay off in the long run.

Friday, March 13, 2009

We're developing an ASP .NET application and want to include a "support forums" feature. Any suggestions?

Lots. In fact, Wikipedia maintains a comparative list of internet forum solutions for ASP .NET here. One to consider is FuseTalk:
  • Feature rich forum software, including
    • flat or threaded views
    • user-selectable themes
    • image attachment capability
    • calendar
    • WYSIWYG editor

  • Ability to convert topics/threads into a knowledge base item, progressively building a knowledge base
  • Simple integration, particularly for single sign-on
  • Localized for translation in any language
  • Written in ASP .NET so that your development team doesn't need to know another programming language to support it
  • "Basic" license reasonably priced ($700)
To host the fusetalk solution however, your application will need to also host a MS SQL server.