Kako praviti dobre SharePoint aplikacije ?

Post on 15-Feb-2016

42 views 0 download

Tags:

description

Kako praviti dobre SharePoint aplikacije ?. (Development Cycle na SharePoint na čin ). Adis Jugo PlanB. GmbH. Perception of SharePoint applications. Agenda. Requirements management. A day in life of a SharePoint architect / dev. - PowerPoint PPT Presentation

transcript

Adis Jugo PlanB. GmbH

Kako praviti dobre SharePoint aplikacije?

(Development Cycle na SharePoint način)

Adis Jugo, PlanB.

Perception of SharePoint applications

Adis Jugo, PlanB.

Agenda

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Requirements management

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

A day in life of a SharePoint architect / dev

“We are shooting at a moving target while wearing blindfolds, without knowing what the target looks like, where it is, or what type of ammo we need to use. In fact, we don’t even know if we’re in the right shooting range.”

Bjørn Furuknap, SP consultant and blogger

Adis Jugo, PlanB.

Requirements management

Holy Grail(and your life insurance)

Change management

(Agile)

Reqs document

Time/cost estimation

Adis Jugo, PlanB.

Requirements document• Contains detailed explanation of all use cases (scenarios)

• Contains descriptions of all user roles (and permissions)

• Contains description of all inputs and outputs

• Contains descriptions of all processes

• Contains predicted extensity of use and concurrency situations

• Describes what can be implemented as a “no code solution”, and what has to be developed

Adis Jugo, PlanB.

Requirements document

• Ensures that all the people involved in the process really understand the process

• Ideally done by a business analyst and an architect

• Contains yours and customer’s signature

Adis Jugo, PlanB.

NO SPECS – NO CODE• SharePoint empowers users to do things alone ->

NO SPECS - NO CODE

• Customer’s processes are at very best loosely described -> NO SPECS - NO CODE

• Customers don’t understand the complexity of the solution they require -> NO SPECS – NO CODE

• But we have agreed that you will do that…NO SPECS – NO CODE

• If we kick off immediately, we will save time…(yes, and Elvis is still alive) -> NO SPECS – NO CODE

• Protect yourself AND your customer

Adis Jugo, PlanB.

Time and Costs estimation

Adis Jugo, PlanB.

Time and Costs estimation• First 80% of the project consumes 80% of the budget

• Last 20% of the project consumes another 80% of the budget

Bill Gates

Adis Jugo, PlanB.

Time/Budget consumption according to Gates

10 20 30 40 50 60 70 80 90 1000

20

40

60

80

100

120

140

160

180

Budget consumption (%)

Project completion (%)

Adis Jugo, PlanB.

Some questions to think about• How long do you need for the development?• Break the requirements document down to deliverables

and blocks. Do you have everything in requirements doc? How long did you write the requirements doc?

• Who did the architecture? When?• How about some testing?• You have bugs? When are you going to fix them?• Who is going to deploy the solution? To which server?

When?• Do you practice code reviews?• Who is going to the meetings? How often?

Adis Jugo, PlanB.

Making a Time / Costs estimation

Iterations• Design• Development• Testing• Debugging• Review• …

Deployment

Project Mgmnt.

Adis Jugo, PlanB.

Making a Time / Costs estimation• Event receiver? Can be done in 1h. (Best case)• Maybe in 2h (Most Likely)• Or sometimes in a day (Worst case)

64 WBMLE

Adis Jugo, PlanB.

Making a Time / Costs estimation

Adis Jugo, PlanB.

Change Management

Adis Jugo, PlanB.

Change Management• I have deleted that field. We didn't need it anymore.

Adis Jugo, PlanB.

Change Management• I have deleted that field. We didn't need it anymore.• We have changed the workflow - process description was

wrong

Adis Jugo, PlanB.

Change Management• I have deleted that field. We didn't need it anymore.• We have changed the workflow - process description was

wrong• I've just changed the list name, why is the event receiver

not working?

Adis Jugo, PlanB.

Change Management• I have delete that field we didn't need it anymore• We have changed the workflow - process description was

wrong• I've just changed the list name, why is the event receiver

not working?

THEY CAN DO THAT!

Adis Jugo, PlanB.

Change Management

Change

Standard Change

Deal within CM

SharePoint Change

Crucial for the solution?

Yes: Deal within

Architecture

No: Deal within CM

Adis Jugo, PlanB.

Architecture of SharePoint solutions

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Architecture of SharePoint solutions

Adis Jugo, PlanB.

A SharePoint Solution

SP Solution

InPage

Event Receivers

Timer Jobs

WorkflowsSilverlight

Ajax

