<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Joshua,<div><br></div><div>my belief is that for PUT, DELETE ops the client should go against /contacts/{id} URI</div><div><br></div><div>Anyone else have a different view of it ?</div><div><br></div><div>Thanks,</div><div>Christos</div><div><br></div><div><br></div><div><div><div><div>On May 1, 2014, at 5:32 PM, joshuaw <<a href="mailto:jowilson@redhat.com">jowilson@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Christos,<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">To answer a) since the Contact is being passed in, it is not necessary to also pass in the ID. For PUT all the information needs to be passed back for the update. While the DELETE only needs the ID, the whole contact is being sent. <o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I am open to discussing this if you think there is something wrong with the design.<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Joshua<o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Christos Vasilakis [via aerogear-dev] [mailto:<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7637&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>] <br><b>Sent:</b> Thursday, May 01, 2014 7:27 AM<br><b>To:</b> joshuaw<br><b>Subject:</b> Re: [aerogear-dev] contacts-mobile-basic quick start<o:p></o:p></span></p><p class="MsoNormal"><o:p> </o:p></p><p class="MsoNormal">Hi everyone, <br><br>have started working on the iOS native client of the contacts quick start app. Based on edewit branch[1] (which creates a contact on signup of a user) have created an initial version of the iOS client and you can find it here [2], together with a screencast showcasing the app in action [3]. <br><br>Some comments observed during writing of the application which would like your feedback: <br><br>a) for PUT, DELETE operations noticed that the jax-rs backend expects the id of the Contact to be present in the body of the request. Not sure why this was chosen instead of @Path(“id”) resulting against /contacts/{id} ? <br><br>b) currently roles are used to distinguish between who is able to create/update/delete contact. When a user signs up (and contact is created), by default the user is _not_ able to apply any CRUD operations apart from viewing (any operation results in unauthorised error). If we agree on this behaviour, would like to know how can I determine the role of the user (in order to update the UI accordingly, eg. disabling add,edit UI elements). Looking at the json response upon login of the user, couldn’t determine a “key” that specifies the role (apart from an “admin” key which stayed the same regardless of the type of the user). <br><br><br>Thanks, <br>Christos <br><br>[1] <a href="https://github.com/edewit/jboss-wfk-quickstarts/tree/push_and_secured" target="_top" rel="nofollow" link="external">https://github.com/edewit/jboss-wfk-quickstarts/tree/push_and_secured</a><br>[2] <a href="https://github.com/cvasilak/aerogear-push-quickstarts/tree/ios" target="_top" rel="nofollow" link="external">https://github.com/cvasilak/aerogear-push-quickstarts/tree/ios</a><br>[3] <a href="https://vimeo.com/93471554" target="_top" rel="nofollow" link="external">https://vimeo.com/93471554</a><br><br><br><br>On Apr 23, 2014, at 5:43 PM, Erik Jan de Wit <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote: <o:p></o:p></p><div><div><br class="webkit-block-placeholder"></div><div class="shrinkable-quote"><br>> Right, that makes sense, so let’s not join them. The alternate thing to do is to create a contact on sign up, because if you want to receive push notifications at least you should be in the list of contacts. We will still need to change the sign up page a little as we need a phone number and a birth date as well in order to create a contact. <br>> <br>> On 23 Apr,2014, at 16:26 , Burr Sutter <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote: <br>> <br>>> These are not strongly held opinions <br>>> <br>>> One reason to keep Users & Contacts separate is...because that is normal for the average enterprise app - your have employees (users) and customers (contacts) - employees/users have different roles/privileges from customers. <br>>> <br>>> The reason they are separated in the secured (PL) version of contacts-mobile-basic is because it simply evolved that way - contacts came first - users/roles added after the fact. Ideally we would not modify the original too much as it allows a nice learning progression - start with the original contacts-mobile-basic, then upgrade to contacts-mobile-basic-secured, then upgrade to contacts-mobile-basic-secured-cordova (names just made up). <br>>> <br>>> <br>>> On Apr 23, 2014, at 10:16 AM, Sébastien Blanc <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=2" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote: <br>>> <br>>>> Sure ! <br>>>> Be sure to check this with Joshua as he drives the backend bits <br>>>> Sébi <br>>>> <br>>>> Envoyé de mon iPhone <br>>>> <br>>>>> Le 23 avr. 2014 à 15:56, Erik Jan de Wit <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=3" target="_top" rel="nofollow" link="external">[hidden email]</a>> a écrit : <br>>>>> <br>>>>> Hi, <br>>>>> <br>>>>> How about merging the User model and the Contact into one entity? Seems like they have a lot in common, do we really need 2? <br>>>>> <br>>>>> Cheers, <br>>>>> Erik Jan <br>>>>> <br>>>>>> On 23 Apr,2014, at 14:34 , Sébastien Blanc <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=4" target="_top" rel="nofollow" link="external">[hidden email]</a>> wrote: <br>>>>>> <br>>>>>> We should be using the email as alias and the email should also be used as login when registering in the secured part. A registration should also trigger the creation of that user / contact in the application. <br>>>>>> Author can be left empty By the client and filled by the backend . <a href="https://github.com/sebastienblanc/jboss-wfk-quickstarts/tree/push_and_securedAuthor" target="_top" rel="nofollow" link="external">https://github.com/sebastienblanc/jboss-wfk-quickstarts/tree/push_and_securedAuthor</a> must stay because the receiver must know who sends the message. <br>>>>>> <br>>>>>> Envoyé de mon iPhone <br>>>>>> <br>>>>>>> Le 23 avr. 2014 à 13:35, Erik Jan de Wit <<a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=5" target="_top" rel="nofollow" link="external">[hidden email]</a>> a écrit : <br>>>>>>> <br>>>>>>> Hi, <br>>>>>>> <br>>>>>>> I was working on the aerogear-push-quickstarts for Cordova and was wondering what to put for the alias on registration. The version that is there now has users that logs in and contacts that are fetched. What seems to be missing is that everybody gets all contacts instead of just mine (maybe that is fine), but users that sign up for the app are not contacts. So when I want to send a message to a specific mobile user they are not in my list and there is no way to have to define an alias to send to. <br>>>>>>> <br>>>>>>> Also the interface for sending push notifications includes a author. I think it would be better if we remove this and let the service put in the logged in user. That way you can’t pretend to send a message like someone else. <br>>>>>>> <br>>>>>>> What do you think? <br>>>>>>> <br>>>>>>> Cheers, <br>>>>>>> Erik Jan <br>>>>>>> _______________________________________________ <br>>>>>>> aerogear-dev mailing list <br>>>>>>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=6" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>>>>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>>>>>> <br>>>>>> _______________________________________________ <br>>>>>> aerogear-dev mailing list <br>>>>>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=7" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>>>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>>>>> <br>>>>> <br>>>>> _______________________________________________ <br>>>>> aerogear-dev mailing list <br>>>>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=8" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>>>> <br>>>> _______________________________________________ <br>>>> aerogear-dev mailing list <br>>>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=9" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>>> <br>>> <br>>> _______________________________________________ <br>>> aerogear-dev mailing list <br>>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=10" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>> <br>> <br>> _______________________________________________ <br>> aerogear-dev mailing list <br>> <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=11" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>> <a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><o:p></o:p><div><br class="webkit-block-placeholder"></div></div><div style="margin-bottom: 12pt;"><br class="webkit-block-placeholder"></div></div><br>_______________________________________________ <br>aerogear-dev mailing list <br><a href="x-msg://3/user/SendEmail.jtp?type=node&node=7636&i=12" target="_top" rel="nofollow" link="external">[hidden email]</a> <br><a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_top" rel="nofollow" link="external">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br><br><o:p></o:p><div><br class="webkit-block-placeholder"></div><div class="MsoNormal" align="center" style="text-align:center"><hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center"></div><div><div><p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">If you reply to this email, your message will be added to the discussion below:<o:p></o:p></span></b></p></div><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-contacts-mobile-basic-quick-start-tp7534p7636.html" target="_top" rel="nofollow" link="external">http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-contacts-mobile-basic-quick-start-tp7534p7636.html</a> <o:p></o:p></span></p></div><div style="margin-top:4.8pt"><p class="MsoNormal" style="line-height:18.0pt"><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To start a new topic under aerogear-dev, email <a href="x-msg://3/user/SendEmail.jtp?type=node&node=7637&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>To unsubscribe from aerogear-dev, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br><a href="http://aerogear-dev.1069024.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_top" rel="nofollow" link="external"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a> <o:p></o:p></span></p></div></div>
        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://aerogear-dev.1069024.n5.nabble.com/aerogear-dev-contacts-mobile-basic-quick-start-tp7534p7637.html">RE: [aerogear-dev] contacts-mobile-basic quick start</a><br>
Sent from the <a href="http://aerogear-dev.1069024.n5.nabble.com/">aerogear-dev mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></div></body></html>