GWT in Action 216
Michael J. Ross writes "Server-side computer languages, such as Java, possess numerous advantages over their client-side counterparts — including more robust integrated development environments (IDEs). In contrast, Web-focused languages, such as JavaScript, benefit from the global accessibility of the Internet. Bridging this gap, and leveraging the strengths of both sides, has long been an objective of the software development community — though not all attempts have been successful, e.g., Java applets. The Google Web Toolkit (GWT) is the latest attempt, and shows considerable promise, as illustrated in a new book intended to help programmers learn this new technology: GWT in Action." Read on for the rest of Michael's review
Written by Robert Hanson and Adam Tacy, this book was published by Manning Publications on 5 June 2007, under the ISBNs 1933988231 and 978-1933988238. For any prospective reader who would like to learn more about the book, they can first try the book's Web page, where they will find online versions of the "about this book" section, table of contents, preface, and index. The publisher offers two freely downloadable chapters, "Creating the Default Application" and "Communicating with GWT-RPC," in PDF format. In addition, there is a link to purchase the book's electronic version, and a link to the author's forum, where readers can post questions about the book or GWT, and likely receive a response — perhaps even by one of the authors.
GWT in Action | |
author | Robert Hanson and Adam Tacy |
pages | 600 |
publisher | Manning Publications |
rating | 6 |
reviewer | Michael J. Ross |
ISBN | 1933988231 |
summary | A practical introduction to programming with the Google Web Toolkit (GWT). |
The book's 17 chapters are organized into four parts, and cover a generous number of topics: introduction to GWT; creating the default GWT application; building your own application based upon the default one; creating widgets and panels, including composite panels; processing user events; creating JSNI components; modularizing your code; communicating using GWT-RPC; client-side RPC; classic Ajax and HTML forms; using JSON for interoperability; automatically generating code; GWT's native properties; testing and deploying GWT applications; more on the inner workings of GWT itself. The book has no appendices, but a substantial index, which is essential for such a technically detailed subject area.
GWT in Action is clearly intended to be a practical and fairly comprehensive coverage of Google's new toolkit. Almost all of the GWT concepts are explained within the context of developing a substantial sample application, the Dashboard, created by the authors. The reader is encouraged to follow along as the authors build the application, thereby learning from doing — almost always an effective approach. At 600 pages, with almost none of the formatting padding found in far too many technical books nowadays, the authors have not skimped on providing the reader with a lot of information. Furthermore, their treatment of application deployment is far better than any other I have encountered.
Unfortunately, the book has many weaknesses. On an overall basis, the order of presentation is at times disjointed — seemingly dictated more by the Dashboard and less by the most logical order for someone new to GWT. Compounding the problem, the authors frequently refer to advanced topics, covered in greater detail later, and also repeat earlier information, occasionally several times. Despite promises to provide a gentle exposition, it can be difficult at times for the reader to determine if any critical steps were skipped, as a consequence of key instructions for building the sample application being spread out, and interspersed with too many references to general comments covered earlier. In turn, readers will likely find it frustrating to try to get the sample application working at each step of the development process — and not just at the end, with the complete code.
One source of these difficulties, is that in the first few chapters, the authors try to introduce too many topics all at once, and as a result do not thoroughly discuss each one in its own section. Instead, they break up the information over multiple sections, scattered throughout the book. An example of this is internationalization. Section 2.2.4 is titled "Implementing Internationalization," and yet provides almost no details, and is essentially unusable by itself. At the very least, it should mention that later sections 3.2.1 and 15.3 provide a lot more information. Furthermore, internationalization was introduced far too early in the book, and greatly complicates the process. Instead, the authors should have created a simple application using only English for the user interface, and introduce internationalization later, after fully explaining the basics of turning Java code into JavaScript functionality.
Part I of the book is the weakest of all of them, which may, sadly, turn off readers who would otherwise get to the better material later. The authors are clearly enthusiastic about the topics at hand, and the number of moving parts associated with Java/JavaScript/GWT development is certainly not trivial. Nonetheless, those initial chapters would greatly benefit from a rewrite; this would make the material more comprehensible and easier to follow, step-by-step.
We can mention some specific flaws: A book like this that is introducing a new technology, must take care to not leave the unwarned reader wondering if they have been left behind in the steps. People reading some of the earlier material may conclude that those steps have already been assumed by the authors, and will not be covered. The authors do not mention how to obtain and install GWT until page 30; that should be right up front. The authors do not appear to mention which version of GWT they used for the book. (I chose 1.3, not 1.4RC, available as of this writing). Any reader trying to follow along and implement their example application (the Dashboard) will probably find several hurdles. First of all, make sure that you have version 1.4 of GWT installed, and not 1.3.3, which does not include some of the panels and widgets used in their sample code.
In Chapter 1, they modify a "Hello world" application to create another application that shows a tic-tac-toe board that has clickable squares, but does not play the game. Chapter 2 describes this as "a fully functioning Tic-Tac-Toe application," which is like claiming a program works because it compiles. Also in Chapter 2, their discussion of development alternatives is slowed down by repetition of the same information. The sample code in the book has minor inconsistencies. For example, naming a password String "oldPass" in one method, then "old" in another, related method. There are other instances, but these give one an idea of some of the inconsistencies.
The coverage of topics is generally quite thorough, though at times verbose and redundant — particularly in Chapter 2, though it is certainly not limited to that chapter. The second and third paragraphs in Chapter 3, for instance, continue the repetitious style which is found in many places throughout the book, and likely has made it longer than necessary. In Chapter 4, the first two pages explain what widgets are, several times, and conclude with a picture of a button — as if any reader who has made it that far into the book doesn't know what a button is. The book could certainly use some trimming.
The downloadable source code is not complete. For starters, it is missing the code from Chapters 1 and 2, though admittedly none of that is too long. The code provided for Chapter 4 is just a portion of what is displayed in the book. Moreover, the directory paths in the sample code archive files, are not consistently named, and some may even be incorrect. For example, the code for Chapter 5 has a folder named "Dashboard — Chapter 4." That sort of thing does not instill confidence in the typical reader. The authors should revisit the sample code — making it complete and consistently named.
The publisher's page for the book does not appear to have a link for errata; perhaps none have been reported yet. Here are some: On page 75, in Table 3.1, in the left-hand column, "gwt-onLoadErrorFn" should instead read ""gwt:onLoadErrorFn." On page 77, in the second paragraph, the file name extension should be all lowercase, not all uppercase. On page 78, in Listing 3.6, the String parameter in the first label.setText() call should be delimited with straight quotes, not curly quotes. (Microsoft Word strikes again?!) On page 81, in the third paragraph, "comply to" should read "comply with." On pages 87 and 88, the -whitelist and -blacklist option values each contain an extraneous space before the "^." There are undoubtedly more such errata throughout the book, and can be corrected in the next edition; but these are enough to at least get an errata file started. Fortunately, none of them would lead an alert reader astray.
Even though the book could use significant reorganization and streamlining in the next edition, GWT in Action is packed with practical information on a wide range of GWT topics.
Michael J. Ross is a Web developer, freelance writer, and the editor of PristinePlanet.com's free newsletter.
You can purchase GWT in Action from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
The more I learn about JavaScript... (Score:5, Insightful)
I'm not really sure I see the point of GWT, given that JavaScript is actually a more powerful language at this point. I'm almost tempted to suggest that someone build a webserver platform around a JavaScript interpreter.
Well, almost. The problem with JavaScript is that it's horribly slow to execute. But then, you still have that problem, even if it's JavaScript generated from Java code.
Re: (Score:2, Funny)
duh... IIS and asp
@ Language=JavaScript
Re: (Score:3, Interesting)
Depends on your engine. I've put some thought into the same sort of server-side Javascript engine as you have. Someone else mentioned the Netscape Enterprise Server. That was... not so great. I was thinking more along the lines of building on top of a Java Servlet Engine. The Mozilla Rhino [mozilla.org] Javascript Engine actually compiles the JS down to Java byte code. That wouldn't be all that special, except that the JVM then JITs that to native code. Wh
Re: (Score:2)
How fast is it, really? Compiling down to Java bytecode doesn't necessarily make it faster.
Consider a Bash script -- for most of what people use Bash for, you're not going to get any significant speed improvement out of "compiling" it, if you could.
I think JavaScript could be very fast
Re: (Score:3, Interesting)
But then, you still have that problem, even if it's JavaScript generated from Java code.
That's not really what's going on.
GUI stuff happens in Javascript. Anything really complicated gets sent over to Java. That's why it's called an AJAX framework, not a Javascript framework.
I like Javascript, but it has the same problem as PHP: no namespaces. Using it as a real language would causes the same problems you see there: security issues, hard-to-read code, difficulty refactoring, interoperability problems, etc. You can actually see those problems and the various mechanisms to overcome them in
Re: (Score:2)
You can work around this by writing object-oriented Javascript, like this:
The only problem you run into is if you want to call a member function as a result of an event. I haven't found a good way to do this without using some sort of global varia
Re: (Score:2)
this and that (Score:2)
But look up Douglas Crockford. He had one way of solving this: var that = this. Since Javascript supports closures, you can then refer to that, even in nested functions in which "this" gets overwritten.
Re: (Score:2)
PHP has classes... (Score:2)
I mean, there are plenty of things to hate about PHP, and even object-oriented PHP, but you can no longer complain that it doesn't have namespaces.
And Javascript is just far too flexible not to let you hack together namespaces on your own. Watch this (sorry about the lack of indentations; stupid Slashdot):
Re: (Score:2)
- Differences in browsers object models makes it counter-intuitive to write cross-browser JavaScript code, GWT can take care of these differences for you.
Re: (Score:2)
This may be more of a DOM issue than a javascript issue but I find a lot of situations where you don't get an error at all. It just doesn't do what you instructed. Sometimes execution just halts in that method and sometimes it doesn't.
Also, don't get me started on javascript's this variable which is a complete joke.
Re: (Score:2)
You want a good debugger. Or, hell, just look at Firefox's error log -- it'll show you errors in HTML and CSS, also.
It's completely easy to work around, also. Would you care to explain what ab
Re: (Score:2)
So what?
Most of the errors I catch at compile time in languages like Java are things that would not be errors in languages like Javascript. And in any case, what is so magically better about compile time?
So can Dojo, the Yahoo UI library, and so on. I understand the
Re: (Score:2)
Netscape did that, back in the "four days", google up "server-side javascript".
> Well, almost. The problem with JavaScript is that it's horribly slow to execute.
Bullshit. The types of JOBS people usually try to do with JavaScript may be slow, however. Or the native methods that the javascript programs are using might be... But that's a far cry from making it a slow language. It's not substancially s
Re: (Score:2)
That's just goofy. Spidermonkey is quite a bit slower than Rhino. They both contain runtime compilers, but Spidermonkey has its own interpreter. Rhino compiles down to Java bytecode which is then JITed by the JVM. If you want performance, use Rhino!
Re: (Score:2)
Re: (Score:2)
Now that IS interesting, I wasn't aware of that. Thanks!
ATM, Spidermonkey seems to perform VERY well for my needs. I have used NJS in the past and been satistfied with it (from a speed perspective) as well.
Of course, when I profile my javascript code... only a VERY SMALL amount of time is spent in the JavaScript interpreter. Wall time is mostly consumed doing pesky things like I/O. So I tend to conce
Re: (Score:2)
I'm not really sure what you're asking here, so I'll just give a generic answer. Rhino compiles scripts to Java classes based on Rhino's hashtable-like data-model classes. Java classes can be passed to Rhino either by extending/implementing the data-model classes [mozilla.org], or by using the Livescript-like Javascript APIs [mozilla.org].
Native libraries are incompatible with Java save for when they are mapped to a class through JNI. So if you want to link in a library
Half-true. (Score:2)
In practice, the more powerful the language is, and the simpler a naive interpreter is, the harder it can be to make a good compiler.
Consider JavaScript -- you have to carry around enough baggage to be able to support random 'eval' statements. Or Perl -- common wisdom dictates creating classes as a hash table, because there's no such thing as actual object members in Perl. Technically, you could make a P
Re: (Score:2)
The first thing I'd like are some of my favorite features from Common Lisp, like first class functions, ability to do procedural, functional, and object oriented programming with the same language, dynamic typing, macros, closures, and lexical scoping.
Having a C-like syntax would be good for people who are used to C or Perl and don't want to learn about s-expressions. Automatic memory management is a must.
So I
Re: (Score:2)
> But if you ever use it while only targetting a single browser, it's a dream to work with,
> and all of the annoyances go away.
I use JavaScript frequently, and have for years. I don't write much for the browser any more, but I often use JavaScript for general purpose projects.
I'm a hardcore C hacker, know enough LISP to write macros for emacs, and I totally agree with your assessment. About the only thing I RE
Re: (Score:2)
I think the coolest thing potentially is being able to send the commands to a real unix server and then pipe the output back to the Javascript shell. Obviously this has potentially serious security implications, but with a secure setup could be extrem
Inheritance... (Score:2)
Re: (Score:2)
Funny thing is, so does, say, Perl (probably to an even greater degree... how do you do macros in Javascript? I know Perl allows script pre-processing modules). However, both language suffer from a flaw that I think makes it difficult to write large scale applications: weak typing. Dynamic typing, that kicks ass, absolutely. But *weak* typing creates a whole class of errors easily avoided with a strong type system, just so the program
Re: (Score:2)
Um, you understand that GWT is not a language, it is a framework, right? Java is the language. And JavaScript is most CERTAINLY not more powerful than Java.
Don't give in to the temptation because it would make you look quite foolish.
-matthew
Re: (Score:2)
Really? What features are missing from Javascript that are in Java?
Because I could come up with a very long list of things that are nowhere to be found in Java, but are actually cleverly hid in Javascript.
Only because it's been done already.
However, you just claimed Java is
Re: (Score:2)
I'm not really sure I see the point of GWT, given that JavaScript is actually a more powerful language at this point.
I think "the point of GWT" is clearly stated on their front page [google.com]. The ability to write your web application more like a real application. The ability to share client and server side code. The possibility of using a real debugger. Support for browser history (havn't seen this for AJAX before).. just to name a few.
Re: (Score:2)
Millions of dollars and 5 years of Java IDE development by some of the best IDE developers in the world. Also the Hotspot JIT Compiler and class libraries.
There are many 'languages' that Java developers would probably prefer to use if they had had the same massive cross-industry investment as Java - like Ruby, Python or Smalltalk.
Matt
Re: (Score:3, Informative)
I agree with you that Javascript is a nicer language than Java and more powerful to boot, but I'm using GWT for one big reason: dead code elimination. The GWT compiler takes advantage of the static analysis possibilities in Java and the closed-world nature of a web page and produces dramatically optimized Javascript. Th
Re: (Score:2)
I know, for one thing, that JavaScript started out as a horrible little language, and within a year or so, it became a beautiful little language. I imagine that we could do better, were the same thing attempted today.
Re: (Score:3, Informative)
Not. Java doesn't have closures. Java functions aren't first-class objects.
JavaScript, OTOH, isn't typed.
There's loads of differences between them. All I'd want from JavaScript is more performance, namespaces, and possibly some very basic native OO concepts so that I can define an inherited class without three or four declarations and maybe have private and static members.
Re: (Score:2)
-matthew
Re: (Score:2)
I agree, Javascript is fine as a client side language only. My point wasn't that we need to turn it into a server side language (although this is already being done [wikipedia.org] in a proof-of-concepty way, so it's sort of too late to make this point), but rather that improving Javascript isn't going to magically turn it into Java.
Re: (Score:3, Insightful)
more info here [mozilla.org]
Re: (Score:2)
Not needed in a dynamically-typed language.
See above.
That's a property of the interpreter, not the language.
Really? So Java has anonymous subroutines, anonymous classes, classes/objects/functions/methods all as first-class variables, closures, dynamic typing, the eval() keyword, and the ability to add stuff to ex
Re: (Score:2)
Would you care to explain? I've used all of these languages to some degree, and Javascript seems no better or worse than the others (well, depending on your preferences... Python and Ruby are both dynamically, strongly typed, and Javascript is dynamically, weakly typed. If you're prejudiced against the latter, then of course you'll prefer the
Re: (Score:2)
I'll bet you just don't know how to work with it. Go read Douglas Crockford.
There are a few quirks, here and there, that I really don't like, but they are things I can live with. As the sibling asked, could you be specific?
Re: (Score:2)
I suppose it depends on whether the price of orange juice directly affects the outcome of soccer games played in the Miami Orange Bowl.
Re: (Score:2)
In other words, it does something like Dojo, Yahoo Web Toolkit, and so on, only in Java instead of Javascript. And Java is, without question, a more restrictive and less powerful language than Javascript.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
I must be missing what, exactly, you're trying to do here -- it's really easy to just search for a method name, for one thing.
If it's more complicated than that, I suppose you could examine the call stack from a debugger...
Re: (Score:2)
Or you can set up methods with types, if the method breaks, callees break too. So it scales very well in terms of number of developers.
Now let's say you have your javascript method that 10 developers call in 20 different ways. Let's say you change that method signature. You have just hosed the code base and pissed off 10 developers, or you can spend 10-30 mins updatin
I Still don't know what GWT is (Score:5, Informative)
It's so simple, but... (Score:2, Troll)
Hell. No.
Re: (Score:3, Informative)
You don't actually write any SOAP code, but rather use Java Remoting to call across the wire, getting a Java object back that you can manipulate. The GWT compiler translates that into a XML request and writes all the serialization/deserialization code and so on. In fact it doesn't seem to be able to call an XML web service
Re: (Score:2)
Re: (Score:2)
Beyond hope (Score:5, Insightful)
Come on, doesn't anybody read these?
Re: (Score:2)
Re:Beyond hope (Score:5, Funny)
Just when you need mod points (Score:2)
Re: (Score:2)
Funny, that, I am using both as well, and I feel the same thing. The other way around. VS is way behind Eclipse on some features, and a lot more on others. VS 2005 now has acceptable support for operations on the abstract syntax tree, but nothing really powerful. Of course, VS has more functionality integrated. But Eclipse has its vast number of functional plug
Re: (Score:2)
Re: (Score:2)
GWT *and* Java (Score:5, Informative)
Before somebody grills me, the version of WindowBuilder Pro that I am using is a bit unstable and crashes Eclipse now and then. Lots of memory is also recommended (then again, if you are a developer, you need lots of memory anyway).
Re: (Score:3, Informative)
Nah, didn't think so
Why should GWT be on my radar screen? (Score:3, Insightful)
Re: (Score:2)
It is a servlet, so it works with servlet containers. Like tomcat, resin, jetty, or those big ol JavaEE containers.
I'm not sure that tells you anything about why to use it though.
Oops. (Score:2)
I want to write desktop apps with JS/GWT/whatever (Score:3, Interesting)
JS is a great language and GWT is a great tool, especially the hosted development environment. But it will never reach its potential until it is a general purpose application programming language.
Very nice toolkit with some problems (Score:4, Informative)
The content on Google's GWT site [google.com] almost speaks for itself concerning the power of it, so I'll elaborate on some negative aspects I've encountered.
I went to explore the possibility of a non-servlet based backend and very quickly encountered problems that are not really GWT's fault but a side effect of having a hosted environment: the browser is based on Mozilla and thus inherits the security restrictions of it. I could not make RPC calls to my backend web server because Mozilla disallows cross-domain access. I spent a lot of time trying to circumvent this, and did find some work-arounds but nothing that worked to my satisfaction (too cumbersome). GWT should offer a modified Mozilla with these restrictions removed, or even better, adopting Flash's excellent practise of looking for a crossdomain.xml [crossdomainxml.org] file in the root of the target webserver (to see whether access is allowed or not).
Also, developing on an AMD64 based Linux I discovered that the hosting environment just doesn't work running from a 64bit JVM. Setting up a 32bit JVM isn't that difficult, but it's not a good solution (However, I talked to a GWT developer on IRC who claimed this issue was high on their priority list).
Lastly, GWT is a nice environment, but it's still a bit young. It seems stable enough, but if you engage in a large GWT based project you may find yourself doing a lot of low-level client-side code unless their limited palette of widgets and other client-side features completely cover your needs
Re: (Score:2)
Distributing a specific web client to make it possible to view (some) web applications? That's not a good idea. Maybe for intranet use, but people won't go for a specific web client just to view some GWT based websites. The idea of a crossdomain.xml for use within JavaScri
Google DB/LDAP API? (Score:2)
Shameless plug - chess board diagram composer (Score:4, Interesting)
Just a few hours ago I finished a small, mostly-for-fun project in GWT, and now I see a GWT-related story on slashdot. Surely it's not a coincidence and therefore I must pimp my project: a chess board diagram composer [jinchess.com].
Re: (Score:2)
GWT in Python and Ruby (Score:3, Informative)
So I want to give oyou two pointers to projects that could need help to transfer the idea of GWT from Java to Python and Ruby:
Python: pyjamas - build AJAX apps in Python (like Google did for Java) [pyworks.org].
Ruby: Blog Entry from Michael Neumann, who tries to port GWT to Ruby [ntecs.de].
The Ruby stuff is in the very early stages
Bye egghat.
Re:Wow (Score:5, Funny)
Re:Wow (Score:4, Interesting)
Is it just me or is anyone else glad to see a review on Slashdot without a chapter by chapter summary? One of the most pointless, pedantic mistakes in book reviews is to summarize each chapter. Hoozah for the writer!
Re:Wow (Score:4, Funny)
Don't Use Google Web Toolkit.
Worse than Wicket? (Score:4, Interesting)
I did an evaluation of it. I kind of liked it, but in general don't like "lets make a servlet environment pretend its an applet", so I didn't endorse.
Now, after months of using Wicket, I wish I had pimped for it more. Seriously. If you're gonna pretend it's an applet, then REALLY do it like GWT does, fake JVM and all. This Wicket stuff.... ugh. keeping the html view and java in synch for anythign complex is SO IRRITATING.
Seriously, after years of Struts and stuff like Wicket, I don't see any real advantage over "Model 2+" (Servlet/JSP pairs) that I started with in 2001. There is a benefit to simplicity and writing HTML in HTML and writing Javascript in Javascript that over-engineers who are, frankly, a little OO-obsessed just don't get.
Maybe years of Perl CGI has bent my brain but The HTTP Request/Response paradigm just doesn't seem so awful that it needs to be (leaky) abstracted away.
Re: (Score:2)
Re:Worse than Wicket? (Score:4, Insightful)
Maybe especially core Wicket, which isn't trying to do much but wrap HTML bits as objects. What really is the benefit of that? Nothing seems simpler and it often seems to be getting in the way-- maybe it's a mental gap problem, but often I end up having to put placeholder HTML in the page, and the set visibility = null. And the Ajax support is so-so.
I mean, I think the fact that the static Wicket homepages often produce session timeout exceptions is pretty damning that it encourages poor web programming.
Re: (Score:3, Interesting)
Re: (Score:3, Informative)
You're obviously missing the point indeed. What it aims to do besides providing abstractions is facilitate a stateless programming model that is safe by default and doesn't leak implementation details of widgets all over the place.
Re: (Score:2)
I haven't seen leaky PKs be too much of an issue. A lot of keys are just local identifiers, or your API should be doing requisite security checks.
Re: (Score:2, Insightful)
And now Wicket In Action [manning.com] is available (partly) via early access. But agreed documentation could be better, which holds true for most open source projects that depend on unpaid volunteers.
But it is something you'll always have to be aware about. The application I'm working for for instance, has a very fine graine
Re: (Score:2)
Sounds like your problems with Wicket are due to your total lack of knowledge about the framework. Hint: there's nothing called "visibility" in Wicket. There
Re: (Score:2)
Read my post (I think as kirkjerk) in the apache mailing list. I know setVisibility takes a boolean. I've been using Wicket solidly for 6 weeks.
Re:Worse than Wicket? (Score:5, Insightful)
I couldn't agree more. I like my code structured, clean and simple, and layering abstraction upon abstraction is not a good way to achieve that. I'm also a big proponent of writing to the language's strengths. JavaScript has some annoying weaknesses (lack of namespaces), but things like it's object prototyping are very powerful, and it seems silly to give that up. For all the browser inconsistencies, HTML + CSS is actually quite a nice layout tool. Getting them all to work together requires some organizational skills, but it pays off in ease of use and a higher level of control.
These are tools a web developer really should be comfortable with anyway, so while I can see the utility of something like GWT if you're not, to really excel at it, you should be knowledgeable about them.
Re: (Score:2, Interesting)
Sometimes I worry that I come up with my philosophy about languages to suit my personal gripes and history, and that ultimately that limits me as a developer, but...
Anytime you borrow someone else's toolkit that adds some kind of organization/abstraction over an existing technology... well, either you're losing bits of the functionality of the lower level, or what you're learning is about as complex as the lower level.
My strong personal preference is to write your OWN, app-specific organization.
The cou
Re:Worse than Wicket? (Score:4, Insightful)
Re: (Score:2)
Especially because usually you're just using a subset of the functionality, but to do it right, have to "pay" for (in terms of learning complexity) much more than that.
That's one reason I love APIs to the heavy lifting, but having a core of the Lowest Common Denominator of control code. For Java, this was Servlet/JSP pairs.
Re: (Score:2)
A relatively simple example - I've written several apps that produce PDF and Excel output - iText and Apache POI have been invaluable. Sure, they've been a pain at times, but they have been more than worth the trouble. They've saved me time and allowed me to produce
Re: (Score:2)
Re: (Score:2)
Here's a funny thing - I go through the same questions, wondering if I'm holding on to old biases that have gone past their best-before date. Every couple years I'll take a look around to see if I'm missing something, and invariably come to the conclusion that things Aren't Quite There Yet. Then I'll go refactor some of my own light-weight libraries and move on. Which makes me wonder how subject I am to NIH syndrome. But I get things done.
The punch line is that I did cut my teeth on CGI (perl 4) and a ha
Re: (Score:2)
I'll just say that your criticisms of Wicket are so entirely opposite of my experience with the framework that it's frustrating and somewhat confusing to read your posts.
So you do seem to be advocating the "write your own framework" approach, which I've already addressed to a certain degree. I'll add/reiterate that i
Re: (Score:2)
And trust me, I'm just as frustrated and confused by people who adore Wicket and say it has a great power/conceptual weight ratio! Especially because I'm concerned it points me to being a curmudgeon before my time, unwilling or unable to learn new things.
The last time I "rolled my own framework", which was just some tools to make "Model Two Plus" (servlets and JSP pairs; esentially MVC w/ lot
Re: (Score:2)
Well said! Same applies to SQL, and the clumsiness of object-relational mapping. SQL selects are awesome - why ruin them? Same with generating a printed document in Postscript vs. using an API; Postscript is text, and is easily mani
Re: (Score:3, Insightful)
You can't really write a web application using a (single) language, though; you need to have some degree of expertise in HTML and CSS AND Javascript AND whatever language(s) your server-side code is written in...
I can see some appeal in toolkits that unify everything into just one language, for the developer's convenience. It's still pretty much impossible that the output of such a toolkit will be anywhere near as elegant or efficient as nativ
Re: (Score:2)
Oh, yeah, that's pretty much what I was trying to get at (unless I misunderstand.) HTML and CSS and javascript and whatever server-side language you're using are all different beasts, and I personally prefer to meet each on their own terms. It might take a bigger learning investment, but the payoff is understanding everything that's going on, and being able to manipulate it at a fine grained level. And you can take advantage of the strengths inherent in each, while occasionally offsetting their weaknesses w
Re: (Score:2)
I also find it easier to import 3rd party javasvript/DHTML widgets when I don't have to sweat wrapping it in Java objects.
Re: (Score:2)
Re: (Score:2)
At this point I'm still willing to give GWT the benefit of the doubt.
I hear your point that you can take my argument to an illogical extreme (lets just toggle panel switches!) but that doesn't mean the opposite is true. I wouldn't want to write an applet by having to control individual pixels either, but the fact is web apps have a pretty good toolset, DHTML, Form Elements, CSS, and in my judgement, unless you embrace a full on JVM-ish approach like GWT, then the
Re: (Score:2, Informative)
Sorry to hear it doesn't work for you. A little OO-obsessed though? Because the framework takes a stance to actually try to provide a real OO programming model where other frameworks simpl
Re: (Score:2)
I felt the same way about GWT -- it's just too much of a black box for my taste. Having said that, it's probably a good idea to reevaluate it now that I use a lot more Ajax and am far more comfortable with JavaScript than I was a year or so ago.
Regarding Wicket, however, I couldn't disagree more. I think Wicket offers by far the best balance of productivity and maintainability compared to any action or component-based Java web framework out there. There are, however, a couple of caveats.
1) Wicket's
Re: (Score:2)
Again, it's the background thing. HTTPRequest/Response seems like the most natural thing in the world to me, in part from years of CGI. But hell, from years of using the Web! Click, or submit, and get a page back. Or, nowadays, click, and some part of the page goes and updates, ala Ajax. And the Session model, a simple Map to st
Re: (Score:3, Informative)
Firstly, I had loads of problems. However they were mainly down to broken stuff in the RC builds (all fixed now that it's out of beta) and the fact that I was learning Java as I went along. Nothing that was a major problem was down to the architecture of GWT.
If i'd have written pure javascript instead then doubtless it'd have taken far longer and worked less well.
GWT rocks for anything where yo
Re: (Score:3, Interesting)