SlideShare une entreprise Scribd logo
1  sur  37
#1 pattern-aware compiler extension to C#/VB
10 Reasons You MUST Consider
Pattern-Aware Programming
By Gael Fraiteur (@gfraiteur),
Founder & CEO of PostSharp Technologies
Housekeeping Rules
• Q&A session at the end.
• Please write questions to GoToMeeting chat window.
• The webinar recording will be made available on Friday, July 22th.
The Problem: Repeating Code (Boilerplate)
Thinking with Patterns
• Developers think
at a high level of abstraction,
using design patterns. Window
pattern,
repeated 200x
Door pattern,
repeated 20x
Conventional Compilers Are Limited
• Conventional compilers don’t have a
concept of patterns.
• Therefore developers write repeating code:
boilerplate code.
• INotifyPropertyChanged
• Undo/redo
• Code contracts (preconditions)
• Logging
• Transaction handling
• Exception handling
• Thread dispatching
• Thread synchronization
• Immutable
• Authorization
• Audit
• Caching
Typical Boilerplate
Consequences of Boilerplate
• High development effort
• Poor quality of produced software
• Code is more complex than necessary
• Difficulty to add/modify functionality after release 1.0
• Slow ramp-up of new team members
Can you see how boilerplate code slows your development team?
The Big Question
• How can we produce high-quality software with less development effort...
without having to replace your existing compiler?
The Solution
Inadequate Technologies
• Dependency Injection
• Just adds behaviors to component boundaries
• Affects your architecture
• Only supports basic patterns
• Great tool, but not for that job.
• Code Generators / Refactoring Tools
• Just makes it easy to generate boilerplate
• You still have to maintain it!
Converging Technologies
Aspect-Oriented
Programming
Static Program Analysis
Dynamic Program Analysis
Metaprogramming
Design PatternsThreading Patterns
Pattern-Aware Compilers
Pattern-Aware Compiler Extensions
• Add support for patterns
• No more pattern hand-coding
resulting in boilerplate!
1) Stop Writing Boilerplate and Deliver Faster
• Fewer lines of code means fewer hours of work
• Outsource repetitive work to compiler
and save time and costs immediately
4 REASONS FOR PATTERN-AWARE COMPILERS
2) Build More Reliable Software
• Fewer lines of code means fewer defects
• Reliability becomes much more affordable
• Reliability generally means boilerplate:
logging, exception handling, caching,
security,…
• The “right” tool.
4 REASONS FOR PATTERN-AWARE COMPILERS
3) Easier to Modify Functionality
• Cleaner and shorter code is easier to understand
• Focus on business logic and save time trying
to understand the code
• Better architecture is future-proof
• Define features such as logging, exception
handling or transactions in one place and
make their modification easy and fast
4 REASONS FOR PATTERN-AWARE COMPILERS
4) New Team Members Contribute Quicker
• Simpler code means faster ramp-up
• New team members can focus on business logic
without worrying about complex architectural structures.
• Implement a tighter feedback loop
• Validate hand-written code against
your defined rules at build time
and detect bugs as quickly
4 REASONS FOR PATTERN-AWARE COMPILERS
Top 10 Features to Look For
1. Ready-made pattern implementations
2. Threading models
3. Ability to automate complex patterns
4. Ease to add patterns to source code
5. Compatibility with existing codebase
6. Build-Time Validation of Patterns
7. Architecture Validation
8. Integration with Visual Studio
9. Run-Time Performance
10. Commercial Support
1) Ready-Made Pattern Implementations
10 FEATURES TO LOOK FOR
• Don’t reinvent the wheel.
• Would you code your own Graph or DataGrid
controls?
• Look for off-the-shelf pattern implementations.
Demo: INotifyPropertyChanged, undo/redo
2) Threading Models
10 FEATURES TO LOOK FOR
• Simpler: Use the right level of abstraction. Don’t
overwhelm your brain with thousands of tiny details.
• Your choice: Immutable, Freezable, Synchronized,
Reader-Writer Synchronized, Actor, Thread Affine and
Thread Unsafe.
• No more random bugs: Model validation catches
most defects during build or during single-threaded
test coverage.
• Build thread-safe applications!
Thread Safety: Example
10 FEATURES TO LOOK FOR
1.
2.
3) Automate Complex Patterns
• Rich set of primitive transformations
• Decoration: methods
• Interception: methods, properties, fields, events
• Introduction: methods, properties, fields, interfaces, custom attributes
• To any declaration… or just public virtual ones?
• Aspects composed of several transformations
• Several aspects on the same declaration
• Simple API… or complex AST/MSIL transformations?
• Validation of hand-written code against pattern guidelines.
10 FEATURES TO LOOK FOR
Example: Weak Event Pattern
• Challenge: Lifetime of event subscriptions controlled by the event client, not the event source.
• Solution: 2 aspects, 1 validation
10 FEATURES TO LOOK FOR
[WeakEventClient]
class MyEventClient
class MyEventSource
{
}
[WeakEvent]
event EventHandler MyEvent;
1.
3.
2.
1. Client adds
handler to
event.
2. Event stores
only weak
reference thanks
to [WeakEvent]
aspect
3. Event adds
handler to source
through
IWeakEventClient
4. [WeakEventClient]
aspect implements
IWeakEventClient interface
and stores strong reference
to event handler.
4) Easy to Add Patterns to Code
• Custom attributes: one by one, hand-picked.
• Multicast attributes: bulk
e.g. add logging to all public methods
• Inheritance
• XML: centrally managed.
• Programmatic at Build-Time: more flexible.
• Programmatic at Run-Time: cool but not a compiler technology
10 FEATURES TO LOOK FOR
5) Compatibility with Existing Codebases
10 FEATURES TO LOOK FOR
• Design Neutrality
• No impact on architecture
• Don’t abuse from dependency injection
• Plain C# and VB
• Get the benefits of F#, Scala, Nemerle, Python,
Ruby or JavaScript in C# and VB
• Cross-platform
• Supports .NET Framework, Windows Phone,
WinRT, Xamarin and Portable Class Libraries
6) Build-Time Pattern Validation
• Emit build-time errors and warnings
• Declarative and programmatic validations
10 FEATURES TO LOOK FOR
10% of developers design patterns and
implement them with aspects.
90% of developers use aspects.
7) Architecture Validation
• Challenge: get large teams respect conventions.
• “Everybody on the team shall solve this problem this specific way”.
• It’s a pattern but it still needs manual work.
• Traditional Solution: Code Review
• Slow feedback loop
• Generates relationship friction
• Better solution: Automatic Validation
• Express conventions as executable code
• Break the build in case of non-compliance.
10 FEATURES TO LOOK FOR
8) Visual Studio Integration
Key questions developers have when coding:
1. What is this piece of code doing?
 Which aspects are applied here?
