Monday, July 24, 2006

This is an excerpt from my talk at CodeCamp 2.0 on 7/22.

Adding the Visual Editor

The Visual Editor is in fact a plug-in. And one you’re going to want if you plan to develop a win form.

I understand with Eclipse 3.2, Callisto makes installation simpler. But with 3.1.2, this is what I did. I chose Help à Software Updates à Find and Install.

1.    Select the Search for New features to install. Click Next

2.    Click on the New Remote Site … button and add http://update.eclipse..org/tools/ve/updates/1.0. Name it VE.

3.    Click on the New Remote Site … button and add http://update.eclipse.org/tools/emf/updates. Name it EMF.

4.    Click on the New Remote Site … button and add http://update.eclipse.org/updates/3.0 . Name it Old Eclipse.

5.    Select VE, EMF, and Old Eclipse. Click Finish.

 

 

 

 

How do you know the Visual Editor is installed? Open Eclipse, type Ctrl+N and look under the Java node to see Visual Class.

 

SWT, Swing, AWT

I’m going to show a little example using the Visual editor with SWT.  I don’t have much experience with these GUI libraries. From what I’ve read, I like SWT best, but I understand that Swing has strong adherents. I’d rather respect the differences than argue them.

SWT is the Standard Widget Toolkit. It’s the foundation for the Eclipse user interface from IBM. Originally IBM used Smalltalk internally, but it had deployment and configuration problems.

Sun wanted a portable widget API and wrote AWT, the Abstract Windowing Toolkit. Many considered it overly complex. Sun abandoned AWT in favor of JFC, the Java Foundation Classes, also known as Swing.

AWT suffered from a “lowest common denominator (LCD)” approach. To remain faithful to “write once, run anywhere” AWT offered only features supported by all the native windowing operating systems.

Swing solved the LCD problem by using no native code and no native widgets. Swing has “pluggable look and feels.” By default Swing adopts the native platform’s look and feel.

Some people maintain that Swing has not lived up to its promise. Reasons are speed (actually lack thereof) and look and feel. Swing devotees bristle at these statements. Swing performance has greatly improved (especially with JDK 1.4), but I read that it continues to be somewhat more sluggish than native applications. (I don’t really know; I haven’t done any performance studies.) About the look and feel … well, you can plug in whatever you want, but Swing may always be a step behind the latest GUIs because support for the GUI must be written explicitly into the Java library.

OTI (Object Technology International, who created widget interfaces for OTI Smalltalk and is now part of IBM) set out to create another GUI library and correct the faults of AWT and Swing. This was SWT. It uses native functionality when available, Java implementation when not.

Installing SWT

SWT is distributed as an archive file; I downloaded swt-3.1.2-gtk-linux-x86.zip. Then, open Eclipse and select File à Import … à Existing Projects Into Workspace.

 

 

 

The result is that org.eclipse.swt appears in the Package Explorer.

Writing a Simple Win Form with VE and SWT

Open Eclipse. Select File à New à Project … à Java Project. Click Next. Type in a Project Name and click Next, then Finish.

 

 

In the Package Explorer, under the Project Name, select src, right-click. Select New à Other à Visual Class. Type in a package name and a class name.

 

The class appears in the Visual Editor.

 

Drop down the Bean toolbar. Choose SWT Controls à Button. Release the mouse, then click on the win form. A button appears. Resize it. Then, select the button and right-click. Choose Set Text and type in the text you want to be displayed on the button. Using this same technique, make a textbox.

Then select the button and right-click. Select Events à Add Events … Choose “implements: …” and select Finish.

 

Then, add code in the button handler to write the textbox.

 

Now select the containing package in the Package Explorer and right-click. Choose Run As … à SWT application.

 

 

7/24/2006 9:31:52 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, June 12, 2006

I downloaded Eclipse 3.1.2 and for the last few days have been trying to become familiar with it. I'd like to say becoming proficient, but that's a while yet in the future. I had put it aside for a few days because I was busy studying for and taking a Microsoft Certification Test (70-320, XML Web Services, .Net Remoting, etc.) This is an old test, not part of their new program, but I had been reading about these topics for a while and thought I should get it out of the way. It was a hard test, I thought, probably hard for me because my knowledge of these topics comes mostly from books and not experience. I know it's silly, but I put the certificate I got on my wall; it took a bunch of effort, and I'm proud of it, so don't laugh.

