33

Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Embed Size (px)

Citation preview

Page 1: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team
Page 2: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries 2013 (plus a bit more)

John TuohyDevelopment Team

www.dataaccess.com

Page 3: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Visual DataFlex 2012 added significant Data Dictionary enhancements

• These new DD features will be useful to Windows and Web development

• But… before we discuss these, let’s take a look at the other non-web changes in versions 17.0 and 17.1

Page 4: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

17.0 - Longer Table and Column Names

• Maximum table name (logical name) has been increased from 8 to 31 characters– Employe1 EmployeeOvertimeHours

• Maximum column names have been increased from 15 to 32 characters– Employee.InsurancePrvdr EmployeeInsuranceProvider

• This applies to all backend databases• This change is fully backwards compatible

– If you need compatibility with old versions, just keep the name lengths at their old shorter limit

4

Page 5: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

17.0 - Font Improvements

• The Font Problem– Visual DataFlex used a fixed font typeface and size.

• It did not use the Windows default font• That fixed font, MS Sans Serif, was old and dated

– COM controls tended to use the system fonts creating a jumbled appearance• Menus and grids used one font, forms and labels used another• This was not so noticeable in XP but very noticeable in Vista/W7

– Fonts did not scale when you change your display resolution – There was no interface for setting sensible and scalable font

sizes

Page 6: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

17.0 - Font Improvements

• The Font Solution– Visual DataFlex 17.0 now uses the Windows default font and

size as its default• The newer Windows fonts, look good• Now all controls use the same fonts

– Fonts properly scale when you change your display resolution– There is now an interface for setting sensible and scalable font

sizes– The new font system can be disabled on an application basis

for backwards compatibility• Plus there is good new documentation section about fonts

that explains this all• Here are examples of the Old and New

Page 7: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

17.0 – Studio Improvements• Workspace Dashboard

– Makes it easier for new users to get started– Makes it easier for all users to navigate the Studio– Provides useful workspace information– You will see lots of examples of us using the dashboard

• To Do panel• Multi-file search• Find all Occurrences Editor context menu• Lots of fixes and behavioral tweaks

Page 8: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

17.0 – Other Changes

• Easier to Use Client Web Services

• Easier Windows Date Entry

• Entering / Exiting Windows Events

• And major Data Dictionary enhancements, which we will get to

Page 9: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

What’s New in 17.1

• Visual DataFlex 17.1 introduces our new Web Application Framework

• This is where most of our efforts were applied and you are going to hear a lot about this

• Here are some of the other non WebApp changes in 17.1

Page 10: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Server Web Services

• Now supports SOAP1.1 and SOAP1.2 formats– Our WSDL provides support for both

• Now supports JSON requests and responses– Server controls the format (we control it)

• The same service supports all of these formats– The server looks at the HTTP content-type to determine

the format• Why all these formats!• Let’s take a look

• Now supports SOAP1.1 and SOAP1.2 formats– Our WSDL provides support for both

• Now supports JSON requests and responses– Server controls the format (we control it)

• The same service supports all of these formats– The server looks at the HTTP content-type to determine

the format• Why all these formats!• Let’s take a look

Page 11: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Client Web Services

• Now supports SOAP1.1 and SOAP1.2 services• When importing a SOAP service

– It will detect if the service supports SOAP1.1, SOAP1.2 or both.• The service’s WSDL determines what is supported

– If 1.1 and 1.2 are both supported• You can select one or both formats• When in doubt just use SOAP1.1

– Why was this added?

Page 12: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Client Web Services

• Other enhancements– We support more types of services

• Recursive Structs• Other “exotic” definitions

– Some services will generate simpler code with better named structs and variables

– Why do I care?

Page 13: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Base64 Encoding

• Base64 encoding and decoding– Two new global functions

• Base64Encode• Base64Decode

