Emberjs: strange bug on iPhone - ember.js

I have an Ember app that works very well on desktop (all major browsers), but it exhibits a strange bug on iPhone (and maybe Android as well, I am not sure).
It happens completely randomly, and even "worse": for some reason I can't replicate it when I connect my iPhone to my computer to use the Web Inspector. So basically I have no idea what's happening.
The app loads fine, but the bug occurs when the user transitions from one page to the other. This transition involves a bit of javascript and ajax (but not a super heavy script), and probably uses a bit of memory.
I apologize I know it is a long shot considering the little amount of info I have, but I was wondering whether someone has been confronted to something like that already? Or do you have any tips on how to track down a problem like this?
Thanks
PJ

Related

Ember Way to Add Rss Feed without third party widget, Front-end only

I am using Ember 3.0 at the moment. Wrote my first lines of code in ANY language about 1 year ago (I switched careers from something totally unrelated to development), but I quickly took to ember. So, not a ton of experience, but not none. I am writing a multi-tenant site which will include about 20 different sites, all with one Ember frontend and a RubyOnRails backend. I am about 75% done with the front end, now just loading content into it. I haven’t started on the backend yet, one, because I don’t have MUCH experience with backend stuff, and two, because I haven’t needed it yet. My sites will be informational to begin with and I’ll build it up from there.
So. I am trying to implement a news feed on my site. I need it to pull in multiple rss feeds, perhaps dozens, filtered by keyword, and display them on my site. I’ve been scouring the web for days just trying to figure out where to get started. I was thinking of writing a service that parses the incoming xml, I tried using a third party widget (which I DON’T really want to do. Everything on my site so far has been built from scratch and I’d like to keep it that way), but in using these third party systems I get some random cross domain errors and node-child errors which only SOMETIMES pop up. Anyway, I’d like to write this myself, if possible, since I’m trying to learn (and my brain is wired to do the code myself - the only way it sticks with me).
Ultimately, every google result I read says RSS feeds are easy to implement. I don’t know where I’m going wrong, but I’m simply looking for:
1: An “Ember-way” starting point. 2: Is this possible without a backend? 3: Do I have to use a third party widget/aggregator? 4: Whatever else you think might help on the subject.
Any help would be appreciated. Here in New Hampshire, there are basically no resources, no meetings, nothing. Thanks for any help.
Based on the results I get back when searching on this topic, it looks like you’ll get a few snags if you try to do this in the browser:
CORS header issues (sounds like you’ve already hit this)
The joy of working with XML in JavaScript (that just might be sarcasm 😉, it’s actually unlikely to be fun)
If your goal is to do this as a learning exercise, then doing it Javascript/Ember will definitely help you learn lots of new things. You might start with this article as a jumping off point: https://www.raymondcamden.com/2015/12/08/parsing-rss-feeds-in-javascript-options/
However, if you want to have this be maintainable for the long run and want things to go quickly and smoothly, I would highly recommend moving the RSS parsing system into your backend and feeding simple data out to Ember. There are enough gotchas and complexities to RSS feeds over time that using a battle-tested library is going to be your best way to stay sane. And loading that type of library up in Ember (while quite doable) will end up increasing your application size. You will avoid all those snags (and more I’m probably not thinking of) if you move your parsing back to the server ...

Visual C++ Best way to monitor visited websites?

My program needs to monitor all websites that are visited when the program runs.
I've been found some ways to do it and I'm wondering which way thats "best" (with best I mean, easiest to implement and offering the best performance). The program is to newer versions of windows only! It should work on both x86 and x64.
The browsers that I need to be able to monitor is IE, FireFox, Chrome and Opera.
I could watch the history files of each browser, but this would be a pretty bad way to do it (newer versions of the browser could make the code stop working etc)
I could check every window (HWND) and see if its a browser that visits a website... But is this really a good way to do it? If so how to I do it? Links or code snippets thanks :)
I could use a packet sniffer, but that would be kinda overkill if I just want the urls...
A proxy wouldn't be a good solution (Am I right?) because it would slow the browsing down (I think so at least)...
Or could I do it some other way thats better?
Since you need to handle multiple browsers, a proxy solution is going to be the most robust way to go about it - and if designed properly, shouldn't incur too much overhead. Packet sniffing is imho too complex.
You might be able to hack something specific togeher that supports your current versions of currently desired browsers, but do note theword "hack", and add in "maintenance nightmare" to the mix.
Also, you might want to rethink your tags - the qeustion doesn't really have much to do with .net, vc++ or vstudio - it's likely going to require the win32 api, though :)

Animated gif pauses when ember.js objects are loading

