SlideShare a Scribd company logo
MAKE
YOUR PROJECT
UP TO DATE
BY SERGEY SELETSKY
Agenda
 Why are we afraid changes?
 Why do we need changes?
 Why is it is bad for us?
 How to improve it now?
 Which tool is better?
 Best practices
XobotOS
https://github.com/xamarin/XobotOS/
They just rewrite Android in C# 
You can revert everything
//Don't care about it, you have a GIT
WHY?
5
Common issues
Legacy
 Framework
 Library
 Language
 Tool
Design
 SOLID
 GRASP
 Anti-patterns
Common issues
System impact:
 Performance
 Testebility
 Extensibility
 Predictability
 Supportability
Supportability
Support $ are infinity in long term!
Total $ = (dev $ * dev time) + (support $ * life time)
540К$ = (10К$ * 6) + (4K$ * 120)
360К$ = (40К$ * 6) + (1K$ * 120)
Economy: 180K$
Why it is bad for us?
 Long term project 
 Higher costs 
 Bigger team 
 More work 
Why it is bad for us?
 Long term project (everybody tired) 
 Higher costs (lower per person) 
 Bigger team (staff turnover) 
 More work (more complexity) 
 Unsatisfied customer 
 No motivation 
 Legacy knowledge 
 More bugs & issues 
HOW?
11
Use latest
• Choose architecture for the future
• Always think about support
• Cover everything with tests
• Automate everything
• Always use the latest tools and frameworks
• Use own independent interfaces and APIs
• Use NuGets
Legacy projects
What to do?
Cover code with tests
Cover everything before…
Smart Tests
Cover everything before…
My method for migration
1. Describe all scenarios for successful migration
2. Identify patterns
3. Create automated tools for migration
4. Run tests, identify issues and repeat
5. Correct manually a few complex issues that remain
6. Do not forget to remove legacy code!
Which tools better?
Better tool – simpler tool
 Transformation templates – for simple changes
 Generation templates – for similar code
 Regular Expressions – for everything
 T4 – used for own project templates
 Roslyn – advanced scenarios
