Software Development: Patterns And Practices

http://msdn.microsoft.com/en-us/practices/default.aspx
http://msdn.microsoft.com/en-us/library/cc467894.aspx
http://www.codeplex.com/AppArchGuide

According to Microsoft P&P (Patterns and Practices) were created to meet the demands of architects and application developers. By following proven patterns and practices it is suggested that more sound applications will be the result. Included in P&P

  • How to design
  • Develop
  • Deploy
  • Operate architecturally sound applications on a Microsoft platform.

P&P for Web Applications
http://msdn.microsoft.com/en-us/practices/bb969054.aspx#web_apps

PHP Patterns and Practices
http://www.phppatterns.com/docs/start

Agile Software Development

Agile Software development

Agile Development is a methodologies that promotes iterations, open collaboration and process adaptability through out the life-cycle of a project.

Software that is developed in iterations that typically last from two to four weeks.  These iterations are referred to as “Timeboxes”. Each iteration passes through the complete software development cycle.
1.Planning
2.Requirements Analysis
3.Design
4.Unit Testing
5.Coding
6.Demonstration to share holders

The goal is to have a bug free release at the end of each iterations. At the end of each iteration, stakeholders can re-evaluate project priorities with a view to optimize their ROI.

Agile development emphasizes bug free working software as the primary measure of progress.  If a stakeholder requires documentation as a higher priority than working software, the working software priority shall be changed.

This form of software development is meant to combat the downfalls and political bureaucratic way software has been development in the past.

The Agile Manifesto

•    Customer satisfaction by rapid, continuous delivery of useful software
•    Working software is delivered frequently (weeks rather than months)
•    Working software is the principal measure of progress
•    Even late changes in requirements are welcomed
•    Close, daily cooperation between business people and developers
•    Face-to-face conversation is the best form of communication (Co-location)
•    Projects are built around motivated individuals, who should be trusted
•    Continuous attention to technical excellence and good design
•    Simplicity
•    Self-organizing teams
•    Regular adaptation to changing circumstances

Contrasting development techniques
1.    Waterfall Model
2.    Cowboy Coding
For best practices using Agile, daily kickoff and review of goals meetings should be held. There should be short release cycles of software functionality. A responsive development approach should be taken. Generalize.
As this approach to software engineering become more widely accepted, and defined. The benefit to the stakeholders is apparent. While development time may be extended while inviting changes throughout the development cycle, scope creep will always be a part of software engineering.
Agile has many benefits from a RAD (Rapid Application Development) point of view. By providing working functionality to the stakeholder, a faster product is delivered over a longer period of time.

ASP.NET Page and Application Tracing

Tracing

The tracing feature in ASP.NET is useful in tracking the execution of an application. This is helpful to display the trace in a way that doesn’t affect the programs output.

To enable tracing on a page-by-page level, set the Page directive in any ASP.NET page to True:

<%@ Page Language=”C#” Trace=”true” TraceMode = “SortByCategory” Inherits = “System.Web.UI.Page” CodeFile=”Default.aspx.cs” %>

To enable tracing for an entire application add tracing settings to the web.config:

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<compilation debug=”false” />
<authentication mode=”Windows” />
<trace enabled =”true” pageOutput =”True” requestLimit =”20″ traceMode =”SortByTime ” />
</system.web>
</configuration>

The page-level setting will take precedence over the web.config setting.

How to view Trace Data.

In the Page_Load event call System.Diagnostics.Trace.Write(). Make sure the pageOutput=True in the webConfig.

What’s being displayed

1. Request Details
ASP.NET Session ID, Character encoding of the request.

2. Trace information
All Trace.write methods called in the HTTP request. This is helpful to find methods that are taking a long time to execute.

3. Control Tree
HTML of ASP.NET Control Tree.

4. Session State
List all keys and values for users session .

5. Application State
List all keys and values for application.

6. Request Cookies Collection
List all cookies passed in during page request.

7. Response Cookies Collection
List all cookies passed back during page response.

8. Headers Collection
Shows all headers passed in during request from browser.

9. Response Headers Collection
Shows all headers passed back during response.

10. Form Collection
Displays dump of Form Collection and all keys and values.

11. Querystring Collection
Displays dump of Querystring collection and all keys and values.

12. Server Variables
Displays dump of Server Variables with keys and values.

The Trace.axd
Page output only displays information of the current page. If you want to create a collection use Trace.axd.

http://localhost/application-name/trace.axd

Trace.axd will display all tracing data up to the present limit.

Trace Forwarding

ASP.NET allows to forward trace message to System.Diagnostics.Trace:write to DiagnosticsTrace

<trace enabled =”true” requestLimit =”20″ writeToDiagnosticsTrace =”true ” pageOutput =”true”/>