Desktop like web apps and JS frameworks? - javascript

I am still learning javascript and the more i learn the more i ask myself why do i need to learn a js framework like cappuccino, sproutcore, qooxdoo, smartclient etc...? The learning curve for these frameworks is steep, also wouldn't it be better to just make use of JavaScript libraries?
Take note, that my objective is to create desktop like web apps. Thanks in advance for any good view points!

Desktop apps are built with frameworks that are of the same quality as those from SproutCore, Cappuccino, etc.
If you want to build desktop quality apps with true MVC architecture you can either write your own framework on top of a library, or start with a framework someone else has written. (SproutCore was originally built on top of jQuery for example)
The best part of a true framework is that the build tools can include only the pieces needed to run your app resulting in very small code with rapid load times.

Seeing as you are still learning Javascript, I would suggest that you continue to work with Javascript, and try out tools like jQuery, and then depending on the individual application you are working on, evaluate whether you need to use a more full featured desktop style Javascript framework at that time - something that will require a knowledge of jQuery/Prototype/etc to evaluate.

IMHO, those JS frameworks you mentioned are overrated bloatware.
I would wholeheartedly recommend that you learn JQuery instead.
It is a much more minimallistic and elegant framework.
Also, by the time IE 9 finally ships earlier next year, all the browsers
will be supporting most of the HTML5 standard, including offline storage and
websockets, making such complex frameworks completely unnecesary.

Related

Simple and popular javascript framework for chrome ext. development

I'm looking for a simple Javascript framework for my Chrome extension development.
I'm using jQuery and jQuery UI, but as my project grows, my orientation in the code is worse. So I need some kind of consistent MV* framework that is really simple&lightweight, popular (because of help and tutorials) and that could be used with jQuery and jQuery UI (or the framework could contain anything similar). Any ideas? Don't suggest me TodoMVC - I tried it and every implementation except jQuery is unnecessarily complex.
For structuring your javascript application, I suggest using Backbonejs. It's lightweight, and it even uses jQuery, so you should feel quite at home. Assuming you need richer widget than what is built into the browser, instead of using jQueryUI you may want to look into "Twitter Bootstrap", which is quite pleasant to work with, looks great and already supports responsive applications (which may or may not be necessary for your Chrome Extensions). I also believe it is a lot more lightweight than jQueryUI, but I really haven't looked into that in detail on my own. The same combo also works great for traditional web pages, web apps, single page applications and even works quite well on mobile devices.
You've tagged your question with Knockout.js - have you found any compelling reasons not to go with that? I've been using it extensively in conjunction with jQuery and jQuery UI, it plays nicely and has plenty of clean extension points. There is a big support community on here and elsewhere, and the documentation is excellent. I'd highly recommend it.
Backbone is the winner. I found the best resources.

UI technologies for Java EE applications

I need some guidance from the experts.
Till now I have worked on Java and Java EE stuff along with Unix scripting etc. But everything was on the backend side. So I never actually touched the UI code much other than occasional cosmetic changes.
But now I have got one project where we need to work on the frontend part as well.
As I learnt from my colleagues, we need to know CSS, Html, Javascript, XSLT/XPath etc to make a good user friendly UI.
So could you kindly guide as to where to start. I feel that there are lot of things put together.
I tried to read up these things separately e.g. CSS thru W3C , Javascript thru W3C and I understood them but when it comes putting all of these together I am faltering. Require your suggestions to overcome this
I guess you are mostly interested in web applications development. In any case, it's good to know CSS (mainly CSS3) and HTML (preferably HTML 5) as well as a javascript library such as jQuery. Regarding the web frameworks to start with. Here are some choices. You may look around to see their pros and cons. So, here they are some of these:
JSF 2.0 is a brilliant framework following the Model View Controller pattern, that can be combined with an off the shelf javascript component library for JSF such as richfaces, primefaces, icefaces to give you a Rich Internet Application experience.
Groovy on Grails is also an excellent framework enabling you to write also in Groovy, starting usually from the domain layer and creating automatically a scaffold to work with - Similarly, Ruby on Rails offers the possibility to work with Ruby.
Spring MVC is also a great and popular framework to work with.
Django Python is a popular framework for writing in python, "Play!" framework to work with scala and many more.
So, choose the flavor you prefer and try delving into its details. Hope I have helped you.
If you are using Java EE, there's already a good UI framework available in that stack called JSF.
A good text to get started with it is JSF 2.0 tutorial with Eclipse and Glassfish