Managed Code

Office Clients

!NET

Adis Jugo, PlanB.

What is wrong with this web part?

Adis Jugo, PlanB.

Solution Architecture

DA Common Functions

Core Functions(Logging,

Exceptions)

Data Access Layer

Business Logic Layer

SP DATA

InPage Event Rcv.

Workflow Timer

Service(s) – WCF, ASMX, REST

RIA NET

Office !Net

I

Adis Jugo, PlanB.

Solution Architecture

DA Common Functions

Core Functions(Logging,

Exceptions)

Data Access Layer

Business Logic Layer

SP DATA

InPage Event Rcv.

Workflow Timer

Service(s) – WCF, ASMX, REST

RIA NET

Office !Net

I

Adis Jugo, PlanB.

Solution Architecture: InPage

Adis Jugo, PlanB.

Solution Architecture: Client Side

Adis Jugo, PlanB.

Solution Architecture: Client Side

Adis Jugo, PlanB.

Solution Architecture: Client Side• People want a good looking and good performing

application• Increase performance:

– Async calls– Client Side Caching– Predictive Loading

• Reachability as an issue

Reach

Capability

HTML

AJAX

Silverlight

Adis Jugo, PlanB.

Error Handling and logging

Adis Jugo, PlanB.

Demo: Logging in ULS

Adis Jugo, PlanB.

Configuration• No Hard-Coded configuration

• Web.Config only in life threatening situations

• Or…

Adis Jugo, PlanB.

SPG Configuration Manager

Adis Jugo, PlanB.

Multilingualism

Adis Jugo, PlanB.

Multilingualism – OOB features

Adis Jugo, PlanB.

Multilingualism – user preferences

Adis Jugo, PlanB.

Multilingualism – ML configuration list

Adis Jugo, PlanB.

Other architecture considerations• Architecture documentation• Standard Design Patterns• Avoid 3rd Party libraries• Solution Technical Documentation

Adis Jugo, PlanB.

SharePoint development

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Development• Standard coding conventions (Microsoft)• Define standard core libraries (reuse standard

functionality) – own or SPG• Use standard VS 2010 SharePoint project

templates• Follow the SharePoint rules of game – field

names, required fields, descriptions, translations

• Follow architecture guidelines – logging and exception handling

• Use a very defensive approach – you never know when will somebody delete a field

Adis Jugo, PlanB.

Development• Use SharePoint tools (SharePoint Manager, ULS

Viewer, SPDiag)

• Don’t use 3rd party components if you don’t really have to

• Use Linq – SPMetal is good

Adis Jugo, PlanB.

Testing SharePoint Solutions

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Unit Testing, Integration Testing• First line of defense• Not possible OOB with Visual Studio 2010 Unit Testing• Custom Unit testing solutions• Moles Framework• Custom Console App

• Continuous Integration Testing(TFS Team Build, Cruise Control)

Adis Jugo, PlanB.

UI, |Stress and Load Testing• Coded UI Tests• Load Tests• Stress Tests

Adis Jugo, PlanB.

Manual tests

• Still the most important tests• Test cases document• Microsoft Test Manager -> Helps with Problem

reproducing fight

Adis Jugo, PlanB.

Quality Assurance

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Quality Assurance

• StyleCop• DisposeChecker

Adis Jugo, PlanB.

Deployment

Dev Cycle

Requirements

management

Solution Architecture

Development

Testing

Quality Assurance

Deployment

Adis Jugo, PlanB.

Deployment cycle

Adis Jugo, PlanB.

And finally

Resources• Time and Costs estimation template

http://adis.jugo.ba/download/blogimg/2011/1sug_juli2011/TimeCostsEstimation_Example.xlsx

• SharePoint Guidance 2010http://spg.codeplex.com

• MVP pattern in SharePoint InPage elements (WebParts, ASPX)http://msdn.microsoft.com/en-us/library/ee413740.aspx

• 1SUG BiHhttp://www.1sug.com

• Adis Jugo bloghttp://adis.jugo.ba

• PlanB. GmbHhttp://www.plan-b-gmbh.com

• Coding Conventions Examplehttp://blogs.msdn.com/b/brada/archive/2005/01/26/361363.aspx

• SharePoint best practiceshttp://msdn.microsoft.com/en-US/sharepoint/ff660756.aspx

• Pex and Moles Frameworkhttp://research.microsoft.com/en-us/projects/pex/downloads.aspx

• Asterix and Cleopatrahttp://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=asterix+and+cleopatra&x=0&y=0

Adis Jugo, PlanB.

• http://www.plan-b-gmbh.com

• http://www.adisjugo.com

@adisjugo