2. Where is this aspect being used?
3. Debugging the business logic with / without the aspects.
10 FEATURES TO LOOK FOR
9) Run-Time Performance
10 FEATURES TO LOOK FOR
• Build-time technology
• Code modification at build time
• Don’t waste time on analysis at run-time
• No reflection at run-time
10) Commercial Support
• Who backs the product?
• Master thesis work vs vested professional software engineers
• Support
• Can you get someone on the phone?
• Documentation
• Quality policies
10 FEATURES TO LOOK FOR
What’s Holding You Back?
• Will I be able to understand my code?
• Yes. With proper Visual Studio tooling, you’ll easily understand where and
how patterns are used in your code
• Can I still debug my code?
• Yes. The debugging experience is unaffected.
• Compilation will be slower
• Possibly. Smarter compilers introduce additional steps into the
compilation, there is a performance cost.
Return on Investment
• Each line of code costs $14. A commercial tool
typically pays off after a developer saves first 50
lines of code.
• Pattern-aware compilers can reduce source
code by up to 20%. That means $5,000-$20,000
per developer per year!
• 15 to 55 times ROI.
• You never lose – you always win.
Picture this
• No more boring and repetitive coding.
• No more spending hours trying to understand the
business logic of the code.
• No more random errors in multithreaded
applications.
• Smoother code reviews.
• Cut development and maintenance costs.
• Go to market faster.
• Produce high-quality, easy-to-maintain software
that has fewer bugs – with less development
effort.
Life is Good!
This webinar is brought to you by…
#1 best-selling pattern-aware compiler extension to C#/VB
Trusted by the World’s Largest Corporations
• Trusted by over 50,000 satisfied
developers worldwide
• Over 1,000 of the world’s largest
corporations
• More than 10% of all Fortune 500
companies rely on PostSharp
All trust…
For More Information
• Go to www.postsharp.net/download
and start the free trial.
• Download the white paper from
https://www.postsharp.net/product/white-papers.
• Read case studies and testimonials
on www.postsharp.net/customers.
• Contact us at hello@postsharp.net
with any questions.
Questions?
#1 best-selling pattern-aware compiler extension to C#/VB

Contenu connexe

