organizing iOS app that gets data from server? - xcode

I am making an app that uses http requests to display images of documents. It will open up on a main page with options of documents and once you click on a document it will read images from the server (note there are like 200 images) and you can flip through the pages. My question: how do a create an app that will get a bunch of images from the server without having to create a bunch of individual Xcode pages? And it has to be able to do it with multiple books based on which one you click. And it should be able to handle the addition of documents to the server.
Thank you so much in advance!

if i understand your question, by 'create page in xcode' you mean in 'interface builder'.
if you have much images you have to load, create and display them programmatically not with interface builder, and take care to load them asynchronously to not freeze your app ( the responde of how you do is in your other question about cacheing images ;) ).

Related

How can I enable user to dynamically set logo in Apex 5?

I need to allow the user upload a number of logos and select a default, that will then become the logo that's shown at the top left of the screen.
Usually the logo is a static application file, so is there perhaps a way to make changes to those by the user? Or to set a static file as a select statement?
I also tried setting an application computation to set an application item but couldn't get that to work.
This is my first question on SO. If I'm asking something stupid, please go easy on me. Thanks.
The way to solve this problem is to give the user a page for him to upload and manage the logos. (save them in the database)
Then create a RESTful Web Service that returns the image of a selected logo,
and use the link of the RESTful Web Service as the img src link.

Docpad design considerations

I'm coming from a php/mysql background. I'm most familiar with the Kohana PHP framework and I'm trying to learn Docpad. I have a loose understand at this point and I've built out my first website and blog. Static content makes a lot of sense to me on Docpad.
I'm working on my photography site where I want to be able to upload new images to a portfolio. The backend needs to handle an uploaded high-resolution image and create several different copies at different resolutions of the image. My biggest question is how do I keep track of the image meta data that I want to display? Do I generate a physical file for each image that has all the particulars I want to track and use those files as my searchable database, much like how blog posts are setup?
Or should I go the route of using something like MongoDB to store image data there where it can be queried and plugged into a layout?
Regarding handling POST or GET data, should I be reading up on the express.js docs? I'm not really sure where to turn for that.
Wordpress uses TimThumb to re-size it's images: How does WordPress.com resize images dynamically?
Then there is this re-sizing library for node: node package for file attachments and image resizing
If you wanted to created like 3 different image sizes and use the backbone collection in DocPad, then you'd add your different re-sized images to those three different collections/folders. For access the images you might just be able to do it via it's file name. So when you copy, re-size and rename the image, in the rename step, concat the image size at the end, like: coolPhoto-med.jpg and then you could just do hard links to get to the image like /spring-collection/med/coolPhoto-med.jpg or you could use query engine to access them.
The file model has a meta attribute: https://github.com/bevry/docpad/blob/master/src/lib/models/file.coffee#L17
I've yet to learn how to use it yet though.
I know we chatted yesterday on #docpad IRC but I just wanted to answer you here too. If you do code something that re-sizes images for DocPad, please do consider putting it up on Github to share with the community.

image media and custom post type in wordpress

I am looking for some help / thoughts. I am building a travel site for a client who will continue to add content to the site when it is finished. At the moment there are 600+ images, just in one region, when the site is up and running there will be over 20 region's, and so a lot of images. Is there a way to section the images so that when the client wants images from the USA, that is all they see in the "Insert Media" window. I am using Custom Post Types for the sections. Does anyone have any thoughts and advice.
I would hope there is a plugin to achieve this, as to be honest I do not want to mess around with any core files in PHP.
Thanks
John
For your issue, you can separate images in post.
For example, Create one post USA and upload all USA region related images into it and there is one option in media to view all images from post.you can create multiple post for multiple region.
And Even you can fetch all images from single post too in wordpress.
Hope this helps.

ExtJs: best practices to handle images saving/retrieval

We are developing a web application with ExtJs 4 and Microsoft RIA services + MS SQL Server on the back end. Currently some of the records we store in the DB have attached images to them. Images are stored in binary format in the DB.
What would be the best approach to:
Display them within ExtJs framework
Allow users to upload images via same ExtJs front end
I looked through ExtJs docs and looks like we would need to provide images as basically individual files and use simple img tag for that. Is that correct assumption? Are there other approaches to render images from binary data (which we currently serve via JSON endpoints)?
Is there samples handy for image upload logic?
ExtJS will give you a framework for getting the images via forms to your back end, but what you do with the images from there is completely ExtJS independent. Displaying them within ExtJS is completely independent of the back end logic as well. It's just a matter of finding a way to pipe the data up to the browser just as you would if you were writing a normal HTML page.
I'll take the answer one step further and mention: Storing images in the database is generally a bad idea. At least, storing them in a relational database is generally not a great plan. If I couldn't use a database like Riak (or Amazon's S3) for storing the images, I would probably follow Diodeus' comment and put them directly in the filesystem.

Resize large images in App Engine

I've got an app on Google App Engine that will accept image uploads from users. The problem that I envision is that users will upload these images directly from their cameras, and file sizes are often greater than 1MB, which is the limit for the image API (which would be used to resize the images).
What's the best way to accept the upload of say a 1.5MB image file, and resize it to under 1MB?
While this is not clear in the App Engine documentation, this is possible by using a combination of the Blobstore and the Image Manipulation Service.
You must:
Upload the Image into the Blobstore
Retrieve the Image from the Blobstore
Perform the Image Manipulation with an Image resulting in less than 1mb in size
I've written up a post about this -> http://socialappdev.com/uploading-and-re-sizing-large-images-on-app-engine-11-2010.
Here are two (similar) ways to solve this:
If you want to keep everything controlled yourself, you can put a resize script on a server of yours, which takes the URL to the raw uploaded image (which can be up to 10MB due to HTTP response size limit, but you would have to store it as 1MB chunks in the datastore), downloads it from your application, resizes it, and then POSTs it back to your application. All this interaction would need some kind of authorization of course, so that it can't be abused. Alternatively, POST the image directly to your external server, but then you have to either send the other form data back to your application, or use a separate form for the image upload.
Use an external imaging service. I would recommend Picnik. See their API documentation. As you can see, it lets you make a form that posts the image directly to their servers, then the user can edit the image (and resize), then the image is posted back to your server. With this solution you have to upload the image in a separate form, since Picnik receives all your POST data.
I recommend point 2, because it doesn't require you to go around Google App Engine limitations and since your users are uploading images straight from the camera, they will probably want to do something with them anyways (such as crop.)
That's a conundrum. The "obvious" answer, using google.appengine.api.images.resize, won't work because it's too big. :) So you will have to use third-party software, either on the server (which will be tricky because of App Engine's limitations) or the cilent (e.g. a Java uploader).

Resources