Thursday, October 18, 2007

4D v11 SQL Overview

Olivier Deschanels gives talk with Luc-Michel Six at 4D Summit 2007Luc-Michel Six gives talk with Olivier Deschanels at 4D Summit 2007These are notes on the "4D v11 SQL Overview" presentation that was given by Olivier Deschanels & Luc-Michel Six of 4D SAS at 4D Summit 2007.

[Olivier is the engineer who developed 4D Forum.]

There's a migration wizard that is used to migrate from v2004 to v11. Once you have set up things like plug-ins and your web folder. Initially 4D will convert the data and the code. Then you'll want to go to the MSC (Maintenance and Security Center) which has all of the capabilities of 4D Tools (plus). Then you'll want to verify the data. That will let you know what was done, etc.

A number of new files will be created including *.4DIndx and *.4DIndy files. There will also be a "Replaced Files" folder that is a copy of your original data and structure. There will be a Resources folder created as well.

You'll then want to check the Compatibility preference window. It won't allow nested transactions and won't support Unicode when you convert an applications. If you want those options, you'll need to say so.

If you're working on MacIntel you'll notice significant speed improvements.

Forms no longer need to be associated with tables. You can also copy entire forms - including all pages, scripts, the form method, etc.

List boxes can how have data objects bound to them with no code (just a property). The data objects (data sources) can be fields, methods (with parameters), and variables.

The explorer how lets you see the structure - with a list of fields and their properties that can be sorted.

You can also zoom in and out on the database structure at a variety of different sizes. You can also hide and show tables by module. You can also hide all fields except key values. You can also change the field order. And you can move multiple tables at the same time. Of course everyone wants to delete tables and fields - that's now possible too. There's also a search function that highlights all tables/fields that match your search term.

There's also a way to see a list of all indexes. Indexes aren't just for single fields now - they can be composite indexes (managed compound fields are a thing of the past), and there's more than just B-Tree indexes.

Components are now basically shared databases. You compile them (they'll have a *.4dbase extension), put them in Components folder that's located next to your structure, and the methods and forms are then available in the primary database. There's no need to "install" them - they work more like plug-ins. You can also include macros in components. Components are basically applications within applications.

Regular expressions are now supported with a 'Match regex' function which finds the pattern in the string, you then use that information to do what you want with the string that's found.

You can also drag and drop text from forms into methods.

There will be a component published later today on 4D Forum that will let you submit regular expressions and search regular expressions others have submitted. It's sort of a clearing house of regular expressions. The component requires that your in Unicode mode, not compatibility mode.

Unicode is now supported (though not by default in migrated databases). This means you can mix and match with languages that have other character sets - in the same text field. You'll want to use UTF-8 as your standard character set in your web settings.

Language localization is now done via XLIFF. There's an XLIFF editor that lets you enter different strings in a variety of languages. They are then saved in XML format and stored in the the Resources folder that will be next to your structure file. To use the translations - just drag the XLIFF string onto your form, and 4D will present the correct language to the user (based on the language of the operating system).

Pictures are now stored in a Pictures folder and are part of the application and can be dragged from the folder onto forms. Pictures can how support alpha channels and transparency using SVG file format.

Graphing can now act on SVG pictures. You can take a picture (say a graph), put it into a BLOB (PICTURE TO BLOB, SVG format), and then convert the BLOB into text (BLOB to text). That will output the SVG text that can be edited as a text file, and then you can convert it back to a BLOB -> Picture. In other words, pretty deep support for SVG.

There's also a command DOM EXPORT TO PICTURE that lets you export SVG data and save it to disk as a picture file (didn't catch whether this can convert to other file formats).

The big change with pictures is that they're not converted to a common format - they're stored in their native format, if the native format supports transparency (as say PNGs do), then the transparency will be handled properly by 4D.

The other big news with pictures is that QuickTime is no longer required to support a full range of file formats.

Form objects (like heirarchical lists) can how have transparency and show pictures beneath them. (Is this new?)

Another cool item was that scroll bars can disappear when they're not needed.

Menus and menu items can now be created on the fly. The same instance of a menu can be used both in the menu bar and contextually.

There's now a new database method called On Drop. That puts whatever they drop into a 'pasteboard' which you can do whatever you want with.

There's a lot of new picture commands...

You can how drag and drop forms, pictures - just about anything between 4D applications. 4D Insider is now inside 4D.

4D Insider's search and replace and other features are also now part of 4D. The window that's the result of finds in the structure is now much more powerful with a lot of features - not just a simple list any more.

Thermometer objects can now be bound to fields. So no code is necessary to display field values graphically using thermometers. But better yet, you can put formulas directly in when you define where the values come from.

They showed an impressive example of integrating 4D-based databases as a data source in Google Earth.

They then demoed an example of using a Flex-based admin tool, based on the 4D Flex Library (announced in keynote presentation) to do things like adding tables to the database remotely, over the web - quite impressive... They also showed the 4D Flex Library running in the Eclipse development environment (Eclipse -> Flex -> 4D).

Q&A

In terms of dates and localization - you can how have formats that adjust based on operating system preferences. So mm/dd/yy can turn into dd/mm/yy or yy-mm-dd... You can also not use it.

Regex cannot be used to search source code - just data, but it is planned.

Labels: , , ,

Digg It!  Add to del.icio.us  Add to StumbleUpon  Add to Reddit  Add to Technorati  Add to Furl  Add to Netscape

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home