Designing a website in Flash or Javascript?

So I have this project I'm working on and I'm trying to build the website part of my project. I have experience with Flash AS3, but not so much or none with JavaScript. My co-workers are telling me that they are almost the same and you can just build the site in JavaScript. But people can have JavaScript turned off, and not everyone uses Flash.
I'm having difficulty knowing what to use to build my website...by the way, this website is generally an application. It's going to have a menu with features and stuff. I figured I can probably do HTML and PHP, but there's some features I need that will be dynamic. I really want this site to be available to as many people as possible.
The only reason (again) why I would use flash is because I've used it before and it's easy to design with animations and junk.
I could use some advice.
This is my personal opinion, but if you can meet the needs of your application with HTML and Javascript, you will probably be much better off. Your application will not require Flash, will likely load faster, will work better on mobile devices and will work on iDevices which do not support Flash at all.
That said, there are some challenges to building some types of applications in HTML and Javascript, particularly if you need to work across a wide range of browsers. Using a popular library like jQuery or YUI can help with a lot of that cross browser compatibility, but some capabilities are only available in the more modern browsers.
On the opposite end of things, some things can be done better in Flash than in HTML (particularly in old browsers).
So ... the answer is that, it depends on the needs of your application. If it were me, I'd build it in HTML and Javascript unless I found a reason that I couldn't make a successful application that way.
As for computers with Javascript off, it's my opinion that those computers are not doing modern things on the web anyway and would not likely be customers of anything I'd build on the web. Google has dropped support for computers without javascript and some old browsers from some of their apps because the cost of development for those cases is way higher than the benefit from the few customers you might gain by it. Whether that logic applies to your application obviously depends upon what you're doing and who it would appeal to.
If you looking to use javascript, there is jquery which is very easy to use and very rich in functioanlity. There is also extjs which is also easy and functionality rich but its not free for commercial use.
If you are new to javascript and already know java, you can use Google web toolkit where you write the code in java and the toolkit compiles that into a javascript. But this depends on how much server functionality you have.
IF the website is a simple one, you can probably use jquery, html and css.
If its a commercial project I would use Flash because You're good at it and You will build the app faster.
If You want to take a fascinating journey with the most popular language and develop Your skills then use javascript.
Flash and javascript are both very popular. For both methods You can use a fallback if the technology is not available.
If You decide to use javascript consider using backbone.js. It's a great MVC library.

Starting out with rails. Suggestions for SDKs plug-ins etc?

