Scalable Programs: Making and Using “Plug-ins” for Your VB Apps

This page is aging out but.  Archived here for further processing

everal years and employers ago, I worked for a school of information technology in Australia. At one point, administrators, frustrated by a confusing and distributed collection of tools for testing and grading, decided they needed a single program that could manage lists of students and subjects, generate tests, grade submissions, and upload results to the central university system?without being constrained in any way by the actual software being assessed in the exams themselves.

By creating an ActiveX/DLL library, with test generators and markers for each product merged together, I was able to rework the system in just that way. A main program was constructed to perform all the necessary housekeeping functions and to search for the DLLs. Menus were dynamically constructed based on the DLLs present. All the logic to make and mark tests for specific products were bundled into these DLLs.

To support a new product became a matter of simply generating a new DLL and dropping it into a disk directory on each computer that was using the system. The main program needed no recompilation or reworking whatsoever.

There are countless ways that you can apply this kind of extensibility. In this article, I’ll show you how to make your own expandable system using ActiveX/DLLs as plug-ins?in this case, a menu to manage a library of games.

Accompanying this article is the code for two VB6 projects implementing computer games?one being the familiar and popular Reversi game, and the other a version of the classic Breakout.

Each of these projects is completely stand-alone, and both compile to a single .exe file.

Through this example, you’ll learn the steps needed to convert your stand-alone programs into plug-in DLLs, and to write a generic program that detects these at run-time.

 

The Steps to Modularity
To convert these two disparate programs into plug-in modules, consider precisely what the requirements are, then modify the original programs to conform to a consistent implementation of these requirements.

Say you had a generic program that could launch games?with no pre-determined knowledge of those games. What sort of information would it need to retrieve from the games? What sort of commands would it need to issue to the games?

There’s no need to rework the games themselves in any way. There will be nothing different between the plug-in versions of the games and their stand-alone equivalents.

In this case, it seems self-evident that you’d want a method to play a game. You’ll also want properties to return the name of the game and its version.

Assign names to these, as follows:

  • playGame: method to invoke the game, displaying its user interface
  • getName: property returning the name of the game
  • getVersion: property returning the version of the game

Figure 4: Create a new ActiveX DLL project – figure lost to time but not indispensible

………more

Carrot Ginger and Coriander Soup

Serves: 4  From here

Difficulty: Easy

Cook Time: 30 mins


Ingredients

  •  Splash Oil
  • 2 Shallots, sliced
  • 3 garlic cloves
  • 1/4 inch piece ginger, sliced
  • 4 carrots, peeled and sliced
  • 1L stock, chicken or veg, 1 cube
  • 1 small bunch of coriander, stem and leaves sliced
  • 1/2 and 1 green chilli
  • 100ml olive oil
  • 50g roasted cashews, chopped

Method

  1.     Heat a large saucepan on medium heat, and add oil with shallot, 2 garlic cloves and ginger. Fry for 2 mins and then add the carrot add fry until they turn bright orange.
  2.  Add the stock and bring to the boil, then turn down to a simmer. Cook until the carrots are soft. Transfer to a blend and blitz until smooth.
  3.   Finish off with coriander stem sliced thinly and salt to taste.
  4.  Make the pesto by crushing 1 garlic clove, green chilli until a smooth paste, add the coriander in 2 handfuls and crush with a little oil. Finish with more oil to emulsify and cashews
  5. Serve the soup with a spoon of coriander & cashew pesto. I hope you enjoyed this recipe. I would love to see photos of your results and any feedback. Ping me an email or DM me on socials. Philli xxx

Beef Soup

Beef Soup

  • 1 turnip
  • 1 package of carrots
  • 1/2  of 5 lbs bag of potatoes
  • 5 cloves garlic
  • 5 bay leaves
  • 1/2 package of celery
  • water up to a little above the solid ingredients
  • 1/2 sodium + 1/2 potassium salt to suit – potassium salt flavors soups better
  • Beef hind shank

Put in a 5 ish quart pressure cooker and cook for 15 minutes after up to full reactor vessel pressure

Italian Sausage Soup

Italian Sausage Soup

  • 1 turnip
  • 1 package of carrots
  • 1/2  of 5 lbs bag of potatoes
  • 5 cloves garlic
  • 5 bay leaves
  • 1/2 package of celery
  • water up to a little above the solid ingredients
  • 1/2 sodium + 1/2 potassium salt to suit – potassium salt flavors soups better
  • 1 package of Italian sausage

Put in a 5 ish quart pressure cooker and cook for 15 minutes after up to full reactor vessel pressure.  Then EAT. Yums.  Made a variant that uses German smoked sausage.  That is good!

Tahini Ginger Salad Dressing

TAHINI – GINGER SALAD DRESSING    

  • 1/2 c. olive oil
  • 1/2 c. tahini
  • 1/2 c. water
  • 2 tbsp. red wine vinegar
  • 1/4 c. tamari
  • 2 tbsp. lemon juice
  • 2 tsp. ground ginger
  • 1 garlic clove, squeezed
  • Black pepper

Blend all these ingredients well. Variations can be made by omitting the ginger and adding more lemon juice to make Tahini-Lemon Dressing or 2 teaspoons crushed mint leaves for Tahini-Mint Dressing. Makes 2 cups.

Originally from here: Tahini Ginger salad dressing