Tendances

Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsMichael Palotas
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013David Funaro
 
The Continuous delivery Value @ codemotion 2014
The Continuous delivery Value @ codemotion 2014The Continuous delivery Value @ codemotion 2014
The Continuous delivery Value @ codemotion 2014David Funaro
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
Enhanced Verification Flow with Nextop's Assertion Synthesis Technology
Enhanced Verification Flow with Nextop's Assertion Synthesis TechnologyEnhanced Verification Flow with Nextop's Assertion Synthesis Technology
Enhanced Verification Flow with Nextop's Assertion Synthesis TechnologyDVClub
 
Is Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic neededIs Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic neededchiportal
 
Behaviour testing for single-page applications and API’s
Behaviour testing for single-page applications and API’sBehaviour testing for single-page applications and API’s
Behaviour testing for single-page applications and API’sAndrew Kirkpatrick
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationZahra Golmirzaei
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppNaresh Jain
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"GoIT
 
Building trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOpsBuilding trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOpsGuido Serra
 
Containerizing legacy applications
Containerizing legacy applicationsContainerizing legacy applications
Containerizing legacy applicationsAndrew Kirkpatrick
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expertgaoliang641
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSourceOleksii Prohonnyi
 
Why your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating itWhy your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating itFarooq Ali
 
Behaviour Driven BizTalk Development
Behaviour Driven BizTalk DevelopmentBehaviour Driven BizTalk Development
Behaviour Driven BizTalk DevelopmentMichael Stephenson
 
Elements of a Test Framework
Elements of a Test FrameworkElements of a Test Framework
Elements of a Test FrameworkSmartBear
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for youAmbientia
 

Tendances (20)

Implementing Test Automation in Agile Projects
Implementing Test Automation in Agile ProjectsImplementing Test Automation in Agile Projects
Implementing Test Automation in Agile Projects
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
The Continuous delivery Value @ codemotion 2014
The Continuous delivery Value @ codemotion 2014The Continuous delivery Value @ codemotion 2014
The Continuous delivery Value @ codemotion 2014
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
Enhanced Verification Flow with Nextop's Assertion Synthesis Technology
Enhanced Verification Flow with Nextop's Assertion Synthesis TechnologyEnhanced Verification Flow with Nextop's Assertion Synthesis Technology
Enhanced Verification Flow with Nextop's Assertion Synthesis Technology
 
Is Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic neededIs Advanced Verification for FPGA based Logic needed
Is Advanced Verification for FPGA based Logic needed
 
Behaviour testing for single-page applications and API’s
Behaviour testing for single-page applications and API’sBehaviour testing for single-page applications and API’s
Behaviour testing for single-page applications and API’s
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Setting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile AppSetting up Continuous Delivery Culture for a Large Scale Mobile App
Setting up Continuous Delivery Culture for a Large Scale Mobile App
 
Whipp q3 2008_sv
Whipp q3 2008_svWhipp q3 2008_sv
Whipp q3 2008_sv
 
Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"Встреча "QA: в каких направлениях может найти себя тестировщик?"
Встреча "QA: в каких направлениях может найти себя тестировщик?"
 
Building trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOpsBuilding trust within the organization, first steps towards DevOps
Building trust within the organization, first steps towards DevOps
 
Containerizing legacy applications
Containerizing legacy applicationsContainerizing legacy applications
Containerizing legacy applications
 
How to become a testing expert
How to become a testing expertHow to become a testing expert
How to become a testing expert
 
Code review process with JetBrains UpSource
Code review process with JetBrains UpSourceCode review process with JetBrains UpSource
Code review process with JetBrains UpSource
 
Why your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating itWhy your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating it
 
Behaviour Driven BizTalk Development
Behaviour Driven BizTalk DevelopmentBehaviour Driven BizTalk Development
Behaviour Driven BizTalk Development
 
Elements of a Test Framework
Elements of a Test FrameworkElements of a Test Framework
Elements of a Test Framework
 
Making software development processes to work for you
Making software development processes to work for youMaking software development processes to work for you
Making software development processes to work for you
 
Code Coverage
Code CoverageCode Coverage
Code Coverage
 

En vedette

Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architectureatozknowledge .com
 
Compiler programming in c# report
Compiler programming in c# reportCompiler programming in c# report
Compiler programming in c# reportAhmed Alkibsi
 
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)PostSharp Technologies
 
Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM Microsoft Visual Studio
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesMichael Step
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsApplying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsPostSharp Technologies
 
