Chris Hance. Why “Re-”evolving?  NIH Epidemic  My name is Chris, and I’m a… VB6 Coder  YAGNI.

Slides:



Advertisements
Similar presentations
Data Modeling and Database Design Chapter 1: Database Systems: Architecture and Components.
Advertisements

.NET Database Technologies: Open-Source Frameworks.
Enterprise Smart Clients Architecture, Patterns, Design, Best Practices Keith Elder Manager, Sr. Software Engineer Quicken Loans Blog:
CSLA Presenter Sergey Barskiy, senior consultant at Magenic Technologies your questions Send an in order.
Programming Creating programs that run on your PC
Domain Modelling Paul Stovell. Architecture: Implicit or Explicit? Architecture exists implicitly But if you don’t define it, it probably sucks.
File Systems and Databases
Fundamentals of Information Systems, Second Edition 1 Organizing Data and Information Chapter 3.
Data Management I DBMS Relational Systems. Overview u Introduction u DBMS –components –types u Relational Model –characteristics –implementation u Physical.
Introduction to Databases Transparencies
Chapter 11 Data Management Layer Design
Chapter 4: Database Management. Databases Before the Use of Computers Data kept in books, ledgers, card files, folders, and file cabinets Long response.
Data Access Patterns. Motivation Most software systems require persistent data (i.e. data that persists between program executions). In general, distributing.
Architecture of Enterprise Systems: Domain Model and Database layer
Configuration Management Managing Change. Points to Ponder Which is more important?  stability  progress Why is change potentially dangerous?
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Entity Framework Code First End to End
Fundamentals of Information Systems, Second Edition 1 Organizing Data and Information.
MVC and MVP. References enter.html enter.html
Module Title? DBMS Introduction to Database Management System.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
SWE 316: Software Design and Architecture – Dr. Khalid Aljasser Objectives Lecture 11 : Frameworks SWE 316: Software Design and Architecture  To understand.
Chapter 1 Introduction to Databases Pearson Education ©
Todd Snyder Development Team Lead Infragistics Experience Design Group.
1 CS 430 Database Theory Winter 2005 Lecture 1: Introduction.
Using Visual Basic 6.0 to Create Web-Based Database Applications
Building an Offline Smart Client using Domain-Driven Design Principles Tim McCarthy.
Configuration Management (managing change). Starter Questions... Which is more important?  stability  progress Why is change potentially dangerous?
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
IE 423 – Design of Decision Support Systems Introduction to Data Base Management Systems and MS Access.
.NET Database Technologies: Data Models and Patterns.
More on “The Huddersfield Method” A lightweight, pattern-driven method based on SSM, Domain Driven Design and Naked Objects.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
1.NET Web Forms Business Forms © 2002 by Jerry Post.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 2 Database System Concepts and Architecture.
L8 - March 28, 2006copyright Thomas Pole , all rights reserved 1 Lecture 8: Software Asset Management and Text Ch. 5: Software Factories, (Review)
© 2005 Prentice Hall10-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
1 Mapping to Relational Databases Presented by Ramona Su.
Domain and Persistence Patterns. Fundamental Pattern Types Design Patterns Business Logic Patterns.
Applying Domain-Driven Design Jimmy Nilsson Webcast with UML China
13 1 Chapter 13 The Data Warehouse Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Data resource management
What it is and how it works
Chris Hance. Where do patterns come from?  Canonical Answer  Design Patterns: Elements of Reusable Object- Oriented Software, “Gang Of Four”  Patterns.
V 1.0 DBMAN 9 Inheritance Modeling + Relational Databases 1.
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
OOPS CONCEPT.  OOPS  Benefits of OOPs  OOPs Principles  Class  Object Objectives.
ORM Basics Repository Pattern, Models, Entity Manager Ivan Yonkov Technical Trainer Software University
CS 440 Database Management Systems Stored procedures & OR mapping 1.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
Reactor An ORM framework for ColdFusion Presentation By: Doug Hughes
Understanding Core Database Concepts Lesson 1. Objectives.
Architecture Patterns Design Patterns
A Simple Introduction to Git: a distributed version-control system
Entity Framework By: Casey Griffin.
Entity Framework Core for Enterprise Applications
File Systems and Databases
Database Systems Chapter 1
Software Architecture
Testing a persistence layer
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
Entity Framework Core for Enterprise Applications
Developing and testing enterprise Java applications
Database System Concepts and Architecture
Understanding Core Database Concepts
INHERITANCE.
Unit – V Data Controls.
Presentation transcript:

