Debugging Gmail Contextual Gadgets? - javascript

How would I go about doing this? Its becoming a real pain to deploy and not seeing anything pop up because of the cache. I have also try adding the tag at the end of the url where its suppose to clear the cache and it still doesn't help.
Would coding under Google Web Toolkit be a better choice in creating an app? Im pretty experienced in java so thats why I asked.

Google actually provides a place where they talk about normal gadget debugging which works for the contextual gadgets:
http://code.google.com/apis/gadgets/docs/tools.html

Related

Make Mithril application SEO friendly

Me and my friend have created a website which we want to use as en experiment for school purpose.
https://www.daniellindgren.se/
But we are encountering some problem when we want Google bots to crawl the subpages, like CV and contact.
When we use Google webmaster tool to how the indexing from Google goes, it says that they can't crawl anything else then the startpage.
We have built a sitemap and we have also declared that in the robots.txt.
But we read somewhere that Mithril can cause problem for Google bots because their links to subpages starts with an "?".
Is there any workaround for that we can use or what other solution is there? Should we maybe try to re-make it a single-page application instead?
I don't see any "?" in the links on your site, and in general Google should be able to index SPA:s nowadays.
But it's not always working, so an option could be to use Mithril to render the templates server-side as well. Depending on your backend it may take a little bit of work. If you're using Node.js it's easy with mithril-node-render, if not I recommend Haxe and mithril-hx for cross-platform support.
Then you need to change the routing strategy so a request from outside the application hits the server as well. Unless you think about it from the beginning, you probably need to rewrite quite a bit of the backend to make it more isomorphic.
But your site doesn't have much client-side functionality however, so as it is right now, I'd treat the site as a non-SPA, and use Mithril when you want some dynamic, ajax-driven functionality.

Can I use brython to develope Chrome extensions?

First, thank you for all your help, since this question has bothered me for a few days. I am not a native speaker of English, so if I make some grammar mistakes or describe the questions unclearly, please forgive me. :)
Originally, I was a crawler only using Python. However, my company wants me to develop a tool which can help them to gain the specific information on the website.
So maybe I should describe the tool first, so you guys will know why I want to use Brython.
The user will open the website containing the information they want to catch.
They just click a button and the information will be sent directly to a Outlook file.
As you see, Chrome extensions would be a best choice for the first step, so I am going to develop the Chrome extension. However, the main problem is that I am not so familiar with JavaScript, HTML and CSS, so I want to develop extensions with Brython. Unfortunately, I have tried for a few days, but I still cannot execute the extension programmed by me in Brython to get the whole website's information, which means I even cannot finish the first step.
So I think I should come here to find out whether Brython can help me achieve this goal or not. Please give me a favor! I am free to use other methods or programming languages to achieve the goal. If you have any suggestion, feel free to tell me.
Deeply thank you all. :)
As jonathanverner said on GitHub:
Actually, using Brython in an extension is completely doable. As a
proof of concept, I hacked together a very crude extension which adds
a "Python console" to the Browser Dev Tools. It isn't very useful, at
the moment, but you can look at it to help you write your extension.

How to update source codes of a phonegap application from server

I have been developing phonegap applications that need to make updates oftenly. The problem is pushing a new ipa to iTune Store take too long. So, I uploaded the application source codes(minified javascript) to my server and download it from application and "eval" the minified js files. But i feel using eval has limitations and also not the right way. So, can someone tell me the right way to accomplish this.
thank you so much.
I'd love to have something like this as well. You're already ahead of me w/your eval() approach - but I'd have the same concerns as you there. Here's what I'm aware is out there on this topic - hope this helps?
IdeaPress(?)
I just recently caught wind of this one - not sure how feasible but it claims to do exactly what we'd like. I have to say the main site looks a bit flaky but I will definitly be checking this out to see if it's feasible or not.
HockeyApp?
HockeyApp (possibly dead-end now). I thought there used to be a pretty clear solution for PhoneGap devs to integrate the HockeyApp API/feature set with their mobile apps but a recent Google search on this is turning up much less than I would think - so maybe it's a dead end now? http://goo.gl/GQOv5o
org.apache.cordova.file
This requires more work and I haven't pushed far enough yet to see if it truly could be a means of updating the app post-app-store-deployment. But based on what I've read if you're just updating code for your WebView you shouldn't have to worry about App Store rejection or anything. Related tutorial
Testflight App Testing (Apple)
I haven't gotten to play w/this yet but sounds like it could be promising for at least the beta/testing phase of development. I, like you, need a solution for end-users, not app testers, but I'll still be looking into this soon as it might replace me having to maintain my own over-the-air app installs for the best/testing periods.

