Local Touch—Global Reach. - Sogeti USA Blogs

tunisianbromidrosisInternet και Εφαρμογές Web

5 Φεβ 2013 (πριν από 4 χρόνια και 7 μήνες)

156 εμφανίσεις

Local Touch

Global Reach.

These slides available at:
http://blogs.us.sogeti.com/andydouglas

(also on Connex, but the URL was too huge to put on a single slide)

Local Touch

Global Reach.

Course Format / Focus


High
-
level / Examples


Wash, rinse, repeat





Real
-
world examples / valuable take
-
aways



Local Touch

Global Reach.

High
-
Level Course Overview

1.
Design Principles (OO and other) (w/ examples)

2.
Data
-
Driven Apps with ORM Solutions (w/ examples)

3.
Best Practices for rich Internet apps (w/ examples)

Local Touch

Global Reach.

Your Expectations?

Local Touch

Global Reach.

Design Principles
-

Preface


What are they?


Concepts / guidelines



Why should you care?


yourSkills++


yourCodeQuality++


Requirements change


Because the best programmers

in the world say you should



But…but…but


I have no time!


My client doesn’t care!


Other buts?


Local Touch

Global Reach.

Separation of Concerns (SoC)

What is it? (from Wikipedia)

Separation of Concerns is the process of separating a computer program into distinct
features that overlap in functionality as little as possible.

A “concern” is any piece of interest of focus in a program (like the Presentation layer,
the Data Access layer, etc.)

Can apply to different levels of

granulatiry

Why should you care?


Maintainability


Flexibility


Testability


Local Touch

Global Reach.

Model
-
View
-
Controller (MVC is one option)

Definition


Model: handles APPLICATION STATE, BUSINESS LOGIC, and DATA PERSISTENCE.
(Is FAT)


View: User Interface. (Is thin)


Controller: responds to actions in UI, calls Model to handle application state /
persistence, and redirects user to Views as appropriate. (Is thin)


When to use (technology
-
specific recommendations)


.Net: ASP.Net MVC 2


Java: Struts2, JSF, Tapestry, and many other frameworks


Ruby on Rails


PHP (has many frameworks)

Local Touch

Global Reach.






SoC Examples

.Net


-

MVC StoreFront


-

Anti
-
pattern


-

MVVM


Java


-

Structs2


-

JSP w/ and w/o Scriptlets

Local Touch

Global Reach.

Single Responsibility Principle


What is it? (from Wikipedia)

In object
-
oriented programming, the single responsibility principle states that
every object should have a single responsibility, and that responsibility should
be entirely encapsulated by the class. All its services should be narrowly
aligned with that responsibility.
(
http://en.wikipedia.org/wiki/Single_responsibility_principle
)




Why should you care?


Maintainability


Testability


Sanity / Organization

Local Touch

Global Reach.

Local Touch

Global Reach.






SRP Examples

.Net


-

NerdDinner


-

MVC StoreFront


-

Uncle Bob (srp.pdf)


-

Anti
-
pattern


Java


-

catch
-
all Util class

Local Touch

Global Reach.

Dependency Inversion Principle


A.k.a. Inversion of Control (IoC)


What is it? (from Wikipedia)


In object
-
oriented programming, the dependency inversion principle refers to a specific form of
decoupling where conventional dependency relationships established from high
-
level, policy
-
setting
modules to low
-
level, dependency modules are inverted (e.g. reversed) for the purpose of rendering
high
-
level modules independent of the low
-
level module implementation details. The principle states:



A. High
-
level modules should not depend on low
-
level modules. Both should depend on
abstractions.



B. Abstractions should not depend upon details. Details should depend upon abstractions.


Why should you care?


Flexibility


Testability

Local Touch

Global Reach.

Dependency Injection


What is it?


Dependency injection (DI) in object
-
oriented computer programming is a
technique for supplying an external dependency (i.e. a reference) to a
software component
-

