Framework to develop Google Chrome Extension "Session Buddy" - google-chrome

I'd love to develop Google Chrome Extension. But currently I don't know any framework to work with. I found the "Session Buddy" is one of very well structured extensions. I think it must be developed by specific framework (because it's very well structured, and encoded).
Anyone know what framework does the author of Session Buddy use to develop this extension? Here is the url: https://chrome.google.com/webstore/detail/edacconmaakjimmfgnblocblbcdcpbko?hl=en-US
Moreover what other frameworks do you use to create chrome extension? Does it support unit test?
Thanks for your answers,
nTuan16

The current version of Session Buddy (v3.0.9) is coded in pure JavaScript, with the exception that it uses MooTools for internationalization of dates and ordinals (I'm currently exploring alternatives to that though, so this may be replaced in favor of a different library in a future release). The code obfuscation is achieved through a simple js parser I built using C#.
-Hans (Session Buddy developer)
Addendum: I should add (because you mention the code structure) that I pass the code through Google's Closure Compiler with a compilation level of WHITESPACE_ONLY.

Related

Chome extension - is any website detector chrome eextention?

Is there any chrome extention, which will detect any webste's cms (such: wp/ joonla), plateform such: php/asp etc.
even help to get any more information.
I need now such type detector.
Here are two extensions that will detect Javascript libraries or CMS frameworks that are being used by a site:
Frameworks and Appspector
You aren't going to find an extension that shows whether PHP or ASP are used because those are server-side technologies and they don't consistently send anything to the client that would enable an extension to detect with 100% accuracy that they are being used.

Cross-platform web development combining HTML5 and native capabilities

I am absolutely new to the mobile development and I am puzzled by the following question:
How can I write a cross-platform mobile application with UI on HTML5 (same for all platforms), most of logic in JavaScript and ajax, but keeping some of native capabilities like marketplace and a good offline storage?
Do "hybrid" applications provide what I need? Is it possible to get access from javascript code inside "web page" to the phone native resources?
Could someone suggest an entry point for such kind of work (framework/toolkit)?
There is some frameworks like Corona SDK or PhoneGap, which can help you to achieve this. Also take a look to this similar post. Another good comparison between such frameworks is available at Mashable

Confusion regarding PhoneGap/Cordova

I have a webapp developed (game), based on HTML5 + CreateJS, but since Android lacks of standards, I've run into unsolvable issues for my webapp. That's why im recurring to PhoneGap.
Yet my confusion lies in the fact that I need to make this game into a phonegap app that runs on Android/iOS, using for each platform native specific stuff.
So, should I build 2 apps (one for each platform), all over again, or use the one I have and try to deploy it into different devices using phonegap?
The truth is I don't know how to approach this problem... can anyone help?
Best Regards.
Yes, you can use Cordova (PhoneGap) to create a cross platform mobile app. Basically, Cordova (PhoneGap is Adobe's version of Cordova) is an open source project that provides JavaScript API's for accessing native device functionality (like the Accelerometer or Camera.) Cordova also lets you package your app in the native application shell, so you put your app on the app store. Please see my other answer here about Cordova and hybrid apps: Beginning with Apache Cordova
If the game runs completely in HTML5, I think it would be easiest to just use that one codebase and integrate it with Cordova and then deploy to the various platforms - why rewrite the app twice if you don't need to?
However, if you are using native device functionality, you may need to develop your own Cordova/Phonegap plugins for use. This way, you can call regular Android/iOS code (Java or Objective-C code) that you write from your web app code with JavaScript. This might be more work, especially if you have never written in these languages.
Personally, since you already have a working HTML5 app, I'd just try to get it working with Cordova and see how it performs. If you really need some native specific stuff, then I'd try creating that "stuff" as a plugin. Rebuilding the app twice, once for Android and once for iOS seems like a pretty big waste of time to me.
The answer here is either yes or no.
Yes if you want to use some specific feature of the native code. For instance, iOS's default objects is beautiful itself, you can easily drag and drop it to build your application. However, it takes lots of time to rebuild for another platform. Specially, if you intend to create app/game for multiple platforms, it would be a nightmare.
HTML5 is much faster for you to approach several platforms. However, you can't get the best result on all platforms and all devices. I mean, it is really difficult to bring the max performance of the app on all devices. For this solution, I suggest HTML5 with some libraries such as LimeJS, Crafty, Impact, etc. or some tools such as Construct 2, etc. I used to use HTML5 with all those libraries but found out that Construct 2 is much better.
Instead of using phonegap, I recommend cocoonjs. Specially if your targets are iOS and Android platforms.
Hope that help.
Yeah, even the simplest game such as bubble buster would be difficult to make cross platform with different version of android webview and you need cross platform? I would suggest looking into something like Unity3D.

Will Dart scripts run natively in the browser?

The Dart language looks like a very nice technology to build web applications for the web. For me it seems that there are no browsers available (yet?) which can run Dart scripts natively. Although there's a description on Dart's site about how to embed such scripts into HTML. I understand that for now i have to "compile" Dart scripts to Javascript. But will this change in the future or the language is designed to be translated to other script standards similar to Haxe?
This is speculation, but I guess that Chrome will likely support dart natively in the future. It will mean that Chrome will be able to outperform other browsers that don't have the native support.
Update: There's a hint from The Official Google Code Blog that it might be coming:
The Dart VM is not currently integrated in Chrome but we plan to explore this option.
Update 2: It looks like I was right! Here's some recent news:
Additionally, and perhaps most importantly, Google is releasing Dartium, a Chromium build with native Dart support.
It’s more than likely that Dartium is part of a series of steps that Google will be taking to launch native support in Chrome — greatly improving the usefulness of Dart. Bringing native support into other browsers like Firefox and IE, on the other hand, will be quite the challenge.
Update 3: Since I posted this answer, Microsoft have released TypeScript which is a competing technology. I'd say it's unlikely that Microsoft have any intention of integrating Dart into Internet Explorer as they would probably prefer people to use TypeScript rather than Dart.
The official answer is Yes, Dart will run natively in Chrome. The branch of Chrome, affectionately called Dartium, is now available as source, and binaries will be released soon. More information on how to get and build the source: http://code.google.com/p/dart/wiki/BuildingDartium
As of March 25 of 2015, the offical answer is: no.
Source: Dart for the Entire Web
Google dropped the integration plan of the Dart VM into Chrome in favor of optimizing the Javascript compilation. Dartium is still accessible for development purposes.
Eventually, yes. The proposed MIME type + usage looks like this:
<script type="application/dart">
main() {
Element element = document.getElementById('message');
element.innerHTML = 'Hello from Dart';
}
</script>
(That example looks like JavaScript, but don't be fooled!)

Using Java/Python libraries in programming Firefox/Chrome Extensions

I have an idea of studying user behavior on the browser, for which I intend to make a Chrome/Firefox extension to study the behavior dynamically. I have some predefined libraries in Java and Python to analyze the results, which will be impossible to program in plain JavaScript.
Now for my question: is it possible to use third party libraries, especially those of Python or Java like plain function calls?
I have a vague idea about something like Java XPCOM or PyXPCOM for Firefox. However, for a beginner, it all looks so scary. I started making Add-On for Firefox, but got lost somewhere in the huge API.
I found Programming Chrome extensions easier than Firefox, but I couldn't come across something similar to XPCOM in Chrome.
How can I decide which one to go for?
Chrome - seems easy but I am not sure of its power.
Firefox - Seems powerful, but is it really possible to use any Java/Python Library?
Additionally, I came across this link that may be useful: How does someone use thirdparty libraries to be included in Firefox addons/extensions?
But seems like it mostly talks about C++ and XPCOM.
I have a vague idea about something like Java XPCOM or PyXPCOM for Firefox. But for a beginner, it all looks so scary.
I am not a beginner and JavaXPCOM/PyXPCOM are very scary (in addition to being barely maintained). As Firefox goes, it should be much easier to wrap your Java/Python library in an application and run it as an external process: https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIProcess. Note that you cannot get data back (other than an exit code) so the application should write it to a file that you can then read in your Firefox extension. Not very elegant but it has the advantage of being doable.
As to Chrome, its extensions run in a sandbox and using Java or Python isn't possible. Only option is adding an NPAPI plugin to your extension. It is binary code meaning that it could do anything.
When writing Chrome extensions, you're limited to JavaScript unless you choose to use an NPAPI plugin, which lets you do pretty much anything, but is not recommended.
The other approach you could take is to implement your Java or Python code on the server and make requests from the chrome extension's JavaScript.