SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Initial Presentation
 February 25, 2010
Progress

 UI
   Finished Wireframes
   Created Mockups
   Decided on a color schemes
   Icon Set is going through revisions
   UI Implementation - translate Photoshop mockup to CSS
   HTML structure & Django templates
 REST API
   Manipulate Tags
   Manipulate Audio Objects



                                            Details on our wiki[1]
Mockup




         See our blog post on waveform behavior[2]
Representational State Transfer
(REST) API



    Interface for manipulating resources over HTTP
REST HTTP methods


          Resource                             GET                      PUT                         POST                    DELETE



                                                             Replace the entire
 Collection URI, such as             List the collection's                                  Create a new entry in    Delete the entire
                                                             collection with another
   http://example.com/resources/     members.                                               the collection.          collection.
                                                             collection.




                                                             Replace the addressed          Treat the addressed
                                     Retrieve addressed                                                              Delete the addressed
  Element URI, such as                                       member of the                  member as a collection
                                     member of the                                                                   member of the
 http://example.com/resources/142/                           collection, or if it doesn't   and create a new entry
                                     collection.                                                                     collection.
                                                             exist,create it.               in it.
REST HTTP methods


          Resource                             GET                      PUT                         POST                    DELETE



                                                             Replace the entire
 Collection URI, such as             List the collection's                                  Create a new entry in    Delete the entire
                                                             collection with another
   http://example.com/resources/     members.                                               the collection.          collection.
                                                             collection.




                                                             Replace the addressed          Treat the addressed
                                     Retrieve addressed                                                              Delete the addressed
  Element URI, such as                                       member of the                  member as a collection
                                     member of the                                                                   member of the
 http://example.com/resources/142/                           collection, or if it doesn't   and create a new entry
                                     collection.                                                                     collection.
                                                             exist,create it.               in it.
REST HTTP methods


          Resource                             GET                      PUT                         POST                    DELETE



                                                             Replace the entire
 Collection URI, such as             List the collection's                                  Create a new entry in    Delete the entire
                                                             collection with another
   http://example.com/resources/     members.                                               the collection.          collection.
                                                             collection.




                                                             Replace the addressed          Treat the addressed
                                     Retrieve addressed                                                              Delete the addressed
  Element URI, such as                                       member of the                  member as a collection
                                     member of the                                                                   member of the
 http://example.com/resources/142/                           collection, or if it doesn't   and create a new entry
                                     collection.                                                                     collection.
                                                             exist,create it.               in it.
REST in Concert
    Easily modify Django models from the frontend




                                          See our previous presentation on
                                          Backbone.js[3]
But what does it all mean?
                  POST http://localhost:8896/api/1/request/
                    {"collection":"/api/1/collection/1/", "user":"/api/1/user/2/"}




   { "collection": "/api/1/collection/1/", "id": "1", "resource_uri":
   "/api/1/request/1/", "status": "p", "user": "/api/1/user/2/" }
But what does it all mean?
                  GET http://localhost:8896/api/1/request/


   [ { "collection": "/api/1/collection/1/", "id": "1", "resource_uri":
   "/api/1/request/1/", "status": "p", "user": "/api/1/user/2/" } ]
How we do it.
###
# A collection join request. Should be deleted when action is taken.
###
class Request(models.Model):
   ...
   user = models.ForeignKey(User)
   collection = models.ForeignKey(Collection)
   status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p')
   ...
How we do it.
###
# A collection join request. Should be deleted when action is taken.
###
class Request(models.Model):
   ...
   user = models.ForeignKey(User)
   collection = models.ForeignKey(Collection)
   status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p')
   ...



                           tastypie
                       ###
                       # This is the resource that is used for a collection request.
                       ###
                       class RequestResource(MyResource):
                          user = fields.ForeignKey(UserResource, 'user')
                          collection = fields.ForeignKey(CollectionResource, 'collection', full=True)
                          status = fields.CharField('status', default='p')
                          ...