Role of Grammar in Communication
Role of Grammar in CommunicationRole of Grammar in Communication
Role of Grammar in Communicationyatin bhardwaj
 
Introduction to Cloud computing
Introduction to Cloud computingIntroduction to Cloud computing
Introduction to Cloud computingatozknowledge .com
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvmAjinkya Khopade
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage CollectionEelco Visser
 
#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio Extensions#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio ExtensionsRobin Sedlaczek
 
Register Allocation
Register AllocationRegister Allocation
Register AllocationEelco Visser
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeOmar Bashir
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017Larry Nung
 

En vedette (20)

Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architecture
 
Compiler programming in c# report
Compiler programming in c# reportCompiler programming in c# report
Compiler programming in c# report
 
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
Advanced Defensive Coding Techniques (with Introduction to Design by Contract)
 
JAVA INTRODUCTION
JAVA INTRODUCTIONJAVA INTRODUCTION
JAVA INTRODUCTION
 
Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM Accelerating Business Agility with Modern ALM
Accelerating Business Agility with Modern ALM
 
Roslyn and C# 6.0 New Features
Roslyn and C# 6.0 New FeaturesRoslyn and C# 6.0 New Features
Roslyn and C# 6.0 New Features
 
Applying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain ModelsApplying Object Composition to Build Rich Domain Models
Applying Object Composition to Build Rich Domain Models
 
Role of Grammar in Communication
Role of Grammar in CommunicationRole of Grammar in Communication
Role of Grammar in Communication
 
Introduction to Cloud computing
Introduction to Cloud computingIntroduction to Cloud computing
Introduction to Cloud computing
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Garbage Collection
Garbage CollectionGarbage Collection
Garbage Collection
 
Java Exception handling
Java Exception handlingJava Exception handling
Java Exception handling
 
The JavaScript Programming Language
The JavaScript Programming LanguageThe JavaScript Programming Language
The JavaScript Programming Language
 
#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio Extensions#ADC 2016 - Roslyn & Visual Studio Extensions
#ADC 2016 - Roslyn & Visual Studio Extensions
 
Java vs .net (beginners)
Java vs .net (beginners)Java vs .net (beginners)
Java vs .net (beginners)
 
exception handling
exception handlingexception handling
exception handling
 
Static Analysis
Static AnalysisStatic Analysis
Static Analysis
 
Register Allocation
Register AllocationRegister Allocation
Register Allocation
 
An Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and RuntimeAn Introduction to Java Compiler and Runtime
An Introduction to Java Compiler and Runtime
 
Visual studio 2017
Visual studio 2017Visual studio 2017
Visual studio 2017
 

Similaire à 10 Reasons You MUST Consider Pattern-Aware Programming

NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET Dmytro Mindra
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality codeHayden Bleasel
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practicesBill Buchan
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)lqi
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code ReviewMilan Vukoje
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Maven Logix
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous IntegrationXPDays
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)Peter Kofler
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategiesRaquel Pau
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationBlue Elephant Consulting
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableComsysto Reply GmbH
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applicationsnadeembtech
 
Object Oriented Programming I
Object Oriented Programming IObject Oriented Programming I
Object Oriented Programming Iraven_rainagi
 
Client Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementClient Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementVictorSzoltysek
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyComsysto Reply GmbH
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyComsysto Reply GmbH
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScriptRob Scaduto
 

Similaire à 10 Reasons You MUST Consider Pattern-Aware Programming (20)

NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET NetWork - 15.10.2011 - Applied code generation in .NET
NetWork - 15.10.2011 - Applied code generation in .NET
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality code
 
The View - Lotusscript coding best practices
The View - Lotusscript coding best practicesThe View - Lotusscript coding best practices
The View - Lotusscript coding best practices
 
Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)Slides for Houston iPhone Developers' Meetup (April 2012)
Slides for Houston iPhone Developers' Meetup (April 2012)
 
Coding Standard And Code Review
Coding Standard And Code ReviewCoding Standard And Code Review
Coding Standard And Code Review
 
Desert Code Camp Presentation
Desert Code Camp PresentationDesert Code Camp Presentation
Desert Code Camp Presentation
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening Capability Building for Cyber Defense: Software Walk through and Screening
Capability Building for Cyber Defense: Software Walk through and Screening
 
Continuous Integration
Continuous IntegrationContinuous Integration
Continuous Integration
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Technical debt management strategies
Technical debt management strategiesTechnical debt management strategies
Technical debt management strategies
 
