SlideShare a Scribd company logo
The Road to Damascus –A Conversion Experience: 
LS and @Formula to SSJS 
2014/09/12 –Matthew Fyleman
Matthew Fyleman 
21 Years as a Notes/Domino Developer 
Mostly Working on: 
Xpagesconversions 
Product development 
Who Am I?
When should you convert existing code? 
Conversion Options 
NotesAgent.run() with parameter doc 
Search and Replace 
Dedicated Tools 
Search and Replace 
Preparation 
Introduction to Regular Expressions 
Examples and Demonstration 
Tips and Traps 
Dedicated Tools 
Questions 
What am I talking about?
Never! 
When should you convert existing code?
It is always going to be slow 
GIGO 
You will introduce new bugs 
Re-developing will be quicker, cheaper and you will end up with a better result 
But if you really must ... 
What is the problem?
NotesAgent.run() 
Quick and Dirty 
Agent must run independently 
Only use when agents are available and time is critical 
Scheduled agents excluded –mostly! 
Search and Replace 
LotusScript-> JavaScript (and Java) 
Less useful for @Formula 
Dedicated Tools 
@Formula 
What are your options?
Search and Replace is most useful for LS conversion 
Syntactically similar 
Easiest if you do a little refactoring first 
Option Declare 
doc.field(0) -> doc.getItemValue(“Field“)(0) 
Camel Case Notes Objects 
Make Sure Method calls are consistently named 
Best to Avoid All-In-One-Go 
Function or Sub at a Time 
Variable with one purpose in one location may have a different use elsewhere 
Converting LotusScriptto SSJS -Preparation
Regular Expressions are your new BFF 
Sophisticated Pattern Matching 
Elements from search can be carried through to replace 
The Search and Replace built in to DDE can use Regular Expressions 
Useful outside LS conversion (e.g. Validation) 
See Planet Lotus -http://planetlotus.org/profiles/ross-swick_97733 
Regular Expressions
[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3} 
Example –What does this do?
Tidy up first –Option Declare, remove clustering e.g.: 
Dim xas Integer,yas Integer,zas Integer 
We want to match any variable name in the pattern: 
Dim <varname> As <Any valid type> 
Fairly simple: 
Dim[ ]+[A-Za-z0-9_]+[ ]+As[ ]+(Integer|String|Boolean|Double|Variant) 
But how do we replace? 
Modify the search: 
Dim[ ]+([w]*)[ ]+As[ ]+String 
Use this for replace 
var1 = “”; 
Starting Simple –Dim Statements
For Notes Objects, Things are simpler 
Dim <varname> As Notes<rest of object name> 
-Ignore ... As New NotesSessionfor now 
Also, initialising in SSJS, = null is ok: 
var<varname>:Notes<rest of object name> = null; 
So our terms are: 
Search: 
Dim[ ]+([w]*)[ ]+As[ ]+(Notes[w]*) 
Replace: 
var1:2 = null; 
Starting Simple –Dim Statements (2)
For the most part, simple S & R (but order is important): 
End If to} 
[ ]*Thento) { 
Else[ ]+If[ ]*to } else if ( 
Else [ ]*to } else { 
If[ ]* to if ( 
But what about: 
If (x = 10) Then 
Use Search: If[ ]+([w()[].<>" ]*)=([w()[].<> "]*)[ ]+Then 
Use Replace: if (1==2) { - 
NB: Works but not optimal! 
Other comparison operators not a problem 
A bit more complex –If Statements
The problem: 
Session object is global in ssjs: ‘session’ 
In LS it is created: 
Dim sessAs New NotesSession 
Need to find all LS session objects, and replace with session 
How do you get a list of session object names? 
! –session objects 
You need a coffee!
Java String Object has regexsearch and replace 
String source = “Dim x As String”; 
String result = source.replaceAll(“Dim[ ]+([w]*)[ ]+As[ ]+String”, “var$1 = “”;”); 
Pattern and Matcher objects make this even more powerful 
Pattern p = Pattern.compile(pattern); 
Matcher m = p.matcher(this.source); 
intstartPos= 0; 
while (m.find(startPos)) { 
if (!itemList.contains(m.group(1))) { 
itemList.add(m.group(1)); 
} 
startPos= m.end() + 1; 
} 
Adding Java
Similar Issue to Session 
Need to find all document object names, and replace field handling methods 
Will probably need to handle dot notation 
Arrgghh! 
How do you search for dot notation? 
<doc name>.([^GetItemValue])([0-9]+) 
Still hard work! 
Field Handling
There are other types than string! 
Always review and test converted code thoroughly 
Date handling is a pain 
Script libraries can help here –Java? 
Watch out for User interaction and particularly dialogues 
Work out your strategies in advance! 
Search and Replace –Tips and Traps
In some respects @Formula -> SSJS is easier than LS -> SSJS 
@Formula JavaScript Wrappers help a lot 
Mostly just ‘;’ to ‘,’, and converting lists to arrays 
Some constructions are obvious: 
@SetField(“Field”, Value); 
Goes to: 
doc.replaceItemValue(“Field”, Value); 
Or 
S: @SetField([ ]*([w”]*)[ ]*,[ ]*([w”]*)[ ]*); 
R: doc.replaceItemValue(1, 2); 
But there are some issues ... 
Converting Formula 
@
No direct equivalent in SSJS for *+, *= *>= etc. when applied to Lists 
Need to plan for this 
Java Class/Library to provide direct substitute 
Unfortunately, Java does not permit operator overloading, so has to be a set of methods 
Converting Formula –List Processing 
@!
@If(@Contains(_WFData_neu;_Key);""; 
@Do( 
@Set("_Sachgebiet_Zuordnung";@DbLookup("NOTES":"NOCACHE";"":_ADM$StructureDB;"Workflows";"WFArbeitsanweisung";"Sachgebietzuordnung")); 
@If(_Sachgebiet_Zuordnung = "" | !@Contains(_Sachgebiet_Zuordnung;_Key2);@Do( 
@Prompt([Ok];"Hinweis";"In der System Struktur VBM wurde für das aktuelle Sachgebiet kein Workflow definiert. Das Dokument wird zum ehemaligen Kompetenzträger zurückgegeben, damit dieser ein neues Sachgebiet auswählen kann."); 
@Set("_Kompetenzträger";Bearbeiter1); 
@Set("_tmpintern";5) 
); 
@Do( 
@Prompt([Ok];"Hinweis";"In der System Struktur VBM wurde für das aktuelle Sachgebiet ein neues Sachgebiet konfiguriert. Das Dokument wird zum Kompetenzträger zurückgegeben, damit dieser das neue Sachgebiet auswählen kann."); 
@Set("_neues_Sachgebiet";@Left(@Right(_Sachgebiet_Zuordnung;_key2);"||")); 
@Set("_Elements";@Elements(@Explode(@Left(@Left(@Right(_WFData_neu;"||Sachgebiet#");"||"); _neues_Sachgebiet) + _neues_Sachgebiet; "$" ))); 
@Set("_KompetenzträgerData";@Explode(@Left(@Right(_WFData_neu;"||Kompetenzträger#");"||"); "$")); 
@Set("_Kompetenzträger";@Subset(@Subset(_KompetenzträgerData;_Elements);-1)); 
@Set("_tmpintern";6) 
) 
) 
) 
); 
Converting Formula -@If, @Do and @While 
@!!
Focusing on @If 
•@Formula is a FUNCTION language 
•@If is a function not a statement 
•In practice: 
@SetField(“Author”; @If(Status=“1”; Manager; Salesman)); 
•Needs to convert to: 
if (Status == “1”) { 
varauthor = doc.getItemValueString(“Manager”); 
} else { 
varauthor = doc.getItemValueString(“Salesman”); 
} 
doc.replaceItemValue(“Author”, author); 
@!!!
Search and Replace can be used for @Formula -> SSJS ... 
... but it can only take you so far 
A dedicated tool can go further 
Only real alternative to manual translation for complex statements 
Time consuming to create 
Still not a silver bullet 
Tools
Espresso -http://www.ultrapico.com/Expresso.htm 
Good for learning regex, and serious regexdev 
Free! 
GREP 
Sophisticated regexfile search 
Where regex started (UNIX grep)! 
Third Party Tools
OpenNTF–www.openntf.org 
RegexQuick Reference 
http://www.night-ray.com/regex.pdf 
Loads of websites for all aspects of regexdevelopment 
Mastering Regular Expressions –Jeffrey E.F. Friedl– O’Reilly Publishing 
Resources and Information
Questions?
matthew.fyleman@we4it.com

More Related Content

What's hot (18)

Gorm
GormGorm
Gorm
NexThoughts Technologies
 
Namespace in C++ Programming Language
Namespace in C++ Programming LanguageNamespace in C++ Programming Language
Namespace in C++ Programming Language
Himanshu Choudhary
 
Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Grails GORM - You Know SQL. You Know Queries. Here's GORM.Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Ted Vinke
 
groovy rules
groovy rulesgroovy rules
groovy rules
Paul King
 
Core java by a introduction sandesh sharma
Core java by a introduction sandesh sharmaCore java by a introduction sandesh sharma
Core java by a introduction sandesh sharma
Sandesh Sharma
 
Scala - en bedre Java?
Scala - en bedre Java?Scala - en bedre Java?
Scala - en bedre Java?
Jesper Kamstrup Linnet
 
2CPP15 - Templates
2CPP15 - Templates2CPP15 - Templates
2CPP15 - Templates
Michael Heron
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with Scala
Neelkanth Sachdeva
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?
Jesper Kamstrup Linnet
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
Mohammed Irfan Shaikh
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
Knoldus Inc.
 
Python dictionary : past, present, future
Python dictionary: past, present, futurePython dictionary: past, present, future
Python dictionary : past, present, future
delimitry
 
Python lec4
Python lec4Python lec4
Python lec4
Swarup Ghosh
 
Python lec5
Python lec5Python lec5
Python lec5
Swarup Ghosh
 
Introduction To Groovy
Introduction To GroovyIntroduction To Groovy
Introduction To Groovy
manishkp84
 
Javascript
JavascriptJavascript
Javascript
Gita Kriz
 
Linq Introduction
Linq IntroductionLinq Introduction
Linq Introduction
Neeraj Kaushik
 
Context
ContextContext
Context
alexisabril
 
Namespace in C++ Programming Language
Namespace in C++ Programming LanguageNamespace in C++ Programming Language
Namespace in C++ Programming Language
Himanshu Choudhary
 
Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Grails GORM - You Know SQL. You Know Queries. Here's GORM.Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Grails GORM - You Know SQL. You Know Queries. Here's GORM.
Ted Vinke
 
groovy rules
groovy rulesgroovy rules
groovy rules
Paul King
 
Core java by a introduction sandesh sharma
Core java by a introduction sandesh sharmaCore java by a introduction sandesh sharma
Core java by a introduction sandesh sharma
Sandesh Sharma
 
Functional programming with Scala
Functional programming with ScalaFunctional programming with Scala
Functional programming with Scala
Neelkanth Sachdeva
 
Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?Scala - en bedre og mere effektiv Java?
Scala - en bedre og mere effektiv Java?
Jesper Kamstrup Linnet
 
Functions & closures
Functions & closuresFunctions & closures
Functions & closures
Knoldus Inc.
 
Python dictionary : past, present, future
Python dictionary: past, present, futurePython dictionary: past, present, future
Python dictionary : past, present, future
delimitry
 
Introduction To Groovy
Introduction To GroovyIntroduction To Groovy
Introduction To Groovy
manishkp84
 

Similar to Icsug dev day2014_road to damascus - conversion experience-lotusscript and @formula to ssjs (20)

Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjsIcsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
ICS User Group
 
Angular Schematics
Angular SchematicsAngular Schematics
Angular Schematics
Christoffer Noring
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
Julie Iskander
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
Jonathan Felch
 
Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional Programming
RichardWarburton
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
Prototype Js
Prototype JsPrototype Js
Prototype Js
Kivanc Kanturk
 
PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)
Concentrated Technology
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans
Fabrizio Giudici
 
Refactoring
RefactoringRefactoring
Refactoring
Bruno Quintella
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Salaudeen Rajack
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Clean Code
Clean CodeClean Code
Clean Code
Nascenia IT
 
lab4_php
lab4_phplab4_php
lab4_php
tutorialsruby
 
lab4_php
lab4_phplab4_php
lab4_php
tutorialsruby
 
DataMapper
DataMapperDataMapper
DataMapper
Yehuda Katz
 
Pxb For Yapc2008
Pxb For Yapc2008Pxb For Yapc2008
Pxb For Yapc2008
maximgrp
 
Modern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.jsModern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
Mike North
 
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
hwilming
 
DataWeave 2.0 Language Fundamentals
DataWeave 2.0 Language FundamentalsDataWeave 2.0 Language Fundamentals
DataWeave 2.0 Language Fundamentals
Joshua Erney
 
Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjsIcsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
Icsug conf 14_dev03_xpages-roadtodamascas-lotus-script-and-formula-to-ssjs
ICS User Group
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
Julie Iskander
 
Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)Groovy On Trading Desk (2010)
Groovy On Trading Desk (2010)
Jonathan Felch
 
Twins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional ProgrammingTwins: Object Oriented Programming and Functional Programming
Twins: Object Oriented Programming and Functional Programming
RichardWarburton
 
Practical catalyst
Practical catalystPractical catalyst
Practical catalyst
dwm042
 
PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)PowerShell Core Skills (TechMentor Fall 2011)
PowerShell Core Skills (TechMentor Fall 2011)
Concentrated Technology
 
