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 11 years ago.
I am learning HTML5. I see almost everything is linked to JS. Why is it so much JS focused than HTML/XHTML?
It's not per se. Javascript is just a very common thing in quality UI's these days. Designers and developers demand interaction on their interfaces that can in many cases only be accomplished via client-side interaction, which is what javascript gives you. Because HTML 5 is cutting edge, it's logical that quality UI guys with expertise in javascript would be flexing their muscle.
HTML5 is responding to many things such as video and tweening that used to require plugins like Flash and Javascript to accomplish. This will allow us to provide these "advanced" features more natively, improving usablity. You'll already see this in examples like YouTube's html5 video delivery, which is compatible with mobile browsers that don't support Flash.
Here's my quick short answer.
Javascript is handled client side and can enable asynchronous requests. This makes pages much faster and allows for animations and content changes without reloads.
My take on this: HTML5 will try to standardize the concept of Web applications. You can pretty much think of HTML5 as the mark-up that defines the user interface while Javascript is the language that allows you to do the application logic (ie. Ajax, User control callbacks).
If you've ever used the Android SDK, the iOS SDK, or Microsoft's WPF, you'll notice that the user interface is defined through XML constructs like input, buttons, etc. While you used, Java, Objective C, or C# to do all the programming logic. Now, HTML 5 and Javascript are being advanced towards the same paradigm.
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.
Is it neccessary to learn Adobe Flash to program browser games? And does it cost money to use and program in Flash? Another question I have and it's about Python and pygame. Can I program a game in Python and pygame that runs in a browser? Or is JavaScript the best and easiest way to go from a programmers and users stand point?
1) No, and I believe it costs money(not sure).
2) Read this
3) Use what you like to use, whether that be python or javascript. Also, if you choose javascript just use html 5 and javascript with a html5 canvas.
You can code games any of those way, I haven't used flash so I couldn't give you advice, but I believe that it is much easier and productive to just go with what you know, but if you haven't been hacking in python or javascript for years I would learn javascript, but it is somewhat of a personal prefrence, but it is much easier in javascript IMHO. It took me and a few friends multiple months just to get a 2d game map wasd controls, but took us less time in java to make a 3d physics engine. Also, going forward less tablets and the other emerging markets are not going to support Flash, besides it being what you know.
There are several options you may use.
Java, can be embedded in browsers using applets, and are used in many browser games.
There is a Unity game engine that is cross platform, but needs Unity Player for web platform. As you mentioned Flash has the same approach.
The only advantage of flash is that more than 95 percent of desktop devices have flash support, in the pre-HTML5 era of the web, we needed some dynamism. But if you go for flash, you will miss the mobile market.
IF you want your game to be truly cross-browser, JavaScript is the way to go. Performance was the main question in mind but, modern browsers are always trying to excel at Javascript performance. For example, Mozilla guys recently imported Unreal3 Game engine to Firefox, using their shiny technology "Emscripten". See demo here Mozilla And Epic Games Bring Unreal Engine 3 To The Web, No Plugin Needed.
So my final answer is JavaScript. Use JavaScript and you will be happy.
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 am interested in making a realtime collaborative drawing system similar to http://flockdraw.com/ . However I would like to only use open source tools (flockdraw uses flash and also limits the number of users) and also I will host it myself.
I have been considering writing the whole thing in Java. However I realize I am not up to date with recent advances in programming languages/libraries. What would be a good programming language/library combination to do this task?
Update. This question/answer looks very relevant.
See:
Realtime HTML5 Canvas Drawing with WebSockets, Node.JS & Socket.io - all open source
draw similar technologies to the above
node.js drawing game tutorial
The basic principles for this is generally pretty easy. Just communicate the shape that has been drawn to the other users - as you suggest. With that in mind there are a number of open source realtime web technologies that you could use.
I've seen apps like that using HTML5.
Take a look at this app. I think it can help you get started.
This kind of apps usually take advantage of HTML5 Canvas and probably HTML5 WebSockets. There are lots of libraries and tutorials out there.
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 want to learn JavaScript. For this recently I had purchased a book named “JavaScript The Good Parts” from OReilly’s. Though this book is pretty old, but I got some good feedback about this book. I want to learn to write plain JavaScript code from scratch and then move to jquery. Is there any suggestion with this vision?
I have another question, just for curiosity --- is it possible to use JavaScript or jquery for developing desktop application inside?
If you search on Google then there are so many tutorial sites like
For JavaScript
http://www.w3schools.com/js/default.asp
http://www.echoecho.com/javascript.htm
http://www.tizag.com/javascriptT/
http://www.tutorialspoint.com/javascript/index.htm
http://www.quackit.com/javascript/tutorial/
For jQuery
http://www.w3schools.com/jquery/default.asp
http://docs.jquery.com/Tutorials
And there are lots of tutorials and PDFs for these, but you can start from the above urls
Or refer answer from here https://stackoverflow.com/tags/javascript/info
JavaScript The Good Parts is a great book for Javascript, I wouldn't recommend it for learning the language. You should come back to it once you understood the concepts of the language.
As #PitaJ already mentioned in the comments you should take a look at the learning section here: https://stackoverflow.com/tags/javascript/info
And yes, it is possible to develop desktop applications. However you will need software that allows you to do that. i.e.: http://appjs.org/ or http://www.tidesdk.org/
Speaking from a quality point of view, software developed like this will probably never reach the level of natively build applications.
You might also find the node.js project interesting.
EDIT: Windows 8 also allows you to build desktop Javascript application. MSDN Javascript Apps for Windows
Try:
1. http://www.w3schools.com/js/default.asp - w3schools' javascript tutorial
2. http://www.w3schools.com/jquery/default.asp - w3schools' jquery tutorial
These will give a idea of both javascript and jquery.
Once you are familiar with jquery, you can also visit: http:// api.jquery.com/
This is the official jquery api "blog".
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 11 years ago.
I'm wanting to create a web app where people can collaborate with a specified image.
For example, if you take a look at this basketball app
https://market.android.com/details?id=com.canica.apps.basket&hl=en
I'm envisioning something similar where people can log in, draw plays etc,
I want updates to happen in real time, so that other people logged in as a team see what others are 'drawing'.
I was thinking of extending a html canvas drawing app and adding network communication, but I'm not sure where to start looking.
My question is - What technologies should I be looking at for pushing the data out to the users?
Does anyone have suggestions?
You've almost answered your own question, especially with your use of HTML5 and JavaScript tag.
You should take a look at WebSockets (what, what and why).
WebSockets allow for bi-directional communication between any client and server. Originally only available in web browsers via JavaScript but there are now a number of WebSocket client libraries available which mean that whilst you can develop with browsers in mind there's no reason why you client can't be any device.
A quick search came up with this example. There is also this iPad/iPhone application.
There also appears to be a video tutorial that uses node.js and socket.io here:
http://wesbos.com/html5-canvas-websockets-nodejs/
If you don't want to worry about installing and maintaining your own realtime infrastructure that also deals with fallback techniques for older web browsers then you might consider using a hosted realtime web service.
XMPP might be something to look into. A great book about interacting with XMPP servers from the browser is Professional XMPP Programming With JavaScript and jQuery.
It's a pretty soft introduction and I think there might even be a chapter in there that covers implementing something similar.