An Introduction To Software Development - Implementation
An Introduction To Software Development - ImplementationAn Introduction To Software Development - Implementation
An Introduction To Software Development - Implementation
 
Software Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuableSoftware Architecture and Architectors: useless VS valuable
Software Architecture and Architectors: useless VS valuable
 
Enter the Team City
Enter the Team CityEnter the Team City
Enter the Team City
 
Quality metrics and angular js applications
Quality metrics and angular js applicationsQuality metrics and angular js applications
Quality metrics and angular js applications
 
Object Oriented Programming I
Object Oriented Programming IObject Oriented Programming I
Object Oriented Programming I
 
Client Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementClient Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future Replacement
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Architectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and ConsistentlyArchitectural Decisions: Smoothly and Consistently
Architectural Decisions: Smoothly and Consistently
 
Unit Testing in JavaScript
Unit Testing in JavaScriptUnit Testing in JavaScript
Unit Testing in JavaScript
 

Plus de PostSharp Technologies

Building Better Architecture with UX-Driven Design
Building Better Architecture with UX-Driven DesignBuilding Better Architecture with UX-Driven Design
Building Better Architecture with UX-Driven DesignPostSharp Technologies
 
Solving Localization Challenges with Design Pattern Automation
Solving Localization Challenges with Design Pattern AutomationSolving Localization Challenges with Design Pattern Automation
Solving Localization Challenges with Design Pattern AutomationPostSharp Technologies
 
Applying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website PerformanceApplying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website PerformancePostSharp Technologies
 
Produce Cleaner Code with Aspect-Oriented Programming
Produce Cleaner Code with Aspect-Oriented ProgrammingProduce Cleaner Code with Aspect-Oriented Programming
Produce Cleaner Code with Aspect-Oriented ProgrammingPostSharp Technologies
 

Plus de PostSharp Technologies (8)

Performance is a Feature!
Performance is a Feature!Performance is a Feature!
Performance is a Feature!
 
Building Better Architecture with UX-Driven Design
Building Better Architecture with UX-Driven DesignBuilding Better Architecture with UX-Driven Design
Building Better Architecture with UX-Driven Design
 
Solving Localization Challenges with Design Pattern Automation
Solving Localization Challenges with Design Pattern AutomationSolving Localization Challenges with Design Pattern Automation
Solving Localization Challenges with Design Pattern Automation
 
Applying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website PerformanceApplying a Methodical Approach to Website Performance
Applying a Methodical Approach to Website Performance
 
Multithreading Fundamentals
Multithreading FundamentalsMultithreading Fundamentals
Multithreading Fundamentals
 
Multithreading Design Patterns
Multithreading Design PatternsMultithreading Design Patterns
Multithreading Design Patterns
 
Design Pattern Automation
Design Pattern AutomationDesign Pattern Automation
Design Pattern Automation
 
Produce Cleaner Code with Aspect-Oriented Programming
Produce Cleaner Code with Aspect-Oriented ProgrammingProduce Cleaner Code with Aspect-Oriented Programming
Produce Cleaner Code with Aspect-Oriented Programming
 

Dernier

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 

Dernier (20)

Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 