Rich Internet Applications con JavaFX e NetBeans
Rich Internet Applications  con JavaFX e NetBeans Rich Internet Applications  con JavaFX e NetBeans
Rich Internet Applications con JavaFX e NetBeans
Fabrizio Giudici
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
Salaudeen Rajack
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Pxb For Yapc2008
Pxb For Yapc2008Pxb For Yapc2008
Pxb For Yapc2008
maximgrp
 
Modern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.jsModern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
Mike North
 
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
Exploring Ceylon with Gavin King - JUG BB Talk - Belrin 2014
hwilming
 
DataWeave 2.0 Language Fundamentals
DataWeave 2.0 Language FundamentalsDataWeave 2.0 Language Fundamentals
DataWeave 2.0 Language Fundamentals
Joshua Erney
 

More from ICS User Group (20)

Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016
ICS User Group
 
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
ICS User Group
 
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
ICS User Group
 
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
ICS User Group
 
Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016
ICS User Group
 
Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016
ICS User Group
 
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
ICS User Group
 
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
ICS User Group
 
OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016
ICS User Group
 
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
ICS User Group
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
ICS User Group
 
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
ICS User Group
 
Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016
ICS User Group
 
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
ICS User Group
 
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
ICS User Group
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016
ICS User Group
 
Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016
ICS User Group
 
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
ICS User Group
 
