16 Replies Latest reply on Feb 20, 2015 5:25 AM by urvashi

    Requirements needed for building an app.

    shipra

      Hello,

       

      We are trying to build an APP for our community. I have created a small app with UI functionality but need to progress on it and make the APP more functional.

       

      I have few questions. If anyone has worked on app before or has any information please revert on them:

       

      1. What are the specifications of the server required to install node.js. We want to know if node.js is a heavy or light application. How much space it requires?

       

      2. Can we host an app in our jive hosted instance without setting up node.js. If yes Please elaborate on it.

       

      3. How can I make my app store data in a DB . I see a folder as DB in the app structure but didn't find much on it in community.

       

       

      I will be looking forward for some helpful replies.

      As you might figure out I am new in app development so any help is appreciated.

       

      cc Lea Reznik

       

      Pawan Shah Aron Racho

        • Re: Requirements needed for building an app.
          pawans


          1. What are the specifications of the server required to install node.js. We want to know if node.js is a heavy or light application. How much space it requires?

          Node.js being single threaded by default, you actually don't require a powerful vm.

          There are node libraries to support multi threading, but as per my experience with jive add-ons, its not required.

           

          I have setup two vms behind our firewall which are CentOS 6.5, 4 core, 4 gb ram, 5gb vms.

          The only reason i got a 4 core vm was to have multiple jive-sdk servers on single vm in future, which I have not utilized yet.

           

          I have a node server running on each of these vms.

          One of the node serfver hosts a heavy webhook based add-on which received jive webhook events every 15 seconds, and beyond that it calls jive rest apis and google apis to do some processing. All on one node process.

          The other server has 4 jive apps plus an internal service for an app, all on one node process.

          It had been running perfectly fine for several months now.

           

          2. Can we host an app in our jive hosted instance without setting up node.js. If yes Please elaborate on it.

           

          This facility is available since cloud version 8c4, which I guess is going live next week for all cloud customers.

          Check this document -- > Creating Jive-hosted Apps

          We are on hosted 7.0.1 yet and in process to move to cloud. So very soon I will be able to utilize this facility.

           

          3. How can I make my app store data in a DB . I see a folder as DB in the app structure but didn't find much on it in community.

          I am not sure if this can be used to store any data.

          For one of my apps, I am planning to use external props mentioned here --> Jive JavaScript API v3.9 → osapi.jive.corev3.extprops.ExtProps entity

          May be Aron Racho, Ryan Rutan have other alternatives for this.

            • Re: Requirements needed for building an app.
              aron.racho
              3. How can I make my app store data in a DB . I see a folder as DB in the app structure but didn't find much on it in community.

              Hi... the services generated by the node sdk can use a mongodb backend instead of the default file persistence:


              Update the dependencies package.json file to include mongodb (add jive-persistence-mongo):

                  "name": "myservice"

              .. 

                  "dependencies": { 

              .. 

                      "jive-persistence-mongo": "*" 

              .. 

               

                  } 

              Edit jiveclientconfiguration.json to configure your service.Make sure to replace <<<DATABASE CONNECTION STRING>>> with the mongodb databse URL, and set persistence to jive-persistence-mongo.

                  "clientUrl": "http://localhost"

              ..

                  "persistence" : "jive-persistence-mongo"

                  "databaseUrl" : "<<<DATABASE CONNECTION STRING>>>"

              ..

               

              There is also an experimental postgres connector for more traditional sql, but its ... experimental.

               

              Shipra Singh

            • Re: Requirements needed for building an app.
              aron.racho

              2. Can we host an app in our jive hosted instance without setting up node.js. If yes Please elaborate on it.

              Depending on the version of your hosted instance -- and if you do not need to make backend service calls to your own service -- you can bundle the app directly into your jive addon package and have Jive serve the static app assets (html, js, images, etc). No need for middleware service provided by jive-sdk. jive-sdk can help you package it. What is the version of your jive instance?

                • Re: Requirements needed for building an app.
                  shipra

                  Thanks Aron Racho Ryan Rutan and Pawan Shah

                   

                  I have got some new pointers for sure.

                   

                  The version of my jive instance is 7.0.2

                   

                  UAT and PROD are jive hosted instances. One more question

                   

                  I had created a small app and used OSAPIs for user picker but I got error related to OSAPI while uploading it to my UAT instance.

                  I removed that part of code but still I am having the same issue. Install an app created using node.js to jive hosted instance

                  Now my app has only static assets but still was throwing an error while uploading in UAT. Correct me if I am wrong in understanding this.

                    • Re: Requirements needed for building an app.
                      pawans

                      Can you share the exact error?

                      And also your app.xml "Require" section?

                      It might be something to do with <Require feature="osapi"/> in app.xml

                      • Re: Requirements needed for building an app.
                        aron.racho

                        Hi -- having jive host the static app resources is only available on cloud (8c4+). It won't work for jive 7.

                          • Re: Requirements needed for building an app.
                            shipra

                            Aron Racho and Ryan Rutan

                             

                            I was evaluating the options of building an app using node.js  and JAVA SDK. I have to do this now because of the limitations of only using mongoDB with Node.js.

                             

                            I see few post on JAVA sdk and found that we can use  SQL DBs  there. I could easily create a small APP using node.js and found it easy but for the DB part.

                            I see few people following or taking JAVA SDK approach with apps is there some reason or just the business suitability.

                            I am in the evaluation phase I wanted to understand both before I could jump into development.

                             

                            Thanks in advance!

                              • Re: Requirements needed for building an app.
                                aron.racho

                                Hi there -- there is a postgres adaptor for nodejs which is experimental. Let me know if you want to evaluate this option.

                                  • Re: Requirements needed for building an app.
                                    aron.racho

                                    jivesoftware/jive-persistence-postgres · GitHub

                                     

                                    Its API is identical to file, memory, and mongoDB connectors. It dynamically creates tables for you, or gives you the ability to define a schema ahead of time. To date there have been no production deployments on it-- but that doesn't mean that has to stay that way If you are willing to evaluate it, I will be encouraged to work on it.

                                      • Re: Requirements needed for building an app.
                                        shipra

                                        Hello Aron Racho,

                                         

                                        We are progressing little on APP development and explored the JAVA and .net SDK for the same as well.

                                         

                                        Wanted to know more on app authentication. Now my app is not authenticated. Anyone can view the app with no credential check.

                                        I have seen about signed and unsigned authentication. Can you provide few inputs on the same or what's the best way to authenticate an app.

                                         

                                        Thanks for helping!

                                        Shipra

                                          • Re: Requirements needed for building an app.
                                            pawans

                                            Hi,

                                            Do you mean restricting the access to the app (which right now loads in side jive) to few users (authorization) after login to jive?

                                            Or having an extra level of authentication for the app? Just asked as you mentioned "no credential check" for the app.

                                             

                                            Jive does give a facility to ensure the app can be accessed by specific group of people and also some extra level of authorization can be coded.

                                              • Re: Requirements needed for building an app.
                                                shipra

                                                Thanks Pawan,

                                                I needed more information on signed and unsigned authentication which I read on community somewhere that apps uses for authentication.

                                                 

                                                Also If you can share how to make the app accessible for specific users that would be great.

                                                Thanks!

                                                  • Re: Requirements needed for building an app.
                                                    pawans

                                                    Hi,

                                                    As we are on hosted too right now, we have done this in two ways.

                                                     

                                                    • Conditional display options given by jive for apps

                                                    check this document --> https://community.jivesoftware.com/docs/DOC-114464#jive_content_id_Conditional_Display_of_App_Actions

                                                    Check the conditional display app actions in this.

                                                    If you want to give access to specific users which are few in numbers, then you can use user id as a filter. As these filters don't support array of users / filters, you will have to add one app.xml entry per user for your hosted instance.

                                                     

                                                    using my move content add-on as an example-

                                                    Assuming i want to ensure only me and Ryan see my app, here's how i add app action in my app.xml

                                                    This option is good if you know specific users who need access and also the number is less.

                                                     

                                                    <action id="org.jivesoftware.movecontent.group.pawans"

                                                    path="jive/tabs/places/group?filter=equals(user.username,pawans)"

                                                    label="Move Content"

                                                    view="movecontent"

                                                    icon="images/icon16x16.png"

                                                      />

                                                     

                                                    <action id="org.jivesoftware.movecontent.group.ryan"

                                                    path="jive/tabs/places/group?filter=equals(user.username,ryan)"

                                                    label="Move Content"

                                                    view="movecontent"

                                                    icon="images/icon16x16.png"

                                                      />

                                                     

                                                    • Custom code

                                                    There is other way where a link to app will still be displayed to everyone on website, but once the app opens, you can control who can use / see the app content.

                                                    For restricted access u can show a message.

                                                    We had one app which loads in a group. We wanted to ensure only group admins are able to use it and also it has to be in Action section.

                                                    There is a place which is shown in Ryan Rutan's admin essentials place which is accessible only to group admins.

                                                    But as it was not easily visible, our users wanted it to be under actions drop down on a page.

                                                     

                                                    So here's what I did -

                                                    Using javascript apis when the app loads we get the current group details and then pull list of owners of the group.

                                                    Depending on the list of owner and current logged in user, we decide if user can use the app.

                                                    You can derive more logic similar to this. Unfortunately here you cannot hide the link to the app.

                                                     

                                                    • On cloud there is one more better option to restrict the app through add-on console.

                                                    For every add-on you can decide a security group which can access the add-on. this is available in recent cloud release 8c4.

                                  • Re: Requirements needed for building an app.
                                    urvashi

                                    Hi shipra singh,

                                     

                                    It is better you go with Nitrous. As this is on cloud so it wouldn't require any maintenance no space no nothing. We have built an App on Jive8.0 instance.

                                    For any app it requires backened, so to start  Nitrous.IO is the best option for you.

                                    If you proceed on this. Then Let Me Know will help you in this further.

                                     

                                    Thanks

                                    Urvashi