LebGeeks

A community for technology geeks in Lebanon.

You are not logged in.

#1 December 19 2011

Polyv
Member

Javascript frameworks & HTML5 ? Please share your experience.

Hello,

I'm working on developing a cross-platform HTML5 application that focuses mostly on the canvas object. I'm thinking that it will probably be 2 applications: one that handles touch (multitouch mainly) input and one that handles mouse and keyboard input having minimal differences between them. I've been doing some research for the past couple of days to find a javascript framework that will help me out in optimizing my code and making it cross-platform. So my assumptions or what I think I need is the following :

-I want a framework that allows a fully object oriented way of doing things ( Based on my research, Mootools seems like a good option)

-I want a framework that facilitates animations and the works ( I will probably go with jQuery, and install a plugin for multitouch support )

So for now I think I'm going to use both Mootools and jQuery in conjunction. Mootools will be the framework and jQuery more of a toolbox to speed things up.

What do you think ? What do you use ? Why ?
Also do you use an IDE ? If yes, which one ?

Thank you for your input and thanks for taking the time to read this !

Offline

#2 December 19 2011

Joe
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

A year ago, I would'v said that Mootools + jQuery is the perfect fit. Today I'll strongly recommend looking into "node.js".

As for the IDE, a simple text editor (like Vim) would be enough.

Obviously ... you also could use Firebug.

Offline

#3 December 19 2011

Kassem
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

My friend at work has been telling me about an MVVM Javascript framework called Backbone. Unfortunately, I haven't had the chance to give it a test drive yet, but from what I've heard from him, it's completely object oriented and very powerful. The only downside he mentioned is that it's kinda too complicated when you're just getting started using it.

As for the IDE, Visual Studio 2010 is the best you can find. It has full support for jQuery intellisense.

Offline

#4 December 19 2011

Polyv
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

Thanks for the replies !
Also, rahmu, after reading about it, I think node.js is exactly what I was looking for :)

Offline

#5 December 19 2011

Joe
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

Any time! Glad I could help ^^

Since you're a new member here, don't hesitate to present yourself in the New Member section. And be sure to tell us how your experience with node goes.

Offline

#6 December 19 2011

rolf
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

rahmu wrote:

A year ago, I would'v said that Mootools + jQuery is the perfect fit. Today I'll strongly recommend looking into "node.js".

As for the IDE, a simple text editor (like Vim) would be enough.

Obviously ... you also could use Firebug.

I don't get it. Mootools and jQuery are client libraries. node.js is a server side technology.

Offline

#7 December 19 2011

saeidw
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

I just want to note that, while awesome, node.js is very well suited for backend code. I don't know if it would be useful when developing a user interface. I don't have much experience with it so I could be wrong.

The Dojo toolkit is another all-in-one framework. It seems to be cross-platform and does UI well. However, I bet it there's a large learning curve associated with it as well.

You might want to look at mustache for templating. It could be useful, and I don't think it gets in the way much. ICanHaz.js builds on mustache and jQuery but it might be overkill, depending on your needs.

@Kassem: Check out knockout.js. It lets you do MVVM in JavaScript. There's an online tutorial/demo and it seems to work really well.

There's definitely some more cool stuff out there, we're in the middle of a JavaScript Renaissance or something. Tread carefully!

Offline

#8 December 20 2011

samer
Admin

Re: Javascript frameworks & HTML5 ? Please share your experience.

Note that JavaScript itself is a prototype based language and has OO capabilities, there is no need for a framework. Occam's razor should come in handy here, choose the hypothesis with the least number of new assumptions. Throwing frameworks at your problem is a recipe for disaster.

I think going the Backbone.js (or any other MVC framework) way is a bit overkill unless you're building a decently heavy web application and want your front-end code structured. They have a steep learning curve and add overhead to your development.

jQuery is the standard library to use for client side interactions, use it only when vanilla JavaScript is too much of a headache.

Offline

#9 December 20 2011

jsaade
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

samer wrote:

Note that JavaScript itself is a prototype based language and has OO capabilities, there is no need for a framework. Occam's razor should come in handy here, choose the hypothesis with the least number of new assumptions. Throwing frameworks at your problem is a recipe for disaster.

