Archive for November, 2006
Welcome to TechEd Europe
Microsoft Extends OSP to Office XML
At Connections in Las Vegas
Writing A Notes C-API Program in Visual Studio Express, Part 3 (Sunday, Nov 5)
Following up on my earlier blog entries about writing a Lotus Notes C-API program in Visual Studio Express (Part 1 and Part 2), here's another thing you might want to do that isn't really obvious.
You know how when you view the properties of most commercial EXE and DLL files, and you see properties like the program description and the version number and so on? For example:
In the full versions of Visual Studio, there is something called the Resource Editor that makes it very easy to create all those properties for your EXE or DLL. However, in the free Visual Studio Express offering that's one of the components they took out.
Luckily, you can still create a resource file and include it with your project, you just have to do it manually. Here's how:
- Open up your favorite text editor and create a resource file (see example below), and save it with an .RC file extension -- you'll probably want to save it in the same directory as the other files in your project
- In your VS-Express project, select the menu option Project - Add Existing Item...
- Change the file type to "Resource Files" and choose the resource file you created
Badda bing, badda boom, you've got yourself a resource file. The next time you compile up your project, it'll have some of those fancy-schmancy properties lists that everyone wants these days.
The exact format and information that you put into a resource file is a little cryptic (which is why there is such thing as a Resource File editor in the first place), but you can usually start with an example and modify it to work for you. Here's the resource file I used for my SoapLog DLL:
//////////////////////////////////////////////////////////
// resource file for soaplog.dll
//////////////////////////////////////////////////////////
#include "soaplog.h"
/*
soaplog.h contains definitions like:
#define RC_FILEVERSION 1,0,3,0
#define RC_FILEVERSION_STRING "1, 0, 3, 0 "
*/
1 VERSIONINFO
FILEVERSION RC_FILEVERSION
PRODUCTVERSION RC_FILEVERSION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L // 0x1L = EXE, 0x2L = DLL
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
//////////////////////////////////////////////////////////
// The BLOCK number here consists of a 4-digit language
// value (0409 = US English) and a 4-digit codepage
// number, in hex (04e4 = 1252).
//////////////////////////////////////////////////////////
BLOCK "040904e4"
BEGIN
VALUE "CompanyName", "http://www.nsftools.com"
VALUE "LegalCopyright", "(c) 2006 Julian Robichaux. All rights reserved."
VALUE "FileDescription", "Domino DSAPI SOAP logging filter"
VALUE "FileVersion", RC_FILEVERSION_STRING
VALUE "InternalName", "soaplog"
VALUE "OriginalFilename", "soaplog.dll"
VALUE "ProductName", "soaplog"
VALUE "ProductVersion", RC_FILEVERSION_STRING
END
END
//////////////////////////////////////////////////////////
// for valid language and charset values below, see:
// http://msdn.microsoft.com/library/en-us/tools/tools/versioninfo_resource.asp
// NOTE that the language value below (409, US English)
// MUST match the StringFileInfo BLOCK number above, and
// the 04e4 suffix on the BLOCK number is a hex version of
// the 1252 codepage that is also defined below.
//////////////////////////////////////////////////////////
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
One thing that is useful to do is to maintain the file version and product version information in a header file (as I did above with RC_FILEVERSION and RC_FILEVERSIONSTRING), because that's something that may change often. Since you can't edit a resource file in VS-Express but you can edit all the header files you want, keeping this information in a header file is a lot easier than having to remember to open the resource file in a separate text editor every time you update the version of your file.
I suppose you could go whole hog and maintain all the String values in a header file, if you really felt like it.
[ permalink ] [ e-mail me ] [ read/add comments ]
PHP as a Deployment Platform
PHP has been incredibly successful as a deployment platform for web applications. The WordPress blog brags that the WordPress 2.0 series has been downloaded 1.2 million times.
However, PHP as a platform is far from homogenous. With many different versions installed and the vast configurability of php.ini, there can be a great deal of variation from PHP installation to PHP installation. PHP developers often ask what should I target? The question is the same if you want to write the next WordPress, or if you want to make sure your code is reusable for the next client that knocks on your door.
Nexen has been publishing PHP version adoption statistics for some time. Damien Seguy has really gone the extra step now by collecting and publishing configuration statistics. These are generated from scanning publicly available phpinfo() output.
The stats range from useful to blog candy.
One thing to keep in mind is sample bias. Damien compared the php version number of the sample against the version data collected from expose php and found they correlate well. But, perhaps there is a bias toward certain configuration settings (or versions) among those who have public phpinfo() data and those who do not. (The stats do have suitable disclaimers.)
Its hard to look at stats like this and decide what they represent. According to the Zend blog, 81% of their customers are using PHP 5, while the nexen monthly numbers report 11%. I think its fair to say that all of Zend's customers use PHP, while many servers that expose_php are domain parking or serving static pages. What is the adoption rate for php 5? Who knows.
It would be interesting to see the correlation between those installations with expose_php off and the monthly version data, collected from the broader set of servers with expose_php on. I think it would also be interesting to see what functions are being disabled with disable_functions. Which extensions are being loaded? How many servers are running an opcode cache?
Which version of PHP to use? PHP 5 versus PHP 4? Unless you are constrained by legacy PHP 4, the answer is definitely PHP 5. Targeting PHP 4 isn't going to make you the next WordPress. Its just going to put you as far behind the version adoption curve as they are.
PHP 5 is vastly easier to develop in than PHP 4. Development is expensive. Hosting is cheap. Don't let the tail wag your dog. If your host doesn't support 5, change hosts. PHP 5 hosting is not rocket science.
I know the decision is that not simple, but the excuses for remaining with PHP 4 are dwindling.
Which configuration options to target? There was some talk recently on the PHP internals list about creating a recommended .ini profile for development environments and one for production environments. I think this is a great idea. Hopefully, then folks installing PHP can choose a profile instead of setting individual .ini options. Perhaps this would help reign in some variability and reduce some Paradox of choice style unhappiness.
Proposal for multi-format ebook authoring tool; Vex open source XML
Tips/Tricks and LINQ Slides+Demos from my Talk in Dallas
Re: Transitioning from older (e.g. FrameMaker) environments
Dynamic languages in ASP.NET
Meet the team in Vegas next week
Calendar Display vs. Free Time Search
I previously explained calendar view beginning and end times here, but I'll quickly explain them setting again. ? In your mail file's calendar preferences
you can configure the time range that you want to see displayed representing your work hours. ?The background of times outside this range are shaded grey, helping you distinguish the different areas.
Since the times you "work" during the day may differ from the times you wish to allow people to schedule you for meetings, Lotus Notes allows you to control this separately.
In your mail file's preferences, under Calendar & To Do > Scheduling > Your Availability, you can define the days, and hours during those your are available.
For example, above I defined my work day as 9 AM to 5 PM, but below you can see that I define my available hours to exclude Noon to 1 PM.
When someone tries to schedule a meeting with me, the scheduler will show anytime before 9AM, 12 PM to 1 PM, and any time after 5 PM as "Unavailable".
Sharing a web “bussiness” tier as web service ?
I need some information on how to best expose the model layer of a struts web application to other clients (typically other web
Generating xml xchema
Can anyone tell me if there is any tool that'll generate an xml schema from a xml file(similar to something like xsd.exe in .net)? I have
Coding4Fun v2 (redesigned) is now live
Bunko (Yeah, right…) (Thursday, Nov 2)
My wife went to play Bunko with a bunch of the neighborhood women tonight. Apparently there's a monthly game, and she thought it would be a good way to meet the neighbors.
I asked her what Bunko was, since I've never actually seen it played before. She didn't know because she's never played before either, but she's always heard it's fun.
Then I talked to one of my friends tonight, and he said that his wife likes to go play Bunko too, and he also had no idea what it is. Which leads me to one of two conclusions:
A. It's a drinking game.
B. It's the female equivalent of a snipe hunt where the women just hang out all night, unless there's a new member, in which case they go through some sort of Bunko initiation routine before letting on that it's just an excuse to get out of the house and drink wine and do girly stuff.
I'm going to grill her when she gets home to find out which one it is...
;-)
(NOTE: before you consider leaving a witty comment, please make sure it's not going to be something that will be insulting about my wife. We don't want to go there. Thanks.)
[ permalink ] [ e-mail me ] [ read/add comments ]
Usage xsd:any types with Axis 1.x
I have a technical question about usage xsd:any type.
For example in my wsdl I have such complex type:
<
Re: Transitioning from older (e.g. FrameMaker) environments
Best approach for transforming xml tag elements
I hope you guys can help me with a solution to the problem. I tried with google but could not get any similar solution to the problem I





