What's New in DataFlex 19.0
DataFlex 19.0 (Released November 2017)
Be sure to check out the examples that illustrate some of the latest changes and additions:
-
Order Entry Tab: The Order view demonstrates that not setting
piMaxSizewill allow the view to stretch to full size. Check out this information on how scrolling views work in all situations. -
Web Order: The Demo menu has been reorganized to make it easier to find the various examples (there is a lot of great stuff in this example of which developers may not be aware). In particular, check out the Restful JSON Service view. See more information about JSON.
-
Web Order Mobile: DataFlex 19.0 marks the debut of swipe gesture support in lists and cards! The Select Customer list now allows you to swipe right for access to the Customer Zoom and swipe left for access to list Customer Orders or delete. The Demo Techniques menu provides access to a "Swipable Card" example view. Another great new feature is the ability for grids to turn off scrolling with
pbScroll, which loads the complete data set and turns on column sorting. You can see this new feature at work in the Order Zoom view. See more information about Web Framework changes.
Primary Development Areas
- Connectivity
- Windows Framework
- Studio
- Packages
- Web Framework
- Web Application Server
- Runtime / JSON Parser
- Development Tools
DataFlex 19.0 sets a new level of usability and functionality when using SQL databases. You will experience:
- Database Connection IDs are fully integrated into the application framework and the Studio and other tools through Managed Connections.
- Improved indexing support for SQL databases.
- Improved flow of SQL-based application development.
- Expected SQL features like Primary Keys, Foreign Keys, identity columns, clustered indexes, and more are now available within the Studio so their use is more automatic and natural.
- An improved database login process including support for encrypted credentials.
- Convert, Connect, Reconnect processes that are easier to use and more robust in their functionality.
- All with backwards compatibility!
While one of the main changes in DataFlex 19.0 is the full integration of Managed Connections, there are many more SQL-related improvements throughout the new product from the drivers, up through the language and the Studio that enhance productivity and efficiency with SQL databases. Among them are:
- Support for SQL Server 2016.
- Support for ODBC Client 11/13 for SQL Server.
- Minimum database Client Version Check.
- Updated Default Type Mappings.
- Database Restructure Prevention.
Note that there are also changes in minimum required SQL Client; read more about this in SQL Database Drivers Client Usage.
Connection IDs
The DataFlex SQL drivers support the use of Connection IDs to make it easier to store database server strings in a central location. The cConnection class integrates Connection ID support into the framework. The Studio and other DataFlex tools generate, maintain, and use Connection IDs. DataFlex has a cConnection class, which handles connections for drivers that support Connection IDs. We refer to this as using Managed Connections.
Enhanced Index Capabilities
DataFlex provides enhanced index capabilities when working with the DataFlex SQL Drivers. You can now define client-only indexes (index definitions in your INT file that do not have an exact counterpart in the SQL Table) and temporary indexes (indexes that can be defined at runtime). See SQL Indexes for more.
Build Notes
The full Build Notes for the DataFlex SQL Driver are provided for those interested.
Windows Framework
Major changes have been made to the Studio as part of the overall undertaking to make DataFlex easier and more productive when developing with SQL databases. The Table Explorer, the Table Editor, Workspace Creation and Migration Wizard, the Conversion and Connection Wizards, and the Object Properties panel are all enhanced in DataFlex 19.0.
The Studio has a fresh, new look too. We applied all of DataFlex 19.0’s DPI changes to the Studio and replaced all the images with multi-sized, flat icons and updated the Studio’s theme to a more modern look.
See Studio Build Notes for details.
cCharTranslate
There are new UChar array functions added to the cCharTranslate class to support various character encodings. We encourage the use of UChar arrays as a more efficient and less-restrictive alternative to direct string or memory manipulation when dealing with character or binary data. The additional functions in cCharTranslate allow you to deal with the various character and binary encodings for the source and destination types more easily. The new UChar functions also make it easier to work with JSON and UChar arrays (ParseUTF8 and StringifyUTF8).
Codejock CommandBars
DataFlex 19.0 includes Codejock Command Bar changes to properly support the myriad of new visual themes that Codejock now supports. These DataFlex changes solve the problem where various themes would not show a status panel (it would be black) after Codejock changed their rules for setting visual themes. Setting a simple Codejock property simply no longer worked. You now must load .dlls and .ini files. We've tried to hide all of this so DataFlex Windows developers won't have to deal with it.
Added 6 files to Bin: Office2007.dll, Office2010.dll, Office2013.dll, VisualStudio2012.dll, VisualStudio2015.dll, and Windows7.dll.
- Changed the order of icon image loading. Resource Icons are now loaded first (if found); otherwise, it will load a matching icon file. Previously, the reverse was true.
- Added
tWinGrpIconDirEntry&tWinGrpIconDirstructs. - Added
FindResource,LoadResource,LockResource,SizeofResourceWin32 API functions. - Added
pbAutoResizeIconsproperty. This controls whether CommandBar Icon sizes are automatically selected to match Windows DPI scaling value. Default is False. - CommandBars now load all icon sizes and color depths for embedded icon resources. Previously, only the first icon in the icon resource was loaded.
Details
DataFlex 19.0 now uses the 17.3.0 release (both COM and MFC) and all the related components have been updated.
The Codejock interface was changed so you can pass two parameters with ChangeTheme. One sets the theme enum (same as before) and the other, themeIni, is a string that sets the custom DLL / INI file which should be found in bin\styles. This makes the themes appear properly in the Studio itself and it allows for proper visual modeling of the themes in the designer. The themeIni values are constants which have been added to the Studio.
Created new theme names that do not exist in the Codejock themes. Codejock expects you to use integer themes, but it allows you to load a theme dll/ini file right before you set the theme. Some themes (VS2012, Office2013) need these to handle all of the sub-themes. For example, the Codejock theme xtpThemeOffice2013 supports sub-themes for Word, Outlook, Excel, etc. I created extra constants for these by:
Define xtpThemeOffice2013Word
Define xtpThemeOffice2013Outlook
Define xtpThemeOffice2013Excel
Define xtpThemeOffice2013PowerPoint
Define xtpThemeOffice2013Access
Define xtpThemeOffice2013Publisher
Define xtpThemeOffice2013OneNote
When our class sets the theme, it figures out what theme dll is needed and what ini section it should use in the theme. As of 19.0, it expects those theme dlls to live in bin\styles. Prior to this, we recommended that developers put the themes in programs and load them manually. This was really confusing, and we expect no one did this and they just used crippled themes. This should all now just work.
Updated the cCjGrid class to use the styles folder.
- Changed
cWebParentComboanddbParentComboto make them use the primary index when no index is specified (piIndex is 0 and the field has no default index). It used to default to 0 (which works for recnum tables but not for standard tables). Reported by Roel. - Changed Property command to be more fmac-ish and to raise clear errors when web-properties are used with non-web applications. The Property command is moved from the packages to the runtime.
- Updated all runtime, fmac, pkg versions, and dependencies.
- Moved text to
Language_English.incfromcConnection(note this needs translations). The English text has been propagated to all languages. - Added new errors to
errornum.inc. - Fixed bug reported in the forum (by Raveen) where a constrained grid would show child records when there was no parent. Needs to be entered into BT. Note that the fix uploaded to the forum is not the same as the fix applied to 19.0.
- Added new errors to
flexerrs001.datfile. Errors have been propagated to all languages except Dutch (needs fixing). - Added FlexCom code which avoids a character conversion when a variant BSTR is returned. Emil has been using this for years so he can use COM Unicode strings. This is a very specialized use.
- Changed server-side web-services that XMLHandle parameters avoid OEM conversions. When XML objects were passed and returned, the private
GET_SERIALIZEXMLandGET_DESERIALIZEXMLinterfaces made calls into flex code that passed and returned OEM strings via address usingpaXMLandLoadXMLFromAddress. Now we usepvXMLandLoadXMLFromVariantso we can avoid that OEM conversion by using Variant BSTR. This required both runtime and package changes. This also requires changes incWebService.pkgto use the variant interfaces. Those changes have been merged.
This XMLHandle change will normally not be seen. As soon as you start using the XML document, you will be using OEM string interfaces and so you will not see a change. There are advanced interfaces where you can work around the OEM conversions and those will now work. For example, you could receive an XML document via XMLHandle and save it to a file without any kind of conversion. Or, you could carefully work with the document using pvXML, LoadXmlFromVariant, and pvNodeValue. While doing this is not easy, it is now possible. Previously the XML document would have been 1) received as Unicode, 2) converted to OEM, 3) loaded into the DOM document and converted back to Unicode. Now it is 1) received as Unicode, 2) loaded into the DOM document as Unicode (no conversions).
Web Framework
Runtime
- JSON Parsing and Transfer
- Fixed bug in
Get_Field_Valuewhen moving text/binary field types to a string. If a length is not passed (and usually it is not), you can get a valstr memory overwrite if the data is longer thanmax_string_size. It's always been like this. This was being reported in grids (cDbCJGridsanddbGrids) in the Studio and Database Explorer when using columns with very large text. - Changed
Refind_Records. The client DSO propagation was not testing if the client was in-use. This would cause the not in-use client to have itsvisited_stateset to True and never get cleared. This would cause Clear/Find operations to not work when you had complicated diamond relationships.
Web Application Server
- The Web Application Server now includes binaries for 64-bit deployment.
- The Administrator allows applications to be configured to run on other than the default web site.
- DFManageVDir provides a new command line interface for managing Web Applications.
Database Builder and Database Explorer have had significant changes made similar to those elsewhere in the product, including the following main areas:
- Support for Managed Connections.
- Major overhaul of Connection Wizard.
- DPI-Aware icons.
- New look & theme.
- Database Explorer has been updated to use Codejock grids.
See Development Tool Build Notes for details.