Lance Rasmussen

Mar 292012
 

TMS Software recently released a new framework for Delphi and Databases that is really quite neat.

Using the framework, you can reduce a lot of SQL needed as well as insert/post/update situations needed by wrapping around your object with the framework, which then ties then to a database and table.

For example:

type

TPerson = class
private
  FId: integer;
  FLastName: string;
  FFirstName: string;
  FEmail: string;
public
  property Id: integer read FId;
  property LastName: string read FLastName write FLastName;
  property FirstName: string read FFirstName write FFirstName;
  property Email: string read FEmail write FEmail;
end;

This is a typical simple class.

Now expand it with:

type

[Entity]

[Automapping]

TPerson = class
private
  FId: integer;
  FLastName: string;
  FFirstName: string;
  FEmail: string;
public
  property Id: integer read FId;
  property LastName: string read FLastName write FLastName;
  property FirstName: string read FFirstName write FFirstName;
  property Email: string read FEmail write FEmail;
end;

The TPerson class now is wrapped around Aurelius to allow database functionality.  So Saving a person is as simple as Manager.Save(Person).

Queries are also great and can be done in a couple ways, including Linq style queries such as:

PersonList := Manager.CreateCriteria<TPerson>;
.Where(TLinq.Like('FirstName', PersonName) or (TLinq.Like('LastName', PersonName)))
.AddOrder(TOrder.Asc('FirstName'))
.List;

What about common situations such as inheritance?  Not a problem. The inheritance still works the same way with the data storing in their perspective tables.

What databases are you limited to?  TMS Software’s Aurelius recently added support for my favorite database by Elevate Software called ElevateDB, but also supports the usual suspects such as MS SQL, MySQL, Oracle, SQLite, PostgreSQL, Interbase, Firebird and DB2.

If you haven’t yet, I’d encourage you to check out a demo on TMS Software’s website.

Sep 292011
 

One of the newly discovered features of RAD Studio XE2 is the ability to have a separate manifest for each build platform as well as the ability to more easily include your own custom manifests.

In XE, D2010, D2009, D2007, the IDE’s added the ability to check an option to include runtime themes.  This created a manifest file that was embeded into the EXE on build.  The manifest was primative and mainly dealt with the inclusion of requiring the ComCtrls 6 to leverage the improved appearance of controls.  The problem with the manifest is that it did not allow for the inclusion of the necessary items for Vista and Windows 7, such as elevation requirements.

The workaround was to disable runtime themes and then create your own manifest file. Then you would create a resource file that included the manifest.  Then you would add a $R pointing to the resource file in the project source to load in the manifest.  Depending on your tact, you may need to use the MSBUILD options to compile the resource before compiling the application. (Pre event).

With XE2’s new ability to build a 32 bit or 64 bit application, this created a problem.  The manifests could potentially be different if you are doing a side-by-side manifest using Type Library / ActiveX controls and need to include the appropriate manifest details for the controls to prevent having to use REGSVR32 on the end user’s machine for the controls.

In XE2, the gang in Scotts Valley did an awesome job in setting up project options for this situation.  First off, each platform has it’s own settings for build settings as well as the option to use run-time themes, no manifest or (THANK YOU THANK YOU [about time] THANK YOU) point to a custom manifest. So now, you can create a PROGRAMMANIFEST.MANIFEST file that can be compiled into the 32 bit and a PROGRAM MANIFEST64.MANIFEST to be compiled into the 64 bit application, each with their own manifests covering their particular needs.

Sep 292011
 

I, for one, am excited to see Embarcadero’s new release of their programmer tools recently.  Embarcadero released upgrades for Delphi, C++ Builder, Prism (Pascal for .NET) and PHP begining of September.

I had the chance to see Anders Ohlsonn at the RAD XE2 World Tour stop in Seattle and was one of many that got to see some pretty cool things.

One of the biggest things added to Delphi that has been grumbled about for some time in the community has been lack of native 64 bit support.  With XE2, this is now here, being able to cross compile your application for 32 bit or 64 bit.

Another new feature is releasing a new framework called Firemonkey.  VCL has long been the framework of Delphi and is stable and can do a lot of things. What Firemonkey brings is a whole new world of 3D visual display and a unique presentation layer.  While this new framework is young, it was based on work done by KSDev who sold the IP to Embarcadero and helped create something new.  The heads of Embarcadero have pledged full backing of Firemonkey and promise frequent updates to resolve issues quickly and to try and grow acceptance of new development to this new framework.  Time will tell, for sure, but it looks promising.

