31 August 2010

How to reference an EPiServer page?

When I started out developing on EPiServer, I was frustrated by the bewildering number of ways to reference and access pages, and at times none of these seemed quite right for the task at hand.
I was using an EPiServer PageList control to display a navigation aid to child pages of the current page, but I needed one of the child pages to trigger some special formatting. I ended up checking the PageID to detect when to trigger the special formatting, but I was never particularly happy with that solution. I stored the PageID of the "special page" in the web.config file, but it still left me feeling like I'd missed a better way to do this.

This blog post by Emil Åström has excellent coverage of this topic, presenting the pro's and con's of each approach quite nicely. The last two methods are my favourites, and I will be using those techniques from now on.

Ted Nyberg has also put up an simple example of how to access an EPiServer page's friendly URL.

25 August 2010

Can I develop on EPiServer with Visual Web Developer Express?

I was asked today whether it is possible for EPiServer developer's to develop on EPiServer using the free Visual Web Developer Express Edition. The answer is yes - you can use the free developer tools from Microsoft to develop templates and plugins for EPiServer without paying a cent.
Visual Studio 2010 is expensive to buy at around USD1000, so this is good news, especially to the freelance developer.
The catch is that you will not have access to the EPiServer plugin that you would have in Visual Studio since Visual Web Developer Express does not have support for Visual Studio plugins/extensions. Thats going to make development a little tricky until you get more familiar with the EPiServer SDK, because you won't have the ability to simply create a new blank EPiServer Page Template. You're going to have to create an EPiServer Page Template from scratch.

Fortunately there's an easier way to get started. Just open an existing EPiServer project from Visual Studio - the Public Templates from the EPiServer SDK are ideal. If you don't have access to an existing project, contact me and I'll help you out.
Basic instructions: Download the Microsoft Web Platform Installer. Run the 'WebPI' and install Visual Web Developer Express 2010. You will need to install SQL Server Express if you to not have it, or you do not have access to a SQL Server instance. Then install the EPiServer CMS 6 SDK.
Grab your existing VS2008 or VS2010 EPiServer project, the EPiServer Public Template, and open it in Visual Web Developer. Use that as your basis for creating your own EPiServer development project.
Happy developing!

18 August 2010

.NET Roasts Java's Beans

Infotech reported a couple of years back that .NET adoption amongst enterprise customers has taken off at the expense of Java's market share.
I think if we are honest, most in the .NET and Java communities have known this for some time.
Oh, and then there's the fact that Oracle (which owns Java thanks to the Sun acquisition) is suing Google over patent infringement for including a Java VM with its Android operating system. Not a nice way to treat the Java community, and a sure fire way to turn big companies in particular, away from Java.
Preston Gralla sees Microsoft as the big winner in this contest, and I have to agree.
The trouble is its not all good news for .NET to see Java take a slide like this. My reasoning is simple: Microsoft need Java - they need the competition in order to make them innovate. And since .NET came out, Microsoft have been moving at light speed, averaging a major new release of the .NET framework every two years, and more recently packing the framework full of goodies like WPF, WCF, Silverlight, Entity Framework, ASP.NET MVC, Linq, new languages (F#, Iron Python), and not to mention regular new versions of Visual Studio, and now Blend.
I just hope the gradual demise of Java does not completely put the brakes on all the good, and mostly free stuff, that Microsoft is doing right now for developers.
In any case, an investment in .NET based technology (such as EPiServer) is still the safest technology bet by a long shot. .NET is here to stay, and is the dominant technology in the enterprise. Developer's love the technology, and a huge and supportive community exists around .NET in a way that has never existed for any previous Microsoft technology. There's a lot of good will in this community, a lot of sharing of ideas, and a strong, growing open source movement (check out Codeplex).

17 August 2010

Translating EPiServer Pages

Language Wire provides a translation service with a bit of a twist. They have a developer API that allows developers to hook any system into Language Wire's human translators. You could call it a 'machine to man' interface I suppose.
It works like this. Lets say you are publishing a new web page in your EPiServer site. You have the content in English, but you need it in German and French as well. With Language Wire's API, your EPiServer editor interface can include a 'Translate' tab to allow you to send the page to Language Wire, and request translation into the language(s) of your choice. After translation, the pages are returned directly into your EPiServer editor interface, where they can be published as pages.
This is not some 'Google Translate' equivalent, but a translation service delivered by real live translators, so you get results that are good enough to publish on your website.

04 August 2010

Make PDF's from Office 2003 and 2007

One thing that has bothered me (for the last 13 years or so!) about using MS Office as a publication tool is the absence of any support for creating PDF documents. Given that PDF is the de facto standard for publishing documents to the web, would it not be unreasonable to ask for built-in PDF publishing support from the world's most used office productivity suite (MS Office)?
Microsoft have made available a free "Save as PDF" add-on for Office 2007 which allows Office 2007 users to save documents as PDF. Why it is an add-on and not part of the core product I have no idea.
But for those of us running earlier versions of Office (I run 2003), we are still not getting any love from Microsoft when it comes to PDF publication. Fortunately there is Bullzip's Free PDF Printer, which does a reasonably good job of creating PDF's from almost any Windows application that can print (it installs itself as a 'printer' on your system). I tried it today with great results on Word 2003 and Excel 2003.