What Technology to use to build this app..?

Discussion in 'iOS Programming' started by kaywilder, Jul 17, 2016.

  1. kaywilder macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #1
    Hey Guys,

    I hope someone can point me in the right direction. I am currently in a process of getting a iPhone App developed and I wanted to get some clarity on what technology to use in terms of web services, framework and programming language. Here is some basic information on what the app requires:
    1. Login / Registration
    2. Loads the camera to take photographs, on average 120 photographs
    3. These photographs are then timestamped, compressed and placed in a pdf template.

    Could you please share some information on what best technology to use to achieve this.

    Thanks,
    Kay :)
     
  2. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #2
    There is any amount of technologies that would work...

    You'll obviously need a web server to handle login/registration. This can be done in virtually any language...JavaScript, Python, Ruby, Groovy, Java, PHP, Swift, C# etc....

    Without more details, it is impossible to determine what the "best" option is. How do you define "best"? Is it runtime speed, is it fastest to market, is it able to handle large volumes of data, and so forth...

    Even the app itself can be multiple languages, Objective-C, Swift, HTML/JavaScript (PhoneGap), C#...
     
  3. kaywilder thread starter macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #3
    Thanks for your reply. I will give you as much details as possible as even I am not sure on whats the best approach to get the photographs converted into pdf.

    The goal of the app is to take a number of photographs (on average 120) and quickly add it to the pdf template with it timestamped. I would need the photographs taken to be compressed to keep the file size to 5 - 8mb max.

    I am still not sure whether it would be effective to do this via the app. Is it possible to quickly and effectively prepare a pdf document from photographs taken in the app itself? If so what best technology to use to achieve this. Can the app handle preparing pdf documents with large number of photographs.

    If not, then is it advisable to transfer the photographs to a backend website via 3g or wifi and proceed with the pdf document on a computer then the App it self. If this approach is more suitable, then what web services should I chose to achieve this.

    Hope this is enough details. Let me know if you need anything more or have any further questions relating to the above.

    Thanks,
    Kay
     
  4. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #4
    Building a pdf that mostly contains images is straightforward on iOS and can be written to disk as it's being built. Images cannot really be compressed in a pdf but they can be converted to a lower resolution than the camera resolution before being added to the pdf, which amounts to a smaller amount of memory per picture. The technology is simply Core Graphics, and maybe ImageIO.
     
  5. kaywilder thread starter macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #5
    Thanks for your reply. What do you mean when you say "can be written to disk as its being built" - can you please elaborate on this? I will read about Core Graphics and ImageIO to get a rough understanding.

    I am getting the App outsourced but want to be a little clear on what would be a good approach to create pdfs from camera photographs in terms of speed.

    Also I have seen a lot of forum post and internet blogs on whether to develop the app in Objective-C or Swift for and against. Whats your opinion on what language to use for something I am trying to create..?

    Thanks,
    Kay..
     
  6. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #6
    The APIs for building pdfs build them one page at a time. When each page is ended it is written to disk. Only one page is in memory at a time.

    For a new project I'd use Swift. Objective-C is a perfectly good language and I've used it for ten years. But it's clear that all the new features will go into Swift, not Objective-C. I don't think I'd rewrite existing projects but new projects I'd start in Swift.
     
  7. kaywilder thread starter macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #7
    Thanks for your reply :) This has help me a great deal. Is there a common framework for Swift..?
     
  8. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #8
  9. albebaubles macrumors regular

    albebaubles

    Joined:
    Feb 9, 2010
    Location:
    Desert Southwest
    #9
    1. Look into iCloud -- you can use that for your login/registration data storage.
    2. CVPixelBufferCreate & CGBitmapContextCreate in didFinishPickingMediaWithInfo delegate is the trick to 'stamping' the photo (or a video for that matter) -- I'm assuming you meant for the timestamp to be visible on the phot.
    3. image to pdf creation is well documented.

    Good luck.
     
  10. kaywilder thread starter macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #10
    Thanks for your replies guys and the useful links. What I mean by "common framework" is I was comparing Swift with PHP. So as I am a PHP developer, I would develop websites in php using PHPCake framework. So if I ever wanted the website outsourced, I would simply look for someone who knows PHPCake so they would understand the code easily and continue working on it. As I am getting the app developed in Swift and am outsourcing it, and reading "PhoneyDeveloper" previous posts - I assume Swift comes with its own api's and common reusable code, which would potentially make it easier for a new developer to work on a existing app coded in Swift..? Sorry I know its silly of me to compare PHP with Swift but I am just trying to get some clarity before I approach a Swift developer.

    1. Look into iCloud -- you can use that for your login/registration data storage - don't you think its better to use web services such as Parse or Amazon AWS for login / registration data storage..? The reason I am asking this is because the first version create pdf document with low resolution photographs but I am planning the second version to also add a feature to transfer all raw high resolution photographs via 3g/wifi to be saved in some database which can be downloaded from the internet. Any thoughts on this..?

    Thanks for all the replies. This has helped me a great deal :)
     
  11. AxoNeuron, Aug 2, 2016
    Last edited: Aug 2, 2016

    AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #11
    Dear god do not use iCloud....for anything.

    Use a backend provider like AWS. This way, you have options if you ever decide to make your app cross-platform. iCloud is an awful proprietary mess.

    I cannot tell you how many times the businesses/clients I've developed apps for have turned out to really benefit from the fact that I try as often as possible not to use proprietary technologies like iCloud when developing a service/app. I build backends that can be moved to a different host (not dependent on AWS) and I try to build apps that use platform-neutral backend technologies.

    This PDF example is something I would try to do on the backend as well, making it as portable as possible.

    There is a fundamental concept in programming called 'modularity', where you try to make the different logical 'classes' or 'components' of your app as distinct and separate as possible. Using iCloud in your app kind of violates this principle, since it makes you dependent on Apple. That way, if you ever decide to build an Android version, you're pretty much hosed.

    I also wouldn't suggest using Parse or AWS for authentication. Do that yourself. Use some good OAuth library on the backend so that it's completely within your control and you aren't tied to any backend host/provider.
     
  12. Sean7512 macrumors 6502a

    Joined:
    Jun 8, 2005
    #12
    I agree that PDF creation should be server-side. Then you write it once and it'll work for all platforms. Why pay someone to write PDF code for iOS and again for Android? Doing PDF creation on the server will preclude you from using iCloud, I would recommend using AWS and rolling your own server.

    For simpler apps, iCloud is fine. Especially since there is now a Javascript library, allowing you to make your app available on other platforms (sans push notifications).
     
  13. kaywilder thread starter macrumors newbie

    kaywilder

    Joined:
    Jul 17, 2016
    Location:
    London
    #13
    So what you guys are saying is the app should simply transfers data (in my case all the photo's) to a backend database and then use a web programming language such as php or ruby on rails to pull the data out of the database and create the pdf document?
     
  14. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #14
    I didn't say that. I said you can build the pdf on the device with no difficulties. I'm not sure we have enough info to advise on this anyway. If the ultimate goal is to have a pdf with the images in it then it probably doesn't matter where the pdf is built. I think for Android you'll need some third party library to build pdfs. But you'll probably also need a third party library if you build the pdf on the server. On iOS everything you need is built-in.
     

Share This Page