HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Creating Android/iPhone apps through the use of JSON

rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one"NY ✭✭✭
edited March 2016 in General Banter

I was hesitating to post this out of fear of making a fool of myself, but here it goes:

I understand that Vanilla's output can be formatted as JSON rather than HTML. The thought crossed my mind that there may be a smart-phone appdev tool out there that is able to create apps that communicate with the backend server via JSON (I'm sure such a tool can parse HTML as well, but JSON looks so much nicer for that purpose).

While I managed to customize my internal forum to work on mobile browsers, the experience is not the same. I know there is a long controversy whether the future/best mobile interaction should be through HTML(5/6/infinity and beyond) or custom apps. Leaving that discussion aside, I'm interested to hear your insights as to the existence of such appdev tools and whether my notion of using Vanilla JSON for this is reasonable.

P.S. Here is this discussion in JSON: https://vanillaforums.org/discussion.json/31847

«1

Comments

  • LincLinc Detroit Admin

    We're about to add a public API v2 to Vanilla this year, so it would be a very inopportune moment to begin such a journey right now.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Not sure I understand - the API runs on the web server, the appdev tool I was wondering about generates smartphone code, and I was hoping there is already such tool that works with JSON...

  • R_JR_J Ex-Fanboy Munich Admin

    @Linc said:
    We're about to add a public API v2 to Vanilla this year, so it would be a very inopportune moment to begin such a journey right now.

    But to my understanding an API centric forum would allow any user interface at all: it is only some kind of model. How you design the controller and view is perfectly free afterwards. So if anybody starts designing an app, already knowing which functions there would be available, the only work left to do would be to adjust those API calls in the app.

    Designing an app takes some time. If anybody wants to take the challenge of designing an app, why not?

  • R_JR_J Ex-Fanboy Munich Admin

    This should not be any advertising, but it appeared on one of news feeds just before one hour - can't be a coincidence, couldn't it?
    https://cosmicjs.com/blog/4-reasons-to-choose-a-cms-api-over-an-installed-cms

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    1) > @R_J said:

    Designing an app takes some time. If anybody wants to take the challenge of designing an app, why not?

    That's my point of (or perhaps wishful thinking) of a general purpose appdev tool that leverages server output in JSON - to save time and effort

    2) > @R_J said:

    This should not be any advertising, but it appeared on one of news feeds just before one hour - can't be a coincidence, couldn't it?
    https://cosmicjs.com/blog/4-reasons-to-choose-a-cms-api-over-an-installed-cms

    Absolutely a coincidence!

    3) I'm curious on how a phone app would communicate with the API. Does an api interface mean that parts of the API supporting code runs on the phone? There probably is a standard protocol, right?

  • LincLinc Detroit Admin

    @R_J said:
    If anybody wants to take the challenge of designing an app, why not?

    Some people (like me) would be angry or frustrated if we showed up with a new API after they spent months building an app based on the old API, so I'm just telling you what's coming. I really don't care how you choose to spend your time. :)

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Hi @Linc - yes, I appreciate your alert that a new api is coming, and indeed it would be wasteful to put an effort only to learn that a better way is just around the corner - so thanks again.

    However, I was hoping to learn of a "quick and dirty" or "quick and fast" way to create an app that uses json (given that everything in Vanilla can be presented in JSON). That, so far, I have not learned from this discussion. Perhaps my question is too afar from the expertise of the forum members, or perhaps I just have to wait for more feedback;-)

  • R_JR_J Ex-Fanboy Munich Admin
    edited March 2016

    You would have to create an app in any language that you like, but it has to be able to send http requests. The keyword that you have to google for would be "REST" or "RESTful API".
    In its simplest form it only deals with GET and POST requests. You already have given an example on how to retrieve/get a discussion.
    Your app makes a http request to the api endpoint, and gets in return some information. Once XML has been hyped as the universal interchange format. Nowadays JSON has taken over this part. Vanilla already supplies JSON formatted output so it would be safe to build an app on that.

    If you want to post a comment to a discussion, it would be a normal http post request. The browser does nothing else, only in the case of an app the http request is formed by your app.

    In theory, you might be able to create an app already now by simulating browser requests. An API should make the handling way more easy. While an app pretending to be a browser is tricking an internet service, an app using an API is guaranteed to work with given endpoints. That makes the app much more robust.
    And you do not have to test around to mimic your browsers behavior, but you get a description of what parameters an API call expects or what is enclosed in the result.

    I understand your question as a theoretical one, but if you really want to start building an app and you should consider using an MVC approach for it, too. That way you can
    a) start right now by returning fake data
    b) assure that future changes in the API only afford changes in the models

    The only mystery to me is authentication, but the answer seems to be OAuth2

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Thanks! Very insightful. I will definitely wait for the api and then some...

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited March 2016

    We just started the development of an APP for Vanilla for iOS which will be followed by an Android version. I have been a customer of Tapatalk for Vanilla for some months, which was the most bad and cruel SaaS i have ever experienced. To me an app for my projects with Vanilla is very important and often requested by my community.

    Currently i'm funding the apps through my company and will be very open to white label them for others. If anyone is interested to apply earlier and would like to join this development process with mind and money, please get in contact with me. It would be great to speed up the development financially as currently it's based on our monthly cashflow which only allows us to proceed with the development on a certain speed.

    I am responsible for the the UX, while the iOS app is done by an XCode developer that is well known in the iOS developer sphere and this prove of concept will then be followed in the development of the Android version.

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Very interesting @phreak - you are validating my intuition that an app front-end to Vanilla may make sense. You also seem to vote for an api approach, which I now understand is indeed the way to go.

    Few comments/questions:
    1. I've seen many cases where an iphone app is developed first and then the Android version is handled later, oftentimes a degraded port of the iphone app. Given than Android has a much larger marker share, why not approach Android first?
    2. I had to google XCode and I learned that it is an IOS only development tool. Isn't there a tool that generates both IOS and Android apps?
    3. @R_J correctly noted that my interest is academic, but I'm curious - what's the business model of the app you are developing (free, one time charge, subscription, etc.)

  • phreakphreak Vanilla*APP (White Label) & Vanilla*Skins Shop MVP
    edited March 2016

    Hi @rbrahmson,

    1.) I have a lot more experience with the development of iOS Apps. In my development plan it makes more sense to outline functionalities and design based on this knowledge and then enroll/adapt this into a Android settings, design and usability.
    2.) There are, but i prefer true native solutions at any time. It has many advantages to work most closely to the offered solutions by Apple and Google.
    3.) I already run communities that are based on advertisement. The apps will be free my community users. Regarding costs i would be happy to find co-founders or people who would like to buy a white-label solution. Not to make a business on it, just to cover some of the not to be underestimated costs. :)

    We are speaking here about 20k to 30k $ overall costs for project development, UX, coding, testing and so on. So within the small Vanilla OS community i'm not sure i should make a business model on top of this. ;) It's better if some forum owners are willing to support the project with a lower amount of k's and get access to the code base or we make the integration but with limited support (OS forum owners are tech companies also, so they should take over development at some point).

    This also makes sense to adept the app to every forum project. But what doesn't make sense if 3-5 forum owners are working on Apps with the same basic forum functionalities (discussions, messages, profile, activity, etc.)

    • VanillaAPP | iOS & Android App for Vanilla - White label app for Vanilla Forums OS
    • VanillaSkins | Plugins, Themes, Graphics and Custom Development for Vanilla
  • hgtonighthgtonight ∞ · New Moderator

    @rbrahmson If you haven't been satisfied yet, let me add another voice.

    Yes, this is a perfectly good use of the JSON endpoints.

    P.S. If I was developing an app on Android, I would check out: http://kejunxia.github.io/AndroidMvc/

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Insightful and good tip! I wish these tools would be cross platform. Personal venting - all these vendor attempts at jailing people in walled gardens is so annoying...

    Anyway, the more inputs the better, even though this is on the shelf right now. The immediate value is the learning from all the viewpoints, so thank you!

  • LincLinc Detroit Admin

    @rbrahmson said:
    I wish these tools would be cross platform. Personal venting - all these vendor attempts at jailing people in walled gardens is so annoying...

    If only there was some sort of cross-platform solution where, I dunno, some kind of neutral backend could serve up views for a rendering engine that worked in a standard way across all devices... what a world that would be.

    :chuffed:

  • R_JR_J Ex-Fanboy Munich Admin

    @rbrahmson said:
    Insightful and good tip! I wish these tools would be cross platform.

    http://ionicframework.com/

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    Looks promising and seems to be open source. However I noticed the following note:

    http://ionic.io/pricing:
    Ionic Platform is free while in beta. Prices will go into effect afterwards. In the meantime, we want to hear your opinion. Please get in touch and let us know what you think!

  • R_JR_J Ex-Fanboy Munich Admin

    I just come across that name sometimes, but I have never looked at it in detail. If you know some software and you are looking for an alternative to it, I could recommend alternativeTo

  • rbrahmsonrbrahmson "You may say I'm a dreamer / But I'm not the only one" NY ✭✭✭

    @Linc said:
    We're about to add a public API v2 to Vanilla this year, so it would be a very inopportune moment to begin such a journey right now.

    I didn't see api V2 in the 2.3b1 - is this still targeted for this year (2.3/2.4?)

  • LincLinc Detroit Admin

    @rbrahmson said:
    I didn't see api V2 in the 2.3b1 - is this still targeted for this year (2.3/2.4?)

    You clicked "Awesome" on the comment where I explained the current plan two months ago.

Sign In or Register to comment.