Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview


Buy Now

Issue 9.6

COLUMN

Introducing Storm

An easy database system

Issue: 9.6 (September/October 2011)
Author Bio: Paul Lefebvre has been using Real Studio for 9 years. His company, LogicalVue Software, specializes in creating database applications using Real Studio. Paul also runs the RBDevZone community site and is a founding member of the Association of REALbasic Professionals.
Article Description: No description available.
Article Length (in bytes): 6,065
Starting Page Number: 82
Article Number: 9613
Related Web Link(s):

http://storm.logicalvue.com
http://storm.logicalvue.com
http://storm.logicalvue.com

Excerpt of article text...

Last time, I first mentioned Storm, the object-relational mapper that I use on nearly all my Real Studio projects. Since my first presentation on Storm at the ARBP Real Studio Summit in March, I've had many people ask if I would make Storm available for purchase. I'm happy to announce that Storm is now available on my website (http://storm.logicalvue.com).

History

Before becoming a full-time Real Studio consultant, I primarily worked with Microsoft .NET. The company I worked for had an in-house ORM that they used to connect to Microsoft SQL Server. After having worked with this for a while, I quickly came to prefer using an ORM when dealing with database access.

When I first started doing Real Studio consulting, I quickly realized that I would need to have my own ORM or I would go crazy repeatedly writing the same SQL statements and related commands.

Originally I would develop an ORM that was specific for each project. This would simply be a set of classes that matched the database structure, with one class for each table and a property on each class for each column. I then would have custom Save and Load methods on each class to communicate with the database. This worked OK, but it was quite a bit of work to set up, particularly for more complex database designs.

I took a step back and decided to take a different approach. Using the Operator_Lookup command, I could eliminate the need to create properties for each column in the table. Instead, I could instead attempt to match the identifier after the dot with a database column of the same name. I also realized I could use introspection so that the class names would simply be the same as the table names. Storm was born.

...End of Excerpt. Please purchase the magazine to read the full article.