I decided to run Eclipse under Linux (The Ubuntu Breezy edition) because I thought the spirit of Eclipse was more open-source Linux than proprietary Windows. However, the main book I'm looking at assumes you're running Windows. Alas. It's a good book, though eclipse Building Commercial-Quality Plug-ins by Eric Clayberg and Dan Rubel. The book is the second edition and also describes Eclipse 3.2. Now the latest download I got from www.eclipse.org was 3.1.2, and I'm sticking with that. The site discusses a release candidate (RC4), but what I'm doing right now is pretty simple, and I'll stay with 3.1.2 for now. Yes, I will upgrade, but I'm not ready to yet. The same is true with Linux. The new release Dapper Drake just came out, but I'm still running Breezy.

I'm scheduled to give a talk about Eclipse and plug-ins at  Portland Code Camp v2.0. This looks like a fun event, and it's free! I went to v1.0 last year. Check it out at http://pdx.techevents.info/codecamp/2/Default.aspx  .  So this is my reason for not upgrading right now. I have some stuff to prepare and don't want to risk getting my computers stuck in an upgrade. But upgrading is good, and I will do it, probably some time in August.

What I wanted to do was first give an introduction to Eclipse, intended for people who haven't used Eclipse before. You know, you've installed it and now what do all those menus mean and how can you set up a development environment and write a simple project. Then, I wanted to write a simple plug-in and show how to add it to the Eclipse environment.

Yesterday, I spent a bunch of time with CVS. Now I know this isn't the latest and hottest version control system, but my interest was not it using the latest and hottest but to understand how Eclipse integrates with version control. CVS is tried and true, and so my focus could then be on the integration of Eclipse with version control and not on the version control itself.

I discovered that my Ubuntu system didn't have CVS. Strange, I thought. In the old days, you installed Linux and it had everything, more than you wanted, more than you'd ever use. Today you get a stripped-down version (Breezy didn't even come with gcc) and then add what you need as you need it. Better, I think; you end up with a cleaner system, but it requires more effort.

Anyway, with Ubuntu, get eclipse through the Synaptic Packet Manager. Click Apply and it downloads and installs. I thought it curious that the installation asked me to load my original Ubuntu CD, but I save those things, so it was OK.

I've used CVS before, or course, but it's been a while. I dug up an old (but still good) book called Open Source development with CVS by Karl Fogel. I think it's like the CVS classic. (There's a newer edition, and he has a co-author.) I also found directions on the CVS wiki, http://ximbiot.com/cvs/wiki/index.php?title=Main_Page

Here's a short description of what it takes to get CVS working under Ubuntu. The first thing you got to do is make a repository. Remember that the repository is for CVS, not you; it's not a subdirectory of your working directory.  I looked at the directions in Fogel's book and choose to make the repository at /usr/local/cvsroot. I also looked at the Ubuntu forum, and apparently this is not the standard location. But the location doesn't really matter; it just has to be something. I became root and issued the command

cvs -d /usr/local/cvsroot init

Here's the result of that command. Note that a directory called CVSROOT is created under /usr/local/cvsroot, and there are a bunch of CVS files put there. One should leave them alone.

 

About permissions. CVS needs write access to the repository. Fogel recommends (and I did this) that you make a group of CVS users and then assign that group to the repository's group ownership and permissions.

Ubuntu has a nice GUI for making groups.

 

What I found, though, was that I was not a member of that group (checked with the groups command) until I logged off and then on again. I'm sure there's a way of forcing membership without logging off/on, and I fiddled for a while without success.

Also, it's more convenient to set an environment variable called CVSROOT to the repository's location, and the best place (I think) to make that definition is in .bashrc if you're using the bash shell.

Note that I also set an environment variable CVS_RSH, but that's another story. It turns out that this is critical for getting Eclipse to talk with CVS using the method I chose, but that's another story.

The next step was to get a little code project and see if I could check it in and out of CVS successfully. You know, eventually I want to do this with a Java project loaded into Eclipse, but for now, I just wrote a C project under my home directory. I wanted this project to be a little more than “hello world,” though. This meant putting together a toy application that would pull utilities from one directory and have a main program in another.

Now I know there are fancier ways of building applications these days, and I want to look at some of those when I get into Eclipse. But for this test, I relied on that old standard, make. I needed a recursive make and honestly thought I could remember how to do that, but my first attempt failed. I had to find a  book that I discovered years ago, Managing Projects with make by Andrew Oram and Steve Talbott (yes, I still had it).

