SCRUDI Interfaces
Programming best practices suggests that we should always program to an interface and never an implementation. And since I am trying to develop a SCRUDI framework, all the more reason not to be tied to any specific implementation. The reality of data access layers is that while a lot of data access objects will support all of CRUD, sometimes some data is read-only (e.g. only selectable, queriable, or retrievable), and only sometimes the data wil also be updatable (e.g. you can add, update and delete data). For this reason alone, it seems to me that we might want to break a SCRUDI framework down into a set of interfaces for data access objects:
- Queriable Interface: used to select or get data.
- Updatable Interface: used to add, update or remove data.
- Searchable Interface: used to search for data.
- Informable Interface: used to inform clients about the data.
CRUD
When programming n-tier style applications, the objects in one’s data access layer inevitably do the same kinds of things: select data, insert data, update data and delete data. This set of behaviours is known as CRUD: Create, Retrieve, Update, Delete. If you think about it, most data access layers could be characterized as implementing a CRUD interface, or a subset of this interface (for example, some data access layer objects may only retrieve data). I like how this concept has been generalized in Logical Data Services - The "SCRUDI" Design Pattern. In this article, Richard Manning extends the concept of CRUD to include two other common data services, namely, search and information (where you can think of information as meta data about the data being CRUD’ed - things like interfaces, formats, documentation, etc.). In this way CRUD becomes SCRUDI. I think it would be neat to implement this concept in an actual framework, so I am working on something in .NET.
Windows Live Writer
I just downloaded Windows Live Writer based on a lot of reviews I was reading on the net. I have become tired of actually editing posts directly in Wordpress which inevitably leads to some fine tuning of the underlying html. The immediacy of editing content is far nicer in a desktop application versus a web based editor. So far this seems like a pretty cool blogging platform, and the user experience is first rate so far. Kudos to Microsoft. I am in the act of installing a plugin for making links to photos on Flickr easier (photos, videos, etc. can be embedded easily enough from Microsoft Live services and by url right out of the box).
Webinar Best Practices
I have attended and given quite a few web seminars over the last few years. Usually these things are organized something like this:
- Emails with a link to a web conferencing service are sent to prospectives attendees, as well as a toll free call-in number.
- People dial into the number for the audio, and log into the web conferencing site, where the presenter will typically share a set of slides.
I am quite sure that the proper way to do a webinar has been covered elsewhere by presentation gurus, but I have a few pieces of advice to give from my own experience:
- When you send out the url for the web portion of the seminar, do not assume everyone’s email supports html. What this means practically speaking, is the link to the meeting should be as short as possible. I could not tell you how many times the url provided is so long, it spans multiple lines requiring invitees to literally cut and paste each line into Notepad to rebuild a contiguous url and paste that back into their browser’s address bar. What inevitably happens is people just click on the (partial) url and of course cannot connect. Chaos ensues.
- Test the web conferencing service and call in number ahead of time. If they provide an acceptable level of service, learn the features of both so that attendees and presenters have access to the right features. You have to read the entire manual for each service before doing the call.
Call a C# Assembly from VB6
I have had to figure this out twice now, so I will write it down this time: how to call and debug a c# assembly from VB6 in a development environment. The first thing you have to do is set up your c# assembly so that it is exposed as a COM object. This is more or less covered here, and I am sure elsewhere, but by way of an example, let’s create a .NET assembly that reverses strings (For this purpose, we will use some techniques outlined by Mladen Prajdić at his I want some Moore blog).
I will create a String.Utilities project with a single public Reverser class. This class is implemented as follows:
Code is interop ready, now we just need to set up some project settings. First, we have to update (or add) the ComVisible setting in the c# project’s AssemblyInfo.cs file (this is the thing I always forget to do):
Next, open the project’s properties and click on the Build tab. Ensure the Register for COM interop option is selected:
In order to be able to debug this while running the VB6 client from the development environment, you want to go to the Debug tab and select the Start external program option specifying the path to the VB6.exe.
Now we can build the assembly. When we debug, as specified in the debug options, VB6 will start. You can then open an existing project (or create a new one) that you want to use as a client for the .NET service. Click on the (VB6’s) project references and select the .NET assembly (which is now exposed as a COM object):
Here is my VB6 client code for calling the .NET assembly:
Running the VB6 client and clicking the button gives the following:
Of course, within the VB6 environment you can fully debug the client (set breakpoints, add watches, etc.). Now, run the VB6 project again, but this time set a breakpoint at public string Reverse(string str) in the Reverser class in VS2005. When you click the button, you will break at the Reverse method in the .NET debugging environment:
Therefore we can call an assembly from a VB6 application and debug both sets of code at the same time. A couple things: (1) the assembly is only registered as a COM object for the lifetime of the debugging session initiated from VS2005. So you cannot open VB6 and debug on its own without building and registering the assembly as a COM object (you use the regasm utility). (2) there is a better way than using ClassInterfaceType.AutoDual to expose the class in COM which I will cover another day.
How I Got An Error Using iJot Within 5 Seconds
iJot is a web application for taking notes, and seems to be getting some traction with its outlining capabilities. So I went over to the site to check it out. The very first thing I did was click on Bookmarks in the menu on the left side (where the red circle is below):

And I got this:

Nice. I guess they really mean it when they say “alpha”. Seriously, I suppose it is a kind of neat application, but I don’t really see myself using it.
Comments(0)



