Is it possible to fetch data from any site in Chrome App? - google-chrome-app

I am new to Chrome App development. I was going to create a simple RSS reader as a helloworld project, but now, after reading docs, I am not sure that this is possible. The problem is, by the Content Security Policy for Chrome Apps it is forbidden to use domain in url_handlers without proving that this is your domain.
It makes retrieving RSS from sites impossible.
But there are references to some sandbox technology in the docs, and Chrome Apps can use low-level sockets. Can I somehow use it to get RSS from any site?

This question is difficult to answer because its topic is so broad.
But to answer if it's possible. Yes it is possible. You'll see that there are already RSS reader applications out there, go and check the webstore and even "reverse engineer" them to study it up if you want.
I also did some RSS reader for a few clients before.
I hope I can give you sample codes to you now but its better if you start looking into main documentation and sample apps.
You should read on XHR to access pages
https://developer.chrome.com/extensions/xhr
You may encounter a lot issues in tackling this project.
You need to consider that websites may load slow and your app should provide some UI for loading and some timeout to give up after a few seconds.
Webpages will redirect, so you should handle if you are going to follow it or not
Sometimes link is 404, or sometimes its not XML
You need to cache things, you may need servers help for this
It's a tough project to do but don't get discouraged.
It is still a fun and challenging one and you should go for it still!
Have fun coding!

Related

Real time web page

I want to build simple web based app, where users, for example, could push the spacebar button, and then do something further, like answer a question, and while other users at the same time only sees that this question is not available any more for answer. When user submits answer, everyone see it.
All right, here is an example. I have seen TV shows, where four players have one button, if one or two of them know answer, they hit a button, and one lamp turns on and the first is allowed to answer, while other keeps their mouths shut. I want to build the same idea, but in the web.
But problem is that, I don't know where to start, what keywords I should search for help on google and so on. I see, that it might work on HTML5, maybe JavaScript and so on.
I have idea using Ajax, but request it every second to get latest actions made seems rubbish. Also I found one service called Pusher, but it has limited users in one time, which doesn't fit my needs.
I need just ideas. Thanks.
Before you read the rest, a disclaimer: I work for Realtime.co but I do believe I can help here so I'm not trying to "pitch a sale".
You can check out Realtime (www.realtime.co). It's basically a set of tools for developers to use real time technologies on their projects. It uses websockets but does fallback to whatever the user's browser supports (such as long polling, for example).
Behind Realtime you have a one-to-one/one-to-many/many-to-many messaging system that will transport your messages to and from your users.
There's also a plus which is the fact that the Realtime framework is actually cross-platform. This means that you can even have your web users communicate with iPhone users, Android, users, Windows Phone, desktop applications, server applications, etc..
You can learn about the JavaScript API here: http://docs.xrtml.org/getting_started/hello_message.html#javascript.
You only need to register at Realtime.co as a developer and start using the free license.
I really hope that helps.
Okey, I think I will go with node.js.
Writing all this previous post, made me think in right way :)

Using a UIWebView as a way to update our business app quickly

We are looking at building a b2b application for the iPhone. A major concern is the possible delay in publishing updates to the applications. I would like to believe that all updates will be orderly, but the reality of a newly found bug for a client or an upcoming trade show could mean that updating the application NOW is critical. Even an "expedited" day wait would not be acceptable.
One option I have thought of is having a flag for each page that we send down when the user logs into our server. If the flag is set, then instead of the native screen for a given page, there would be a page with a UIWebView that would get the latest HTML from the web or stored HTML loaded at the time of login.
I would prefer storing the HTML and using it "offline" because a data connection cannot be guaranteed.
The questions are:
1) Does this violate any of Apple's licensing?
2) Is this feasible or is there a hole I am not thinking of?
It doesnt violate Apple's guidelines and as far as I know you are not missing anything here...in fact, we have the exact same problem in my company (which on top of the issue that you have, we have customers that would like to "brand" the app for their users, and thats how we accomplish that) and there are no issues with apple (for now...:)). Obviously, you need to think of user experience implications...hope that helps.

