English 中文(简体)
Which web application framework? [closed]
原标题:
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

From the following list of frameworks, which one would you use to develop a rich web application and why would you choose it over the others?

Sproutcore GWT ExtJS GXT SmartGWT Dojo / Dijit Flex Capuccino Grails

最佳回答

These are based on my personal experiences using the frameworks you have mentioned. So yes, it is a bit biased. So as others have said over and over again, define your requirements and which one do you think fits your requirement based on what people have suggested here.

  • GWT is too verbose eventhough I found many Java developers love GWT because you can unit test it and it s all in Java. But I personally don t like it because it is far from being simple. There are times when I feel I can tweak a little bit with Javascript, but with GWT I am enforced to do it with several lines of Java code.
  • GXT is too far from GWT these days and you will find it difficult to do things as GXT has its own way of doing things which is way too different from GWT. When complex requirement come up, in the end you are going to go back doing plain GWT. And oh, their technical support is not that good either as I had several bad experiences when asking few questions to them.
  • Ext-JS is good for simple stuff and the look and feel is really slick. But when things gets more complex, you are going to fight you re way through. Eventhough I have dealt with the GXT tech support, I haven t dealt with the ExtJS tech support since they have different people eventhough it s in one company, so I can t say much.
  • Flex is nice, really nice. But again it is good for simple stuff. Once things gets more complicated you are going to write lots of actionscript, which is less enjoyable. There are many things that is available out of the box which may be to difficult if you have to code it in Javascript, like multimedia support. And oh, if you are writing for a public website you must consider that not too many user has flash plugin on their browser.
  • Grails, I m not sure how you would implement RIA apps with Grails since Grails is just another MVC framework which you need to add your own RIA framework on top of it such as the ones that you have mentioned.
问题回答

I m personally tired of browser inconsistencies. If someone else has solved the problem, I d rather not do it again. That s why I m getting more interested in front ends like cappuccino and qooxdoo. They are a zero-HTML zero-CSS solution.

This is strictly a matter of opinion. You will not get any definitive answers from anyone, since anyone that answers will have one or another that they personally prefer.

Try each one for long enough to decide which one is best for your (or your team s) purposes.

That being said, I prefer GWT. Others will invariably disagree with me.

Reasons that I like GWT:

  • You can share (some) client- and server-side code (as long as your server is written in Java)
  • GWT makes a lot of advanced performance features really easy (e.g., deferred JS loading, image spriting, CSS obfuscation)
  • A focus on one-page apps, with third-party support for Places (using the gwt-presenter library)
  • It s just as easy to add GWT to an existing web page as it is to create a full one-page GWT app
  • UiBinder allows you to write your UI using a declarative HTML-like syntax; you re not stuck writing Swing-like UI if you don t want to
  • Browser incompatibilities are (mostly) taken care of by GWT -- you just write Java code, and GWT compiles it to work on every browser

Things that may make GWT not right for you:

  • If your server is already written in something besides Java, you will still be able to write your UI in GWT, but you ll lose out on some nice features
  • Compilation time using GWT is a non-trivial cost -- Development Mode mitigates this a lot, but it s still an issue sometimes
  • As others have mentioned, GWT can be considered "verbose" compared to simple JavaScript libraries like jQuery or ExtJS

Ext GWT has worked well for my project. The premium support has been good.

However the project is for internal use which has allowed deployment to be restricted to one browser on one OS, and no effort has been made to change the default appearance or behaviour of Ext GWT.

Developing entirely within Java is a key benefit as it helps to keep the project manageable as features are added.

I am currently working on a grail/flex hybrid app that is working a lot better than I expected. I have looked at GWT but there were not a lot of books about it at the time and it seemed to stress the leveraging of Swing-like programming techniques which I have never liked. I agree with the comment about trying them all out. Run hello app they all have and measure how hard or easy it is to modify. Also tool (IDEs, Maven, CI...etc) support can be a big factor as well in terms of being immediately productive.

We are using Grails+ExtJS here. Since we try to make an idiomatic ExtJS application, Grails is not fully utilized, though it still makes sense to use Grails instead of, say, JSP, for the server-side part.

Why ExtJS: Because it s a very rich toolkit for GUI-like web applications. Our job is to replace an old Motif GUI, so this is exactly what we need.

Why Grails: Because it gets the job done easily and quickly. For the communication with the ExtJS part, we need a lot of JSON, and in Grails it s like that:

import foo.bar.FooBar
class FooBarController {
    def viewFooBars = {
        def list = FooBar.getList(session.userId, params.foo, params.bar)

        def result = [resultset: list] as JSON

        response.setHeader( Content-disposition ,  filename="json" )
        response.contentType = "text/json";
        render result
    }
}

And that s even two or three lines more than necessary...

Unfortunately the answer will be opinionated, GWT in it s purest form is not an eye-candy. That being said, ExtJs GXT is super hunky dory. One of the major issues I face with evolving frameworks is that they are not absolutely defect free, If I remember correctly, GWT 2.0 was shipped out with missing CSS styles for some of the new layouts. I am trying to trouble shoot an issue in ExtJs/GXT since last 5 days :(, frameworks obfuscate a lot of things. I will go with any framework that is absolutely robust and gives appropriate error messages. I haven t worked with others though.

I d recommend Dojo.

In addition to the massive infrastructure it provides, Dojo 1.6 is also the first (and only) popular JavaScript Library that can be successfully used with the Closure Compiler s Advanced mode, with all the size, performance and obfuscation benefits attached to it -- other than Google s own Closure Library, that is.

http://dojo-toolkit.33424.n3.nabble.com/file/n2636749/Using_the_Dojo_Toolkit_with_the_Closure_Compiler.pdf?by-user=t

In other words, a program using Dojo can be 100% obfuscated -- even the library itself.

Compiled code has exactly the same behavior as plain-text code, except that it is much smaller (average 25% over minifiers), runs much faster (especially on mobile devices), and almost impossible to reverse-engineer, even after passing through a beautifier, because the entire code base (including the library) is obfuscated.

Code that is only "minified" (e.g. YUI compressor, Uglify) can be easily reverse-engineered after passing through a beautifier.

ExtJs is great for creating complex web applications. The API provides anything you can imagine in a webapp and its really easy to extend any component after some time.

You can plug it to any backend (we use django or php) and reuse or extend any component in several different applications.

You ll need severals months to feel comfortable with it. IMHO.

That said, the lib is sometimes a bit too slow for simples uis like a website (then you can use ExtCore). But when it comes to webapps this is not an issue.

Im not a java guy so GWT was not an option for me :/

hope this helps





相关问题
grails + gwt request handling via controllers

I am new to gwt. I am trying to integrate gwt+grails.Can anybody provide me a good example for handling the request using grails controllers and not a custom servlet.I will be really thankful if ...

Error loading the grails gwt module xml

I ve installed the plugin from this article by Peter http://www.cacoethes.co.uk/blog/groovyandgrails/the-command-pattern-w.... While compile time its not able to find the module file which is present ...

Sorting Objects Based on Custom Domain Class Methods

I have a domain class, in which I ve defined some methods which give the object a score based on different algorithms (eg. popularity). I now want to retrieve a list of these objects sorted by one of ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

Hibernate/GORM: collection was not processed by flush()

I have an integration test in my Grails application that fails when I try to save an entity of type Member invitingMember.save(flush: true) This raises the following exception org.hibernate....

热门标签