To add the project to CVS, first delete all executables and and object files and import the project.

 

Here's what results.

 

The key thing to mention here is that although the project is imported, the remaining source files are not a CVS working copy. For example, if you try

cvs log ted001.c

CVS won't know about ted001.c in spite of the fact that it's a member of an imported project. You got to check out the files. Before doing this, I deleted all the source in the sample_project directory under my home. Yes, I was paranoiac enough to make a backup. Then, I checked out the files with (be sure to cd to the parent directory of sample_project before checking out).

cvs checkout sample_project

Then,

cvs log ted001.c

shows two entries: the initial import and the initial revision. I made a trivial change to ted001.c, then tried cvs log ted001.c again and saw the change displayed on my screen. So it appears to be working.

The next task is to get Eclipse talking to CVS. I'm almost there. Getting Eclipse to recognize the repository was not as trivial as the books make it out to be. I'll describe what I did next time.

6/12/2006 10:29:43 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Friday, June 02, 2006

Running Eclipse: Windows or Linux?

Well, I chose Linux, the Ubuntu Breezy edition. There's a Windows version, but I think Eclipse is better suited to the Linux environment, but I admit that's a personal opinion. In fact, I'm writing this with Open Office running under Ubuntu.

Installing Eclipse

There's an Eclipse that comes with Ubuntu. Well, I think you actually use gnome-apt-install. It's an icon on the top menu bar. I don't remember whether it's there by default or I put it there. You got to be root to run it. I was not happy with this Eclipse. It appeared to be missing source code, and one of the points of having Eclipse is to look at the source code, not to modify it, but to understand what's going on. I'm going to be interested in adding plugins, and books tell me I should look at source code when I do that.

I downloaded eclipse-SDK-3.1.2-linux-gtk.tar.gz from www.eclipse.org, placed in my directory /home/ted/Eclipse_downloads, unzipped with gunzip, then untarred with tar vxf. There isn't really any configuration. Untarring releases a bunch of files from the tarball, one of which is an executable called eclipse.

Where's the best place to install Eclipse? I don't know.

I run that executable without arguments. I'll add args later, but for now this is it.

Now there's a question of what java I'm using. Inside Eclipse. I can look at Windows-Preferences... and then on the right panel open up java and select Installed JREs. I chose the Sun JDK, which I donwloaded from Sun a while back. I'm not sure what the other JVMs are. One came with Ubuntu, and it doesn't work well with Eclipse. If I use the original java, I can make java programs OK but cannot stop at a breakpoint. I talked with Bill at Padnug about this, and he says this is a known problem, but it's not clear whether it is a java or an eclipse issue. Let's see if I understood this correctly. The JVM signifies when it reaches a breakpoint and some JVMs do it differently than others. Eclipse does not recognize all the variations.

One of my books (I got a bunch on Eclipse that I read all at once; this one is eclipse Distilled by David Carlson) says that “you might have several version of java installed on your computer and you should use the -vm option to specify the one you want to use.” Well, I don't. But the Eclipse IDE itself is telling me what java I'm using.

 

Notice the line on top of the console window. It says /usr/lib/j2sdk1.5-sun/bin/java, the Sun version I installed.

Also, my command window shows java goes there.

ted@halibut:~$ which java

/usr/bin/java

ted@halibut:~$ ls -l /usr/bin/java

lrwxrwxrwx  1 root root 22 2005-12-26 15:32 /usr/bin/java -> /etc/alternatives/java

ted@halibut:~$ ls -l /etc/alternatives/java

lrwxrwxrwx  1 root root 30 2005-12-29 13:46 /etc/alternatives/java -> /usr/lib/j2sdk1.5-sun/bin/java

 

The same links work for javac.

Looking at the Eclipse Source Code

So this is how I did it. I'm reading Contributing to eclipse by Erich Gamma and Kent Beck. This is an excellent book, written by two famous programmers, but it is somewhat out-of-date. Its examples come from an older version of Eclipse, and the screens show windows that we don't have any more.

So this is what I did. Choose File – Import ... Then, select External Plug-ins and Fragments and click Next. Choose to import as Binary projects, which makes the projects read-only. You can still look at the source for binary projects, and you want to look at that source when you add a plug-in of your own. But you don't want to modify any of that source. Click Next again and select Add All ...

The in the Package Explorer, you see a lot of projects. You can use the dropdown menu in the Package Explorer to filter out these plugins and see only your own projects if you want to. But if you leave then there and navigate to a class in one of the plugins, this is what you see. Yes, you can cruise the source code, which is just what I want to do.

 

This is org.eclipse.debug.core. Then open up org.eclispe.debug.core_3.1.2.jar. Then under org.eclipse.debug.core, double-click DebugPlugin.class. The book says to use Navigate – Open Type and put in *, but I haven't had luck with that. The resulting window always shows OK as disabled.

 

6/2/2006 1:13:44 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, May 29, 2006

Well, I’ve been using realvnc (www.realvnc.com), and I think it’s neat. Now granted, I’ve only used it on my local network, which is a workgroup and not a domain; but I like it much more than the Remote Desktop that comes with Windows XP.

The reason I like it better than Remote Desktop is because I can share a desktop among more than one computer. I run Windows XP Pro SP2, and I’ve found that when I connect to another computer with Remote Desktop, my local computer logs off.

What I want is to share a program with multiple computers. You know, I’m running an app and I want three or four friends to also see that app. In fact I want more than that … I want those three or four friends to be able to take control of my app – click a checkbox or click a button. I can do this with realvnc.

We have used gotomeeting (www.gotomeeting.com) for this. Gotomeeting is a great program and works fine over the Internet. And I haven’t tried realvnc over the Internet. I think the cost of gotomeeting is reasonable. It’s about $50/month, but realvnc has a free version.

There are for-pay versions of realvnc. On their website you can compare features. The personal edition does encryption and file transfer along with some other features that I don’t understand like “one-port HTTP & VNC” and “Desktop Scaling.” The cost is reasonable (about $30 for each server site). I have not tried running the viewer on a site that does not have the server.

Gotomeeting has a messaging capability that realvnc lacks (or I haven’t found it.) This is not a big loss for me. We like to use Skype (www.skype.com) for voice communication anyway. BTW, Skype works really well over broadband and over the free wireless I can pick up in various coffee shops, but it worked terribly with PeoplePC. I had dialup PeoplePC for a while and was not impressed with its performance and got somewhat irritated with its silly user interface.

When I first started using realvnc, I was not able to share a desktop with several computers. When another viewer connected to my VNC server, the computer with the previous view lost its connection. Easily fixed, though, you got to configure the VNC viewer to have a shared connection. To do this open the viewer and click on Options before you connect to the VNC server. Then, under the Misc tab, choose “Shared connection…”

 

Here’s a screenshot of one of my computers running the viewer and connection to another of my computers running the server.

 

Now admittedly I have not tried this over the Internet yet. I don’t know what kind of problems firewalls and NAT routers will give me, but so far I really like realvnc.

Anyone else using it?

5/29/2006 3:04:17 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Friday, May 05, 2006

All the different .NET Remoting varieties have similar but not identical configuration files. And there are a lot of optional elements I am not showing. My description here is by no means complete. (For a full description of remoting configuration files, see the MSDN article Format for .NET Remoting Configuration Files – a good article, but could use more examples.)

What I’m trying to do is clear up some of the simple stuff for myself. So if someone sees an error here, I really would appreciate knowing.

Remote objects can be CAOs or SAOs and when they are SAOs, they can be singleton (stateful and all clients share state) or single-call (stateless). CAOs are stateful , and each client has its own state.

SAO (server side)

On the server, the config file looks like …

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <system.runtime.remoting>

    <application>

     <lifetime>

     </lifetime>

      <service>

       <wellknown mode = "Singleton"

        type = "StepByStep3_1.DbConnect, StepByStep3_1"

        objectUri="DbConnect" />

      </service>

      <channels>

       <channel ref="tcp" port="1234" />

      </channels>

      </application>

   </system.runtime.remoting>

</configuration>

 

Well, that you have a <service></service> element tells me that this is a config file on a server. <wellknown … /> tells me that it is an SAO; the mode attribute makes it a singleton.

This file chooses a tcp channel, but it could just as easily been an http channel.

Often for examples, I just create a console application as a simple server to host the remotable class. I could instead run the server process as a Win service or use IIS as an activation agent for the server process.