How we do it.
###
# A collection join request. Should be deleted when action is taken.
###
class Request(models.Model):
   ...
   user = models.ForeignKey(User)
   collection = models.ForeignKey(Collection)
   status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p')
   ...



                           tastypie
                       ###
                       # This is the resource that is used for a collection request.
                       ###
                       class RequestResource(MyResource):
                          user = fields.ForeignKey(UserResource, 'user')
                          collection = fields.ForeignKey(CollectionResource, 'collection', full=True)
                          status = fields.CharField('status', default='p')
                          ...



                                                                                                        /**
                                                                                                         * A Collection object represents a django Collection object.
                                                                                                         * @class
                                                                                                         **/
                                                                                                        var Collection = ConcertBackboneModel.extend({
                                                                                                           ...
                                                                                                           /**
                                                                                                            * When a user wants to join a collection.
                                                                                                            **/
                                                                                                           requestToJoin: function() {
                                                                                                               var reqs = this.get('requests');
                                                                                                               reqs.create({
                                                                                                                  user: com.concertsoundorganizer.page.user.url(),
                                                                                                                  collection: this.url()
                                                                                                               });
                                                                                                           }
                                                                                                           ...
How we do it.
###
# A collection join request. Should be deleted when action is taken.
###
class Request(models.Model):
   ...
   user = models.ForeignKey(User)
   collection = models.ForeignKey(Collection)
   status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p')
   ...



                            tastypie
                       ###
                       # This is the resource that is used for a collection request.
                       ###
                       class RequestResource(MyResource):
                          user = fields.ForeignKey(UserResource, 'user')
                          collection = fields.ForeignKey(CollectionResource, 'collection', full=True)
                          status = fields.CharField('status', default='p')
                          ...



                                                                                                        /**
                                                                                                         * A Collection object represents a django Collection object.
                                                                                                         * @class
                                                                                                         **/
                                                                                                        var Collection = ConcertBackboneModel.extend({
                                                                                                           ...
                                                                                                           /**
                                                                                                            * When a user wants to join a collection.
                                                                                                            **/
                                                                                                           requestToJoin: function() {
                                                                                                               var reqs = this.get('requests');
                                                                                                               reqs.create({
                                                                                                                  user: com.concertsoundorganizer.page.user.url(),
                    POST http://localhost:8896/api/1/request/                                                     collection: this.url()
                    {"collection":"/api/1/collection/1/", "user":"/api/1/user/2/"}                             });
                                                                                                           }
                                                                                                           ...
Issues


               Concert Events

                     &

         Many-To-Many Relationships
Issues
class Tag(models.Model):
   segments = models.ManyToManyField('AudioSegment', related_name = "tags")
   collection = models.ForeignKey('Collection')
   name = models.CharField(max_length = 100)
   time = models.DateTimeField(auto_now_add = True)
   creator = models.ForeignKey(User)




                                                     Old Way
                                              Add URL: /add_segment_to_tag

                                           Delete URL: /delete_segment_from_tag
Issues
class Tag(models.Model):
   segments = models.ManyToManyField('AudioSegment', related_name = "tags")
   collection = models.ForeignKey('Collection')
   name = models.CharField(max_length = 100)
   time = models.DateTimeField(auto_now_add = True)
   creator = models.ForeignKey(User)




                                                     New Way

  Client send a PUT Request                         /api/tag/<tag_id>/        Backend UPDATES the tag
  (Wants to add an audio segment to a given tag)
                                                                              object instance
                                                                              (HOW AND WHAT DID IT UPDATE?)
Solution



           Custom Nested
             Resources
Solution

           /api/tag/<tag_id>
Solution

                     /api/tag/<tag_id>



       /api/tag/<tag_id>/audio_segment/<audio_seg_id>
Thanks & Questions
Especially to Graylin...

Mais conteúdo relacionado

Mais procurados

Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?Yevhen Kotelnytskyi
 
Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0Yevhen Kotelnytskyi
 
Intro to Joomla Development
Intro to Joomla DevelopmentIntro to Joomla Development
Intro to Joomla DevelopmentAlex Andreae
 
WordPress plugin #3
WordPress plugin #3WordPress plugin #3
WordPress plugin #3giwoolee
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Kris Wallsmith
 

Mais procurados (6)

Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?
 
Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0
 
Intro to Joomla Development
Intro to Joomla DevelopmentIntro to Joomla Development
Intro to Joomla Development
 
WordPress plugin #3
WordPress plugin #3WordPress plugin #3
WordPress plugin #3
 
Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)Introducing Assetic (NYPHP)
Introducing Assetic (NYPHP)
 

Destaque

ReliefWeb | DevSeed Meeting | 03 Sep 2010
ReliefWeb | DevSeed Meeting | 03 Sep 2010ReliefWeb | DevSeed Meeting | 03 Sep 2010
ReliefWeb | DevSeed Meeting | 03 Sep 2010ReliefWeb
 
ReliefWeb Strategic Business Plan
ReliefWeb Strategic Business PlanReliefWeb Strategic Business Plan
ReliefWeb Strategic Business PlanReliefWeb
 
Relief: 2nd Round Mockups
Relief: 2nd Round MockupsRelief: 2nd Round Mockups
Relief: 2nd Round MockupsReliefWeb
 
Illustration in Advertising
Illustration in AdvertisingIllustration in Advertising
Illustration in AdvertisingSumo
 
Museum Branding from Sumo
Museum Branding from SumoMuseum Branding from Sumo
Museum Branding from SumoSumo
 
Making your brand social
Making your brand socialMaking your brand social
Making your brand socialSumo
 
Crowdsourcing Democracy
Crowdsourcing DemocracyCrowdsourcing Democracy
Crowdsourcing DemocracySumo
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Stephen Hay
 
Illustration from Sumo
Illustration from SumoIllustration from Sumo
Illustration from SumoSumo
 

Destaque (10)

ReliefWeb | DevSeed Meeting | 03 Sep 2010
ReliefWeb | DevSeed Meeting | 03 Sep 2010ReliefWeb | DevSeed Meeting | 03 Sep 2010
ReliefWeb | DevSeed Meeting | 03 Sep 2010
 
ReliefWeb Strategic Business Plan
ReliefWeb Strategic Business PlanReliefWeb Strategic Business Plan
ReliefWeb Strategic Business Plan
 
Relief: 2nd Round Mockups
Relief: 2nd Round MockupsRelief: 2nd Round Mockups
Relief: 2nd Round Mockups
 
Illustration in Advertising
Illustration in AdvertisingIllustration in Advertising
Illustration in Advertising
 
dirty mockups
dirty mockupsdirty mockups
dirty mockups
 
Museum Branding from Sumo
Museum Branding from SumoMuseum Branding from Sumo
Museum Branding from Sumo
 
Making your brand social
Making your brand socialMaking your brand social
Making your brand social
 
Crowdsourcing Democracy
Crowdsourcing DemocracyCrowdsourcing Democracy
Crowdsourcing Democracy
 
Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)Style Guides Are The New Photoshop (Fronteers 2012)
Style Guides Are The New Photoshop (Fronteers 2012)
 
Illustration from Sumo
Illustration from SumoIllustration from Sumo
Illustration from Sumo
 

Mais de mskmoorthy

Crowdsourcing for geoint-11.11.11
Crowdsourcing for geoint-11.11.11Crowdsourcing for geoint-11.11.11
Crowdsourcing for geoint-11.11.11mskmoorthy
 
Shuttle trackersecondpresentationfall2011
Shuttle trackersecondpresentationfall2011Shuttle trackersecondpresentationfall2011
Shuttle trackersecondpresentationfall2011mskmoorthy
 
Mobile shuttle tracker_fall_2011_first_present
Mobile shuttle tracker_fall_2011_first_presentMobile shuttle tracker_fall_2011_first_present
Mobile shuttle tracker_fall_2011_first_presentmskmoorthy
 
Rcos presentation 9-23-2011
Rcos presentation 9-23-2011Rcos presentation 9-23-2011
Rcos presentation 9-23-2011mskmoorthy
 
Rcos presentation
Rcos presentationRcos presentation
Rcos presentationmskmoorthy
 
Dynamorio rpioss-aug2011
Dynamorio rpioss-aug2011Dynamorio rpioss-aug2011
Dynamorio rpioss-aug2011mskmoorthy
 
Auto scheduler presentation_2
Auto scheduler presentation_2Auto scheduler presentation_2
Auto scheduler presentation_2mskmoorthy
 
Second presentation idea_bank
Second presentation idea_bankSecond presentation idea_bank
Second presentation idea_bankmskmoorthy
 
Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011mskmoorthy
 
Sean austin uir-2
Sean austin uir-2Sean austin uir-2
Sean austin uir-2mskmoorthy
 
Nexus2 7-22-1011
Nexus2 7-22-1011Nexus2 7-22-1011
Nexus2 7-22-1011mskmoorthy
 
Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011mskmoorthy
 
Flagship safety, hfoss-7-22-2011
Flagship safety, hfoss-7-22-2011Flagship safety, hfoss-7-22-2011
Flagship safety, hfoss-7-22-2011mskmoorthy
 
Olympus pesentation2
Olympus pesentation2Olympus pesentation2
Olympus pesentation2mskmoorthy
 
Observatory 7 15-11
Observatory 7 15-11Observatory 7 15-11
Observatory 7 15-11mskmoorthy
 
Concerto conmoto
Concerto conmotoConcerto conmoto
Concerto conmotomskmoorthy
 

Mais de mskmoorthy (20)

Crowdsourcing for geoint-11.11.11
Crowdsourcing for geoint-11.11.11Crowdsourcing for geoint-11.11.11
Crowdsourcing for geoint-11.11.11
 
Shuttle trackersecondpresentationfall2011
Shuttle trackersecondpresentationfall2011Shuttle trackersecondpresentationfall2011
Shuttle trackersecondpresentationfall2011
 
Rcos intro-2
Rcos intro-2Rcos intro-2
Rcos intro-2
 
Mobile shuttle tracker_fall_2011_first_present
Mobile shuttle tracker_fall_2011_first_presentMobile shuttle tracker_fall_2011_first_present
Mobile shuttle tracker_fall_2011_first_present
 
Rcos presentation 9-23-2011
Rcos presentation 9-23-2011Rcos presentation 9-23-2011
Rcos presentation 9-23-2011
 
Rcos presentation
Rcos presentationRcos presentation
Rcos presentation
 
Dynamorio rpioss-aug2011
Dynamorio rpioss-aug2011Dynamorio rpioss-aug2011
Dynamorio rpioss-aug2011
 
Auto scheduler presentation_2
Auto scheduler presentation_2Auto scheduler presentation_2
Auto scheduler presentation_2
 
Second presentation idea_bank
Second presentation idea_bankSecond presentation idea_bank
Second presentation idea_bank
 
Scrutiny 2
Scrutiny 2Scrutiny 2
Scrutiny 2
 
Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011
 
Sean austin uir-2
Sean austin uir-2Sean austin uir-2
Sean austin uir-2
 
Nexus2 7-22-1011
Nexus2 7-22-1011Nexus2 7-22-1011
Nexus2 7-22-1011
 
Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011Rpi planner geoffrey_wright_7-22-2011
Rpi planner geoffrey_wright_7-22-2011
 
Flagship safety, hfoss-7-22-2011
Flagship safety, hfoss-7-22-2011Flagship safety, hfoss-7-22-2011
Flagship safety, hfoss-7-22-2011
 
Olympus pesentation2
Olympus pesentation2Olympus pesentation2
Olympus pesentation2
 
Observatory 7 15-11
Observatory 7 15-11Observatory 7 15-11
Observatory 7 15-11
 
8.7.2011 agml
8.7.2011 agml8.7.2011 agml
8.7.2011 agml
 
Concerto conmoto
Concerto conmotoConcerto conmoto
Concerto conmoto
 
Koala pres1
Koala pres1Koala pres1
Koala pres1
 

Último

Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 

Último (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 

Concert spring 2011_presentation_1

  • 2. Progress UI Finished Wireframes Created Mockups Decided on a color schemes Icon Set is going through revisions UI Implementation - translate Photoshop mockup to CSS HTML structure & Django templates REST API Manipulate Tags Manipulate Audio Objects Details on our wiki[1]
  • 3. Mockup See our blog post on waveform behavior[2]
  • 4. Representational State Transfer (REST) API Interface for manipulating resources over HTTP
  • 5. REST HTTP methods Resource GET PUT POST DELETE Replace the entire Collection URI, such as List the collection's Create a new entry in Delete the entire collection with another http://example.com/resources/ members. the collection. collection. collection. Replace the addressed Treat the addressed Retrieve addressed Delete the addressed Element URI, such as member of the member as a collection member of the member of the http://example.com/resources/142/ collection, or if it doesn't and create a new entry collection. collection. exist,create it. in it.
  • 6. REST HTTP methods Resource GET PUT POST DELETE Replace the entire Collection URI, such as List the collection's Create a new entry in Delete the entire collection with another http://example.com/resources/ members. the collection. collection. collection. Replace the addressed Treat the addressed Retrieve addressed Delete the addressed Element URI, such as member of the member as a collection member of the member of the http://example.com/resources/142/ collection, or if it doesn't and create a new entry collection. collection. exist,create it. in it.
  • 7. REST HTTP methods Resource GET PUT POST DELETE Replace the entire Collection URI, such as List the collection's Create a new entry in Delete the entire collection with another http://example.com/resources/ members. the collection. collection. collection. Replace the addressed Treat the addressed Retrieve addressed Delete the addressed Element URI, such as member of the member as a collection member of the member of the http://example.com/resources/142/ collection, or if it doesn't and create a new entry collection. collection. exist,create it. in it.
  • 8. REST in Concert Easily modify Django models from the frontend See our previous presentation on Backbone.js[3]
  • 9. But what does it all mean? POST http://localhost:8896/api/1/request/ {"collection":"/api/1/collection/1/", "user":"/api/1/user/2/"} { "collection": "/api/1/collection/1/", "id": "1", "resource_uri": "/api/1/request/1/", "status": "p", "user": "/api/1/user/2/" }
  • 10. But what does it all mean? GET http://localhost:8896/api/1/request/ [ { "collection": "/api/1/collection/1/", "id": "1", "resource_uri": "/api/1/request/1/", "status": "p", "user": "/api/1/user/2/" } ]
  • 11. How we do it. ### # A collection join request. Should be deleted when action is taken. ### class Request(models.Model): ... user = models.ForeignKey(User) collection = models.ForeignKey(Collection) status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p') ...
  • 12. How we do it. ### # A collection join request. Should be deleted when action is taken. ### class Request(models.Model): ... user = models.ForeignKey(User) collection = models.ForeignKey(Collection) status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p') ... tastypie ### # This is the resource that is used for a collection request. ### class RequestResource(MyResource): user = fields.ForeignKey(UserResource, 'user') collection = fields.ForeignKey(CollectionResource, 'collection', full=True) status = fields.CharField('status', default='p') ...
  • 13. How we do it. ### # A collection join request. Should be deleted when action is taken. ### class Request(models.Model): ... user = models.ForeignKey(User) collection = models.ForeignKey(Collection) status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p') ... tastypie ### # This is the resource that is used for a collection request. ### class RequestResource(MyResource): user = fields.ForeignKey(UserResource, 'user') collection = fields.ForeignKey(CollectionResource, 'collection', full=True) status = fields.CharField('status', default='p') ... /** * A Collection object represents a django Collection object. * @class **/ var Collection = ConcertBackboneModel.extend({ ... /** * When a user wants to join a collection. **/ requestToJoin: function() { var reqs = this.get('requests'); reqs.create({ user: com.concertsoundorganizer.page.user.url(), collection: this.url() }); } ...
  • 14. How we do it. ### # A collection join request. Should be deleted when action is taken. ### class Request(models.Model): ... user = models.ForeignKey(User) collection = models.ForeignKey(Collection) status = models.CharField(max_length=1, choices=REQUEST_STATUS_CHOICES, default='p') ... tastypie ### # This is the resource that is used for a collection request. ### class RequestResource(MyResource): user = fields.ForeignKey(UserResource, 'user') collection = fields.ForeignKey(CollectionResource, 'collection', full=True) status = fields.CharField('status', default='p') ... /** * A Collection object represents a django Collection object. * @class **/ var Collection = ConcertBackboneModel.extend({ ... /** * When a user wants to join a collection. **/ requestToJoin: function() { var reqs = this.get('requests'); reqs.create({ user: com.concertsoundorganizer.page.user.url(), POST http://localhost:8896/api/1/request/ collection: this.url() {"collection":"/api/1/collection/1/", "user":"/api/1/user/2/"} }); } ...
  • 15. Issues Concert Events & Many-To-Many Relationships
  • 16. Issues class Tag(models.Model): segments = models.ManyToManyField('AudioSegment', related_name = "tags") collection = models.ForeignKey('Collection') name = models.CharField(max_length = 100) time = models.DateTimeField(auto_now_add = True) creator = models.ForeignKey(User) Old Way Add URL: /add_segment_to_tag Delete URL: /delete_segment_from_tag
  • 17. Issues class Tag(models.Model): segments = models.ManyToManyField('AudioSegment', related_name = "tags") collection = models.ForeignKey('Collection') name = models.CharField(max_length = 100) time = models.DateTimeField(auto_now_add = True) creator = models.ForeignKey(User) New Way Client send a PUT Request /api/tag/<tag_id>/ Backend UPDATES the tag (Wants to add an audio segment to a given tag) object instance (HOW AND WHAT DID IT UPDATE?)
  • 18. Solution Custom Nested Resources
  • 19. Solution /api/tag/<tag_id>
  • 20. Solution /api/tag/<tag_id> /api/tag/<tag_id>/audio_segment/<audio_seg_id>