#1 pattern-aware compiler extension to C#/VB

Slides:



Advertisements
Similar presentations
Introduction to .NET Framework
Advertisements

COM vs. CORBA.
Top 10 SSIS Best Practices Tim Mitchell Artis Consulting The World’s Largest Community of SQL Server Professionals.
Using Microsoft SharePoint to Develop Workflow and Business Process Automation Ted Perrotte National Practice Manager, Quilogy, Microsoft Office SharePoint.
Test-Driven Development “Test first, develop later!” –OCUnit.
NYC Technology Forum Introduction to Test Automation 11/2/07 All rights reserved Not to be reproduced without permission Bill Rinko-Gay Solutions Director,
Test Driven Development An approach to writing better code Jimmy Zimmerman Intel Corporation.
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
ExtWebDriver Open Source Project Daniel Koo Latha Nagaraj Bryan Robbins 04/23/2014.
Introduction to AOP.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
POSTSHARP TECHNOLOGIES Better software through simpler code.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 1: Software and Software Engineering.
DB2 Universal Database Confidential | July 2012 | India Software Lab Click to add text © 2012 IBM Corporation An End to End Windows Automation Framework.
1© Nokia Siemens Networks Presentation / Author / Date For internal use T Better Code Faster - Next Generation Java Continuous Integration Environment.
Grigore Rosu Founder, President and CEO Professor of Computer Science, University of Illinois
Introduction to Yan Cui Aspect Oriented Programming by
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
EMEA Beat Schwegler Architect Microsoft EMEA HQ Ingo Rammer Principal Consultant thinktecture
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
Northwest Arkansas.Net User Group Jay Smith Tyson Foods, Inc. Unit Testing nUnit, nUnitAsp, nUnitForms.
Enterprise Library 3.0 Memi Lavi Solution Architect Microsoft Consulting Services Guy Burstein Senior Consultant Advantech – Microsoft Division.
How Sage ERP X3 Systems Can Benefit Businesses.  Sage X3 is an affordable and flexible ERP solution designed to help mid-sized companies manage business.
CS223: Software Engineering
SAP Trade Repository Reporting by Virtusa
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Building Enterprise Applications Using Visual Studio®
SE-1021 Software Engineering II
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Lecture 1b- Introduction
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Test-driven development
5/15/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Top Ten List for Directors of Technology
PLM, Document and Workflow Management
Cisco Data Virtualization
Chapter 18 Maintaining Information Systems
Software testing
Development Changes in Dynamics 365 for Finance and Operations
Intent To provide a framework to manage the process of software salvage and promote loose coupling through message passing. Salvage means recycling significant.
Visual Studio Tools for Office 2005
References: "Software Engineering, 9th ed." (Addison-Wesley 2011)
Enterprise Library Overview
Magento Technical Guidelines Eugene Shakhsuvarov, Software Magento
Introduction Enosis Learning.
runtime verification Brief Overview Grigore Rosu
Script-less Automation: An Approach to Shift-Left.
Top Reasons to Choose Angular. Angular is well known for developing robust and adaptable Single Page Applications (SPA). The Application structure is.
Advantages OF BDD Testing
WEBINAR: Becoming Agile In Software Testing: The Government Edition
Introduction Enosis Learning.
Visual Studio 2005 “Personalized productivity”
Big Red Cloud Offers a Simple Online Accounts Solution for Business Owners and Bookkeepers Hosted on the Powerful Microsoft Azure Platform MICROSOFT AZURE.
Design and Programming
The Object-Oriented Thought Process Chapter 05
Transforming Automation through Artificial Intelligence
Automation Of Software Test
Software Testing and Maintenance Maintenance and Evolution Overview
Adra ACCOUNTS: Transaction Matching Software Powered by the Microsoft Azure Cloud That Helps Optimize the Accounting and Finance Processes MICROSOFT AZURE.
Appcelerator Arrow: Build APIs in Minutes. Connect to Any Data Source
Purge-it! USP's, pre-sales process & helping the customer to decide
Software visualization and analysis tool box
SAMANVITHA RAMAYANAM 18TH FEBRUARY 2010 CPE 691
CS310 Software Engineering Lecturer Dr.Doaa Sami
Delivering great hardware solutions for Windows
Extreme Programming.
Object Oriented Design & Analysis
Mark Quirk Head of Technology Developer & Platform Group
Smart companies carefully track their investments in every part of their business. By carefully monitoring and managing their return on investment (ROI)
Presentation transcript:

#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 #1 pattern-aware compiler extension to C#/VB

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.

Typical Boilerplate INotifyPropertyChanged Undo/redo Code contracts (preconditions) Logging Transaction handling Exception handling Thread dispatching Thread synchronization Immutable Authorization Audit Caching

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 Static Program Analysis Metaprogramming Pattern-Aware Compilers Aspect-Oriented Programming Dynamic Program Analysis Threading Patterns Design Patterns

Pattern-Aware Compiler Extensions Add support for patterns No more pattern hand-coding resulting in boilerplate!

1) Stop Writing Boilerplate and Deliver Faster 4 REASONS FOR PATTERN-AWARE COMPILERS 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

2) Build More Reliable Software 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.

3) Easier to Modify Functionality 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) New Team Members Contribute Quicker 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

Top 10 Features to Look For Ready-made pattern implementations Threading models Ability to automate complex patterns Ease to add patterns to source code Compatibility with existing codebase Build-Time Validation of Patterns Architecture Validation Integration with Visual Studio Run-Time Performance Commercial Support

1) Ready-Made Pattern Implementations 10 FEATURES TO LOOK FOR 1) Ready-Made Pattern Implementations 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 Build thread-safe applications! 10 FEATURES TO LOOK FOR 2) Threading Models Build thread-safe applications! 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.

Thread Safety: Example 10 FEATURES TO LOOK FOR Thread Safety: Example 2. 1.

3) Automate Complex Patterns 10 FEATURES TO LOOK FOR 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.

Example: Weak Event Pattern 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 1. Client adds handler to event. 2. Event stores only weak reference thanks to [WeakEvent] aspect class MyEventSource { } [WeakEventClient] class MyEventClient 4. [WeakEventClient] aspect implements IWeakEventClient interface and stores strong reference to event handler. 1. [WeakEvent] event EventHandler MyEvent; 2. 3. 3. Event adds handler to source through IWeakEventClient

4) Easy to Add Patterns to Code 10 FEATURES TO LOOK FOR 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

5) Compatibility with Existing Codebases 10 FEATURES TO LOOK FOR 5) Compatibility with Existing Codebases 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 10 FEATURES TO LOOK FOR 6) Build-Time Pattern Validation 10% of developers design patterns and implement them with aspects. 90% of developers use aspects. Emit build-time errors and warnings Declarative and programmatic validations

7) Architecture Validation 10 FEATURES TO LOOK FOR 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.

8) Visual Studio Integration 10 FEATURES TO LOOK FOR 8) Visual Studio Integration Key questions developers have when coding: What is this piece of code doing?  Which aspects are applied here? Where is this aspect being used? Debugging the business logic with / without the aspects.

9) Run-Time Performance 10 FEATURES TO LOOK FOR 9) Run-Time Performance 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? 10 FEATURES TO LOOK FOR 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

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 Life is Good! 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