Você está na página 1de 14

Code Reference Slice

C3: Protected

About the Author


Created By:

Binson Paul (105475)

Credential
Information:

Sr. Architect, Microsoft Solutions Center of Excellence

Version and
Date:

Omega.Net/PPT/1010/1.0

ognizant Certified Official Curriculum

2007, Cognizant Technology Solutions Confidential

Icons Used

Questions

Tools

Coding
Standard
s

Test Your
Understandi
ng

Demonstrati
on

A
Welcome
Break
2007, Cognizant Technology Solutions Confidential

Hands-on
Exercise

Referenc
e

Contacts

Code Reference Slice Objectives


Objective:

After completing this chapter you will be able to:


Identify Code Reference Slices
Recognize the utility of Code Reference Slices
Identify methods of implementing Code Reference Slices

2007, Cognizant Technology Solutions Confidential

Code Reference Slice Overview


Goals:
Come out with standard implementation for development

team to use as reference while developing other


components of system.
Come out with ready-to-use components
Implement end-to-end functionality for a set of business use
cases.

2007, Cognizant Technology Solutions Confidential

What is Code Reference


Slice?
Implementation of specification:
Architecture + Design

Strictly complies with Specification and Test Suite.


Implementation of a use case, showing the collaboration of

components in all layers.

2007, Cognizant Technology Solutions Confidential

Code Reference Slice


How To?
Implement

a critical use case which collaborates with


components in all the layers.
Use appropriate design patterns, libraries and best practices.
Make it available in repository; publish and share the intent of
design.
Often referred to as prototype, but is important to understand
the value it brings:
As far as possible, it should be used as a basic building
block for the application and not used as a throw-away
implementation.

2007, Cognizant Technology Solutions Confidential

Code Reference Slice Benefits


Serves as a reference (standard) implementation which shows

proper usage of design patterns and libraries:


Helps improve the quality of the application.
Helps the developers to implement Defined Architecture and

Best Practices.
Helps the team understand the system boundaries,
communication & transition points between various
architectural layers and understand the system constraints.
Helps reduce risk to the project because architect can

discover whether a chosen approach is feasible

2007, Cognizant Technology Solutions Confidential

Implementation
Architectural & Design
Patterns
Coding Standards & Best
Practices
Code Generation
Code Analysis & Code
Metrics
Unit Testing & Code
Coverage
Code Profiling
Check-in Policies,
Automated Build &
Continuous Integration
Code Promotion
Packaging & Deployment
NCAP
2007, Cognizant Technology Solutions Confidential

Implementation
Demonstrate all the project specific conventions and

standards.
Implement a Use case which cover all or most of layers.
Exception handling, commenting, logging.
vehicleDetails.SetPremium(premium.CalculatePremium(vehicleDetails));
}
catch (InValidVehicleException excep)
{
request.SetAttribute("error", excep.getLocalizedMessage());
throw new ApplicationException(excep);
}
catch (ServiceException exce)
{
request.SetAttribute("error", exce.getLocalizedMessage());
throw new ApplicationException(exce);
}
2007, Cognizant Technology Solutions Confidential

Implementation
Internalization, externalization.
Demonstrates the usage of design patterns.
Framework specific best practices.
Profiled for response times and memory consumption.
Included Unit tests should have more than 90% coverage.
Include logical models and detailed design documents.
Make this available as part of source and publish in project

portal
Make sure that every developer understands the
technology stack in RI.

2007, Cognizant Technology Solutions Confidential

Test Your Understanding


1) As a Tech Lead how can I ensure, my team members create

consistent, readable, maintainable and error free code?


2) As a developer how can I create consistent, readable,

maintainable and error free code?

2007, Cognizant Technology Solutions Confidential

12

Code Reference Slice Source


Reference sites and books:
https://mscoe/omeganet/Shared%20Documents/CodeReferenceSlice

.aspx

Disclaimer: Parts of the content of this course is based on the materials available from the
websites and/or books listed above. The materials that can be accessed from linked sites
are not maintained by Cognizant Academy and we are not responsible for the contents
thereof. All trademarks, service marks, and trade names in this course are the marks of the
respective owner(s).
2007, Cognizant Technology Solutions Confidential

13

You have successfully completed


Coded Reference Slice

Você também pode gostar