Regular Expressions
f = Regex.Replace(f, @"([a-
z]*)s+functions+(w*)s*Q(Es*([^)]*)s*Q)E(s*{)", "$1
$2(%#$3%#)$4");
f = Regex.Replace(f, @"([a-
z]*)s+functions+(w*)s*Q(Es*([^)]*)s*Q)Es*:s*(w*)", "$1 $4
$2(%#$3%#)");
f = Regex.Replace(f, "%#s*%#", "");
for (int i = 0; i < 9; i++)
{
f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*,", "$2 $1,%#");
f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*%#", "$2 $1");
f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*=s*([^):,]*)s*,", "$2
$1=$3,%#");
f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*=s*([^):,]*)s*%#", "$2
$1=$3");
}
f = Regex.Replace(f, "(w+)s+ass+(w+)", "($2)$1");
f = Regex.Replace(f, @"ints*Q(E([^)]+)Q)E", "((int)$1)");
f = Regex.Replace(f, @"public var (.*?):(.*?)( = )??(.*?)??;", "public $4 $1
$3$2;");
Regular Expressions
Before After
Latest case
More than 200 Spring.NET objects
<object id=“Company.Web.GUI.WebServices.ContactsService" singleton="false"
type="Company.Web.GUI.WebServices.ContactsService, Company.Web.GUI">
<property name="ContactInformationService" ref="ContactInformationService" />
</object>
<object id="Company.Web.GUI.WebServices.PrivilegesService" singleton="false"
type="Company.Web.GUI.WebServices.PrivilegesService, Company.Web.GUI">
<property name="LoginService" ref="LoginService"/>
</object>
<object id="Company.Web.GUI.SearchService" singleton="false"
type="Company.Web.GUI.SearchService, Company.Web.GUI">
<property name="SearchUIService" ref="SearchUIService" />
</object>
Latest case
Now it looks like this with Simple Injector
container.Register<IContactsService, ContactsService>(lifestyle);
container.Register<IPrivilegesService, PrivilegesService>(lifestyle);
container.Register<IContactsService, ContactsService>(lifestyle);
Also performance was improved in ~10-30 times
Best practices
Use SonarQube for gated builds
• Keep code as clean as posible
• Code convention with zero compromises
• Validate design and complexity
• Improve software quality
• Reduce technical risks
Best practices
Use AOP and PostSharp
• Keep code as clean as posible
• Separate all cross-cutting aspects
• Fail build when aspects missed
• Optimize cross-cutting code
Best practices
Use IoC Interception
• Flexible decoration
• Clean design and code
• Better extensibility
Best practices
Use TDD and DDD
• Everything well tested
• Everybody knows project
• Monster project can be divided
• Better UX
• Better value from BA
References
Code Smells
Anti-pattern
http://www.regexr.com/
Roslyn
Simple Injector
THANK YOU
27
Sergey Seletsky
sselet@softserveinc.com
https://www.linkedin.com/in/sergeyseletsky

More Related Content

Similar to Make your project up to date

New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - Greach
HamletDRC
 
Electronic Grading of Paper Assessments
Electronic Grading of Paper AssessmentsElectronic Grading of Paper Assessments
Electronic Grading of Paper Assessments
Matthew Leingang
 
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
ICS User Group
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
Guillaume Laforge
 
Drupaljam xl 2019 presentation multilingualism makes better programmers
Drupaljam xl 2019 presentation   multilingualism makes better programmersDrupaljam xl 2019 presentation   multilingualism makes better programmers
Drupaljam xl 2019 presentation multilingualism makes better programmers
Alexander Varwijk
 
Refactoring
RefactoringRefactoring
Refactoring
Amir Barylko
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
Peter Maas
 
POSI Overview
POSI OverviewPOSI Overview
POSI Overview
aindilis
 
WebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All RevolutionaryWebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All Revolutionary
C4Media
 
the productive programer: mechanics
the productive programer: mechanicsthe productive programer: mechanics
the productive programer: mechanicselliando dias
 
Hands on Mahout!
Hands on Mahout!Hands on Mahout!
Hands on Mahout!
OSCON Byrum
 
Amplify your stack - Jsfoo pune 2012
Amplify your stack - Jsfoo pune 2012Amplify your stack - Jsfoo pune 2012
Amplify your stack - Jsfoo pune 2012threepointone
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
PrestaShop
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software ValidationJames Pascoe
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
Ganesh Samarthyam
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
Guillaume Laforge
 
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJSThe Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
mfyleman
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
O'Reilly Media
 

Similar to Make your project up to date (20)

New Ideas for Old Code - Greach
New Ideas for Old Code - GreachNew Ideas for Old Code - Greach
New Ideas for Old Code - Greach
 
Electronic Grading of Paper Assessments
Electronic Grading of Paper AssessmentsElectronic Grading of Paper Assessments
Electronic Grading of Paper Assessments
 
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
Icsug dev day2014_road to damascus - conversion experience-lotusscript and @f...
 
Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008Groovy Introduction - JAX Germany - 2008
Groovy Introduction - JAX Germany - 2008
 
Drupaljam xl 2019 presentation multilingualism makes better programmers
Drupaljam xl 2019 presentation   multilingualism makes better programmersDrupaljam xl 2019 presentation   multilingualism makes better programmers
Drupaljam xl 2019 presentation multilingualism makes better programmers
 
Refactoring
RefactoringRefactoring
Refactoring
 
Introduction To Scala
Introduction To ScalaIntroduction To Scala
Introduction To Scala
 
POSI Overview
POSI OverviewPOSI Overview
POSI Overview
 
10 Ways To Improve Your Code
10 Ways To Improve Your Code10 Ways To Improve Your Code
10 Ways To Improve Your Code
 
WebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All RevolutionaryWebAssembly. Neither Web Nor Assembly, All Revolutionary
WebAssembly. Neither Web Nor Assembly, All Revolutionary
 
the productive programer: mechanics
the productive programer: mechanicsthe productive programer: mechanics
the productive programer: mechanics
 
Hands on Mahout!
Hands on Mahout!Hands on Mahout!
Hands on Mahout!
 
Amplify your stack - Jsfoo pune 2012
Amplify your stack - Jsfoo pune 2012Amplify your stack - Jsfoo pune 2012
Amplify your stack - Jsfoo pune 2012
 
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimizationGood practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
 
A Replay Approach to Software Validation
A Replay Approach to Software ValidationA Replay Approach to Software Validation
A Replay Approach to Software Validation
 
Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)Software Design in Practice (with Java examples)
Software Design in Practice (with Java examples)
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJSThe Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
The Road To Damascus - A Conversion Experience: LotusScript and @Formula to SSJS
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 

