Creating cross-platform app for my website

5 replies
Hey guys, some quick questions.

I have a PHP website which I'd like to build an app for on Android and iOS.

I'm a PHP developer myself but haven't got any experience with app development. I'm gonna outsource this but I need some answers first to make a good decision.

If the right person comes along, maybe you'll be the one to develop this with me.

1) Is there a cross-platform way to create the app so it would work both on Android and iOS? I'm looking at things like PhoneGap | Home and Cross-Platform Mobile App Development for iOS, Android - Corona Labs but not sure if that's the right choice.

2) Considering I already have a working site, can the app make use of the back-end code or does everything need to be re-written?

3) Which programming languages are primarily used/recommended for such a project?
#app #creating #crossplatform #website
  • Profile picture of the author szaboomikierno
    Can only respond to your second question.
    'Considering I already have a working site, can the app make use of the back-end code or does everything need to be re-written?'

    Back-end should always be written only once. Now I have no idea how experienced of a Php developer you are, but if you build up your applications correctly, it should be structured in multiple layers. I'm sure you have already heard of the MVC architecture before. The Model(your application's data center and business logic) should obviously be written only once since that can not change in the same application. But the more important thing is that the Model should not care of what you or any other part of the application does with the requested data, it does not care of the language either.

    I'm sure you were expecting yes/no answer but it's not that easy. The short answer: if the web app is written correctly then the app should be able to use it.
    This is a very long topic, but if you are interested please look up MVC architecture, Separation of concerns, Dependency injection and RESTful programming. These are just a couple of keywords to get you started, you will find a TON of information on the internet (for free). However if you get stuck at some point or you need help in learning these, feel free to throw me a PM.
    {{ DiscussionBoard.errors[9675289].message }}
    • Profile picture of the author Monsignor
      Thanks.

      I'm aware of MVC and have been using it for the last 2 years or so, but unfortunately this is an older website which was one of my training projects when I started a few years back, and it turned out to get a whole bunch of niche users.

      However, it was built with no framework at all. The procedural code is good enough to be manageable, I used includes and requires to make sure I don't write the same code over again, but MVC it is certainly not.

      So I take it there is no choice but to rewrite a lot of it for the app.
      Signature

      The intelligent investor is a realist who sells to optimists and buys from pessimists. - B. Graham

      {{ DiscussionBoard.errors[9675298].message }}
      • Profile picture of the author szaboomikierno
        You can always consider re-writing the back-end of the website. I would always tidy up my code first and then outsource it if needed. If you have 2 years of experience in any coding, you know how small errors and buggs can add up.
        I also believe that when you started the project you did not know that you want to have an app for it. You never know, if there is room for expansion you should start with a strong core.
        However if you don't want to further scale the project then just go for outsourceing the back-end of the app, short term this is the cheaper way.
        {{ DiscussionBoard.errors[9675311].message }}
        • Profile picture of the author Monsignor
          I don't think it's worth the effort to rewrite the site back-end, because there's a lot of stuff on the site that I won't need for the app.

          But the following seems logical to me, please tell me if it's technically undoable.

          I have the app built as front-end only, and it sends API requests to my web server for everything. A lot of things on the site are done with AJAX so all those requests could be re-used, no?
          Signature

          The intelligent investor is a realist who sells to optimists and buys from pessimists. - B. Graham

          {{ DiscussionBoard.errors[9675330].message }}

Trending Topics