Another new feature asked about is cross compiling for the OSX platform. With XE2, this is now an option, however, can only be done (officially) using the Firemonkey framework.  To get to market faster, Embarcadero chose to develop a remote compiler which leverages the FreePascal / XCode compilers for the Mac.  I’m sure XE3 will probably change this to have their own native compiler.

May 112011
 

It’s always interesting to sometimes here competitor developers state that Delphi is not a serious programming language.  It’s sometimes snickered at as if it was archaic and irrelevant as RPGII is today (no offense to RPGII developers). Surely there is no way that a program developed using Delphi can reap serious financial rewards for developers and companies, right?

Early this week, a little company called Skype was recently acquired by a company from Redmond, WA that I don’t think anyone would have trouble guessing who.  The price tag…  $8.5 Billion dollars. I certainly don’t need my MBA education to tell me that this is some serious money.

What’s Skype? For the minority who never heard of Skype, it is video and voice communication product that uses the Internet to carry the signal.  It’s used frequently in communication among companies, especially for intercontinental conference calls and such.  It’s inexpensive and works very well.  It’s almost used a term to communicate, such as “I’ll Skype you tomorrow”, very much as saying “can someone hand me a Klenex”.

What’s this have to do with Delphi?  Well the Windows based client has long used Delphi as the primary development platform. It’s probably one of more well known products you’ve ever used written in Delphi. There are several others you may have heard of:

  • Ad Aware
  • Quickbooks Point of Sale
  • Spybot S&D
  • TOAD
  • FinalBuilder
  • Help and Manual
  • Installaware
  • MySQL Administrator

There’s lots more and you can find on Embarcadero’s website.

Delphi has and continues to grow. Embarcadero has made great strides with the development environment, language and documentation since acquiring the development tools from Borland, who know is no longer in existence.

What future holds for Microsoft Skype and the Windows client? Who knows. Hopefully it will remain developed under Delphi, but I’m probably not in the minority of developers that are guessing it will be ported to .NET and most likely C#.

May 062011
 

One of the pains of developing software is creating documentation for the product. There becomes a lot to think about, which includes just letting the end-user figure it out on their own and not even bother.

Some of the things to consider for a software product:

  • Do you need a Help File for installed EXE’s?
  • Do you need a Product Manual?  Printed or Electronic format? How about a manual which could be referred from a Nook or Kindle?
  • Do you want or prefer help to be viewed via a web browser with the help stored locally or on your web server?
  • If you’re writing development products, do you need to have the file be compatible to install into Visual Studio or Embarcadero’s Delphi or C++ Builder? IDEs?

Uggh…..  sounds like there’s going to be a lot of writing. And using several tools.  Get Word out to write the manual for the printer. Get a tool to make a help file. Get Dreamweaver out to make the web pages. I think it’s time to go back to just writing the program and not even bother.

Well EC Software has a great product that puts everything into one tool called Help and Manual. The product takes the write once, output in many ways approach which lowers the overall time needed to create your help file, printed manual and online help file and allow output for the needed formats to be generated in a single click.

Installation of the program is easy by downloading their installer from their website. The code-signed installer is simple and typical of installing most programs. EC Software also offers a Premium Pack set of templates that are in a separate installer available as an optional add-on.

Help and Manual uses the Microsoft toolbar / menu system design introduced in Office 2007, making navigation and use of the program easier to learn.  There are several example projects installed to help learn the product and see the capabilities.

When setting up a project, you make use of the project explorer and create book chapters and topics. Within each topic page created, you can enter your text, then use the Topic Options for the page to enter keywords that would be used to index the help file as well as become part of the index used in the printed documentation. Other options include configuring help context IDs for context sensitive help.

A unique feature is having access to the topic text as XML, allowing finer grain presentation of the topic page.

Help and Manual offers use of text variables within the text and project. For example, if your new software product was called Widget 2011, then create a text variable called PROGRAMNAME and then use %PROGRAMNAME% anywhere in the topic text to automatically fill when generating output.

The editor for the program is easy to use and contains the typical text formatting features expected for word processing. The software also includes a spell checker, of which several language dictionaries are available.

Need to earmark a topic page as pending, while you’re working on it? Not a problem. If the project is generated, it will ignore those topics.

When creating PDF / printed documentation, Help and Manual provides a template design tool, allowing you the freedom to design how the cover would look, table of contents and index appearances and the content pages. If you like your page numbers to be at the top of the page, simply use the design tool to move the page numbers to the desired location. If you prefer to show your Index in two columns, but want your table of contents to be one column, it’s not a problem.