Web-based or App-based for an Events-tracker?

I'm trying to plan out an application on the iPhone/Android that could be used to track dates/locations of events and update them as necessarily but I really have no idea what kind of method I should take.
Currently, there's two ideas for methods in my head:
1) Make a mobile webpage/website that could be updated with the necessarily information, then display this particular webpage/website on the App for users to view.
2) Make an app in iOS/Android to do the above without displaying the webpage at all.
The first idea is the easiest for me to grasp, since I roughly know the procedures of setting this method up. Displaying the webpages on a iPhone/Android screen should be relatively easy and this also allows me to only update the webpage with the latest information and all without (hopefully) building some kind of update system for the app itself.
The second idea is probably the better of the two, since I can make use of all the nifty features in the iOS/Android to make some pretty cool (what are the cool things, i don't know yet) things. I'm not exactly experienced in the field of creating apps, and I really have no idea how to start some kind of self-update functionality on an app, seeing all the apps I've done thus far are offline-based apps that does not communicate with anything save for local files. Should I get the App upon startup to download a file (XML or whichever?) to "read" the contents then update as necessarily?
Or should I just go for the first method, since it can be more efficient than the second one?
I'm really lost here, can anyone offer some tips and advice?
I believe that the first approach is a good one but I would suggest the following:
1- Create the website that will do all the business in your mind then
2- Port out the application in an easy way to be a mobile application how? Please have a look into this http://www.appcelerator.com/
3- Another idea that would save you the pain of going into all the above is to create a facebook application, this way you can make use of the facebook infrastructure and you will have the viral effect as I guess thats what you are looking for.
I hope I've introduced a good tips for you.

How to integrate vBulletin features into an external site

I have a web site I'm building and the client wants to have features from vBulletin (blog, forums) integrated into the site. Its not enough to simply add the sites skin to vBulletin. Is there a way to do this?
I would expect there to be documentation on how, if it is possible, to do such a thing but haven't been able to find anything.
I'd rather not connect and query the vBulletin database directly.
There is no proper API for this yet, so you'd either have to rely on things like RSS, or query the database directly. RSS won't get you old data, nor any forum structures, etc. just basics of new data.
After much research (see: cursing) I've found that external.php and blog_external.php do what I want though not quite as elegantly as I would like.
So if you want to incorporate forum threads into your web page then external.php is what you need. It appears to be a bit more customizable in that you can have it output in JavaScript, XML, RSS, and RSS Enclosure (podcasting).
If you want to incorporate blog posts you appear to be limited to RSS only. Like I said, less than ideal but at least its something.
There is more information here: http://www.vbulletin.com/docs/html/vboptions_group_external

GWT SE friendly application

How can I develop 'Search Engine Friendly' web app in GWT? Take an example of StackOverflow itself, it's a web app and should be SEO friendly allowing users to search from search engines. If someone wants to develop same app in GWT. How can one make it SEO friendly?
GWT contains a single HTML file. How can we allow its inner content to be visible in SE?
Any suggestion or comment, will really help. Thank you.
Make it crawlable ... this could be helpful http://code.google.com/web/ajaxcrawling/
As someone who has done this before, I want to warn you. If you are going to do a small application and want to be searched by google, great. http://code.google.com/web/ajaxcrawling/ will work. If you want to build a tool that includes bing, then you will be out of luck. You are better off breaking up your navigation with HTML and embedding your GWT in one of the pages.
Until all search engines can handle this, you will spend precious resources trying to work redirection and carefully reviewing search engine results.
When building an SPA, you don't have to do anything specific for Google anymore. Google's AJAX crawling scheme has been deprecated been Google.
You just have to make sure your website serves your users well, and that it is convenient to use. Google will crawl it in a way relatively close to your user experience.
Should you want to do more, however, you can use Prerender. I would recommend checking that article:
https://moz.com/blog/optimizing-angularjs-single-page-applications-googlebot-crawlers