Beyond XPages ICS.UG 2015
Beyond XPages  ICS.UG 2015Beyond XPages  ICS.UG 2015
Beyond XPages ICS.UG 2015
ICS User Group
 
ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015
ICS User Group
 
Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016Domino Security Present and Future ConnectED Review - ICS.UG 2016
Domino Security Present and Future ConnectED Review - ICS.UG 2016
ICS User Group
 
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
Moving DNUG Usergroup von on-premise in die IBM ConnectionsCloud - ICS.UG 2016
ICS User Group
 
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
IBM Notes Traveler & IBM Mobile Connect What's new?, What's next? - ICS.UG 2016
ICS User Group
 
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
Warum IBM mit Watson den Büroalltag revolutioniert - ICS.UG 2016
ICS User Group
 
Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016Private Cloud Storage - ICS.UG 2016
Private Cloud Storage - ICS.UG 2016
ICS User Group
 
Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016Die mobile Herausforderung meistern! - ICS.UG 2016
Die mobile Herausforderung meistern! - ICS.UG 2016
ICS User Group
 
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - Verse (&Toscana) - ICS.UG 2016
ICS User Group
 
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
Cloud Update 2016 IBM Collaboration Solutions - ConnectionsCloud - ICS.UG 2016
ICS User Group
 
OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016OpenNTF - From Donation to Contribution - ICS.UG 2016
OpenNTF - From Donation to Contribution - ICS.UG 2016
ICS User Group
 
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
Virtual, Faster, Better! How to Virtualize the Rich Client and Browser Plugin...
ICS User Group
 
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
Find your data - using GraphDB capabilities in XPages applications - ICS.UG 2016
ICS User Group
 
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
XPages on IBM Bluemix: The Do's and Dont's - ICS.UG 2016
ICS User Group
 
Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016Die Zukunft spricht Domino! - ICS.UG 2016
Die Zukunft spricht Domino! - ICS.UG 2016
ICS User Group
 
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
Smashdocs - Dokumente gemeinsam schreiben - ICS.UG 2016
ICS User Group
 
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
Smashdocs - Collaborative authoring & reviewing - ICS.UG 2016
ICS User Group
 
IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016IBM Digital Experience Overview - ICS.UG 2016
IBM Digital Experience Overview - ICS.UG 2016
ICS User Group
 
Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016Watson - Bitte-helfen-Sie - ICS.UG 2016
Watson - Bitte-helfen-Sie - ICS.UG 2016
ICS User Group
 
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
Planung / Terminierung eines Außendienstes mit XPages - ICS.UG 2016
ICS User Group
 
Beyond XPages ICS.UG 2015
Beyond XPages  ICS.UG 2015Beyond XPages  ICS.UG 2015
Beyond XPages ICS.UG 2015
ICS User Group
 
ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015ATLUG comes to you ICS.UG 2015
ATLUG comes to you ICS.UG 2015
ICS User Group
 

Recently uploaded (20)

Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
A Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity SequencesA Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity Sequences
natarajan8993
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
fundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptxfundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptx
Sunkod
 
Approach to diabetes Mellitus, diagnosis
Approach to diabetes Mellitus,  diagnosisApproach to diabetes Mellitus,  diagnosis
Approach to diabetes Mellitus, diagnosis
Mohammed Ahmed Bamashmos
 
Bloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptxBloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptx
FamilyWorshipCenterD
 
2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx
aschenakidawit1
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.
NeoRakodu
 
The Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdfThe Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdf
RDinuRao
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
Bidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdfBidding World Conference 2027-NSGF Senegal.pdf
Bidding World Conference 2027-NSGF Senegal.pdf
ISGF - International Scout and Guide Fellowship
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Rajdeep Chakraborty
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
Bidding World Conference 2027 - NSGF Mexico.pdf
Bidding World Conference 2027 - NSGF Mexico.pdfBidding World Conference 2027 - NSGF Mexico.pdf
Bidding World Conference 2027 - NSGF Mexico.pdf
ISGF - International Scout and Guide Fellowship
 
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
patricialago3459
 
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdfMicrosoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
MinniePfeiffer
 