JavaScript Best Practices: How to implement long-lived apps (one-page web apps)?

Are there any best practices for implementing a long-lived JavaScript app, i.e. a web app that consists of a single page and loads other pages into the content area via AJAX? (Gmail is a good example of this.)
I already read about pro and cons, SEO, performance, etc. (http://stackoverflow.com/questions/1499129/one-page-only-javascript-applications), I'm interested in patterns how to implement this.
I'd like to avoid large frameworks (e.g. Cappuccino, Echo2, SproutCore, Claypool).
How would I manage dynamically loading content while maintaining the #link portion of the URL (for bookmarking)?
Don't get me wrong, I have an idea how to implement this myself, but this problem must have been solved before.
Are there articles on this? Maybe a tiny JavaScript library?
Thanks!
Mark
I found JQuery Address http://www.asual.com/jquery/address/ extremely easy to set up. $.address.change() let's you know whenever something was clicked (works with back and forth as well) and you just parse self.location.hash and build your app from there. It seems lighweight enough as well, if you can handle using JQuery.
Here is an article to help you with the History bookmarks problem: http://codinginparadise.org/weblog/2005/09/ajax-dhtmlhistory-and-historystorage.html. It's quite old, but the solution still works.
I made several apps using this "long lived" apps, and one thing you should take into account is IE's tendency to leak memory.
I would also recommend you to use a JS library, like JQuery to help you with the AJAX and DHTML.
Heard about javascript pushstate?
http://badassjs.com/post/840846392/location-hash-is-dead-long-live-html5-pushstate
It's meant to replace location.hash

Automated browsing with javascript?

I'm trying to do some browser automation, but I'm having some problems. Basically, what I'd like to do is load a set pages, set some forms options, click a button and view the results for each page that I open. Originally, I tried to do this by placing the pages I wanted to automate in iframes and then using javascript to drive the interactions I want in each, but that results in a Permissions Error, since the sites I want to automate are not on my server. Is there any way around this? The other possibility I've thought of is to use QT's webkit class and the evaluateJavaScript method to accomplish what I'd like to do, but this seems a bit more heavy weight for something that is, conceptually, pretty simple.
The tasks that I wanted to accomplish weren't really test related, so a lot of the test-frameworks don't fit the use case that I had in mind (I did try to use Selenium, but ran into problems). I ended up doing what I mentioned in original question and injecting javascript into pages through QT. This ended up working pretty well, although it was a pain to debug, since the javascript had to be passed in as a string and the base environment provided by QT's webkit class doesn't reveal a whole lot.
Check out Selenium: http://seleniumhq.org/. It lets you automate Firefox and is probably the easiest to get start with.
Are you trying to do test automation? If so, there are plenty frameworks for that, like Selenium, WatiN, WebAii and even that built in Visual Studio.
Some of them (WebAii is my favorite) allow you to launch test in a real browser like FireFox.
If a peace of software you searching for is more like form filler, than take a look at iMacros, thay have a complete browser-side scriptable solution.
An easier way of doing this would be to use a web debugging proxy and injecting javascript that way. This should allow you to debug the code you wrote within the browser.
I haven't personally used web debugging proxies, But I wrote my own proxy and did this a while ago just for fun and it worked great.

Categories