Archive for the ‘Software’ Category
Developing a Complex External DSL. Part 2.
Design and Development
Designing and developing any complex language is a big challenge. Even if you have a good idea of what you want out of a language, working out the details of a complex language can bend your mind. It seems like just about the time you think you’ve got all the language features identified and syntax worked out, your future user base (including yourself) thinks of something new. This is many times even more so the case than when designing a general purpose language.
Of course, like anything useful in our field, a language will undergo enhancement after enhancement over time. One thing we need to do is make sure that we can support those enhancements over time. The language design, therefore, needs to embrace change. Further, a good language design will make developing the language far easier.
I mention a wide range of language syntaxes in this section, including graphical and textual. However, I must limit my scope to just one syntax type in order to keep this article to a reasonable length. Thus, I have chosen to focus on textual DSLs. A textual DSL is easily understood, and is likely applicable even when a graphical DSL is in use (see why below).
Syntax Design For Now and Later
Fortunately most language designers don’t wake up in the morning and say “I’m going to create a language today, and I wonder what it will be.” If we are considering the development of a language we have a good idea why. This is important because if we really don’t have a clear vision for the language our resulting design will be just as weak. So an important first step in language design is to know a lot about what you want your language to do.
Getting Started with Windows 7 XP Mode
To install XPM, you’ll need the right combination of hardware and software. Your hardware must include a CPU and motherboard that supports Hardware Virtualization Technology, sometimes known as VT-d, AMD-V, or Vanderpool. If your motherboard is less than two years old, you’re probably safe, though you may need to find a Hardware Virtualization option in your computer’s BIOS and switch it on. If you’re not certain whether your system supports Hardware Virtualization, visit this Microsoft Web page and download and run a CPU-identification utility from Intel or AMD that can tell you. The same page tells you how to switch on the necessary technology in many standard BIOSes.
Your operating system must be Windows 7 Professional, Windows 7 Enterprise, or Windows 7 Ultimate. The currently downloadable Release Candidate installs Windows 7 Ultimate, so the RC version is ideal for testing XPM. Next, you’ll need to install a small 5MB update to the RC version, which you can find by visiting this Microsoft update page, where you can download Windows Virtual PC.
Finally, from the same Web page, you’ll need to download Windows XP Mode, which is a 445MB installer that expands into a 1GB virtual XP system. With both downloads, make sure to download the 32-bit or 64-bit version, depending on whether you’re running 32-bit or 64-bit Windows 7.
Your next step is to run the small Windows Virtual PC installer and, when prompted, restart your system. After that, you install Windows XP Mode. The installer will present you with a screen that says your XP Mode username will be “user” (you can’t change that) and prompts you to create a password. On the same dialog, you should mark a checkbox labeled “Remember credentials (recommended)” so you won’t be prompted to retype the password when XPM starts up. The next dialog will prompt you to turn on Automatic Updates, which you definitely should do, so that XPM will update itself without your intervention. Finally, after about ten minutes of background activity, a virtual Windows XP desktop will open in a window.
You’ll probably want to customize the desktop and Start Menu of your virtual XP system. For example, you’ll probably want to open the Control Panel, then Folder Options, and the View tab, and tell XP not to hide the extensions of known file types, so .DOC files will display in Explorer with the .DOC extension. You’ll probably also want to open the Display Control Panel, go to “Appearance,” then “Effects,” and turn on ClearType to smooth screen fonts.
You’ll also want to install a printer so that applications running in XPM can print to the same printer you use for Windows 7. If your printer is attached by a USB cable, all you need to do is go to the top-line menu of the virtual machine, click USB, and then click the line that reads “Attach” followed by the name of your printer. XP will need to install drivers for your printer, which you’ll provide either by inserting the installation CD that came with your printer, or by running the Internet Explorer browser in your virtual XP system, and finding, downloading, and installing the XP drivers for your printer.
How XP Mode Is Supposed to Work
XPM lets you run older apps on the new OS by doing two things: First, XPM lets you use a new, improved version of Microsoft Virtual PC to run a complete, freely downloadable “virtual” copy of Windows XP that runs in a window that contains a Windows XP desktop—which appears in a window on the Windows 7 desktop.
Second, XPM lets you install applications into this virtual copy of Windows XP, in exactly the same way you install them in an ordinary XP setup. This means that you can run those applications seamlessly from the Windows 7 desktop, just as if they were standard Windows 7 applications. In this second “seamless” mode, you don’t see the Windows XP desktop. Instead, you see just the window that contains the XP-based application. The whole virtual Windows XP system is running invisibly in the background.
When you save a file from an application running in seamless mode under XPM, the file gets saved by default to the same Documents folder you use under Windows 7. But the seamless application runs so seamlessly that you can also save or open files on any drive or folder anywhere in your Windows 7 setup.
Hands On with Windows 7’s XP Mode
The Windows 7 Release Candidate ships with a feature called Windows XP Mode (XPM) that has left longtime Windows users excited. XPM is designed to let users continue to run older XP-compatible applications, mostly special-purpose business programs, that won’t run smoothly (or won’t run at all) with Vista or Windows 7.
XPM sounds like the feature that finally kills off XP by persuading XP users to switch to Windows 7 without fear of incompatibilities.
In reality, the beta of XPM is a mixed bag of clever programming, appalling kludges, missed opportunities, and challenges to the ingenuity of even the most experienced Windows user. To be fair, however, this is indeed a beta, and we would hope quite a lot will change between now and the final release.