The document discusses the use of Perl at the Geneva Courts of Law. It provides an overview of the IT infrastructure and applications used, including a case management system and electronic judgements archive built using Perl. Several changes since 2009 are described, such as a database migration. The document outlines the modules used, including Moose, Template Toolkit, and DBIx::DataModel. It concludes that Perl has worked well technically but recruitment has sometimes been challenging due to negative perceptions of the language.
A CASE STUDY ON ONLINE TICKET BOOKING SYSTEM PROJECT.pdf
Yapceu2015 geneva courts
1. 04.09.2015 - Page 1
Département
Office
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Perl at Geneva Courts of Law :
recent developments
A Perl success story
An update from YAPC::EU::2009 Lisbon
YAPC.:EU:::2015, Granada
laurent.dami@justice.ge.ch
Département
Office
2. 04.09.2015 - Page 2
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Agenda
• Goals
– Tell how and why we use Perl, and are happy with it
– Discuss some choices of components in our architecture
• Chapters
– Business context
– IT at Geneva justice
– Main changes since 2009
– Perl usage
– Modules we used (or created)
– Conclusions
3. 04.09.2015 - Page 1
Département
Office
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Business context
4. 04.09.2015 - Page 4
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Geneva : one of 26 Swiss cantons
• 15,88 km2
• 484'000 inhabitants
(2nd Swiss agglomeration)
• "Big Geneva" : almost 1'000'000
inhabitants
• Among the highest concentrations
of lawyers in Europe
5. 04.09.2015 - Page 5
Courts in Switzerland
• Unified "content laws" : civil code, penal code, etc.
• Before 2011 : cantonal procedural laws
– Unified since 01.01.2011
– Needed several years of adaptation
• Swiss federal state
– each canton responsible for its court organization & tools
– 2 software products on Swiss market
– 3 cantons with their own sofware
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
6. 04.09.2015 - Page 6
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Geneva courts : some figures
• > 20 courts
• 149 permanent judges
• 364 occasional judges (assisting, replacing)
• 285 "prud'hommes" (industrial tribunal)
• 647 employees
• expenses 150M CHF (2% of global Geneva budget)
• 62'000 cases / year
7. 04.09.2015 - Page 7
Mission of Justice department
• Judge
– Civil cases
– Penal cases
– Administrative cases
• Notify & execute decisions
– Impact of judicial decisions on other authorities
• Subsidize
– Judicial assistance
• Publish
– http://ge.ch/justice/ (mostly Drupal-PHP )
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
8. 04.09.2015 - Page 1
Département
Office
IT at Geneva justice
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
9. 04.09.2015 - Page 9
IT resources
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
DSI-Direction
(1.5)
DSI-ASSIST (6)
Assistance, support,
data correction
Studies & projects (6) Development &
operations (5)
Central IT services of State of Geneva
Infrastructure : network, servers, databases, workstations, etc.
1 head
1 release manager & QA
1 document modeler
2 application developers
Secrétaire général
Priorization
commission
11. 04.09.2015 - Page 11
Main applications
• Case management
• Judgements electronic archive
• Billing & taxing
• Reports & statistics
• Document production
• Interfaces to other information systems
• Directories (employees, rooms, lawyers, etc.)
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
12. 04.09.2015 - Page 12
Example of a page for a court case
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
13. 04.09.2015 - Page 13
Example of judgements electronic archive
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
14. 04.09.2015 - Page 1
Département
Office
Main changes since 2009
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
15. 04.09.2015 - Page 15
Main events
• 01.01.2011: radical changes in procedural code
– must re-parameterize everything (procedural acts, documents, etc)
• 01.01.2013: radical change in guardianship law
– new concepts, extension of app core & database schema
• 08.06.2013: database migration
• 2014 : interface to Swiss post
– Mails with barcodes
– access Web Service to recover delivery dates and compute time limits
• 2014 : interface to Accounting IS
– Merge judicial data and financial data into a single display
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
16. 04.09.2015 - Page 16
Database migration
• Livelink Communication Server (a.k.a Basis+) Oracle
• About 1.5 year of preparation
– Intermediate ORM layer to abstract differences between the 2 DBMS
• Some hard things
– Old DBMS, slow JDBC driver
• cloned reference tables in SQLite
• needed to inspect joins to decide where to dispatch requests
– Dealing with multivalues Array::PseudoScalar
– Oracle equates empty strings with NULL
– No separate datatypes for date & time
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
17. 04.09.2015 - Page 1
Département
Office
Perl usage
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
18. 04.09.2015 - Page 18
Infrastructure stack
• perl 5.14.3
– no specific urge to upgrade
– no decision yet about how to deal with smart match deprecation
• Apache 2.2
• mod_perl 2.0.7
– mod_perl is not dead !
– agreed, there are more modern solutions for serving content
– but mod_perl is great for its API to every Apache response phase
• Apache2::AuthenNTLM
• StrawberryPerl for dev desktops
– because users have Windows + Office
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
19. 04.09.2015 - Page 19
(the smart match deprecation problem)
• perl 5.10 : new elegant syntax
– if ($data ~~ $condition) { ... }
– given ($data) { when ($condition1) {...} ... }
• perl 5.18 :
– Smart match becomes "experimental"
– Special declaration required
• no if $] >= 5.018, warnings => "experimental::smartmatch";
• #or: use experimental 'smartmatch';
– Problem : the declaration is lexically scoped
• No global switch
• need to edit every source file !
• when and how will the "experiment" end ?
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
20. 04.09.2015 - Page 20
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Why did we start with Perl ?
• positive experiences on former, less critical applications
• expressive power, concision
– ( but not cryptic ! )
– we can show algorithms to business analysts (impossible in Java!)
• productivity through available components (CPAN)
• modularity and abstraction mechanisms
– multiparadigms ( imperative, object-oriented, functional )
• dynamic language
– closures
– dynamic loading of components
– dynamic class / method creation
• regexes
21. 04.09.2015 - Page 21
What if we started now ?
• Perl5 is still a very valuable platform
• Technically competitive
• Culturally less fashionable
• If we started now
– I would still propose Perl5
– Not sure that I could still convince my organization
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
22. 04.09.2015 - Page 1
Département
Office
Modules we used (or created)
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
23. 04.09.2015 - Page 23
Infrastructure modules
• Moose
• Plack
• JSON::XS
• YAML
– For config files (handled by business analysts)
– For recursive dumps of court cases
• Config::General
– Because of variable interpolation and inclusion capabilities
• Data::Domain
– For checking datastructures and producing detailed mismatch reports
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
24. 04.09.2015 - Page 24
Infrastructure modules (2/2)
• Params::Validate
• Module::Load
• XML::Simple
• Date::Calc
• Text::Transliterator::Unaccent
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
25. 04.09.2015 - Page 25
Web apps
• Catalyst for big apps
• CGI::Expand (not related to CGI.pm !)
• Javascript : prototype.js + Alien::GvaScript
• About 20 small apps with File::Tabular::Web
– People directory
– Room occupation
– People availability
– Publications database
– ...
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
26. 04.09.2015 - Page 26
Templating
• Template Toolkit
– Used for web pages and document production
– Using both communication modes
• Model produces the data and calls the view
• The view asks the model for more data (calling methods from TT2)
– Modular architecture
• Blocks
• Macros
• Views ("experimental" since 1998) OO template programming
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
27. 04.09.2015 - Page 27
Relational database
• Oracle (not my choice!)
• DBI + DBIx::DataModel
– DBIx::Class wasn't there when we started !
– Lightweight ORM framework
• UML – inspired
• Centralized schema in one source file
• Focus on tables, primary keys and associations
• Little information about columns
– Optimized for dealing with database joins
• A joined row is a first-class object
• Multiple inheritance from table classes participating in the join
– Very little overhead on DBI
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
28. 04.09.2015 - Page 28
Document production
• Requirement : docs must be editable in MsOffice
• Rejected technologies :
– OLE/COM to a MsOffice "server"
– RTF + Templating
– XML (ODF or OOXML)
• Solution MsOffice::Word::HTML::Writer
– MsWord parses the HTML when opening the file
– developers know to write HTML
• Barcode::Code128
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
29. 04.09.2015 - Page 29
Reporting
• Data extraction
• Presentation through Excel
• 2 modes :
– Excel::Writer::XLSX
• Produce full result on server
• Excellent quality
• no API for crosstab queries
– Call CSV web service from Excel
• Builtin feature of Excel
• pre-built crosstab queries update automatically
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
30. 04.09.2015 - Page 30
Web services
• I hate SOAP ... but that's what our partners talk !
• Soap::Lite
– Verbose API
– ¨Obfuscated datastructures
• Use it nevertheless
• In one case I used raw XML+Templating
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
31. 04.09.2015 - Page 31
Tools
• RequestTracker
• App::Ack
• App::AutoCRUD
• Pod::POM::Web
• Perl::Critic
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
32. 04.09.2015 - Page 1
Département
Office
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Conclusions
33. 04.09.2015 - Page 33
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Positive
• Perl
– never any technological problem
– code clear and concise (mostly)
– good suite of tools
– productivity
– internal resistance disappeared
34. 04.09.2015 - Page 34
Gestion des procédures judiciaires
DIRECTION DES SYSTÈMES D'INFORMATION (DSI)
Negative
• sometimes hard to recruit
– (but not impossible)
– some consultants refused to do any Perl ("would stain their CV" !)
– Sometimes we hired people without Perl background
• Took them a couple of weeks to learn it
• Took them a couple of years to learn the business !
• heavy parameterization hard to test
– combinatorics, many possible cases
– complex data sets