More from Sergey Seletsky

CICD Azure DevOps
CICD Azure DevOpsCICD Azure DevOps
CICD Azure DevOps
Sergey Seletsky
 
Intellias CQRS Framework
Intellias CQRS FrameworkIntellias CQRS Framework
Intellias CQRS Framework
Sergey Seletsky
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
Sergey Seletsky
 
CQRS and Event Sourcing
CQRS and Event SourcingCQRS and Event Sourcing
CQRS and Event Sourcing
Sergey Seletsky
 
Go Serverless with Azure
Go Serverless with AzureGo Serverless with Azure
Go Serverless with Azure
Sergey Seletsky
 
IoT Smart Home
IoT Smart HomeIoT Smart Home
IoT Smart Home
Sergey Seletsky
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
Sergey Seletsky
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
Sergey Seletsky
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studio
Sergey Seletsky
 

More from Sergey Seletsky (9)

CICD Azure DevOps
CICD Azure DevOpsCICD Azure DevOps
CICD Azure DevOps
 
Intellias CQRS Framework
Intellias CQRS FrameworkIntellias CQRS Framework
Intellias CQRS Framework
 
Cqrs and event sourcing in azure
Cqrs and event sourcing in azureCqrs and event sourcing in azure
Cqrs and event sourcing in azure
 
CQRS and Event Sourcing
CQRS and Event SourcingCQRS and Event Sourcing
CQRS and Event Sourcing
 
Go Serverless with Azure
Go Serverless with AzureGo Serverless with Azure
Go Serverless with Azure
 
IoT Smart Home
IoT Smart HomeIoT Smart Home
IoT Smart Home
 
Continuous delivery by sergey seletsky
Continuous delivery by sergey seletskyContinuous delivery by sergey seletsky
Continuous delivery by sergey seletsky
 
Asp.net mvc 5 course module 1 overview
Asp.net mvc 5 course   module 1 overviewAsp.net mvc 5 course   module 1 overview
Asp.net mvc 5 course module 1 overview
 
Mobile development with visual studio
Mobile development with visual studioMobile development with visual studio
Mobile development with visual studio
 

Recently uploaded

Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
XfilesPro
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 

Recently uploaded (20)

Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, BetterWebinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
Webinar: Salesforce Document Management 2.0 - Smarter, Faster, Better
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 