– Low level memory based interfaceMove (Base64Encode(pBinaryData, iBinaryLength)) to pBase64Move (Base64Decode(pBase64, (&iBinaryLength)) to pBinaryData

– Why was this added?

Page 14: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Windows Application Changes

Updated Latest CodeJock 15.3.1– Brings command-bars, grids and skinning up to date

• Added support for time mask in windows controlsSet Form_Datatype to Mask_TimeSet Form_Mask to "Zh:mm:ss ap"

• Drag and Drop into source code– You might have heard you can use this with Web

applications– Did you know it can be used with Windows applications

as well?

Page 15: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Other Studio Improvements

• Save "Read Only" File– now allows to you change the file's Read Only state during the

save• More informative Studio Errors during some operations

– Errors vs. Disabling • Migrate Studio Settings: The Studio now migrates the

following settings from a previous version– Code Editor configuration– Settings in the configure Studio dialog– Tools menu configurations– We’ve had a lot of requests for this

Page 16: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Bug Fixes

• As always, we fix bugs and implement suggestions

• In particular, we have addressed two important long standing issues…

Page 17: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Code Pages

• Some code pages just didn’t quite work right with some our edit controls– Cyrillic, Eastern European, Chinese– Forms, Grids and CJGrids

• There were data entry issues and copy/paste issues – All very confusing

• Fixed!

Page 18: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Constraint Bug

• A long standing bug made it impossible to use embedded double quotes of the right side of a constraint

// this worksConstrain Part.Size GT "4' pipe"

// while this raises a runtime errorConstrain Part.Size GT '4" pipe'

• Really hard to work around … also hard to fix• Fixed!

Page 19: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

One more minor constraint fix• Another bug caused some date fields on the right side of a

constraint to raise runtime errors

// This might raise a runtime errorConstrain Part.ShipDate GT SysTable.StartDate

• Easy to work around. Use ()Constrain Part.ShipDate GT (SysTable.StartDate)

• Fixed!

• Plus you are going to get some really nice constraint documentation and possibly a webinar out of this)

Page 20: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

And now back to your regularly scheduled program…

Page 21: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Changes in header / detail handling– Header / detail navigation is now more intuitive– This makes it easier to work with constrained grids– Less code for Windows and Web applications

Page 22: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Changes in Refresh event– The refresh event is sent from a DD to a DEO after important

DD operations (find, save, clear, delete)– Old approach: when in doubt, don’t send the event– New approach: when in doubt, send the event– Fixes some issues with Windows classes– Allows web applications to be much more flexible

Page 23: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• New Events– OnPreFind and OnPostFind

• Augmenting the find messages is difficult– too many messages sent to too many objects

• OnPostFind is often a good replacement for exiting messages• Very useful in web applications

Page 24: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• New Event– OnSaveRecord

• Only called if a record is actually changed• Good for recording change date stamps

Page 25: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• New Event– Cascade Delete Validation

• Allows validations of cascade delete records• If invalid, entire transaction is rolled back

Page 26: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Full DD support for text field DEOs– Was missing from Windows framework– Makes DD options like “Required” work with text fields– Optional and backwards compatible– Automatic

Page 27: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• DD Remember– A better retain– Very easy to add to an application– User driven

Page 28: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Committed Record feature– A record’s state can be committed or not

• By default a record that is saved, is committed

– New DD field option: DD_Commit• If set and a record is committed, the field is disabled

– New DD property: ParentNoSwitchIfCommitted• If set for parent and a record is committed you cannot change it

– All Modeled by the Studio

Page 29: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Null Parent Support– Allows a parent to be optional– Works with auto-find and find-required– Some developers use this technique, others don’t– Modeled in Studio

Set ParentNullAllowed SalesP.File_Number to True

Page 30: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Local DD Relationships– Optionally allows relationships to be defined at the DD level– Can be defined at the class or object level– Not meant to replace global relationships – use when needed– Useful with

• Legacy database definitions• Alias tables

Page 31: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

– Better Alias Table Support• Makes it easier to work with alias tables• Alias tables and DDs can be defined directly within the Studio in

single step• Takes advantage of other DD enhancements

– Null-parent– Local relationships– Read-only parent validation (pbForeignReadOnly)

Page 32: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

Data Dictionaries

• Summary of improvements– Changes in Header / Detail Handling– Better Refresh Event– OnPreFind and OnPostFind Events– OnSaveRecord Event– Cascade Delete Validation– Full DD support for text field DEOs– DD Remember– Committed Record feature– Null Parent Support– Local DD Relationships– Better Alias Table Support

Page 33: Data Dictionaries 2013 (plus a bit more) John Tuohy Development Team

The End