Ember: app not being fetched by Google - ember.js

Having tested a simple (hello world) app in ember a few months ago, I was really excited because I knew that Google was able to fetch and therefore index it. Another app I built in Angular a few years was also being indexed! So I pressed on with my ember development and now have an application ready to deploy. This uses a PHP/MySQL backend api.
Today, I uploaded the production build to a server and then checked things in webmaster tools using the fetch and render tool. This time, nothing is being rendered !!!! I have double checked and uploaded the hello world app to the same server, which was fetched and rendered without any problem. I have absolutely no idea why this is happening!
I then looked at ember-cli-fastboot (having not really worried about it before because I thought that Google could index single page apps) and when I run
ember fastboot --serve-assets
I get
jQuery is not defined
ReferenceError: jQuery is not defined
So I'm now at a complete standstill after a lot of work!
Any help in resolving this would be much appreciated! Ideally I don't want to have to use fastboot, but if I have to, I'm not sure how to resolve the above issue.

unfortunately, ember-fastboot has some limitations and jQuery is one of them. You could use Phantom-based prerender instead.

Related

Hosting a ember application under angular Progressive web apps

We need to create a PWA with angular which will wrap the ember application and communicate through some navigation and events.
PWa will be just as a container which hosts the ember so that the application can be used as native and as webapps through every devices.
We need some approaches to get some solution regarding the above requirement.
Will it be possible for everyone to give some light one that.
Planning to host the application using iframe under PWA and communicate.Not sure whether it will be helpful or not.
It's not the best idea to use Angular to create a PWA for an Ember app, you should be doing this in Ember.
One reason that it might not be the greatest idea is that if you're adding Angular to your setup you are adding a minimum of 130KB of compressed JS before taking into account any features that you might be using. Assuming a baseline Ember app size you're talking about adding a roughly 60% extra JS to achieve something that can also be achieved by Ember.
It sounds like you might be following a tutorial on how to turn an app into a PWA that is based on Angular. If you are you having specific issues that you don't know how to solve with Ember I would recommend joining the Ember Community Discord and asking for some help there and maybe someone will point you in the right direction.

Django, phonegap and heroku. How to combine them?

I have made a web-app using django framework and stored it on heroku.
How can i combine phonegap so that I will be able to create both iOS and Android application that will simply load my hosted website?
I'm having an hard time knowing how to combine both technologies (django and phonegap) together, because phonegap requires the "index.html" and i dont know how to make it navigate to my main page.
And i dont know what "Procfile" to use in order that the heroku server will know how to react both.
I have seen somthing involves rest API for django. I found it hard to understand why should i add it for my website...
A tutorial would also be great !!
Integrating phonegap and django is a pretty broad topic covered here and in this tutorial.
For setting up multiple stacks on the same heroku app, you will probably want to use buildpack-multi.

How to start using Doctrine 2 in an Apigility application with zf-apigility-doctrine?

I want to integrate the Doctrine 2 to an Apigility driven Zend Framework 2 application.
So I installed zfcampus/zf-apigility-doctrine
$ composer require zfcampus/zf-apigility-doctrine "~0.3"
and activated the modules Phpro\DoctrineHydrationModule, ZF\Apigility\Doctrine\Server, and ZF\Apigility\Doctrine\Admin in the application config files (/config/application.config.php and /config/development.config.php).
What should be done next to start using Doctrine in the application as general and particularly in the Apigility Admin area?
I experimented with this Apigility extension in the fall but it was far from complete at that point. The server code was usable but there wasn't any UI integration to speak of. You can still manipulate endpoints by dissecting how zf-apigility-doctrine's controllers work and the information provided in the README. The rest is mostly trial and error. At the time I used the Postman plugin for Chrome to send requests to the endpoints mentioned in the README, trying different inputs until I found something that worked. It looks like they've made good progress on this portion of the integration since I last tried but I haven't revisited since to try again.
It seems there's no official integration with the Apigility admin UI yet. There is a repository for it (https://github.com/zfcampus/zf-apigility-admin-ui) but a quick browse of the open tickets shows it's not working yet. Someone has forked it and worked on it, but I haven't looked into it myself so I can't comment on it's readiness.
My suggestion is that if you want to learn how to integrate zf-apigility-doctrine into your Apigility the best way to do that right now is to take a look at Roll'n API (source here)

Chrome Packaged apps and Ember.JS

I'm trying to understand if Ember.JS would work with chrome packaged apps, as I get these errors when I first run it.
http://pastebin.com/fV8V4fjw
Would these errors end up being a big issue? I can see the localstorage one being an issue, but I can always change that part of the api if needed I suppose.

HTML5 Offline storage web framework

I am looking for a web app framework which can automatically generate an HTML5 offline storage based app, so while the users become disconnected they still can view the data which normally is stored on a server
Also currently I am using Django and it would be great if there was a framework which could pull data from Django and present that as an offline app.
From the related questions suggested by stackoverflow, while writing this question, I found one interesting link mentioning that GWT has such functionality, I would like to know more about that if possible and if it can generate an HTML5 offline app
Thanks in Advance
Rather than server-side frameworks, you should be taking a look at JavaScript frameworks.
Dojo Storage will transparently select between providers such as Google Gears, Adobe AIR or plain old HTML 5 local storage. Dojo 1.5 - dojox.storage: http://dojotoolkit.org/api/1.5/dojox/storage
There's also jQuery local storage: http://plugins.jquery.com/project/saveit
... or jStorage, which can act as a storage plugin for jQuery, Prototype or MooTools: http://www.jstorage.info/
With any of these, you should be able to use a quick little AJAX call to pull (JSON perhaps) data from your server and use one of these tools to help minimise your storage code.
You're talking about a standalone app, not a django app.
This can be done with javascript (jQuery, Sproutcore, JavascriptMVC, Pyjamas ...) or Adobe AIR, or...
Pulling data from Django is just a matter of setting up a syncing method, most probably using JSON, to fill up the browser local storage. So this is not django-specific at all.
If you want a standalone django app, this can be done if you bundle in a python desktop app django with a built-in server, that's another question
You could suggest the users to create web apps or use google gears instead... I don't know if this will fill the question, but, i'm in the same way. However, I'm developing an governamental solution who will run only for some kind of people, so, I can have a few control about the user's environment... All you need to do is to use jquery to detect if user has a live connection, or offer to the users a 'preferences' page where you define the behavior of the page itself...
Some info about offline cache: http://diveintohtml5.ep.io/offline.html
PS.: In another post in stackoverflow, I 've found another question: html5 offline caching with php driven sites... The last Post said:
HTML5 offline caching does not work to make your pages interact; it works only to make a
particular page available offline. Basically, it works on a URL-by-URL basis. If you
absolutely need offline functionality, you will be forced to make it work in JS.
Also, make sure your manifest includes all resources used by all pages.
Hope this helps!
Hope it helps!!