Make your project up to date

  • 1. MAKE YOUR PROJECT UP TO DATE BY SERGEY SELETSKY
  • 2. Agenda  Why are we afraid changes?  Why do we need changes?  Why is it is bad for us?  How to improve it now?  Which tool is better?  Best practices
  • 4. You can revert everything //Don't care about it, you have a GIT
  • 6. Common issues Legacy  Framework  Library  Language  Tool Design  SOLID  GRASP  Anti-patterns
  • 7. Common issues System impact:  Performance  Testebility  Extensibility  Predictability  Supportability
  • 8. Supportability Support $ are infinity in long term! Total $ = (dev $ * dev time) + (support $ * life time) 540К$ = (10К$ * 6) + (4K$ * 120) 360К$ = (40К$ * 6) + (1K$ * 120) Economy: 180K$
  • 9. Why it is bad for us?  Long term project   Higher costs   Bigger team   More work 
  • 10. Why it is bad for us?  Long term project (everybody tired)   Higher costs (lower per person)   Bigger team (staff turnover)   More work (more complexity)   Unsatisfied customer   No motivation   Legacy knowledge   More bugs & issues 
  • 12. Use latest • Choose architecture for the future • Always think about support • Cover everything with tests • Automate everything • Always use the latest tools and frameworks • Use own independent interfaces and APIs • Use NuGets
  • 14. Cover code with tests Cover everything before…
  • 16. My method for migration 1. Describe all scenarios for successful migration 2. Identify patterns 3. Create automated tools for migration 4. Run tests, identify issues and repeat 5. Correct manually a few complex issues that remain 6. Do not forget to remove legacy code!
  • 17. Which tools better? Better tool – simpler tool  Transformation templates – for simple changes  Generation templates – for similar code  Regular Expressions – for everything  T4 – used for own project templates  Roslyn – advanced scenarios
  • 18. Regular Expressions f = Regex.Replace(f, @"([a- z]*)s+functions+(w*)s*Q(Es*([^)]*)s*Q)E(s*{)", "$1 $2(%#$3%#)$4"); f = Regex.Replace(f, @"([a- z]*)s+functions+(w*)s*Q(Es*([^)]*)s*Q)Es*:s*(w*)", "$1 $4 $2(%#$3%#)"); f = Regex.Replace(f, "%#s*%#", ""); for (int i = 0; i < 9; i++) { f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*,", "$2 $1,%#"); f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*%#", "$2 $1"); f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*=s*([^):,]*)s*,", "$2 $1=$3,%#"); f = Regex.Replace(f, "%#s*(w*)s*:s*(w*)s*=s*([^):,]*)s*%#", "$2 $1=$3"); } f = Regex.Replace(f, "(w+)s+ass+(w+)", "($2)$1"); f = Regex.Replace(f, @"ints*Q(E([^)]+)Q)E", "((int)$1)"); f = Regex.Replace(f, @"public var (.*?):(.*?)( = )??(.*?)??;", "public $4 $1 $3$2;");
  • 20. Latest case More than 200 Spring.NET objects <object id=“Company.Web.GUI.WebServices.ContactsService" singleton="false" type="Company.Web.GUI.WebServices.ContactsService, Company.Web.GUI"> <property name="ContactInformationService" ref="ContactInformationService" /> </object> <object id="Company.Web.GUI.WebServices.PrivilegesService" singleton="false" type="Company.Web.GUI.WebServices.PrivilegesService, Company.Web.GUI"> <property name="LoginService" ref="LoginService"/> </object> <object id="Company.Web.GUI.SearchService" singleton="false" type="Company.Web.GUI.SearchService, Company.Web.GUI"> <property name="SearchUIService" ref="SearchUIService" /> </object>
  • 21. Latest case Now it looks like this with Simple Injector container.Register<IContactsService, ContactsService>(lifestyle); container.Register<IPrivilegesService, PrivilegesService>(lifestyle); container.Register<IContactsService, ContactsService>(lifestyle); Also performance was improved in ~10-30 times
  • 22. Best practices Use SonarQube for gated builds • Keep code as clean as posible • Code convention with zero compromises • Validate design and complexity • Improve software quality • Reduce technical risks
  • 23. Best practices Use AOP and PostSharp • Keep code as clean as posible • Separate all cross-cutting aspects • Fail build when aspects missed • Optimize cross-cutting code
  • 24. Best practices Use IoC Interception • Flexible decoration • Clean design and code • Better extensibility
  • 25. Best practices Use TDD and DDD • Everything well tested • Everybody knows project • Monster project can be divided • Better UX • Better value from BA