As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I need to make a desktop application using CSS/HTML5/JavaScript. This application should work cross-platform (Linux/Mac/Windows) and will be distributed as a simple executable (not an installer), where the user simply opens it and can start using it right away. It also needs to work offline, on machines where internet is not accessible.
So I thought WebKit would be the perfect choice. In fact I went ahead, installed Xcode, and in little time I had an executable that opened a window and loaded some CSS/HTML/JavaScript.
However, my issue is that I don't have Linux/Windows machines. I can't afford buying a Windows copy and I don't want to go through the effort of having to install the OS and installing the Visual Studio or whatever thing, and trying to make an executable for those platforms as well.
I was wondering if there was a pre-built executable for each platform that comes with WebKit. So that all I have to do is change the icon of the application, the name and tell it where to get the html/css/javascript and it would make an executable for the platforms I need.
Is this possible? What are my best alternatives?
You can use node-webkit.
It uses webkit to render the webpage and execute the Javascript, and you will have access to all the Node.js javascript API (reading/writing files, …)
Update: Titanium Desktop is an open sourced project nowadays and named "TideSDK"
http://www.tidesdk.org/
You may try both of below. I have used Titanium Desktop: It is webkit based and also becoming an open source project.
http://www.appcelerator.com/products/titanium-desktop-application-development/
You can also use Embedded Chromium project, but this might require some knowledge on other then HTML/CSS/JS
http://code.google.com/p/chromiumembedded/
There is certainly some way to do this with Qt / QtWebkit / QWebview. But, it is certainly involved.
There is also a Gtk Webkit.
You would still need an installer, but you can look into Adobe Air. You can build apps that even leverage AS3 libraries as well as make them entirely with HTML5/CSS3 and your flavor of Javascript. Best of luck to you.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I want to develop an Android application with HTML5. Application has some basic UI with data which needs to be fetched from server.
I have only basic knowledge of the HTML5 and CSS; But I am new to JavaScript and JQuery.
Which is essential to learn, JavaScript or JQuery? Or I need to learn both?
Any sample code for mobile application screen and request/response will be really appreciated.
First of all you should decide which framework you want to use. The next step is to setup environment. Let's say you want to code with PhoneGap, than you need Eclipse and Android SDK, etc. The list of software you will find in a description.
Actually in my view it is not necessary to use jQuery or its mobile version for development. Sometimes you only need to create an up to 5-6 pages app with some basic animation which is easy to make with CSS3 Transition3D.
However, when you plan to create a big app with complicated business logic, than you may need to use some framework like Sencha or Angular (it depends on your needs).
Talking about frameworks you must understand that every framework is for certain purpose only. I mean, it is ridiculous to use, for instance, knockoutJS for big apps, because the only thing it has been developed for is data binding between model and view. Moreover, in many cases you don't need a framework at all.
Anyway, first of all you should to learn JavaScript basics. I mean how it works, in which steps a code is being processed, that is a function and what in a prototype and so on. Otherwise, you will never know how to write an effective code or how to optimize your code for better performance. It is critical for a mobile devices as they are not such powerful as a desktops. Also you need to understand how a browser works (rendering, network, etc).
That's my view.
You learn here javascript and jquery by simple way
You can build apps using html, css, javascript with phone gap
You can use cross mobile platform.Sencha touch is also one of the cross platform to start.
http://www.sencha.com/products/touch
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am new to Javascript frameworks and nodejs. Recently, I came across a requirement which made me think if I can use them.
Requirements:
--A lightweight website which can be run off a usb stick (kind of portable webapp) without a need to install a complete webserver on client machine.
--The website should be available to users on the local network. The webapp will be maily used for (a)capturing user responses to a questionnaire (b) showing graphs, data, reports (c) showing clickable diagrams
I want to build a very responsive, rich-client kind of webapp.
From whatever I searched on the Internet, I think I should use node.js (as webserver) + express.js (MVC framework) + Twitter Bootstrap (for building nice UI).
I am not sure, if my choices of frameworks/tools is correct, so want to know what experts recommend.
Thanks.
The only requirement is to download a portable version of node.js. For example, windows x64 v0.8.18. All the distributables are located here.
That's all. All your modules need to be installed locally.
I have just downloaded and compiled node.js to evaluate. Great tool, builds and runs nice also under Ubuntu and is also supported on Mac OS and Windows. Very interesting possibilities. Surely can be recommended.
To have it really cross platform, you can simply drop several nodejs executables for different platforms into NTFS formatted USB stick. Linux guys may need to tweak mounting permissions but they are used to.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want a unit-test framework for JavaScript which runs in the browser. Not with an external browser-automation system as in Selenium, or a non-browser JS environment, but just one .html which loads the test framework and test suite and displays the results in that page. My searches have found only the other two kinds.
I am primarily interested in testing JavaScript code for expected results and not crashing, not DOM/events or visual appearance.
Nice-to-haves:
Performance testing/benchmarking as well as correctness testing.
Optional external automation so a shell command can run the test suite and check if it succeeded.
The motivation for the requirements is:
My application under test is currently itself pure JavaScript, and I'd like to keep it that way (without platform or other-language dependencies).
I am using many newer or bleeding-edge features such as ECMAScript 5, Typed Arrays, WebGL, and Local Storage. I want to test the actual interaction with these facilities, not stubs.
jsunit or Jasmine
You can run Selenium in the browser only. Download Selenium Core 1.01. Upload the unzipped files to the domain you want to test. Open /core/TestRunner.html and start the browser only frontend of Selenium :)
I use this kind of test in several projects. It's perfect to have only one place to store and to run tests. You can trigger those these by cronjobs and capture the results as well. I extended it a lot and I save the results to a Database and take automatically screenshots with JS when errors occur.
If this kind of running Selenium is still supported in version > 2.0, I don't know. Here is a tiny documentation.
I recommend qunit. It's created by the jQuery team (and is used to test the jQuery framework) and it works in both the browser and node. It's really quick to set up tests, with just a single HTML file which has script tags with your tests, and it's well documented.
Besides those already mentioned (qunit & Jasmine) I recommend mocha.js, it adds a little bit more complexity but it's so much more flexible, you need to load the file, add a script tag with the configuration and start testing, the plus is you can use any assertion/expectation library you like if it throws exceptions if the test fails.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm currently develloping a Chrome Extension and i'm searching for more ergonomy by finding a good IDE who can manage javascript and also Chrome Extension API.
Thanks in advance.
Use Aptana Studio and add the following scripts to File references.
chrome_extensions.js
webkit_dom.js
Congratulations! You now have a very capable javascript editor with autocomplete support for chrome APIs
EDIT
You can have the same functionality in Visual Studio, which has (in my opinion) even better support for javascript. In fact I think it's the best javascript editor around (quiet an achievement for microsoft :))
Just add the following comment to your js files:
/// <reference path="MyExternalFile.js" />
And you get:
I got this to work on IntelliJ by using this API stub (to make the chrome object appear in auto completion)
https://github.com/linux-china/chrome_js_api_stub
In combination with the chrome extension.js
https://code.google.com/p/closure-compiler/source/browse/contrib/externs/chrome_extensions.js
I then added the stub chrome_js_api_stub library and the chrome extension library by following the below directions
http://www.jetbrains.com/idea/webhelp/configuring-javascript-libraries.html
It's not for everyone, but if by ergonomy you mean moving your hands around as little as possible, not reaching for the mouse, VIM is very much designed to keep your fingers on the keyboard and as close to the asdf/jkl; positions as much as possible. It's a pretty steep learning curve, but the payoff is extremely quick workflow.
With the right addons, it's a very decent javascript editor, with syntax highlighting (including jsdoc comments), code completion, jslint integration, etc
For Aptana Studio 3: (plugin for Eclipse tested)
Find a library you are interested in...Save it to your disk, and then drag it into your project. It does not matter where in the project it sits, so you can create a new folder for files like this if you like.
!! The project must be some type of web project: Web, PHP, Python, Ruby, Rails.
http://wiki.appcelerator.org/display/tis/Using+JavaScript+Libraries
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
What is the best windows environment to use while developing web application with heavy javascript coding? Does any tools other than VS have some kind of intellisense for javascript?
Look at cloud9ide, netbeans, vs2010, webstorm, Aptana, Eclipse.
I mean have your pick!
Cloud9IDE is a web based IDE thats run in a server. You just go to the website and develop, write and debug your code in the browser. Just login and write. But this is in closed beta and very young. It needs to mature
Netbeans is familiar for those who have used it for java. It's javascript support is good and compared to aptana, eclipse & vs2010 I prefer it.
WebStorm is a great IDE made for front-end developers. This like VS isn't free but it's significantly cheaper then VS. I would recommend WebStorm currently for having good features like intellisense, git integration and refactoring tools build in.
Of course you can always use VIM, Emacs or Notepad++ for your javascript.
'Best' is very much relative to the user. Personally, I've used Komodo Edit (if my memory serves me correctly has intellisense for JS), Eclipse (dunno about intellisense), Notepad++, Vi and finally Emacs.
Emacs is my editor of choice for everything. If you know your way around the commands, key binds and system commands well enough (if you're on Windows, you should install Cygwin and learn it imho), it's without a doubt the most effective dev environment available.
(No need to spark a religious emacs vs. vi debate here - I do like Vi too, just not as much ;))
Netbeans works as good as anything for me - but it's really down to personal taste! There's loads out there, give them a go and see what works best for you.
TextMate. Lightweight, performs very well, extremely configurable, lots and lots of nice built-in bundles.
I know you say 'other than VS,' but Visual Studio 2010 has really great javascript support. Have a look at these posts by Scott Gutherie on the subject:
http://weblogs.asp.net/scottgu/archive/2010/04/08/javascript-intellisense-improvements-with-vs-2010.aspx
http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx
The second post applies to improvements introduced in Visual Studio 2008, but it certainly holds true for the 2010 edition. If you are needing intellisence in your standalone script files I suggest you read this blog post on the subject. Do you find something lacking in Visual Studio's javascript support that has you searching for another solution?