I have 6 years of C# programming experience and I'm looking to broaden my horizons. I'm going to build a simple web app to demonstrate knowledge of Ruby on Rails so I can get my foot in a place that might want a Rails programmer. It's the hot new thing, so I want to be marketable.
Anyway, I have been playing around with solr and tomcat and I want to use solr as a search engine for a products database. This means that I will be using some java (tomcat and solr) and for the web app I will be using MSSQL because I'm using Windows. A friend suggested that I look into jRuby because if I'm going to be working with tomcat, it makes sense to put it all on one webserver. I want to use Eclipse as my editor. I hear that rails programmers typically use prototype as their java selector tool but I really like jQuery (or even mootools). I have also heard that jRails is something that ties jQuery to my ruby application.
Given that I use tomcat in conjunction with jRuby using Eclipse as the IDE, what would you suggest I use for handling javascript/ajax and what are some useful plug-ins, software, or tips you have for me that can help me get started on the right foot with ruby on rails?
I would stick with jQuery for your JS/ajax. My perception is that the RJS/Prototype is falling out of favor to jQuery but that could be just me. Where jRails would fit in is if you want to use RJS to generate JavaScript from Ruby code. My personal preference is to keep all of my JavaScript in application.js and keep it unobtrusive.
Some plugins I like are Authlogic, Nifty Generators, Paperclip, ssl_requirement, subdomain-fu, and QueryTrace.
A couple good resources for starting out are Rails Guides and Railscasts. I think it's a good idea to learn the language itself before learning the framework, but I'm sure it's possible to develop a simple Rails application with minimal Ruby knowledge.
As for your application stack, I would recommend reconsidering deploying a Rails app to Windows. Even developing a Rails app on Windows will likely be painful. If you can, I'd get a VM (or old machine) running with Ubuntu and use MySQL. If you're looking for a full text search on Rails you could use Thinking Sphinx - here's a Railscast if you're interested. I'd also give a gentle nudge into trying a Text Editor instead a full blown IDE - I like TextMate on OS X and gedit on Linux.
I also had a Microsoft background when I decided to learn Rails. There was a lot for me to take in - Not having the framework pretend the web is stateful (asp.net), learning a new language, learning a new framework, getting stronger css/html/javascript skills, new OSes (OS X and Linux for me), learning new databases. Overall I'm very happy I did. I'm a better developer for it.
If you want to be marketable, I'd start with learning the lowest common denominator, the default Rails stack, to get broad appeal. Then maybe consider acquiring some more niche skills to raise your value to a subset of potential clients/employers.
That pretty much means targeting MRI 1.8.6/7, Rails 2.3.4 (consider learning at least HAML and rspec in addition to erb and test/unit) and MySQL in an Apache *nix world.
I wouldn't recommend learning much about deploying to a Windows stack - the target for servers is overwhelmingly Linux or perhaps some other *nix flavour. For development web server purposes, Mongrel works fine on Windows.
Build on Windows by all means - I do, without too much pain - but be aware that the visible part of the Ruby/Rails community (the people who mostly develop the libraries and frameworks and most of those who write about it online) are predominantly OSX or Linux users, so there's often a delay in the trickle-down to Windows users, especially where OS interaction is called for or where there are compiled elements to libraries. Also, I'm reliably informed that Rails startup is much slower on Windows. I don't want to confirm it personally - I might get upset.
MSSQL works fine with Rails, but I'd be cautious about using any platform-specific features for reasons mentioned above: you're unlikely to find a site that will be happy to deploy to a mixed Win-*nix environment. The MSSQL ActiveRecord code may also not be quite as hardened as MySQL or SQLite - the one bug I ever found in any version of any Rails-related code was in there. That said, if you don't use any MS-specific features you'll find porting easy. But then if you don't use any extra stuff, why not skip it completely? There are enough differences (the query "optimizer" in MySQL for one takes some getting used to) that you're probably better off learning the platform you're most likely to be targeting.
As for Eclipse, it's obviously a mature development environment but I'm not sure how good the Rails plugins are (and as a hostage to Lotus Notes I'm allergic to using Eclipse any more than absolutely necessary). If you can't live without an IDE (and I'd recommend that you try - you'll learn more) then there are several SO questions that cover the alternatives.
Using Solr in your project doesn't require that you have a Java stack for running the actual Rails app. There are quite a few Ruby libraries out there that would help you easily interface with the Solr backend. A few to look at:
solr-ruby – This is the official client library included with the Solr distribution. It's lower-level than some of the other alternatives, but gives you some good flexibility in accomplishing what you need to.
rsolr – Another lower-level library that looks like a replacement to solr-ruby. At first glance it appears to be more frequently updated.
sunspot – I have not used this, but it looks like it's currently the most popular Solr => Ruby object mapping library. The acts_as_solr library was once an option, but I think that it has since fallen out of favor.
I agree with the other posters that you would want to target a C Ruby / *NIX environment, but if using Tomcat/JRuby helps you learn this faster, go for it.

GWT or DOJO or something else?

I come from the Microsoft world (and I come in peace). I want to rapidly prototype a web app and if it works out, take it live - and I don't want to use ASP.Net.
I am not sure which web application toolkit to use though. Should I use GWT, DOJO...other recommendations? I am open to any server-side language but am looking at RoR, Php or even Java (J2EE to be precise). I am not much of a Javascript/CSS guy so a toolkit that might make it relatively easy on me on those fronts would be preferable.
Also, I am a mac user at home. What IDEs go along with the framework you would recommend?
Any recommendations guys?
If you're open to doing Java, GWT is the way to go. It allows you to have a relatively uniform codebase across client-server, and to only use one language on both.
There are some limitations to doing very off-the-beaten-path AJAXy things (which GWT makes difficult, but not impossible), but it doesn't sound like that's your use case anyway.
GWT will allow you to scale up by using more of its features as your app gets more complex - and your prototype won't be throwaway code.
If you want to write the front and back end in JAVA, and want to do complex ajax type thing, then GWT is a great way to go.
The easiest way to think about it is that building a GWT app is kind of like building a JAVA swing application that hooks into a server. Just like a swing app that uses a server you can make it fat or thin. When you're done it all compiles down into HTML and javascript, and has very good modern browser support (ie6+ ff, opera, safari).
It does abstract all the javascript and HTML away, but if you want it to look good you'll still need to understand CSS.
I think anyone who says that that it ruins MVC or that it's a muddying of client vs server doesn't understand GWT. GWT is a CLIENT side framework. And it is only used on the CLIENT. GWT does provide an RPC mechanism to hook it into JAVA (and other) back ends, but that's just a communication protocol, it doesn't mean that your server code magically becomes your client code. Sure you can write a whole bunch of business rules into your UI if you really wanted to, but you can do this with any framework, so it would be silly to say that GWT is somehow different in that respect.
GWT is a good choice, while if you choose more powerful JavaScript framework based on GWT (e.g. SmartGWT), the compiled stuff is too heavyweight.
Choose direct JavaScript if you need a compact project.
I am a fan of GWT, however I am very familiar with Java. I found it to be intuitive, and surprisingly easy to get good results quickly. If you are to use GWT, then you'll definitely want to use the free, and immensely powerful Eclipse IDE.
One disadvantage of GWT is that it requires Javascript to be supported by the browser, there is no "graceful degradation".
We have evaluate a large list of frameworks and have decide us for Echo2.
You need only to code in Java. Javascript you need only if you want write your own components.
There are no startup performance problems with large projects like GWT.
You can use the full range of Java in your client code because it run on the server. In GWT you can use only very small set of Java classes.
The IDE for Java is Eclipse. This is independent of the used framework.
I'm a fan of jQuery, the chainability of actions, traversals, and commands is really powerful. A good friend of mine is crazy about Mootools, he works at a Java shop FWIW. He mentioned a cool feature of Mootools is that you can specify the functionality you want the framework to include and it will generate the entire library on a single line in a file that you can include on your page to minimize the weight of the framework (pretty cool feature). Really it just depends on what you are most comfortable with. jQuery has great tutorials, is super fast, and can be used along with other javascript frameworks.
Not related to GWT, but have you considered other backends that GWT could work nicely with?
Grails is one backend that ties quite nicely with GWT.
Personally, I would avoid server-side frameworks that try to embed or hide the client-side framework. I'm sure that GWT is great for getting something going quickly, and is probably fine for certain kinds of applications, but you'll probably run into lots of problems "on the edges" for more complex applications. Decoupling the client framework from the server-side framework avoids those problems.

Categories

Resources