10 Reasons You MUST Consider Pattern-Aware Programming

  • 1. #1 pattern-aware compiler extension to C#/VB 10 Reasons You MUST Consider Pattern-Aware Programming By Gael Fraiteur (@gfraiteur), Founder & CEO of PostSharp Technologies
  • 2. Housekeeping Rules • Q&A session at the end. • Please write questions to GoToMeeting chat window. • The webinar recording will be made available on Friday, July 22th.
  • 3. The Problem: Repeating Code (Boilerplate)
  • 4. Thinking with Patterns • Developers think at a high level of abstraction, using design patterns. Window pattern, repeated 200x Door pattern, repeated 20x
  • 5. Conventional Compilers Are Limited • Conventional compilers don’t have a concept of patterns. • Therefore developers write repeating code: boilerplate code.
  • 6. • INotifyPropertyChanged • Undo/redo • Code contracts (preconditions) • Logging • Transaction handling • Exception handling • Thread dispatching • Thread synchronization • Immutable • Authorization • Audit • Caching Typical Boilerplate
  • 7. Consequences of Boilerplate • High development effort • Poor quality of produced software • Code is more complex than necessary • Difficulty to add/modify functionality after release 1.0 • Slow ramp-up of new team members Can you see how boilerplate code slows your development team?
  • 8. The Big Question • How can we produce high-quality software with less development effort... without having to replace your existing compiler?
  • 10. Inadequate Technologies • Dependency Injection • Just adds behaviors to component boundaries • Affects your architecture • Only supports basic patterns • Great tool, but not for that job. • Code Generators / Refactoring Tools • Just makes it easy to generate boilerplate • You still have to maintain it!
  • 11. Converging Technologies Aspect-Oriented Programming Static Program Analysis Dynamic Program Analysis Metaprogramming Design PatternsThreading Patterns Pattern-Aware Compilers
  • 12. Pattern-Aware Compiler Extensions • Add support for patterns • No more pattern hand-coding resulting in boilerplate!
  • 13. 1) Stop Writing Boilerplate and Deliver Faster • Fewer lines of code means fewer hours of work • Outsource repetitive work to compiler and save time and costs immediately 4 REASONS FOR PATTERN-AWARE COMPILERS
  • 14. 2) Build More Reliable Software • Fewer lines of code means fewer defects • Reliability becomes much more affordable • Reliability generally means boilerplate: logging, exception handling, caching, security,… • The “right” tool. 4 REASONS FOR PATTERN-AWARE COMPILERS
  • 15. 3) Easier to Modify Functionality • Cleaner and shorter code is easier to understand • Focus on business logic and save time trying to understand the code • Better architecture is future-proof • Define features such as logging, exception handling or transactions in one place and make their modification easy and fast 4 REASONS FOR PATTERN-AWARE COMPILERS
  • 16. 4) New Team Members Contribute Quicker • Simpler code means faster ramp-up • New team members can focus on business logic without worrying about complex architectural structures. • Implement a tighter feedback loop • Validate hand-written code against your defined rules at build time and detect bugs as quickly 4 REASONS FOR PATTERN-AWARE COMPILERS
  • 17. Top 10 Features to Look For 1. Ready-made pattern implementations 2. Threading models 3. Ability to automate complex patterns 4. Ease to add patterns to source code 5. Compatibility with existing codebase 6. Build-Time Validation of Patterns 7. Architecture Validation 8. Integration with Visual Studio 9. Run-Time Performance 10. Commercial Support
  • 18. 1) Ready-Made Pattern Implementations 10 FEATURES TO LOOK FOR • Don’t reinvent the wheel. • Would you code your own Graph or DataGrid controls? • Look for off-the-shelf pattern implementations. Demo: INotifyPropertyChanged, undo/redo
  • 19. 2) Threading Models 10 FEATURES TO LOOK FOR • Simpler: Use the right level of abstraction. Don’t overwhelm your brain with thousands of tiny details. • Your choice: Immutable, Freezable, Synchronized, Reader-Writer Synchronized, Actor, Thread Affine and Thread Unsafe. • No more random bugs: Model validation catches most defects during build or during single-threaded test coverage. • Build thread-safe applications!
  • 20. Thread Safety: Example 10 FEATURES TO LOOK FOR 1. 2.
  • 21. 3) Automate Complex Patterns • Rich set of primitive transformations • Decoration: methods • Interception: methods, properties, fields, events • Introduction: methods, properties, fields, interfaces, custom attributes • To any declaration… or just public virtual ones? • Aspects composed of several transformations • Several aspects on the same declaration • Simple API… or complex AST/MSIL transformations? • Validation of hand-written code against pattern guidelines. 10 FEATURES TO LOOK FOR
  • 22. Example: Weak Event Pattern • Challenge: Lifetime of event subscriptions controlled by the event client, not the event source. • Solution: 2 aspects, 1 validation 10 FEATURES TO LOOK FOR [WeakEventClient] class MyEventClient class MyEventSource { } [WeakEvent] event EventHandler MyEvent; 1. 3. 2. 1. Client adds handler to event. 2. Event stores only weak reference thanks to [WeakEvent] aspect 3. Event adds handler to source through IWeakEventClient 4. [WeakEventClient] aspect implements IWeakEventClient interface and stores strong reference to event handler.
  • 23. 4) Easy to Add Patterns to Code • Custom attributes: one by one, hand-picked. • Multicast attributes: bulk e.g. add logging to all public methods • Inheritance • XML: centrally managed. • Programmatic at Build-Time: more flexible. • Programmatic at Run-Time: cool but not a compiler technology 10 FEATURES TO LOOK FOR
  • 24. 5) Compatibility with Existing Codebases 10 FEATURES TO LOOK FOR • Design Neutrality • No impact on architecture • Don’t abuse from dependency injection • Plain C# and VB • Get the benefits of F#, Scala, Nemerle, Python, Ruby or JavaScript in C# and VB • Cross-platform • Supports .NET Framework, Windows Phone, WinRT, Xamarin and Portable Class Libraries
  • 25. 6) Build-Time Pattern Validation • Emit build-time errors and warnings • Declarative and programmatic validations 10 FEATURES TO LOOK FOR 10% of developers design patterns and implement them with aspects. 90% of developers use aspects.
  • 26. 7) Architecture Validation • Challenge: get large teams respect conventions. • “Everybody on the team shall solve this problem this specific way”. • It’s a pattern but it still needs manual work. • Traditional Solution: Code Review • Slow feedback loop • Generates relationship friction • Better solution: Automatic Validation • Express conventions as executable code • Break the build in case of non-compliance. 10 FEATURES TO LOOK FOR
  • 27. 8) Visual Studio Integration Key questions developers have when coding: 1. What is this piece of code doing?  Which aspects are applied here? 2. Where is this aspect being used? 3. Debugging the business logic with / without the aspects. 10 FEATURES TO LOOK FOR
  • 28. 9) Run-Time Performance 10 FEATURES TO LOOK FOR • Build-time technology • Code modification at build time • Don’t waste time on analysis at run-time • No reflection at run-time
  • 29. 10) Commercial Support • Who backs the product? • Master thesis work vs vested professional software engineers • Support • Can you get someone on the phone? • Documentation • Quality policies 10 FEATURES TO LOOK FOR
  • 30. What’s Holding You Back? • Will I be able to understand my code? • Yes. With proper Visual Studio tooling, you’ll easily understand where and how patterns are used in your code • Can I still debug my code? • Yes. The debugging experience is unaffected. • Compilation will be slower • Possibly. Smarter compilers introduce additional steps into the compilation, there is a performance cost.
  • 31. Return on Investment • Each line of code costs $14. A commercial tool typically pays off after a developer saves first 50 lines of code. • Pattern-aware compilers can reduce source code by up to 20%. That means $5,000-$20,000 per developer per year! • 15 to 55 times ROI. • You never lose – you always win.
  • 32. Picture this • No more boring and repetitive coding. • No more spending hours trying to understand the business logic of the code. • No more random errors in multithreaded applications. • Smoother code reviews. • Cut development and maintenance costs. • Go to market faster. • Produce high-quality, easy-to-maintain software that has fewer bugs – with less development effort. Life is Good!
  • 33. This webinar is brought to you by… #1 best-selling pattern-aware compiler extension to C#/VB
  • 34. Trusted by the World’s Largest Corporations • Trusted by over 50,000 satisfied developers worldwide • Over 1,000 of the world’s largest corporations • More than 10% of all Fortune 500 companies rely on PostSharp All trust…
  • 35. For More Information • Go to www.postsharp.net/download and start the free trial. • Download the white paper from https://www.postsharp.net/product/white-papers. • Read case studies and testimonials on www.postsharp.net/customers. • Contact us at hello@postsharp.net with any questions.
  • 37. #1 best-selling pattern-aware compiler extension to C#/VB

