Piotr Burczynski - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Piotr Burczynski

Description:

DataObjects.NET jest biblioteka kt ra dramatycznie ulatwia tworzenie warstwy ... 2000, Microsoft Access, Oracle, Firebird (formerly Interbase), MaxDB (formerly ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 17
Provided by: pbur3
Category:

less

Transcript and Presenter's Notes

Title: Piotr Burczynski


1
  • Piotr Burczynski
  • s2649_at_pjwstk.edu.pl

2
Krótki wstep
  • DataObjects.NET jest biblioteka która
    dramatycznie ulatwia tworzenie warstwy dostepu do
    bazy danych oraz warstwy biznesowej.

3
Plan prezentacji
  • Glówne cechy DataObjects.NET
  • Wydajnosc
  • Przyklad
  • Wspierane technologie\platformy
  • Podsumowanie

4
Glówne cechy DataObjects.NET - Automatic
database schema building \ upgrading
  • public abstract class Person DataObject
  • public abstract string Name get set
  • public abstract string SecondName get set
  • public abstract string Surname get set
  • public abstract int Age get set
  • public abstract string Info get set
  • NotPersistent
  • public virtual string FullName
  • get return Name" "SecondName" "Surname
  • public abstract class Author Person
  • public abstract string HomePage get set

5
Glówne cechy DataObjects.NET- Transparent
persistence
  • using (Session session new Session(domain))
  • // We can access the storage only during
    transaction, so...
  • session.BeginTransaction()
  • // That's how we create our first persistent
    instance of Person
  • Console.WriteLine("Creating an instance of Person
    ")
  • Person p (Person)session.CreateObject(typeof(Per
    son))
  • // Instance is already persisted to the storage
    now
  • // Let's set persistent properties
  • p.Name "John"
  • p.Surname "Smith"
  • p.SecondName "V."
  • p.Age 32
  • p.Info "John V. Smith, 32 years old"
  • // And read the instance ID
  • personID p.ID
  • // And finally commit our work
  • session.Commit()

6
Glówne cechy DataObjects.NET- Querying
  • Select Animal instances where LegCount 4
    order by Name
  • Select Animal instances where
  • ChildrenChildren.count gt 0.count gt 0
  • Select top 100 IFtObject instances as fto with
    (SkipLocked)
  • where not exists Select FtRecord objects where
    FtObjectfto
  • Skladnia
  • Select count distinct top N (TypeName
    FieldName) (instances objects values)
  • with options (OptionsExpression)
  • joins
  • where WhereExpression
  • textsearch SearchExpression
  • order by OrderByExpression

7
Glówne cechy DataObjects.NET- Multilingual
properties
  • public abstract class Book DataObject
  • public abstract string Title get set
  • Translatable
  • public abstract string Description get set
  • ...

8
Glówne cechy DataObjects.NET- References
  • public abstract class Article DataObject
  • public abstract string Title get set
  • public abstract string Annotation get set
  • public abstract string Body get set
  • public abstract int PublicationDate get set
  • Contained, Nullable, LoadOnDemand
  • public abstract Author Author get set

9
Glówne cechy DataObjects.NET- Collections
  • public abstract class Author Person
  • ...
  • Contained
  • ItemType(typeof(Article))
  • public abstract DataObjectCollection Articles
    get

10
Glówne cechy DataObjects.NET- Full-text indexing
search
  • Full-text search query example
  • Select Author instances where Namegt'D
    textsearch top 5
  • freetext 'Jungle order by FullTextRank desc
  • Full-text filters usage example (External)
  • Filter docFilter Filter.Create("doc")
  • FileStream docFile new FileStream(_at_"C\AnyMicros
    oftWordFile.doc",FileMode.Open)
  • Debug.WriteLine(docFilter.GetFilteredContent(docFi
    le))
  • Filter txtFilter Filter.Create("txt")
  • FileStream txtFile new FileStream(_at_"C\AnyPlainT
    extFile.txt",FileMode.Open)
  • Debug.WriteLine(txtFilter.GetFilteredContent(txtFi
    le))

11
Glówne cechy DataObjects.NET- Built-in NTFS-like
security system
  • public abstract class Book DataObject
  • Demand(typeof(BookReadPermission), AccessorType
    AccessorType.Get)
  • Demand(typeof(BookModifyPermission),
    AccessorType AccessorType.Set)
  • public abstract string Title get set
  • // AccessorType.All is used by default
  • Demand(typeof(AdministrationPermission))
  • public abstract Author Author get set
  • ...

12
Wydajnosc
  • Caching
  • Lazy loading (load-on-demand)
  • Preloading
  • Delayed updates

13
Przyklad
14
Wspierane technologie\platformy
  • 6 RDBMS platforms Microsoft SQL Server 2000\2005
    (Yukon), MDSE 2000, Microsoft Access, Oracle,
    Firebird (formerly Interbase), MaxDB (formerly
    SAP DB)
  • 2 full-text search engines Microsoft Search,
    DotLucene
  • .NET Framework 1.1/2.0 languages
  • Mono (beta stage)
  • .NET Remoting

15
Podsumowanie
  • Methodology
  • Persistence framework
  • Transactional services
  • Security system
  • All is initially remotable

16
  • K O N I E C
Write a Comment
User Comments (0)
About PowerShow.com