SlideShare a Scribd company logo
Developing Social Network
       using ORM

                By N.S.Devaraj
Good Afternoon!!
Agenda
                     ORM Introduction

                        Why ORM ?

                    How to use ORM ?

         Why Generic DAO / Persistent Collections ?

               Social Networking Application

                           Demo

                        Questions ?
Flash Camp Chennai - Social network with ORM
OMG WTF ORM ?
Object-Relational Mapping
maps objects to relational databases   maps relational databases to objects



   a programming technique for converting data between incompatible
   type systems in object-oriented programming languages
                                                     - WikiPedia
Why ORM ?
                                                             Full on
                                                        Objects of objects

                       Less DB Work           The ORM World

                                          Beans
                                      Not much else


 Procedural                                           Object-Oriented




 Classic Procedural
    with DAO’s


                      More DB Work
How to use ORM
ORM have to allow the DB swap "on the fly"


                        to achieve, we need DI / IoC framework (Swiz)

                       a GenericDAO to be created to manage Business
                                           Logic

                         a Persistent Data collection to reduce server
                                             calls

                         supported with a Push Mechanism to be Sync
                         with Data Source & for Conflict Management
Data Access Object
                 DAO is used to
                                            Each DAO
                   do CRUD
                                           instance is
                operations and
                                         responsible for
                  access with
                                          one primary
                Database tables,
                                         domain object
                used to achieve
                                            or entity.
                 encapsulation



 an object that provides an abstract interface to some types of database
 or persistence mechanism.
                                                       - WikiPedia
Why we need
GenericDAO?
  Mostly we                                                     With
   deal with                                                GenericDAO,      Unit testing
multiple VO’s    Using MVC Framework, while dealing with    the business    is damn easy
to be queried            n x VO, we end up with             logic will be     as we can
 from service                                                in generic     inject values
     layer.                                                     code.




                   nx             nx
                                               n x Events
                Delegates      Commands
Advantages
                Increases
               productivity


             Apply DRY (Don’t
             Repeat Yourself)
                Principle



              Reduces errors



               Easy for Unit
                  Testing
Server DAO Model
         Abstract                                            Real World Example

     Data Source                                              SQL Table: Notes

  Create, Read, Update, Delete                                    Perform SQL Queries


Data Access Object                                                 Notes DAO
                                    creates                                              Maps SQL Records to

Delegates CRUD Operations to                                  Delegates CRUD Operations to

                                              Value Object                                                     NoteVO
  Business Object                                               Library Service

             calls               receives                         Communicates with
                                                                                             receives


          Client                                                     Flex RIA
Client DAO Model
             Abstract                                                Real World Example
                                                     Push                                                           Push
      Business Object                        Delegate Update             Notes Beans                    Delegate Update



       Create, Read, Update, Delete                                        Perform functions
                                         creates

PC             DAO                                             PC       Generic DAO                 Service Results to



     Delegates CRUD Operations to                                    Delegates CRUD Operations to

                                                       VO                                                       NoteVO
              Events                                                         Signals

                dispatches            receives                                dispatches
                                                                                                        receives

               View                                                 Skinnable Component
Why Persistent
Collections?
Social Network App
  Value Objects Required



                               Persons




                                         Notes(updates)
                 Connections
                                          – files, replies
DEMO
Questions ?
Thanks For




      Twitter @nsdevaraj
      GTalk   nsdevaraj
      Blog    http://nsdevaraj.wordpress.com
      Code    https://github.com/nsdevaraj/SwizDAO
      Web     http://www.adamstudio.in

More Related Content

PPTX
Take the spaghetti out of windows azure – an insight for it pro techies part 1
Microsoft TechNet - Belgium and Luxembourg
 
PPT
Sem tech 2011 v8
dallemang
 
PPT
Verdens bedste BPM-platform leveret som cloud, Christian A. Givskov, IBM
IBM Danmark
 
PDF
2011 04-dsi-javaee-in-the-cloud-andreadis
dandre
 
PDF
Oracle VDI 3.2 Overview
Matthias Mueller-Prove
 
PDF
Twee remedies tegen systeemuitval en datacorruptie
Jos van den Oord [Oracle DBA,OCM,OCP,RAC,CLOUD]
 
PPTX
Edition based redefinition joords
Jos van den Oord [Oracle DBA,OCM,OCP,RAC,CLOUD]
 
PDF
Ari Zilka Cluster Architecture Patterns
deimos
 
Take the spaghetti out of windows azure – an insight for it pro techies part 1
Microsoft TechNet - Belgium and Luxembourg
 