Notes de l'éditeur

  1. Conventional programming languages like C# and Visual Basic miss a concept of pattern, therefore patterns like threading, INotifyPropertyChanged or logging are hand-coded and result in a large amount of boilerplate code. This boilerplate code adds up to: High development effort: some features require a large amount of repetitive code when implemented manually The quality of the produced software is poor as it contains high number of defects. Code that stems from copy-paste programming is more likely than other to be buggy because subtle differences are often overlooked. The applications we develop often lack robustness as enterprise-grade features such as exception handling or caching are often deliberately omitted because of the high amount of source code they imply. It’s difficult to add/modify functionality after first release because the business code is often littered with low-level non-functional requirements and so is more difficult to understand and maintain. Features like logging, exception handling or INotifyPropertyChanged are often scattered among thousands of files, making it very difficult to change their implementation. Codebases with a lot of boilerplate slow down the ramp-up of new team members as they often must first learn about caching, threading and other highly technical issues before being able to contribute to the business value. There are also long feedback loops even in small development teams as common patterns like diagnostics, logging, threading, INotifyPropertyChanged and undo/redo can be handled differently by each developer. Architects need to make sure new team members understand and follow the internal design standards and have to spend more time on manual code reviews--delaying progress while new team members wait to get feedback from code review.
  2. Wouldn't it be nice to produce high-quality, software that is easy to maintain with less development effort and faster ramp-up of new team members... without having to replace your existing compiler? You may want to consider…
  3. Pattern-Aware Compiler Extensions. They extend conventional object-oriented programming with a concept of pattern and so patterns do not need to be manually implemented as boilerplate code. Features such as INotifyPropertyChanged, logging, transactions are implemented in a cleaner, more concise way, making development and maintenance much easier.
  4. Stop writing boilerplate and deliver faster As you stop implementing patterns manually and outsource the repetitive work to the compiler, you will need less lines of code to deliver a functionality. Fewer lines of code means fewer hours of work so you’ll be able to deliver features faster and save development time and costs immediately
  5. 2. Build more reliable software • With a pattern-aware compiler eliminating the boilerplate, your code becomes easier to read, understand and modify, and contains fewer defects. • Reliability becomes much more affordable. Because reliability features such as caching or exception handling no longer require so much manual coding, they are much easier and cheaper to implement. You can spend your extra time building a more robust app.
  6. 3. Pattern-aware compiler extensions make it easier to add or modify functionality. • Cleaner and shorter code is easier to understand. After the initial release, too much development time is spent on reading and analyzing source code, especially if the initial developer left. With minimized boilerplate code, developers can easily focus on business logic and spend much less time trying to understand the code. • Better architecture is future-proof. Using a pattern-aware compiler, features like logging, exception handling or transactions are no longer scattered among thousands of files but they are defined in one place, making it much easier and fast to modify when necessary.
  7. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  8. There are 4 reasons why to consider pattern-aware compiler extensions: They help you stop writing boilerplate code and deliver faster because patterns do not need to be manually implemented as boilerplate code. You can build more reliable software They make it easier to add/modify functionality after first release New team members can contribute quicker thanks to cleaner codebase
  9. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  10. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  11. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  12. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  13. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  14. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  15. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  16. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  17. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  18. 4. New team members contribute quicker • Pattern-aware compilers help new team members contribute quicker and achieve a better division of labor. Because your codebase is cleaner, new or junior team members can focus on simpler, more business logic-oriented tasks rather than having to waste so much time learning complex architectural structures. • Implement a tighter feedback loop. A pattern-aware compiler can validate that hand-written code respects a pattern or a model, and it can detect bugs at build time instead of during code reviews, testing, or in production.
  19. Following are the most common questions about PostSharp: Will I be able to understand my code? Yes. Thanks to PostSharp’s Visual Studio tooling, you’ll easily understand where and how patterns are used in your code Can I keep using my existing compiler? Yes. PostSharp is 100% compatible with your existing Microsoft compiler Compilation will be slower Possibly. PostSharp introduces additional steps into the compilation, there is a performance cost. However, PostSharp is highly optimized several times faster than FxCop, etc.
  20. The detailed document on how ROI is calculated can be provided on request. A few background information on the data: For a cost of only 350$ -- cost of PostSharp license per developer if purchased 5 licenses with 3 years of maintenance (=$5,212 – public price)) Cost for 1 developer is $95k – source: https://visualstudiomagazine.com/articles/salary-surveys/salary-survey.aspx 1 developer typically produces 600 lines of code per month – source: McConnell, Steve (2006-02-22). Software Estimation: Demystifying the Black Art. Pearson Education. PostSharp pays off after he/she saves first 50 lines of code -- Average price for the first year for a 5-dev team: 665$
  21. Think about the last time your developers found it painful to implement a feature manually or modify functionality in existing software, and then never think of it again. Imagine you could produce high-quality software that is easy to maintain and has fewer bugs – all with less development effort. No more copying and pasting blocks of code to add a functionality. No more spending hours trying to understand the business logic of the code. No more hiring an expensive specialists to build thread-safe applications. Deliver the same functionality faster with less development costs. Stop imagining. Get to know PostSharp, the #1 best-selling pattern-aware extension to C# and VB,and improve your developers’ efficiency and lives.
  22. Now that you have seen some of the benefits of using a pattern-aware compiler, let's talk about the main reasons you may wish to consider PostSharp, the #1 best-selling pattern-aware compiler extension to C# and Visual Basic.
  23. Trusted by over 50,000 developers worldwide and over 1,000 leading corporations. More than10% of all Fortune 500 companies including Microsoft, Intel, Bank of America, Phillips, NetApp, BP, Comcast, Volkswagen, Hitachi, Deutsche Bank, Bosch, Siemens, and Oracle rely on PostSharp to reduce their development and maintenance costs.
  24. Steps to Actuate Sign up for free trial See more features and code examples on www.postsharp.net Read case studies and testimonials of satisfied customers Attend a free live webinar Get the price or request a quote Contact us with any questions