If you wanted to use IIS as an activation agent, the channel would have to be http.  Also, the objectUri value would have a .rem extension. My server would be a web app and the configuration would be in web.config. I would not specify a port number because IIS automatically uses port 80. I wouldn’t have a <channels></channels> element either. My web.config would look like …

<configuration>  

 <system.runtime.remoting>

  <application>

   <service>

    <wellknown mode="Singleton"

     type="StepByStep3_10.DbConnect, StepByStep3_10"

     objectUri="DbConnect.rem" />

   </service>

  </application>

 </system.runtime.remoting> 

<!-- other web.config stuff -->

</configuration>

 

SAO (client side)

On the client side, the config file (for the app that uses the remote object) looks like …

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 <system.runtime.remoting>

  <application>

   <client>

    <wellknown

     type = "StepByStep3_1.DbConnect, StepByStep3_1"

     url="tcp://localhost:1234/DbConnect" />

   </client>

  </application>

 </system.runtime.remoting>

</configuration>

 

That you have a <client></client> element tells me that this is a config file on a client. <wellknown … /> tells me that it is an SAO; there is no mode attribute because the client does not care about the mode.

Note that the value of the url attribute ends with the objectUri of the server-side config file. It also specifies the name of the computer that hosts the remote object and the port it uses. This example uses a tcp channel, but it could just as easily have been an http channel.

However, if you’re using IIS as an activation agent, the channel would have to be http. The url attribute value would end in .rem. And I would not specify a port number.

CAO (server side)

On the server, the config file looks like …

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

  <system.runtime.remoting>

    <application>

      <service>

       <activated

        type = "StepByStep3_1.DbConnect, StepByStep3_1"

       />

      </service>

      <channels>

       <channel ref="http" port="1234" />

      </channels>

      </application>

   </system.runtime.remoting>

</configuration>

 

That you have a <service></service> element tells me that this is a config file on a server. <activated … /> tells me that it is an CAO; there is no mode attribute because the client does not care about the mode.

CAO (client side)

On the client side, the config file looks like …

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

 <system.runtime.remoting>

  <application>

   <client url="http://localhost:1234">

    <activated type="StepByStep3_1.DbConnect,StepByStep3_1" />

   </client>

  </application>

 </system.runtime.remoting>

</configuration>

 

That you have a <client></client> element tells me that this is a config file on a client. <activated … /> tells me that it is an CAO; there is no mode attribute because the client does not care about the mode.

IIS does not support CAO.

 

5/5/2006 10:16:00 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [5]  |  Trackback
 Sunday, April 30, 2006

Installation

You know I thought this problem went away with the beta, but it apparently is still there. I had installed Visual Studio 2005 Professional, used it for a while and then tried to install SQL Server 2005 Development Edition. I never get to see the Management Studio. It seems that my computer always wants to use SQL Express.

I can see the Management Studio if I install SQL Server 2005 Development Edition without previously installing Visual Studio 2005 Professional. I haven’t yet tried installing Visual Studio 2005 Professional after installing SQL Server 2005 Development Edition to see if they work together.

Here’s the version of Visual Studio 2005 Professional that I have.

 

Microsoft Visual Studio 2005

Version 8.0.50727.42  (RTM.050727-4200)

Microsoft .NET Framework

Version 2.0.50727

 

Installed Edition: Professional

 

Accessing Data with SQL Express

I have been using Visual Studio 2005 for a while now, but just recently tried accessing a database with SQL Server Express. I had a rude awakening. I couldn’t use the method I had become familiar with. I finally got this to work, but I didn’t find the documentation trail easy. No one ever talks about this; everyone must have figured it out a long time ago, I guess.

Here’s what I tried to do that did not work. I got error messages like cannot login to the database or something cryptic about named pipes. I didn’t pursue the details of the error message. I mean I might have to later, but experience has told me that it is more efficient to figure out how to do something than to analyze why the method you tried did not work. Sometimes it’s frustrating to do that, but the pursuit of knowledge can get in the way of getting the job done. My academic friends are now shaking their heads and wagging their fingers.

I should mention that I can access the data in the database just fine with Server Explorer

Anyway, here’s what I tried to do (that did not work)…

SqlConnection cnn = new SqlConnection();

cnn.ConnectionString = "Data Source=beachparty;" +

   "Initial Catalog=Northwind;" +

   "Integrated Security=SSPI";

SqlCommand cmd  = cnn.CreateCommand();