Help and Manual offers its own screen capture utility to make it easy to take a screen shot of your program, manipulate the size, such as shrink it 50%, then save it as a PNG or other format. I personally love Snaggit for screen captures and H&M’s utility doesn’t attempt to outshine or outperform. But it’s included and realistically perfect for most jobs. H&M also includes an image editor to add callouts or other embellishments to the screenshots.

What if you have a bunch of chapters or topics that you don’t want to waste pages for the printed manual, but you want to include in the help file or web based help? Not a problem with Help and Manual. Topics can be flagged to be used for specific or all output types. If you have a couple paragraphs of text that would be best left out of print as well, you can use a conditional flag around the text to accomplish the same goal.

There is a lot of control offered for output destinations. The PDF output allows for generating an interactive document or as a simple document. The prior allows chapters and “See Other” links within the document to jump within the PDF. Security can be applied to the PDF to prevent printing or modification and fonts can be embedded or not.

Generating Winhelp (the help system used in older windows) and HTML help (used mostly now for program EXE’s) will require installation of Microsoft’s help SDK’s which must be downloaded separately.

One of the more recent features of Help and Manual has been the support for multi-user editing.  If you have multiple technical writers and require editing the same help file, you can easily edit the file and see when a topic is currently being edited by someone else.

Help and Manual supports Unicode fully, allowing integration with tools used to support multiple language translations.

The output can be generated via command line automation, making it easy to include generating documentation as part of the build process.  For those using FinalBuilder (one of my favorite tools that was introduced to me by Nick Hodges), there is built-in support for automating the building of the H&M project.

One of the newer features I like is the ability to collapse text using toggles. This is seen a lot in websites that use FAQ’s and don’t want to overload the viewer with both the questions and answers run together.

There is certainly a lot more to the program than what’s been mentioned. Help and Manual is reasonably priced for all it offers. Especially when comparing to some of the other commercial tools such as Robohelp.  The software has a standard and professional edition along with a concurrent license for larger license needs.

If you are a developer working on open source projects, contact EC Software to find out about their requirements to acquire a license of Help and Manual for little to no charge.  The company has been mentioned in credits for projects, such as GExperts, as providing a free license for the project.

I strongly encourage readers to check out the demo at helpandmanual.com and see for yourself.

Apr 152011
 

Embarcadero just announced a new free version of TMS Software’s Smooth Controls Pack special edition is being released to registered users of RAD Studio XE, Delphi XE and C++Builder XE.

TMS Smooth Controls Pack allow you to build cool user interfaces with a smooth look and have additional types of controls not included in the base VCL components. While source code is not included, the expanded version with source code is available from TMS Software.

Apr 142011
 

Elevate Software recently released Version 2.05 Build 6 of their ElevateDB database tool. For those not familiar with ElevateDB, it is a prepackaged database solution that can be directly compiled into Delphi, c++ Builder and Lazarus applications.

ElevateDB also run in a client-server mode using a small, but powerful server executable that can be connected by clients using Delphi, c++ Builder, Lazarus as well as though Visual Studio .NET languages via the ElevateDB .NET Data Provider or through additional development platforms using the Elevate ODBC Connector. A newer addition to the ElevateDB family is a PHP extension for Windows based PHP servers.

ElevateDB supports a large subset of the SQL-2003 standard, making the transition to integrate this database easy, while still following standards.

Support for Elevate Software products is primarily via forum / newsgroup or email. Aside from being a great product, the support provided by the owner/developer Tim Young is outstanding. There is a Team Elevate group that also assists other fellow users.

I’d strongly recommend, if you’re in need of a database tool, to check out this product.  The pricing is designed to be very fair and reasonable when compared to other commercial products. In fact, I think it is a GREAT value when all is said and done. If you require source code, there is options to purchase the source code editions for a reasonable surcharge.

Disclaimer: While I’m not being paid by Elevate Software for this mention or an employee of Elevate Software, I am a member of Team Elevate.

Apr 132011
 

Cary Jensen just released a great book on the introduction, basic and advance usage of ClientDataSets in Delphi.

Some of the topics include:

  • Improve your software using powerful Delphi ClientDataSet features
  • Master the art of cached updates
  • Understand the role of in-memory data
  • Build multi-tier applications using Delphi’s DataSnap

Cary is a great technical writer and would strongly recommend this book to database developers using Delphi.