Sem tech 2011 v8
dallemang
 
Verdens bedste BPM-platform leveret som cloud, Christian A. Givskov, IBM
IBM Danmark
 
2011 04-dsi-javaee-in-the-cloud-andreadis
dandre
 
Oracle VDI 3.2 Overview
Matthias Mueller-Prove
 
Twee remedies tegen systeemuitval en datacorruptie
Jos van den Oord [Oracle DBA,OCM,OCP,RAC,CLOUD]
 
Edition based redefinition joords
Jos van den Oord [Oracle DBA,OCM,OCP,RAC,CLOUD]
 
Ari Zilka Cluster Architecture Patterns
deimos
 

What's hot (20)

PDF
Novell Success Stories: Endpoint Management in Retail and Manufacturing
Novell
 
PDF
Choosing Your Windows Azure Platform Strategy
drmarcustillett
 
PPTX
VMware PEX Boot Camp - Reaching the Clouds with NetApp Integrations with VMwa...
NetApp
 
PDF
Cloud computing bringing the dark side of enterprise apps into the light by...
Khazret Sapenov
 
PDF
Novell Success Stories: Collaboration in Government
Novell
 
PDF
Novell Success Stories: Collaboration in Travel and Hospitality
Novell
 
PPTX
Is Private Cloud Right for Your Organization
Dave Roberts
 
PDF
Cloud Computing - Making IT Simple
Bob Rhubart
 
PDF
9sept2009 concept electronics
Agora Group
 
PDF
FutuRIS Architecture
pashaz03
 
PPTX
Repeater customer business presentation 5 nov-12
Nuno Alves
 
PDF
Novell Support Revealed! An Insider's Peek and Feedback Opportunity
Novell
 
PDF
Inside the Hadoop Machine @ VMworld
Richard McDougall
 
PDF
Practical experiences and best practices for SSD and IBM i
COMMON Europe
 
PPTX
Mysql story in poi dedup
feng lee
 
PDF
Virtualization Primer for Java Developers
Richard McDougall
 
PPTX
RES Online Seminar Een gratis werkplek voor iedereen
RES Software Nederland
 
PPTX
Windows Azure and the cloud: What it’s all about
Maarten Balliauw
 
PDF
Stairway to heaven webinar
CloudBees
 
PPTX
Client Virtualization
Amit Gatenyo
 
Novell Success Stories: Endpoint Management in Retail and Manufacturing
Novell
 
Choosing Your Windows Azure Platform Strategy
drmarcustillett
 
VMware PEX Boot Camp - Reaching the Clouds with NetApp Integrations with VMwa...
NetApp
 
Cloud computing bringing the dark side of enterprise apps into the light by...
Khazret Sapenov
 
Novell Success Stories: Collaboration in Government
Novell
 
Novell Success Stories: Collaboration in Travel and Hospitality
Novell
 
Is Private Cloud Right for Your Organization
Dave Roberts
 
Cloud Computing - Making IT Simple
Bob Rhubart
 
9sept2009 concept electronics
Agora Group
 
FutuRIS Architecture
pashaz03
 
Repeater customer business presentation 5 nov-12
Nuno Alves
 
Novell Support Revealed! An Insider's Peek and Feedback Opportunity
Novell
 
Inside the Hadoop Machine @ VMworld
Richard McDougall
 
Practical experiences and best practices for SSD and IBM i
COMMON Europe
 
Mysql story in poi dedup
feng lee
 
Virtualization Primer for Java Developers
Richard McDougall
 
RES Online Seminar Een gratis werkplek voor iedereen
RES Software Nederland
 
Windows Azure and the cloud: What it’s all about
Maarten Balliauw
 
Stairway to heaven webinar
CloudBees
 
Client Virtualization
Amit Gatenyo
 
Ad

Viewers also liked (10)

PDF
Python BCN Introduction to SQLAlchemy
theManda
 
PPTX
Relational Database Access with Python ‘sans’ ORM
Mark Rees
 
PDF
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
PPTX
Api architecture
Guru Lakshmeekar B
 
PDF
Building RESTful APIs
Silota Inc.
 
PDF
Python Comparing ORM
Jose Manuel Ortega Candel
 
PPT
Learn REST API with Python
Larry Cai
 
PDF
Python RESTful webservices with Python: Flask and Django solutions
Solution4Future
 
PPTX
JSON and REST
Robert MacLean
 
PDF
Building Automated REST APIs with Python
Jeff Knupp
 
Python BCN Introduction to SQLAlchemy
theManda
 
