Friday, January 27, 2006
Tuesday, January 24, 2006
"555" and IP addresses
We all know that all American movies have phone numbers that start with "555". I noticed that whenever it is being talked about IP addresses in series and movies something like "355." or "295." is being said. Hmmm... As far as I know the biggest possible address is "255.255.255.255". I really cannot believe that the writers of these shows overlooked this detail. I know about newer IP addressing versions, but these are not used on the internet yet as far as I know...
So I am thinking: Are movies and series using IP addresses that are in a range outside real IP addresses for the very same reasons that movie phone numbers start with "555"?
Just something to think about for the day. I am eager to hear your comments.
Saturday, January 14, 2006
Command Line Switch Helps Testing Packages
BDS has the command-line switch -r which lets you define a registry key that is used instead of "BDS\4.0\" by the IDE.
So basically, if you start the BDS using: bds.exe -rTESTING you end up with an IDE that looks just like a newly installed version. No custom packages, no custom components are loaded that have not been installed with the Borland Installer. Basically, if you e.g. installed IntraWeb that comes with Delphi 2006, that package will be loaded, because it is part of your default install.
However, this environment is ideal if you want to check out packages that you are uncertain about and you can still keep your working environment undisturbed.
If you develop for multiple customers you can build yourself two shortcuts on your desktop. One shortcut executes bds.exe -rCUST_A the other one calls bds.exe -rCUST_B. So you have a customized IDE for your customers.
Also take note of the fact that there is also the -p command-line switch. That will only load a certain personality and can be combined with -r.
BDS 2006 is fast, but using these command-line switches will make it even more handy and snappy.
Monday, January 02, 2006
ECO: Using Building Blocks
Let me at first tell you how I built the Category class to make it easy inserting it into other applications. It is not difficult to use ECO classes from multiple packages in one ECO Space. The difficult thing to do is to refer to classes during design-time. In this example I will build an application that assigns categories to a product. That means I have to create an association from a class named "Product" to the already modeled "Category" class.
Step 1: Create a new ECO Package DLL. I used the C# personality for that. That is just my personal taste, of course. I can handle namespaces easier in C# that is the reason why I generate C# code for my models.
For that, go to "File / New...", select "Other..."...

... click on the correct personality and double-click the "ECO Package DLL" item.

Step 2: Name your model library appropriatly, remember to use namespaces. From my own experience, you get name conflicts if you do not create proper namespaces.


That's it. This will make sure that you can use the business logic you define in the library in any other ECO application, even during design-time.
So, how do we actually include a model in another application during design-time? Well, I tried to find it in the help of D2006 and I actually could find zero on that topic. So, I will be very verbose and will try to give you as much information as I can.
First, create a new ECO application, of course, it could also be another library that is based on the other library. But we'll create a Delphi .NET Winforms Application in this example.






After re-opening your project, open "Package_1" and add a class named "Product".
Right-click on the modeling workspace and choose "Add / Shortcut...". This will make it possible for you to add the class "Category" to the model.




that the Product has a property called "Category". Even more surprising, it is of type "Category", just as we wanted it to be.
Isn't ECO just great? You just have to love it a little bit more because of this...