Having a problem with a spinner actually spinning while ember.js is doing it's thing. I have a very generic jsfiddle example that illustrates the issue:
http://jsfiddle.net/h4ZcZ/2/
I assume there has to be a simple way to make this work as expected, but I am not finding it. I have tried using a JavaScript/CSS implementation of a spinner (spin.js) with the same results. I saw some stuff indicating this was typically an IE issue, but that is not the case here. This happens on all browser on Windows and i have tested on Mac Safari as well.
The problem is your for loop--you're basically locking up the thread. I would use timeouts and chunk up the work to be done to give other processing needs on the page the ability to execute.
As far as root cause, #ChristopherSwasey is correct. I asked a few other Ember developers about this. No solution, but two interesting thoughts that might help:
1) One developer reported that he has run into this problem and gotten around it by making sure the animated gif started before the long javascript execution.
2) Another developer suggested that using a virtualized list is the right path, so that only visible nodes are rendered. However, I'm afraid I don't know of an open source Ember virtualized list class yet.
Hope that helps.

Web Developer curious about developing for the Android

Hey there,
So I've been heavily focused on design/development using web technology for the last few years (php/mysql, javascript, etc), and I'm a bit hesitant to start learning C++.. At the same time, I see it as a potentially enjoyable learning experience.
To keep things brief, right now I'm developing an online app that plots out certain locations on a map, and you can sort through these locations and do a bunch of other nifty things..sorry to be vague. The point is: I don't see any real advantages of making this an actual "app" when the entire functionality of the app itself can do quite fine through the modern mobile browser..
Not to mention that, by living in a browser, it's much less proprietary
So, my question is: Is there any way to make a simple app that's basically porting the user to my site? I guess it'd be convenient that as an app, the user has a nice little icon to click on when they do need to access it..
Android development relies heavily on Java. So you are all ready on the right track.
However if you just want to make an app that brings people to your website, running javascript I am guessing, this is easy to do with android.
Android supports the webkit browser and has a view group called WebView. Your app can be nothing more than a shortcut on a desktop that opens a webview directly pointed to your website. It could add other options to point to other parts of your website like bookmarks.
WebView webview = new WebView(this);
setContentView(webview);
weview.getSettings().setJavaScriptEnabled(true);
webview.loadUrl("yoursiteurlgoeshere);
A lot of apps on the market are actually based around a WebView. There are other classes that allow you more control over the view, like whether links are opened in the webview or in a new browser, or whether the user is allowed to use the resize options, etc.
Welcome to Android.
There is a massive article on exactly this type of idea. It discusses a number of different things and is well worth the read if you are indeed interested in making a cross-phone web-app. It talks about an html5 facility in the works for creating such a thing as you describe, but it isn't quite universal yet.
Here is an article on making an iphone app in html5.
You can also use phonegap to port your design to andorid.
also, check out a jquery plugin calld jqtouch if you are interseted in developing touch capable applications quickly.
If you are worried about speed and the issue of internet connectivity, you can use html5 local storage features which are available on both android and itouch. Ibm has a great series on these issues and part 2 covers local storage.
No. The problem with web technology on a mobile device is the delay. You are far away from the server, so a lot of the things you can easily do with a normal client creates a very bad user experience on a mobile device. The roundtrip time is simply too large. You have to move much more functionality to the client. This client is also less powerfull, and tends to have limits on caching large elements
How is this related to C++?
There is also a C++ API which is only recently available. Google calls it the NDK (Native Development Kit). Information about it can be found here: http://developer.android.com/sdk/ndk/index.html
I personally haven't developed using the NDK. The only real reason someone would really need to would be to write a high-performance application that can't stand the overhead of the Java JVM--which is getting more and more rare these days IMO.
As far as creating a simple app with a web container in it, see Phobos' response. That is exactly how I'd do it personally.

Weird issue with cftextarea/cfwindow

A while ago, I worked on an application where a manager can approve/deny xxx applications. When some body selects an action from a drop down, it opens a cfwindow and loads cftextarea richtext="yes" in there, so that they could enter reasons for approval/denial.
Now the culprit is that in production, the fckEditor has a ton of funky chars in IE8. Same thing won't happen in FireFox. Also, the IE8 does not show the same stuff in dev.
I have looked at the scripts in /cf_admin/CFIDE/scripts/ajax/FCKeditor, they are all the same.
Since this wasn't an issue before, I am not sure where to look at. Something got updated on the server which probably causes this problem. Does anybody know what could be the problem?
It turns out the vp put the header X-UA-Compatible: IE=IE7 in IIS to force IE8 emulate IE7. When I made them change this to X-UA-Compatible: IE=EmulateIE7, everything started to work perfectly again. For more details see Introducing IE=EmulateIE7.
Hope it helps others. Thanks.