that is, indicating to a part of a program which other
parts it can use. It is a specific form of inversion of control where the concern
being inverted is the process of obtaining the needed dependency.




Why should you care?


Flexibility


Testability

Local Touch

Global Reach.






DI Examples

.Net

-

Uncle Bob (dip.pdf)

-

NerdDinner


Java


-

Spring + Struts2

Local Touch

Global Reach.

Notable Design Principles

Class Design

1.
S
ingle Responsibility Principle

2.
O
pen/Closed Principle

3.
L
inkov Substitution Principle

4.
I
nterface Segregation Principle

5.
D
ependency Inversion Principle

Package Cohesion

1.
Release/Reuse Equivalency Principle

2.
Common Closure Principle

3.
Common Reuse Principle

Coupling between Packages

1.
Acrylic Dependencies Principle

2.
Stable Dependencies Principle

3.
Stable Abstractions Principle


Local Touch

Global Reach.

ORM Solutions
-

Intro

ORM = Object Relational Mapping

Approaches to data
-
driven applications

1.
Data Centric: Database is king, drives application

2.
Domain Centric: Business entities and processes drive
application


True ORMs support both approaches


What ORM Brings to the Table (Why should you care?)

1.
DevelopmentTime
--


2.
TediusCode
--

(Less code = higher quality)

Local Touch

Global Reach.

Popular Solutions

Microsoft


Linq to SQL (easy to learn, but very limited)


ADO.Net Entity Framework (medium to learn, more powerful than L2S)


NHibernate (*very* hard to learn, but very powerful)


Java / IOS


Hibernate


JPOX


Cayenne

Local Touch

Global Reach.






ORM Demo

.Net


-

Coding in public; Custom EF Project


Java


-

Hibernate

Local Touch

Global Reach.

Best Practices
-

RIAs


Provide a good user experience


Ajax


JQuery (Ajax and Animations)


Silverlight / Flex

Local Touch

Global Reach.






Rich Internet Applications Examples

Java


-

Ajax / jQuery


Misc


-

Debugging JavaScript and CSS with
Firebug

Local Touch

Global Reach.

Your Expectations?

Local Touch

Global Reach.

Further Study

Recommended Resources

Design Principle
-
Related


Design Patterns:
Head First Design Patterns


OOP Principles / Good SDLC:
Head First Object Oriented Analysis and Design


SOLID Principles Tutorials:
http://www.dimecasts.net/Casts/ByTag/SOLID%20Principle


ASP.Net MVC Tutorials:
http://www.asp.net/mvc


(See other resources on my blog)


ORM Resources


Hibernate:
http://www.roseindia.net/hibernate/index.shtml



Entity Framework:
http://msdn.microsoft.com/en
-
us/library/bb386876.aspx



Nhibernate: (perhaps you can find a better link than I)


RIA Resources


JQuery Tutorial:
http://docs.jquery.com/Tutorials:Getting_Started_with_jQuery


Silverlight Resources:
http://www.silverlight.net/




Local Touch

Global Reach.

Community Groups


Cincinnati .Net User Group:
http://cinnug.org/



Cincinnati SharePoint User Group:
http://cincyspug.securespsites.com



Cincinnati Architect’s User Group (technology agnostic):
http://cinnug.org/



Cincinnati Java User Group:
http://www.cinjug.org/



Cincinnati SQL Server User Group:
http://www.cincysql.org/



Cincinnati Programmer’s Guild:
http://cincypg.org/



Cincinnati Agile Round Table (Ruby):
http://agileroundtable.org/



Listing of other IT groups in Cincinnati:
http://www.thecircuit.net/User/UserGroups.aspx



(Misc link) Great Programming Forum:
http://www.stackoverflow.com


Local Touch

Global Reach.

Thank you!


Andy Douglas
-

andrew.douglas@us.sogeti.com


Bojan Simic


bojan.simic@us.sogeti.com

Link to Resources:
http://blogs.us.sogeti.com/andydouglas