Long time fans of Gallery Server may recall that versions earlier than 2.5 supported SQLite as a database option. At the time it was a great choice because it was a file-based database that was robust, fast, required no extra software on the server, and required no maintenance. The only real downsides were that we had to distribute both a 32-bit and 64-bit version, and it ran only in Full Trust environments (no worky on GoDaddy). When Microsoft released SQL CE 4, we realized it would solve both of these issues, so in 2.5 we dropped SQLite support and moved to SQL CE. Overall it's been a great move - it just "works" and people who use it almost never have to interact with the underlying database. But it came with a price. It is slow. So slow that customers who use SQL Server often see a 20-fold increase in database performance. If you're running [...]
Last week I came across a tough programming challenge that I couldn’t find solved anywhere on the internet. It took several hours to figure it out, so I thought I’d write it up here to help others. Gallery Server Pro uses Entity Framework (EF) Code First Migrations to create the database and tables and seed it with initial configuration data. We had these requirements it had to handle: Automatically create the database, objects and initial data the first time the application starts or any time it is missing. If the database exists but doesn't yet have any gallery-related tables, create them and seed them with data. If an earlier version of the gallery data schema is present, automatically upgrade it to the current version. It must support upgrades from any previous version of Gallery Server Pro going back to 3.0.0. These requirements must be simultaneously met without requiring changes to [...]
Today I was building a web application with an embedded gallery when I hit a snag that wasted an hour of my time. The fix turned out to be simple so I decided to write it up to save you the same grief. The issue only affects developers adding a gallery to an existing website using Visual Studio. To make deployment easier, I had grabbed the compiled version of GSP and added all the files in the gs directory to a gs directory in my web application. When I compiled the project, I was met with this error: “Project file must include the .NET Framework assembly 'PresentationCore, PresentationFramework' in the reference list.” I dutifully added project references to PresentationCore.dll and PresentationFramework.dll and tried again. This time I got 84 errors, all of which had one of these two messages: “The tag 'Canvas' does not exist in XML namespace 'http://schemas.microsoft.com/client/2007'.” “Each [...]
Today I released the Gallery Server Pro API Documentation, freshly updated for 3.0. This is primarily a resource for developers who want to better understand the namespaces and classes used in Gallery Server Pro. Previous versions were released as a chm file, but this time I decided to post it as a set of web files. This makes it easy for anyone to reference and doesn’t require a download.
Galleries using SQL CE benefited from significant performance improvements in 2.6.0. Retrieval of data was up to 15 times faster than in 2.5. However, many users noticed that synchronize operations still were slower than both SQL Server and the now obsolete SQLite data provider (replaced by SQL CE in 2.5). This week I focused on analyzing the source of the difference with an aim to improve it. I am pleased to say that I succeeded in achieving about a 50% speed improvement with only a minimal change. I will soon be releasing 2.6.1, which contains this benefit as well as several bug fixes. Before I dig into the details, I want to mention that the upcoming .NET 4.5 runtime is expected to bring additional performance benefits to SQL CE users. The ADO.NET Team just announced some details that show a real world app running 67% faster under .NET 4.5 than [...]
After a frustrated user posted his troubles getting GSP to work in a .NET 4.0 application, I thought I would dig into it to see what was going on. I have step by step directions for Visual Studio 2008 in the Admin Guide, but it turns out they don’t quite work for Visual Studio 2010. I also felt I could improve upon the explanation that is in the Admin Guide, so I decided to completely rewrite it in this blog post. Eventually I will update the Admin Guide to include this information. I will create a default .NET 4.0 web application and then add a gallery to it. These steps are largely the same for Visual Studio 2005 and 2008, too. Download the sample application I created for this post. A couple notes: (1) Log in to the gallery with username Admin (password=111). (2) For demonstration purposes, it includes the [...]
ACTION ALERT: See the end of this post for a request to vote on a Visual Studio bug that is affecting Gallery Server Pro development. I need your help! UPDATE 2010-5-5: Microsoft has confirmed they can reproduce the issue and is investigating it. Keep voting to keep the pressure on! Visual Studio 2010 just came out, so I installed it, opened up the Gallery Server Pro solution, and took a peak around. The first thing I noticed is that all my ascx and aspx pages had squiggly marks all over the place: When I hover over the @Control directive in the first line, I see this message: "ASP.NET runtime error: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format." That is a tell-tale sign that Visual Studio is trying to load the 64-bit version of [...]
Internet Explorer 8 was released last Thursday, so I installed it and crossed my fingers as I fired up Gallery Server Pro. What would it look like? There has been a lot of talk about how IE8 defaults to a standards-compatible mode that breaks a lot of existing web sites. But I was hopeful since I built GSP to be XHTML 1.0 Strict compliant, which should provide maximum forward compatibility. And that proved to be true. All of the HTML I wrote worked perfectly in IE8. Woo HOO! This proves the power of web standards and why it is important to develop against the standards instead of against one or two specific browsers. I am also pleased that Microsoft defaults to standards mode - that should make future upgrades go smoothly. I wish the story ended here. Did you notice the qualification in what I wrote: "All of the HTML [...]