Your SlideShare is downloading. ×
Flash Camp Chennai - Social network with ORM
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Flash Camp Chennai - Social network with ORM


Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Developing Social Network using ORM By N.S.Devaraj
  • 2. Good Afternoon!!
  • 3. Agenda ORM Introduction Why ORM ? How to use ORM ? Why Generic DAO / Persistent Collections ? Social Networking Application Demo Questions ?
  • 4. OMG WTF ORM ?
  • 5. Object-Relational Mappingmaps 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
  • 6. 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
  • 7. How to use ORMORM 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
  • 8. 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
  • 9. Why we needGenericDAO? Mostly we With deal with GenericDAO, Unit testingmultiple VO’s Using MVC Framework, while dealing with the business is damn easyto 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
  • 10. Advantages Increases productivity Apply DRY (Don’t Repeat Yourself) Principle Reduces errors Easy for Unit Testing
  • 11. Server DAO Model Abstract Real World Example Data Source SQL Table: Notes Create, Read, Update, Delete Perform SQL QueriesData Access Object Notes DAO creates Maps SQL Records toDelegates CRUD Operations to Delegates CRUD Operations to Value Object NoteVO Business Object Library Service calls receives Communicates with receives Client Flex RIA
  • 12. Client DAO Model Abstract Real World Example Push Push Business Object Delegate Update Notes Beans Delegate Update Create, Read, Update, Delete Perform functions createsPC 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
  • 13. Why PersistentCollections?
  • 14. Social Network App Value Objects Required Persons Notes(updates) Connections – files, replies
  • 15. DEMO
  • 16. Questions ?
  • 17. Thanks For Twitter @nsdevaraj GTalk nsdevaraj Blog Code Web