I think going the Backbone.js (or any other MVC framework) way is a bit overkill unless you're building a decently heavy web application and want your front-end code structured. They have a steep learning curve and add overhead to your development.

jQuery is the standard library to use for client side interactions, use it only when vanilla JavaScript is too much of a headache.

on the other hand, do not re-invent the wheel with every project.
with jQuery you are tied to the DOM in order to actually store the model object unless you re-write something
that will end up looking like backbone.
backbone.js is the answer to that and the learning curve is not really that much, just check the homepage and you will understand it.

Polyv what you are looking for is the combination of backbone.js, underscore.js, jquery and handlebars.

Last edited by ZeRaW (December 20 2011)

Offline

#10 December 20 2011

Polyv
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

Though Node.js may not help with the interface design, having it on the server side with socket.io on the client side is definitely something that's going to make my life much easier ( I was planning on using one of the available socket servers like electroserver and unionplatform and writing a java plugin on them to get what I wanted ). So my server side needs are met. Remains the question of the client-side. I would normally agree with you samer hands-down. But I'm going for a cross-platform application so a MVC architecture would help me a lot, and would surely be more appreciated by the designer I'm working with. Also, the application is pretty heavy and having it well structured is worth the overhead in this case.

What I've decided to do, after reading all of your extremely helpful posts, is  the following: Use Node.js on the server-side, and on the client-side : Socket.io, jQuery, Backbone.js, underscore.js and handlebars.

Thanks for your suggestions, glad I joined this community :)

Offline

#11 December 20 2011

rolf
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

This is a great thread full of info :)
With the limitation of CSS, the power of HTML5, increased power of browsers and client-side JavaScript, and shift towards rich browser apps, JavaScript frameworks have a bright future.

Offline

#12 December 20 2011

jsaade
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

Kassem wrote:

My friend at work has been telling me about an MVVM Javascript framework called Backbone. Unfortunately, I haven't had the chance to give it a test drive yet, but from what I've heard from him, it's completely object oriented and very powerful. The only downside he mentioned is that it's kinda too complicated when you're just getting started using it.

As for the IDE, Visual Studio 2010 is the best you can find. It has full support for jQuery intellisense.

VS2010 as an IDE for client side?
it is not a good choice if you are not actually using .net technologies (well cost wise at least).
I use notepad++

Offline

#13 December 20 2011

Joe
Member

Re: Javascript frameworks & HTML5 ? Please share your experience.

I don't mean to start any futile controversy, and clearly I'm no javascript guru (a "ninjavascript" ... ). But here's my point of view after briefly playing with node.

Saying node is a "backend" technology as opposed to "frontend" is an extremely limited view. Why is the tech world so hyped about Node? Simply because we found yet another backed framework to imitate RoR? I don't think so.

Exporting the javascript outside the browser is not an innoncent feat. The true underlying power is that it effectively blurs the limit between backend and frontend.

If I can create a JS object in one application (the server - backend), serialize it over the network and have another JS app (the browser - fronted) unserialize it and read it, in a completely asychronous way. We're talking about potentially seamless real-time interaction in your browser.

Java had a similar approach in the 90s, focusing on Java applets in the browser and the whole Entreprise stack in the back.

Of course, all this is theoretical, and I haven't played with Node enough to know the exact limits. But still, Javascript has transcended the browser, so the distinction between front and end will definitely be thiner.

Offline

#14 December 20 2011

xterm
Moderator

Re: Javascript frameworks & HTML5 ? Please share your experience.

Off-Topic response to rahmu

rahmu wrote:

If I can create a JS object in one application (the server - backend), serialize it over the network and have another JS app (the browser - fronted) unserialize it and read it, in a completely asychronous way. We're talking about potentially seamless real-time interaction in your browser.

That kind of seamless interaction exists already everywhere. The better example is GWT RPC. Although i understand what you mean.

Clearly Node is more than just "Javascript on the server", granted Sybase iAS had this for well over 8 years, they  used it as a means of serializing their famous DataWindow control across the wire. Node's power is its hook to the operating system and the concurrency model. But as long as the entire web stack is split into two, there will always be front-end technology and back-end technology.

Edit: Lift framework does a pretty darn good job at seamless integration between the server and the client as well, and what's better is that it uses comet extensively. It's almost like JSF on steroids.

Last edited by xterm (December 20 2011)

Offline

Board footer