Bidding World Conference 2027 - Ghana.pptx
Bidding World Conference 2027 - Ghana.pptxBidding World Conference 2027 - Ghana.pptx
Bidding World Conference 2027 - Ghana.pptx
ISGF - International Scout and Guide Fellowship
 
Setup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODCSetup & Implementation of OutSystems Cloud Connector ODC
Setup & Implementation of OutSystems Cloud Connector ODC
outsystemspuneusergr
 
A Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity SequencesA Bot Identification Model and Tool Based on GitHub Activity Sequences
A Bot Identification Model and Tool Based on GitHub Activity Sequences
natarajan8993
 
Reflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabweReflections on an ngo peace conference in zimbabwe
Reflections on an ngo peace conference in zimbabwe
jujuaw05
 
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvvBasic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
Basic.pptxsksdjsdjdvkfvfvfvfvfvfvfvfvfvvvv
hkthmrz42n
 
fundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptxfundamentals of communicationclass notes.pptx
fundamentals of communicationclass notes.pptx
Sunkod
 
Bloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptxBloom Where You Are Planted 05.04.2025.pptx
Bloom Where You Are Planted 05.04.2025.pptx
FamilyWorshipCenterD
 
2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx2. Asexual propagation of fruit crops and .pptx
2. Asexual propagation of fruit crops and .pptx
aschenakidawit1
 
cardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugscardiovascular outcome in trial of new antidiabetic drugs
cardiovascular outcome in trial of new antidiabetic drugs
Mohammed Ahmed Bamashmos
 
Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.Key Elements of a Procurement Plan.docx.
Key Elements of a Procurement Plan.docx.
NeoRakodu
 
The Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdfThe Business Dynamics of Quick Commerce.pdf
The Business Dynamics of Quick Commerce.pdf
RDinuRao
 
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
THE SEXUAL HARASSMENT OF WOMAN AT WORKPLACE (PREVENTION, PROHIBITION & REDRES...
ASHISHKUMAR504404
 
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptxLec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
Lec 3 - Chapter 2 Carl Jung’s Theory of Personality.pptx
TayyabaSiddiqui12
 
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptxBesu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Besu Shibpur Enquesta 2012 Intra College General Quiz Finals.pptx
Rajdeep Chakraborty
 
2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx2025-05-04 A New Day Dawns 03 (shared slides).pptx
2025-05-04 A New Day Dawns 03 (shared slides).pptx
Dale Wells
 
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
ICSE 2025 Keynote: Software Sustainability and its Engineering: How far have ...
patricialago3459
 
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdfMicrosoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
Microsoft Azure Data Fundamentals (DP-900) Exam Dumps & Questions 2025.pdf
MinniePfeiffer
 

Icsug dev day2014_road to damascus - conversion experience-lotusscript and @formula to ssjs

  • 1. The Road to Damascus –A Conversion Experience: LS and @Formula to SSJS 2014/09/12 –Matthew Fyleman
  • 2. Matthew Fyleman 21 Years as a Notes/Domino Developer Mostly Working on: Xpagesconversions Product development Who Am I?
  • 3. When should you convert existing code? Conversion Options NotesAgent.run() with parameter doc Search and Replace Dedicated Tools Search and Replace Preparation Introduction to Regular Expressions Examples and Demonstration Tips and Traps Dedicated Tools Questions What am I talking about?
  • 4. Never! When should you convert existing code?
  • 5. It is always going to be slow GIGO You will introduce new bugs Re-developing will be quicker, cheaper and you will end up with a better result But if you really must ... What is the problem?
  • 6. NotesAgent.run() Quick and Dirty Agent must run independently Only use when agents are available and time is critical Scheduled agents excluded –mostly! Search and Replace LotusScript-> JavaScript (and Java) Less useful for @Formula Dedicated Tools @Formula What are your options?
  • 7. Search and Replace is most useful for LS conversion Syntactically similar Easiest if you do a little refactoring first Option Declare doc.field(0) -> doc.getItemValue(“Field“)(0) Camel Case Notes Objects Make Sure Method calls are consistently named Best to Avoid All-In-One-Go Function or Sub at a Time Variable with one purpose in one location may have a different use elsewhere Converting LotusScriptto SSJS -Preparation
  • 8. Regular Expressions are your new BFF Sophisticated Pattern Matching Elements from search can be carried through to replace The Search and Replace built in to DDE can use Regular Expressions Useful outside LS conversion (e.g. Validation) See Planet Lotus -http://planetlotus.org/profiles/ross-swick_97733 Regular Expressions
  • 10. Tidy up first –Option Declare, remove clustering e.g.: Dim xas Integer,yas Integer,zas Integer We want to match any variable name in the pattern: Dim <varname> As <Any valid type> Fairly simple: Dim[ ]+[A-Za-z0-9_]+[ ]+As[ ]+(Integer|String|Boolean|Double|Variant) But how do we replace? Modify the search: Dim[ ]+([w]*)[ ]+As[ ]+String Use this for replace var1 = “”; Starting Simple –Dim Statements
  • 11. For Notes Objects, Things are simpler Dim <varname> As Notes<rest of object name> -Ignore ... As New NotesSessionfor now Also, initialising in SSJS, = null is ok: var<varname>:Notes<rest of object name> = null; So our terms are: Search: Dim[ ]+([w]*)[ ]+As[ ]+(Notes[w]*) Replace: var1:2 = null; Starting Simple –Dim Statements (2)
  • 12. For the most part, simple S & R (but order is important): End If to} [ ]*Thento) { Else[ ]+If[ ]*to } else if ( Else [ ]*to } else { If[ ]* to if ( But what about: If (x = 10) Then Use Search: If[ ]+([w()[].<>" ]*)=([w()[].<> "]*)[ ]+Then Use Replace: if (1==2) { - NB: Works but not optimal! Other comparison operators not a problem A bit more complex –If Statements
  • 13. The problem: Session object is global in ssjs: ‘session’ In LS it is created: Dim sessAs New NotesSession Need to find all LS session objects, and replace with session How do you get a list of session object names? ! –session objects You need a coffee!
  • 14. Java String Object has regexsearch and replace String source = “Dim x As String”; String result = source.replaceAll(“Dim[ ]+([w]*)[ ]+As[ ]+String”, “var$1 = “”;”); Pattern and Matcher objects make this even more powerful Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(this.source); intstartPos= 0; while (m.find(startPos)) { if (!itemList.contains(m.group(1))) { itemList.add(m.group(1)); } startPos= m.end() + 1; } Adding Java
  • 15. Similar Issue to Session Need to find all document object names, and replace field handling methods Will probably need to handle dot notation Arrgghh! How do you search for dot notation? <doc name>.([^GetItemValue])([0-9]+) Still hard work! Field Handling
  • 16. There are other types than string! Always review and test converted code thoroughly Date handling is a pain Script libraries can help here –Java? Watch out for User interaction and particularly dialogues Work out your strategies in advance! Search and Replace –Tips and Traps
  • 17. In some respects @Formula -> SSJS is easier than LS -> SSJS @Formula JavaScript Wrappers help a lot Mostly just ‘;’ to ‘,’, and converting lists to arrays Some constructions are obvious: @SetField(“Field”, Value); Goes to: doc.replaceItemValue(“Field”, Value); Or S: @SetField([ ]*([w”]*)[ ]*,[ ]*([w”]*)[ ]*); R: doc.replaceItemValue(1, 2); But there are some issues ... Converting Formula @
  • 18. No direct equivalent in SSJS for *+, *= *>= etc. when applied to Lists Need to plan for this Java Class/Library to provide direct substitute Unfortunately, Java does not permit operator overloading, so has to be a set of methods Converting Formula –List Processing @!
  • 19. @If(@Contains(_WFData_neu;_Key);""; @Do( @Set("_Sachgebiet_Zuordnung";@DbLookup("NOTES":"NOCACHE";"":_ADM$StructureDB;"Workflows";"WFArbeitsanweisung";"Sachgebietzuordnung")); @If(_Sachgebiet_Zuordnung = "" | !@Contains(_Sachgebiet_Zuordnung;_Key2);@Do( @Prompt([Ok];"Hinweis";"In der System Struktur VBM wurde für das aktuelle Sachgebiet kein Workflow definiert. Das Dokument wird zum ehemaligen Kompetenzträger zurückgegeben, damit dieser ein neues Sachgebiet auswählen kann."); @Set("_Kompetenzträger";Bearbeiter1); @Set("_tmpintern";5) ); @Do( @Prompt([Ok];"Hinweis";"In der System Struktur VBM wurde für das aktuelle Sachgebiet ein neues Sachgebiet konfiguriert. Das Dokument wird zum Kompetenzträger zurückgegeben, damit dieser das neue Sachgebiet auswählen kann."); @Set("_neues_Sachgebiet";@Left(@Right(_Sachgebiet_Zuordnung;_key2);"||")); @Set("_Elements";@Elements(@Explode(@Left(@Left(@Right(_WFData_neu;"||Sachgebiet#");"||"); _neues_Sachgebiet) + _neues_Sachgebiet; "$" ))); @Set("_KompetenzträgerData";@Explode(@Left(@Right(_WFData_neu;"||Kompetenzträger#");"||"); "$")); @Set("_Kompetenzträger";@Subset(@Subset(_KompetenzträgerData;_Elements);-1)); @Set("_tmpintern";6) ) ) ) ); Converting Formula -@If, @Do and @While @!!
  • 20. Focusing on @If •@Formula is a FUNCTION language •@If is a function not a statement •In practice: @SetField(“Author”; @If(Status=“1”; Manager; Salesman)); •Needs to convert to: if (Status == “1”) { varauthor = doc.getItemValueString(“Manager”); } else { varauthor = doc.getItemValueString(“Salesman”); } doc.replaceItemValue(“Author”, author); @!!!
  • 21. Search and Replace can be used for @Formula -> SSJS ... ... but it can only take you so far A dedicated tool can go further Only real alternative to manual translation for complex statements Time consuming to create Still not a silver bullet Tools
  • 22. Espresso -http://www.ultrapico.com/Expresso.htm Good for learning regex, and serious regexdev Free! GREP Sophisticated regexfile search Where regex started (UNIX grep)! Third Party Tools
  • 23. OpenNTF–www.openntf.org RegexQuick Reference http://www.night-ray.com/regex.pdf Loads of websites for all aspects of regexdevelopment Mastering Regular Expressions –Jeffrey E.F. Friedl– O’Reilly Publishing Resources and Information