Chris Hance

Why “Re-”evolving?  NIH Epidemic  My name is Chris, and I’m a… VB6 Coder  YAGNI

Who Are You? 1. A Drag-n-drop Developer 2. A Design Patterns Practitioner 3. Somewhere In Between 4. The Heckling Section 5. Making A Quick Exit

What Do I Know?  Not as much as I’d like  But way too much VB6 and COM  Definitely Certifiable  MCDBA on SQL 2000  MCPD on.NET 3.5 Windows Apps

Where do patterns come from?  Canonical Answer  Design Patterns: Elements of Reusable Object- Oriented Software, “Gang Of Four”  Patterns of Enterprise Application Architecture (PoEAA), Martin Fowler  Real Answer  “Lots of people do it this way.”

Lots of People are Wrong  Anti-pattern  Common practice that’s (usually) inefficient or incorrect.  Get used to “It Depends”  “Portland Pattern Repository's Wiki”

Antipatterns? 1. Forms Over Data 2. Stored Procedures for Everything! 3. Naïve OOP  We'll discuss what's wrong and right.

1. Forms Over Data Sub Form_Load SQL = "Select * From " Set RS = Conn.Execute SQL Do Until RS.EOF Grid.AddItem RS(0) & Tab & RS(1) RS.MoveNext Loop End Sub

1.Forms Over Data  No way to share this code  That's what Object-Oriented is for, right?  Coder has to know SQL Schema  Stored procedures?  Data Access Layer (DAL)?  Object/Relational Mapper (O/RM)?

2. Stored Procedures for Everything! Sub Form_Load Set RS = Conn.Execute "prGetMyTable" Do Until RS.EOF Grid.AddItem RS(0) & Tab & RS(1) RS.MoveNext Loop End Sub

2. Stored Procedures for Everything!  Every change requires a DBA and a developer.  DBAs can change the recordset.  Database lock-in?  Some reusability.

3. Naïve OOP  Build an Object Model  Link Everything to Everything  Edit Anything  Commit It All Back?

3. Naïve OOP  Worked fine for Build (Compile) Automation  Very little "Commit It All Back"  Could only model changes, not the whole system, for memory and speed.  Still hard to change.  Can you "load everything" and "save everything" safely?

3. Simplified Build Model

3. Simplified Student Model Not simplified enough.

4. Concentrations  Light version of Aggregate Roots Eric Evans, Domain Driven Design  Limited models for updating data  Top level = what you're updating  Attach child collections / objects  Reference other concentrations

4. Concentrations

Where do we get data?  Classes self-populate?  E.g. Student.LoadByID(int ID)  Single Responsibility Principle (SRP) Violation  Unit testing is slow and difficult.  Object/Relational Mapper (ORM)  Another learning curve, but worth it.

Where do we get data? (2)  Custom Data Access Layer (DAL)  Talks to the database (or is the collection)  Retrieves editable objects  Save the edited objects  Nothing about keeping them consistent in memory.

Command / Query Separation  Don't use your DAL for reports  Don't need to update  Don't need to enforce business rules  Just need properly linked rows or hierarchical data  Data Warehouse or raw SQL

Multiple Versions of a DAL  Unit Testing – Mock DAL  Compatibility with multiple DBs  Different implementations for QA / Prod  Probably requires multiple assemblies  Single assembly would contain unused code  Define a DAL interface

Replaceable DAL

Cross-concentration Queries  Should one DAL know about another DAL?  CheckOutDAL references ContactDAL?  If not, returned objects are incomplete  If so, do we ever want to "short-circuit" and populate the references locally?  Teacher name & room number on Checkout list by date

Cross-DAL references

Abstract Factory Pattern  Different factories create objects differently, and/or instantiate different classes of the same interface.  Factories are interchangeable (like the previous DALs).  Domain Objects have different behavior or implementation, same interface.

Factory vs DAL?  Do you want to separate instantiation and reference setting code from data access?