Relational Database Access with Python ‘sans’ ORM
Mark Rees
 
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
Api architecture
Guru Lakshmeekar B
 
Building RESTful APIs
Silota Inc.
 
Python Comparing ORM
Jose Manuel Ortega Candel
 
Learn REST API with Python
Larry Cai
 
Python RESTful webservices with Python: Flask and Django solutions
Solution4Future
 
JSON and REST
Robert MacLean
 
Building Automated REST APIs with Python
Jeff Knupp
 
Ad

Similar to Flash Camp Chennai - Social network with ORM (20)

PPTX
Getting started with entity framework
Lushanthan Sivaneasharajah
 
PDF
Dao pattern
ciriako
 
PPT
Object Relational Mapping with LINQ To SQL
Shahriar Hyder
 
PPTX
Introducing SQL Server Data Services
goodfriday
 
PPTX
Introducing SQL Server Data Services
goodfriday
 
PPT
Jdbc Dao it-slideshares.blogspot.com
phanleson
 
PPT
Getting started with entity framework revised 9 09
manisoft84
 
PPTX
Lets focus on business value
Einar Ingebrigtsen
 
PPTX
Lets focus on business value
Einar Ingebrigtsen
 
PDF
Go simple-fast-elastic-with-couchbase-server-borkar
Dipti Borkar
 
PDF
Domain Driven Design Development Spring Portfolio
Srini Penchikala
 
PPTX
Entity Framework - Queries
Eyal Vardi
 
PDF
Transition from relational to NoSQL Philly DAMA Day
Dipti Borkar
 
PDF
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Dipti Borkar
 
DOC
10265 developing data access solutions with microsoft visual studio 2010
bestip
 
PPT
7 data management design
Châu Thanh Chương
 
PPTX
Entity Framework V1 and V2
ukdpe
 
PDF
Intro to NoSQL and MongoDB
DATAVERSITY
 
PDF
01.egovFrame Training Book II
Chuong Nguyen
 
PPTX
Java and Mongo
Marcio Mangar
 
Getting started with entity framework
Lushanthan Sivaneasharajah
 
Dao pattern
ciriako
 
Object Relational Mapping with LINQ To SQL
Shahriar Hyder
 
Introducing SQL Server Data Services
goodfriday
 
Introducing SQL Server Data Services
goodfriday
 
Jdbc Dao it-slideshares.blogspot.com
phanleson
 
Getting started with entity framework revised 9 09
manisoft84
 
Lets focus on business value
Einar Ingebrigtsen
 
Lets focus on business value
Einar Ingebrigtsen
 
Go simple-fast-elastic-with-couchbase-server-borkar
Dipti Borkar
 
Domain Driven Design Development Spring Portfolio
Srini Penchikala
 
Entity Framework - Queries
Eyal Vardi
 
Transition from relational to NoSQL Philly DAMA Day
Dipti Borkar
 
Navigating the Transition from relational to NoSQL - CloudCon Expo 2012
Dipti Borkar
 
10265 developing data access solutions with microsoft visual studio 2010
bestip
 
7 data management design
Châu Thanh Chương
 
Entity Framework V1 and V2
ukdpe
 
Intro to NoSQL and MongoDB
DATAVERSITY
 
01.egovFrame Training Book II
Chuong Nguyen
 
Java and Mongo
Marcio Mangar
 

More from RIA RUI Society (20)

PPT
User experience - Why the mobile space is important
RIA RUI Society
 
PPTX
Introduction to google cloud messaging in android
RIA RUI Society
 
PPT
Entering the world of Samsung developer ecosystem
RIA RUI Society
 
PPTX
App monetization - 5 secrets of success
RIA RUI Society
 
PPT
Socialize and Gaming on the move
RIA RUI Society
 
PDF
Indian design and the art of story telling
RIA RUI Society
 
PPSX
Design of the indian rupee symbol
RIA RUI Society
 
PDF
Creating delightful experiences
RIA RUI Society
 
PDF
Typographic history, systems and perception
RIA RUI Society
 
PDF
Understanding Design and Brand Communication Workshop Content - Design Camp I...
RIA RUI Society
 
PPTX
Bug deBug Chennai 2012 Talk - Driving innovation using pattern based thinking...
RIA RUI Society
 
PDF
Bug deBug Chennai 2012 Talk - Trimming those flabs designing lightweight test...
RIA RUI Society
 
PPT
Bug deBug Chennai 2012 Talk - Web application usability by Parimala Hariprasad
RIA RUI Society
 
PPTX
Bug deBug Chennai 2012 Talk - V3 analysis an approach for estimating software...
RIA RUI Society
 
PPTX
Bug deBug Chennai 2012 Talk - Future of testing impact of mobile devices by S...
RIA RUI Society
 
PPT
Bug deBug Chennai 2012 Talk - Effective test management with triple t tools,...
RIA RUI Society
 
PPTX
Bug deBug Chennai 2012 Talk - Business value articulation in software project...
RIA RUI Society
 
PPTX
Bug deBug Chennai 2012 Talk - Test automation support systems layered archite...
RIA RUI Society
 
PPTX
Usability testing for mobile apps - Touch Tour Chennai
RIA RUI Society
 
PDF
Introduction to Android OS - Touch Tour Chennai
RIA RUI Society
 
User experience - Why the mobile space is important
RIA RUI Society
 
Introduction to google cloud messaging in android
RIA RUI Society
 
Entering the world of Samsung developer ecosystem
RIA RUI Society
 
App monetization - 5 secrets of success
RIA RUI Society
 
Socialize and Gaming on the move
RIA RUI Society
 
Indian design and the art of story telling
RIA RUI Society
 
Design of the indian rupee symbol
RIA RUI Society
 
Creating delightful experiences
RIA RUI Society
 
Typographic history, systems and perception
RIA RUI Society
 
Understanding Design and Brand Communication Workshop Content - Design Camp I...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Driving innovation using pattern based thinking...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Trimming those flabs designing lightweight test...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Web application usability by Parimala Hariprasad
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - V3 analysis an approach for estimating software...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Future of testing impact of mobile devices by S...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Effective test management with triple t tools,...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Business value articulation in software project...
RIA RUI Society
 
Bug deBug Chennai 2012 Talk - Test automation support systems layered archite...
RIA RUI Society
 
Usability testing for mobile apps - Touch Tour Chennai
RIA RUI Society
 
Introduction to Android OS - Touch Tour Chennai
RIA RUI Society
 

Flash Camp Chennai - Social network with ORM

  • 1. Developing Social Network using ORM By N.S.Devaraj
  • 3. Agenda ORM Introduction Why ORM ? How to use ORM ? Why Generic DAO / Persistent Collections ? Social Networking Application Demo Questions ?
  • 6. Object-Relational Mapping maps objects to relational databases maps relational databases to objects a programming technique for converting data between incompatible type systems in object-oriented programming languages - WikiPedia
  • 7. Why ORM ? Full on Objects of objects Less DB Work The ORM World Beans Not much else Procedural Object-Oriented Classic Procedural with DAO’s More DB Work
  • 8. How to use ORM ORM have to allow the DB swap "on the fly" to achieve, we need DI / IoC framework (Swiz) a GenericDAO to be created to manage Business Logic a Persistent Data collection to reduce server calls supported with a Push Mechanism to be Sync with Data Source & for Conflict Management
  • 9. Data Access Object DAO is used to Each DAO do CRUD instance is operations and responsible for access with one primary Database tables, domain object used to achieve or entity. encapsulation an object that provides an abstract interface to some types of database or persistence mechanism. - WikiPedia
  • 10. Why we need GenericDAO? Mostly we With deal with GenericDAO, Unit testing multiple VO’s Using MVC Framework, while dealing with the business is damn easy to be queried n x VO, we end up with logic will be as we can from service in generic inject values layer. code. nx nx n x Events Delegates Commands
  • 11. Advantages Increases productivity Apply DRY (Don’t Repeat Yourself) Principle Reduces errors Easy for Unit Testing
  • 12. Server DAO Model Abstract Real World Example Data Source SQL Table: Notes Create, Read, Update, Delete Perform SQL Queries Data Access Object Notes DAO creates Maps SQL Records to Delegates CRUD Operations to Delegates CRUD Operations to Value Object NoteVO Business Object Library Service calls receives Communicates with receives Client Flex RIA
  • 13. Client DAO Model Abstract Real World Example Push Push Business Object Delegate Update Notes Beans Delegate Update Create, Read, Update, Delete Perform functions creates PC DAO PC Generic DAO Service Results to Delegates CRUD Operations to Delegates CRUD Operations to VO NoteVO Events Signals dispatches receives dispatches receives View Skinnable Component
  • 15. Social Network App Value Objects Required Persons Notes(updates) Connections – files, replies
  • 16. DEMO
  • 18. Thanks For Twitter @nsdevaraj GTalk nsdevaraj Blog http://nsdevaraj.wordpress.com Code https://github.com/nsdevaraj/SwizDAO Web http://www.adamstudio.in