JSON performance tips. Drupal backend and IONIC Frontend - angularjs

I am creating a hybrid app (IONIC + AngularJS). Using Drupal as my Backend. I am using Drupal services and getting the JSON data.
I would like to improve the speed/performance of getting the data. Most of the data will be images.
On the first page, i just want a list of the user's firstnames. When you click on a name you get the details page for that user. This page contains a lot of images.
What is the best way of doing this?
If my list contains a 100 people with profile pictures. I don't want to download all this information. Just the information of the person that was selected from the list. Is this possible? Is this a good idea? I am sorry if this is dumb questions. I am a beginner.
Do you have a better suggestion on how to do this?
Thanks in advance
JSON
[{"firstName":"John", "Image1":"John.jpg", "Image2":"John2.jpg", "Image3":"John3.jpg"},
{"firstName":"Jane", "Image1":"Jane.jpg", "Image2":"Jane2.jpg", "Image3":"Jane3.jpg"},
{"firstName":"Sam", "Image1":"Sam.jpg", "Image2":"Sam2.jpg", "Image3":"Sam3.jpg"}]

Here are few links you might want to go through for performance
https://www.sitepoint.com/5-ionic-app-development-tips-tricks/
http://julienrenaux.fr/2015/08/24/ultimate-angularjs-and-ionic-performance-cheat-sheet/
http://www.gajotres.net/speed-up-your-ionic-application-using-these-techniques/
Regards.

Related

Unsplash API - How to obtain search / suggestion words?

I have a task of making a search bar in React. When you type at least 3 characters in, the suggestions start popping up. Then, after selecting one, the related photos from Unsplash show up on the page.
I've already got two separate components - a search bar that will give suggestions from a hard coded / provided array and a search bar that will show Unsplash photos after typing a word.
But I don't know how to connect them - Do I need an array with Unsplash keywords? But how do I obtain it? I don't think I should be preloading all millions of photos first, do I?
Thank you for the answers.
In documentation of the project theres no word about returning suggestions, so I think they don't support this.
If you ask how is it working on production - api is returning an object with 5 suggestions related to sent query. You can check this in "Network" tab when you type something into the searchbar on their website, just paste the link they fetch into your browser.
Does it answer your question?

Create a thumbnail of document after uploading?

I am making a tiny website with reactJS where users can upload documents and share them,since multiple extensions are being uploaded,I managed to make the viewing work by just using google docs viewer.
but now i want to have thumbnails of those files,maybe of the first page so that it shows up un the search feature.
seeing that theres many extensions flying around i cant figure out how to approach this,what can i use to solve this problem ?
thank you.

one database, same content, two wordpress sites, different structure? or another solution to have 2 websites with the same content?

I have a WordPress site that shows posts that it gets from rss using a plugin.
I want to split the "jobs" in 2 different websites because in this configuration is not working properly (high amount of rss sources to be parsed).
I need to set one site to get the posts, and the other to show them on a template; i dont want to have the rss plugin on the site that display the posts.
Is this possible using the same database, same content but different wordpress configuration?
Is there another solution to have 2 different databases and autoupdate one from another?
Any ideea other then these 2?
Thanks
if I understand your problem correctly the solution will depend on what you can do to resolve this issue.
Firstly I think you only need one website the issue you have sounds like your website is displaying items directly from the many RSS feeds which will be slow, instead I would recommend creating a process to import the posts on a daily basis to then get written to your database.
This will probably take the form of a cron job on your server.
However if you don't have access to do this I would recommend creating pages in the back end that will import the rss content when you click import.

serving pictures from database using nodejs

I am working on a web app and I want to serve users some of their own pictures that I will have stored in a database. I have a profile page view were I have some jade template. I want to load the users pictures when they click on their profile but I do not know where to start with that (I am relatively new to node). I have tried using google but no useful answers have come up. How can I load the user specific pictures from a database using nodeJS?
Any help is appreciated, thank you.
Never store image into db. It's wrong. Store path, url or other, but not Image Binary.
Retrieve url that you have stored into db and put them into your final html.
M.

Product Gallery in Drupal 7 (like Amazon's)

I want to create a product preview gallery page for a certain node type. I do not want to use any eCommerce plugin nor do I want to use Drupal's Kick Starter. I simply want to replicate the image thumbnail hover/gallery in Amazon's inner product pages. Is there a way you can do this in a simpler approach? A simple plugin will do, but it would be best if it can be done even simpler just by using Drupal 7's defaults.
I hope I'm not violating any policies that will get me flagged or be voted down for asking this. Thank you very much!
You can create a gallery with drupal views and views slideshow.
check this page out
https://drupal.org/node/1497058
Also it would helpful if you could provide a link to the page you are referring to in amazon to get a better idea.
Hope it helps.

Resources