cmd.CommandType = CommandType.Text;

cmd.CommandText = "SELECT CompanyName FROM Customers " +

    "ORDER BY CompanyName";

cnn.Open();

 

Here’s what I did instead that worked…Is there a better way? I’m sure there is. If you know of one, please don’t keep it a secret!

I chose Data-Add New Data Source… from the Visual Studio menu, I chose Database and clicked Next.

 

Look at that connection string. Not what I expected. Click Next again.

 

I click Next and get asked what I want in my Dataset. I don’t really want a Dataset, so I choose nothing and click finish. The result is that I get a NORTHWNDDataSet.xsd, which I then delete. But what I gained that I wanted was an app.config file, which has the appropriate connection string.

<?xml version="1.0" encoding="utf-8" ?>

<configuration>

    <configSections>

    </configSections>

    <connectionStrings>

        <add name="StepByStep7_7.Properties.Settings.NORTHWNDConnectionString"

            connectionString="Data Source=.\SQLEXPRESS;

               AttachDbFilename=&quot;C:\SQL Server 2000 Sample Databases\NORTHWND.MDF&quot;;

               Integrated Security=True;Connect Timeout=30;User Instance=True"

               providerName="System.Data.SqlClient" />

    </connectionStrings>

 

The point now is how to take advantage of that new connection string stored in the app.config. I noticed that under my project (called AppA) in the Solution Explorer, I see a section called Properties. I can expand that and see a file called Settings.Designer.cs.

 

This file resides in the namespace AppA.Properties, so I put a using AppA.Properties at the top of my winform. I also notice that the file has a property called NORTHWNDConnectionString.

public string NORTHWNDConnectionString {

   get {

      return ((string)(this["NORTHWNDConnectionString"]));

   }

}

 So I replace the connection string assignment

cnn.ConnectionString = "Data Source=beachparty;" +

   "Initial Catalog=Northwind;" +

   "Integrated Security=SSPI";

 

with

Settings mySettings = new Settings();

cnn.ConnectionString = mySettings.NORTHWNDConnectionString;

 

Hmmm… now things are working. All the code above is in the event handler for the button labeled Get Customers.  Click on the button and fill the listbox.

SqlDataReader dr = cmd.ExecuteReader();

while (dr.Read())

{

    lbCustomers.Items.Add(dr.GetString(0));

}

 

4/30/2006 7:46:15 PM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, April 29, 2006

Agatha is dying. She had two seizures yesterday..the second went on for 15 minutes. She shook and cried and it was heartbreaking. Then we called several vets. Our Hillsboro vet was unhelpful and too far away. Our Seaside vet had an emergency number that went to an answering machine. We called a vet hospital in Astoria and drove her there. We poured cold water on her to keeep her fever down, and she seizured the whole way. She’s there now, getting Valium intravenously. We visited her this afternoon. She looks bad, still twitching and scared. We’ll visit her this morning and ask that she be put to sleep.

She’s the best friend I ever had. I wish so very much that she could go more easily, but I think she suffered these last couple of days. We wanted to give her a chance to live a little longer. Because she had suffered. We had hoped she could have come home and be with us for a few days more. So that we could show her how much we loved her.

Agatha is my dog. We’ve had her for about 15 years, and she’s about 16. We found her back then abandoned in the park across the street.

4/29/2006 1:26:03 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, April 28, 2006

Again an old book … for old people I guess … anyway I’ve read it and still look at it. It’s the Developing XML Web Services and Server Components from Microsoft’s self-paced training kit.

Once again looking at the chapter on serviced components, I came across something I missed last time around. You know, I find this serviced component stuff and all .NET and COM interoperability confusing. I suspect it’s because I came to .NET without first going through COM as most people have.

I think of a serviced component as a .NET component that derives from SystemEnterpriseServices and that can use COM+ services; and that’s why you use them – to use the COM+ services.

Then, the book mentions dynamic registration (the CLR registers the assembly in the COM+ Catalog) and constrasts this with the command line utility regsvs.exe. And then comes this kicker: “On the other hand for COM clients you should register the serviced components manually by using the command line utility, regsvs.exe.” For COM clients? Why would a COM client ever want to use a serviced component? COM clients can get at COM+ services much more directly it seems to me.

I talk to some people about this, but apparently serviced components are not in the path most people around here travel on.

4/28/2006 10:13:22 AM (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback