Sql Data Services

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Sql Data Services - Presentation Transcript

    1. A Real World Web Site with SQL Data Services So Cal Code Camp January 24-25, 2009 James Johnson Inland Empire .NET User’s Group [email_address] www.iedotnetug.org
    2. About me
      • Founder and President, Inland Empire .NET User’s Group. Past 5 years in Riverside, San Bernardino Counties
        • www.iedotnetug.org
      • Executive Director, Geeks Without Borders
        • www.geeks-without-borders.org
      • My Blog
        • www.duringlunch.com
      • Serial Netrepreneur
        • Latringo.com, ElSalvadorArtwork.com, TourElSalvador.com, 0AAFFF.com, AzureBlueCoding, AnonymousTypes.com, etc.
      • Last but not least
          • No bailar con monos borracho al comer su almuerzo.
    3. More stuff
      • Have been developing software since i286 days
      • Educational CD-ROMs
      • If a mistake, had to redo the entire run
      • Started looking at ways to have dynamic data
      • Web development
        • Cold Fusion (yuck) , PHP (yikes) , ASP.NET (the promised land)
      • Met David Robinson on Code Trip (Feb 08)
      • The rest is history
    4. SQL Data Services - Introduction
      • Agenda
      • What is SDS
      • How to setup the development environment
    5. SQL Data Services - Introduction
      • SDS is a component of SQL Services
      • Integrated into the “cloud”
      • Provides database and querying
      • Flexibility
      • Scaling
      • Developer agility
    6. SQL Data Services - Introduction
      • SDS is built on SQL Server and Windows Server
      • Quickly build and extend applications
      • Low cost management with high scalability
      • Reliability, and security features
    7. SDS – Setting up the environment
      • Download Azure Services Training Kit
        • www.microsoft.com/azure/trainingkit.mspx
        • Contains Hands-on-labs (HOLs) for:
          • Windows Azure
          • .NET Services
          • Live Services
          • SQL Services
    8. SDS – Setting up the environment
      • Sign up for the SDS Public CTP
        • http://go.microsoft.com/fwlink/?LinkID=133905&clcid=0x409
        • Sign up is free, but will ask for CC for verification
      • Create a Solution
        • Name and Password
        • Name of solution is the username when logging into system via code
    9. SDS – Setting up the environment
      • SDS Developer Center
        • http://msdn.microsoft.com/en-us/sqlserver/dataservices/default.aspx
        • Link to change password for solution
      • SDS Primer
        • http://msdn.microsoft.com/en-us/library/cc512417.aspx
      • Getting Started Forum
        • http://social.msdn.microsoft.com/forums/en-US/ssdsgetstarted/threads/
    10. Authorities, Containers, Entities
      • Authorities, Containers and Entities, Oh My
      • SDS data model is based on this concept
      • Provides flexible schema
      • Easy to create data structures
    11. Authorities, Containers, Entities
      • Authorities
      • Topmost level of the hierarchy
        • anontypes-01
      • DNS name
        • https://anontypes-01.data.database.windows.net/v1
      • Maps to specific data center
      • Is a unit of geo-location
    12. Authorities, Containers, Entities
      • Containers
      • Each container has unique id associated
      • Store the data contained in the application
      • Cannot be in a different geo-located Authority
      • Can contain homogeneous or heterogeneous data
    13. Authorities, Containers, Entities
      • Entities
      • Actual bits of data stored in container
      • Stores any number of user-defined properties/values
      • Retrieved, added, updated, deleted
      • Partial updates are not supported
      • Entire entity is replaced in container when updated
    14. Homogenous/Heterogeneous Data
      • Homogeneous data is similar to a database table, in which all entities are of the same kind
      • Books container stores “book” entities
      • Highly structured applications should use
      • Heterogeneous data contains all types of entities
      • MyOffice container stores “books”, “supplies”, “furniture”
      • Allows for querying across all entities in parent container
    15. Flexible Entities
      • Key concept of SDS
      • XML fragment with one element per property value.
      • Value restricted to simple scalar type of string
        • String, binary, Boolean, decimal, datetime
      • Fixed metadata properties – Id, Version, Kind
        • Version. New version assigned with each update
        • Kind. User-defined, identifying the entity type
    16. Anonymous Types
      • A new podcasting website featuring the little known development geeks
      • Site runs on a hosted server
      • Data is hosted on SQL Data Services
      • Leads to differences in how we work with data
      • When using REST, return types are XML
      • Need to use LINQ
    17. Differences to remember
      • An Entity is like a property bag – keys/values
      • Each Entity in a Container can have a different structure
      • Different paradigm than when working with database tables
      • There is no “primary key”, instead an “EntityID”
        • User defined value
    18. Containers
      • Can contain heterogeneous, homogeneous, or flexible entities
      • For this project decided to have four Containers
        • at_page
        • at_podcast
        • at_podcastdata
        • at_guest
    19. Site structure
      • Administer text data
      • Upload and administer BLOB’s (podcasts)
        • Demo only shows uploading – not streaming down
      • Standard ASP.NET Membership, Roles, Authentication for Admin pages
      • Classes for different aspects of site functions
        • Pages, Podcasts, Guests, Configuration, Utilities
    20. Using REST
      • POST (Insert, Create)
      • PUT (Update)
      • GET (Retrieve)
      • DELETE (Delete)
    21. Page Administration
      • Insert, Save, Edit, Delete
      • Page code creates XML passed to the class
      • Methods
        • SelectPages()
        • SelectPage()
        • InsertPage()
        • UpdatePage()
        • DeletePage()
      • Make sure to HtmlEncode strings going in HTML chars will mess things up with validity of the XML
    22. Demo
      • Web site Page administration
    23. Uploading PodCasts (BLOBs)
      • Uploading of BLOBs is possible, but can only send the object, no other data
      • Create two XML strings
        • PodCast
          • EntityId, Container, FilePath
        • PodCastData
          • Meta and other data about the PodCast
          • EntityId,Title, RunTime, Guest, Publish Date, etc.
        • Since two different containers, can have same EntityId
    24. Uploading PodCasts (BLOBs)
      • Two step process
        • First insert the Meta data
          • Title, Guest, Description, etc.
        • If successful, upload the PodCast
    25. Demo
    26. Public facing side
      • One Master Page
        • Navigation, PodCast List
      • One Content Page
        • Page Content for different “pages”
    27. Demo
      • Setting Navigation
    28. Demo
      • Setting Page Content
    29. Demo
      • Get All PodCasts
      • Uses Join between Containers so that we can get data back on the Guests as well
    30. Demo
      • Get Single
      • Uses Join between Containers
      • Uses Where to get specific Pod Cast
    31. Questions
    32. Thank you
      • Email – [email_address]
      • Inland Empire .NET User’s Group
        • www.iedotnetug.org
        • 2 nd Tuesday evenings of each month – Riverside
      • Geeks Without Borders
        • www.geeks-without-borders.org
      • My Blog
        • www.duringlunch.com
      • Please tip your wait staff
      • PayPal address – members@iedotnetug.org
    33. Thanks to our sponsors We could not hold these code camps for you without our sponsors. These Guys ROCK!

    + James JohnsonJames Johnson, 10 months ago

    custom

    818 views, 0 favs, 1 embeds more stats

    January 24, 2009 presentation to So Cal Code Camp a more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 818
      • 817 on SlideShare
      • 1 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 25
    Most viewed embeds
    • 1 views on http://www.brijj.com

    more

    All embeds
    • 1 views on http://www.brijj.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories