mike taylor uniface solution specialist atlanta - june 7th, 2010
DESCRIPTION
Agenda APS Integration National Language Support HTML E-Mail 2TRANSCRIPT
Mike Taylor Uniface Solution Specialist Atlanta - June 7th,
2010
Uniface 9.4 Features (Non RIA) Mike Taylor Uniface Solution
Specialist Atlanta - June 7th, 2010 Agenda APS Integration National
Language Support HTML 2 Improvements Installs APS from a singe
DVD/download
New directory structure New /adm command line flag Servers are
shared between products Urouter, tomcat and solid Central database
with one repository Development license allows access to all
products Multiple separate installations New directory
structure
Development: All products installed Deployment: Select required
products Each product has its own folder Shared components are in a
common location Project folder defined during installation You can
have multiple Uniface installations on the same machine /adm Each
product has its own adm folder
Local asn files #file common asn files Logical paths located in
usys.ini Possible to add user defined usys paths Shared Servers
Tomcat is now a service Installer looks for free ports
Urouter uses $default_net to find port number All installed
products are configured during installation to use the shared
servers Installation options are included in usys.ini Licensing
Development license is now for the whole Uniface APS.
Deployment licenses are still split into individual products.
Multiple installations
The installation is self contained Multiple installations allows
patched versions The installer looks for unused ports Can still
choose port Integration New workflow tab Flow added to Editors and
Go To menus
View added to Utilities Agenda APS Integration National Language
Support HTML 10 Areas: Formatting Sorting Searching &
Syntax-comparison Time Zones NLS Locale Master switch Assignment
File
$NLS_LOCALE { = } ln_CY | system | classic Proc Code $nlslocale =
"classic" | "system" | ln_CY Formatting Date: 18 mrt 2010 14:56:21
Currency: 10.000,00
Dutch (Netherlands) Date:18 mrt :56:21 Currency:10.000,00 English
(United States) Date:Mar 18, :56:21 PM Currency:$10,000.00 Chinese
(Simplified Han, China) Date: 02:56:21 Currency:10,000.00 Hindi
(India) Date: :: Currency:.,. Formatting Field Layout definitions
Syntax DIS ( $NLS ( NlsFormat )) Formatting DIS($NLS(CURRENCY))
=> 10.000,00
Date/Time/DateTime Parsing and Formatting $NLS(SHORT)
$NLS(SHORT,DATE)$NLS(SHORT,TIME$NLS(SHORT,DATIM)
$NLS(MEDIUM)$NLS(MEDIUM, DATE)$NLS(MEDIUM, TIME)$NLS(MEDIUM, DATIM)
$NLS(LONG)$NLS(LONG, DATE)$NLS(LONG, TIME)$NLS(LONG, DATIM)
$NLS(FULL)$NLS(FULL, DATE)$NLS(FULL, TIME)$NLS(FULL, DATIM)
$NLS(Pattern) DIS($NLS(FULL)) => vrijdag 8 mei 2009
Numeric/FloatingPoint Parsing and Formatting
$NLS(NUMERIC)$NLS(CURRENCY) $NLS(FLOAT)$NLS(pattern)
DIS($NLS(CURRENCY))=>10.000,00 Sorting Entities Lists Entity
Sorting Syntax Sort{/e} Entity , {LiteralFieldName : SortOptions {;
LiteralFieldName: SortOptions}} Sorting SortOptions: Ordering: A
Ascending Option D Descending Option
Unique:U Unique Option Typing:CS/Classic CaseSensitive Option CI
CaseInsensitive Option NLS NLSLOCALEOption String Sort Data as
String (CS) Numeric Sort Data as Numeric Float Sort Data as Float
Boolean Sort Data as Boolean Date Sort Data as Date Time Sort Data
as Time DateTime Sort Data as DateTime Level Sort Data as levelId
(n.n.n) Entity Sorting Sort/e entity, FLD1:Classic PK Fld1[String]
1 rene
2 Ren 3 Renf 4 5 Rend PK Fld1[String] 5 Rend 3 Renf 4 2 Ren 1 rene
Entity Sorting PK Fld1[String] 1 rene 2 Ren 3 Renf 4 5 Rend
PK
Sort/e entity, Fld1: NLSU PK Fld1[String] 1 rene 2 Ren 3 Renf 4 5
Rend PK Fld1[String] 5 Rend 1 rene 2 Ren 3 Renf Entity Sorting PK
Fld1[String] 1 1.2.3 2 1.11.5 3 1.2.4 4 1.1.2 PK
Sort/e entity, Fld1:Level PK Fld1[String] 1 1.2.3 2 1.11.5 3 1.2.4
4 1.1.2 PK Fld1[String] 4 1.1.2 1 1.2.3 3 1.2.4 2 1.11.5 List
Sorting List Sorting List Sorting Syntax Indexed list, associative
list, or an indexed list of sublists. sort/list List {, SortElement
: SortOptions {; SortElement : SortOptions}} $sortlist (List {,
SortElement : SortOptions {; SortElement : SortOptions}})
Associative list in which the value part of each list item is an
indexed list. $sortlistid ( List {, SortElement : SortOptions {;
SortElement : SortOptions}}) Sorting SortOptions: Ordering: A
Ascending Option D Descending Option
Unique:U Unique Option Typing:CS/Classic CaseSensitive Option CI
CaseInsensitive Option NLS NLSLOCALEOption String Sort Data as
String (CS) Numeric Sort Data as Numeric Float Sort Data as Float
Boolean Sort Data as Boolean Date Sort Data as Date Time Sort Data
as Time DateTime Sort Data as DateTime Level Sort Data as levelId
(n.n.n) List Sorting SortElement $IdPart IdPart of an associative
list
element of an associative list, or a sub-list element, on which to
sort $IdPartIdPart of an associative list $ValuePartValuePart of an
associative list Position in Sub-list NumberPosition StringBy Name
$String(Number)if Position the name List Sorting vList =
"1=GREEN;0=RED;3=BLUE"
vAnswer = $SortList(vList, "$IdPart: Ascending") ;vAnswer =
"0=RED;1=GREEN;3=BLUE vAnswer = $SortList(vList, "$ValuePart: A")
;vAnswer:"3=BLUE;1=GREEN;0=RED List Sorting vAnswer =
$SortListId(vList, "3: Ascending)
1.2.3 = Key1 !; Type !; DataZ; 1.2= Key2 !; Type !; DataX; 1.1.4 =
Key3 !; Type !; DataY vAnswer = $SortListId(vList, "3: Ascending) =
Key2 !; Type !; DataX; 1.1.4 = Key3 !; Type !; DataY; 1.2.3 = Key1
!; Type !; DataZ List Sorting 1.2.3 = Key1 !; Type !; DataZ;
= Key2 !; Type !; DataX; 1.1.4 = Key3 !; Type !; DataY vAnswer =
$SortListId(vList, "$IdPart: Level A) 1.1.4 = Key3 !; Type !;
DataY; 1.2.3 = Key1 !; Type !; DataZ Searching &
Syntax-comparison Search Syntax pattern and $Syntax function can be
used with
$ltrim, $rtrim functions $scan, $rscan, $replace functions.
Conditions like if, while etc Search SyntaxMode $syntax ( String {,
SyntaxMode })
Pattern matching characters like # & etc, will keep their
original syntax functionality. For currency the $ is introduced. (%
will escape special characters) SyntaxMode Classic or C (default)
CaseInsensitive, CI, or I CaseSensitive, CS, or S NlsLocale, NLS,
or N Search Field Syntax Definitions Treat the following
characters
% escape character for comparison. %[CS] or %[S]as Case Sensitive.
%[CI] or %[I]as Case InSensitive. %[NLS] or %[N]as Follow the
$NlsLocale %[CLASSIC] or %[X] back to original syntax rules Search
$syntax ( String {, SyntaxMode )} Example
Resulting syntax string Matches $syntax("D&G") '%[X]D&G'
DIG, DOG, . $syntax("D&G", CS) '%[CS]D%&G%[X]' D&G
$syntax("D&G", CI) '%[CI]D%&G%[X]' D&G, d&g,
D&g, d&G $syntax(%[CI]D%&%[CS]G%[X])
'%[CI]D%&%[CS]G%[X]' D&G, d&G $syntax("i#B", NLS)
'%[NLS]i%#B%[X]' Depends on locale. If $NlsLocale = tr_TR, i#B and
#b, but not I#B Search Pattern = "angstrom"
Text = "ngstrom, ngstrom, aengstrom, ngstrom, ngstrom, angstrom.
Pos: Pattern = "angstrom" Pos =
$scan(Text[Index+1],$syntax(Pattern, "NLS")) Results Dutch=>1,
11, 51 Results Danish=>51 Pattern = "aengstrom" Results
Dutch=> 21, 32, 41 Results Danish=> 21 Searching NOT Proc
statements: Uppercase & Lowercase
$Uppercase (string{, NLSLOCALE | CLASSIC }) $Lowercase (string{,
NLSLOCALE | CLASSIC }) FIELD1 = $uppercase ("Gro-Gerau",
"nlslocale") ;Result: FIELD1 =GROSS-GERAU NOT Proc statements:
Uppercase & Lowercase Time Zone NLS Time Zone System Time Zone
Internal Time Zone Time Zone Syntax $nlstimezone = TimeZone |
Classic" | System
When $NlsTimeZone is set Proc functions returns the External
Date(Time) Format/Parse shows the External Date(Time)
Stores/Retrieve the External Date(Time) Exchange via Xml and/or
other gates like CallIn/CallOut etc. also via External Date(Time)
Time Zone Syntax $nlsinternaltime = "UTC" | Classic
When $NlsInternalTime is set to "UTC Then all 'internal;
(Date)Times are handled in UTC+00:00. Proc functions returns the
Internal Date(Time) Stores/Retrieve the Internal Date(Time)
Exchange via Xml and/or other gates like CallIn/CallOut the
Internal Date(Time) etc. via Internal Date(Time) Format/Parse will
be corrected to the External/Locale Date(Time). $NlsInternalTime
will NOT have influence on the $NLS DisplayFormats but on parsing
of Date(Time) values NLS Listings Syntax Get a list of available
Locales & TimeZones
List= $NlsLocaleList{(System")} List= $NlsTimeZoneList {(System")}
Function / asn-Setting
Setting NLS with the local Browser setting $NlsLocale =
$item("accept-language, $webinfo("httpRequestHeaders")) The
following Nls Properties are available: SORT_STRENGTH 1=Primary,
2=Secondary, 3=Tertiary, 4=Quaternary; Default=3
SEARCH_STRENGTH1=Primary, 2=Secondary, 3=Tertiary, 4=Quaternary;
Default=1 LOCALEset via $Nls_locale; Default SYSTEM_LOCALE
SYSTEM_LOCALEReadOnly FRENCH_COLLATION0=off, 1=on
NORMALIZATION_MODE0=off, 1=shifted, 2=non_ignorable
ALTERNATE_HANDLING0=off, 1=on CASE_FIRST0=off, 1=upper_first,
2=lower_first CASE_LEVEL0=off, 1=on HIRAGANA_QUATERNARY_MODE 0=off,
1=on Restrictions Windows{/CE} VMS & AS400 in Patch
Sorting & Searching limitations $NlsLocale = "system" DatePart,
MEDIUM is mapped to SHORT DatePart, FULL is mapped to LONG TimePart
all are mapped to SHORT VMS & AS400 in Patch Agenda APS
Integration National Language Support HTML 42 UPOPMAIL Internal
Uniface component that provides operations for sending and
receiving. Sending a message always as a plain text. activate
UPOPMAIL.SendMail(SMTPServer, HeaderList, Text, AttList, MailSize)
43 43 HTML with old UPOPMAIL 44 44 UPOPMAIL 2.0 Generate proper
MIME headers for all the combination of a plain text, a HTML text,
attachments and inline images. Introduce new APIs for sending an.
Increase the max size of the text imposed by the signature
parameter limit from 10K to 10M. 45 45 New APIs for sending a
mail
Build up the mail structure one by one instead of passing all info
at once. newinstance UPOPMAIL, Mail Mail->LogonSMTP(SERVER, , )
Mail->SetFrom(FROM_ADDR) Mail->SetToList(TO_ADDR)
Mail->SetSubject(SUBJ) Mail->SetMessage(TEXT, )
Mail->SetMessage(HTMLTEXT, MIMEType=text/html)
Mail->AddAttachmentFromFile(FILE, ) Mail->Send() 46 46 New
APIs (1) Operations for the header information
Note that TO, CC and BCC accept a list separated by GOLD+;
SetFrom(FROM_ADDR) SetToList(TO_ADDR_LIST) SetCCList(CC_ADDR_LIST)
SetBCCList(BCC_ADDR_LIST) SetSubject(SUBJECT) SetPriority(PRIORITY)
SetReplyTo(REPLYTO) 47 47 New APIs (2) Operation for the message
body
SetMessage(MESSAGE, OPTION_LIST) OPTION_LIST: MIMEType=text/plain
or text/html Example SetMessage(TEXT, ) SetMessage(HTMLTEXT,
MIMEType=text/html) 48 48 New APIs (3) To add attachments
AddAttchmentFromFile(FILEPATH, OPTION_LIST) OPTION_LIST: MIMEType=
ex. MIMEType=image/jpg 49 49 HTML mail with inline images
How to send HTMLwith inline images? Link to the external images. or
Provide image soruce with cid: AddInlineFromFile(c:\image.jpg, )
Use ContentID. AddInlineFromFile(c:\image.jpg, ContentID=picture1)
50 50 New APIs (4) Send the email Clear the mail structure
Send(OPTION_LIST) OPTION_LIST: MaxSize= ex. MaxSize=10000 Clear the
mail structure ClearMail() 51 51 Notes New APIs are recommended to
use for sending a mail. Old SendMail() operation is available only
for backward compatibility. UPOPMAIL doesnt generate, parse,
convert or check HTML text. Just send a piece of text with the
text/html MIME header. 52 52 Slide for big flashy message here
Thank You & Questions