Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Is the Google Web Toolkit Right For You?

CmdrTaco posted more than 8 years ago | from the sure-why-not dept.

163

An anonymous reader writes "The recently released Google Web Toolkit (GWT) is a comprehensive set of APIs and tools that lets you create dynamic Web applications almost entirely in Java code. However, GWT is something of an all-or-nothing approach, targeted at a relatively small niche in Web application development market. This article shows you what GWT can do and will help you decide if it's the best tool to use for your web development."

Sorry! There are no comments related to the filter you selected.

When I hear OO ... When I hear Java (-1, Flamebait)

neonprimetime (528653) | more than 8 years ago | (#15621010)

Where I hear OO ... I think good ... there'll be readable code, there'll be clean code, there'll be re-usable code
When I hear Java ... I think arg ... poor performance & not truly open source

Looks interesting, but who will take the chance on it?

Re:When I hear OO ... When I hear Java (0)

Anonymous Coward | more than 8 years ago | (#15621040)

I'm guessing that Google will.. (?)

Huh? (2, Funny)

r00t (33219) | more than 8 years ago | (#15621104)

You haven't seen bad OO code? (maybe YOU'RE the bastard who writes it) You don't know how to write good non-OO code? It exists.

There is an OO equivalent to spaghetti code, and it's fearsome.

Re:Huh? (2)

neonprimetime (528653) | more than 8 years ago | (#15621171)

I think you're confusing yourself ... I didn't say anything to the effect of non-OO code being bad ... or OO code always being good ... basically ... I personally find it much easier to write clean code in an OO language like Java ... than in a semi-OO lanaguage like C or C++ ... With C / C++ there are so many tricks, shortcuts, and multiple ways of doing things that I always end up finding myself writing obfuscated code ... where as in Java, I find myself sticking to a standard format ... where everything looks similar. That said ... I've been around programming long enough (I've even taught, C, c++, and Java courses), so I've seen the good, the bad, and the ugly in all languages.

Re:Huh? (0)

Anonymous Coward | more than 8 years ago | (#15622889)

Jesus Christ, please try to complete a sentence without ... stopping ... and ... breaking ... it ... up.

Thank you.

Re:When I hear OO ... When I hear Java (1, Insightful)

Serapth (643581) | more than 8 years ago | (#15621118)

What do you think when you hear "Code Generator?"

Thats my biggest beef with the way this kit works. The JSNI interface seems like a pure hack to start with doing things like embedding javascript code in a java file using code like the following:

private native void applyEffect(Element element, String effectName) /*-{

// Trigger named Scriptaculous effect
$wnd.Effect[effectName](element);
}-*/;


I find these kinds of toolkits get you up and going quickly, especially if you are new. However, the first time you run into something the toolkit can't handle, the black box nature means your SOL.

Re:When I hear OO ... When I hear Java (1, Interesting)

neonprimetime (528653) | more than 8 years ago | (#15621142)

What do you think when you hear "Code Generator?"

Great for college research (took multiple classes on it)... but annoying in the real world ... if it's possible ... I'll delete as much of the auto-generated code as possible and start from scratch ...

Re:When I hear OO ... When I hear Java (1)

jrockway (229604) | more than 8 years ago | (#15621205)

> What do you think when you hear "Code Generator?"

Perl 6. Perl 6 will be compilable to JavaScript, so you can write your web applications completely in Perl :)

Re:When I hear OO ... When I hear Java (1, Insightful)

Doctor Memory (6336) | more than 8 years ago | (#15621213)

the first time you run into something the toolkit can't handle, the black box nature means your SOL.

This is exactly the reason I gave up on VB. Want to do something even mildly handy (say, check the amount of free space on a disk)? Better figure out the WinAPI call format and figure out how to cast your arguments to FAR_WPTR[1], 'cause VB itself is absolutely worthless for this. OK, so you're not totally SOL, but if you don't have some experience with cross-language subroutine calls, you'll be pulling your hair out for days.

[1] Not a real data type. Not that UINT8 is any better...

Re:When I hear OO ... When I hear Java (1)

mdielmann (514750) | more than 8 years ago | (#15621488)

I wrote a VB 6 app in a couple hours that not only notified me of the amount of free space in a given folder (including the root folder), but displayed it in a chart so I could easily pinpoint where all my hard drive space went. Not counting the VB Form, I used two objects: the chart object (crappy, but all I needed) and the filesystemobject object [microsoft.com] . It took about two hours to get it to where I needed, and I was doing it as a semi-useful learning task (elements of the filesystemobject that I hadn't used before). I imagine it could be done more easily in VB.Net, but I haven't bothered to try.
I'm not saying there aren't better tools than VB out there, or that it is easier to do what you were looking for in VB, but don't pass off your lack of knowledge as fact.

Re:When I hear OO ... When I hear Java (1)

Doctor Memory (6336) | more than 8 years ago | (#15621780)

Gee, VB's changed since VB5 (when I gave up on it). Who'da thunkit?

Re:When I hear OO ... When I hear Java (1)

mdielmann (514750) | more than 8 years ago | (#15621839)

Sorry about the tone of that reply, I shouldn't have assumed that you had used VB as recently as I had. I didn't use VB5, but I did hear some pretty ugly things about it.

Re:When I hear OO ... When I hear Java (3, Insightful)

frantzdb (22281) | more than 8 years ago | (#15621441)

What do you think when you hear "Code Generator?"

When I hear "code generator", I think compiler.

Re:When I hear OO ... When I hear Java (3, Informative)

stratjakt (596332) | more than 8 years ago | (#15621162)

When I hear someone say what you said I think... "another hack who's never programmed anything, never will, but read some shit on slashdot about it and now believes he's an expert"

There's plenty of unreadable, unusable OO code out there, as well as plenty of well performing Java.

Re:When I hear OO ... When I hear Java (1)

neonprimetime (528653) | more than 8 years ago | (#15621283)

I'm too lazy to type it twice [slashdot.org]

Re:When I hear OO ... When I hear Java (1)

Hoolala (976766) | more than 8 years ago | (#15621285)

We are taking advantage of it. We really look forward to the ability to develop rich Web Apps using a standard IDE and Java "OO" paradigm. ==== Beaches & Casinos: http://buddytrace.com/ [buddytrace.com]

Re:When I hear OO ... When I hear Java (1)

Valthan (977851) | more than 8 years ago | (#15621338)

Umm... Java IS an Object Orientated language... (unless you mean something else by OO, in which case I would love to be enlightened..)

Re:When I hear OO ... When I hear Java (1)

neonprimetime (528653) | more than 8 years ago | (#15621401)

Yes ... Java is an OO language
No ... Java != OO
Thus it's ok to have different opinions on them.

Re:When I hear OO ... When I hear Java (1)

Valthan (977851) | more than 8 years ago | (#15621436)

OK, Now I am confused... Who wants to explain to the first year CS student?!

Re:When I hear OO ... When I hear Java (1)

neonprimetime (528653) | more than 8 years ago | (#15621497)

OO = Object Oriented
Many computer languages are or can be Object Oriented (Java, C#, VB.NET, C++, etc.)
Therefore Java is a sub set of Object Oriented Programming
Object Oriented Programming is not just Java though, cause as said above it could be C++, C#, VB.NET, etc.
Therefore, I believe it's ok to say then that Java (as a subset of OO) may suck ... but Object Oriented Programming in general does not (cause for example C++ rocks).
Well, I tried.

Re:When I hear OO ... When I hear Java (1)

Valthan (977851) | more than 8 years ago | (#15621535)

OH, OK, I thought at first he was trying to say that Java was not part of the OO grouping, which really threw me for a loop.

And personally I like Java, (although all I have to compare it to as far as programming goes is VB and Turing so...)

Re:When I hear OO ... When I hear Java (1)

neonprimetime (528653) | more than 8 years ago | (#15621610)

In school ... my favorite languages were probably in the following order
  • C++ - I learned this first, and it was tricky, but incredibly beneficial to learn
  • Java - Once I already new C++, Java was REAL REAL easy ... and I also just loved how clean and easy it was to program in ... although in larger projects, at least back when I was in school, I did notice significant performance differences as compared to C++
  • C - After learning C++, C was like a fun throwback ... it becomes a very interesting language ... and I sometimes just wrote programs in C instead of C++ just for the fun of it.

Now sadly ... since I've graduated ... I've had to move into the corporate world ... and I find myself stuck programming in C# and VB.NET (which both are incredibly easy to learn if you already know C++ and/or Java). I do miss the days though in college of C++, Java, and C programming ... and thus I hope to go back to academia sooner or later.

Good luck with your schooling ... my tip : experiment with everything, don't just do the homework assignment in class, try doing the same assignment in another language ... test out C++, C, Java, Perl, Python, everything ...

Ahem (1)

Morosoph (693565) | more than 8 years ago | (#15621345)

*Kaffe* [kaffe.org]

There's not a lot of tolerace for criticism of corporations, is there?
I think that most coders feel the same way.

Re:When I hear OO ... When I hear Java (1)

zootm (850416) | more than 8 years ago | (#15622311)

Java's performance isn't "poor" — as is frequently pointed out on this site, this is largely an outdated myth. As for not truly open source, it's a definate issue, yes, although there is open implementations [wikipedia.org] .

No... (0)

Anonymous Coward | more than 8 years ago | (#15621012)

...because I can't program :-)

34

Google takes more ground... (5, Funny)

utopianfiat (774016) | more than 8 years ago | (#15621014)

I, for one, welcome our weather-reporting overlords.

Mingling of server and client code is "unusual"? (4, Insightful)

xxxJonBoyxxx (565205) | more than 8 years ago | (#15621025)

"The GWT takes an unusual approach to Web application development. Rather than employing the normal separation of client-side and server-side codebases, GWT provides a Java API that lets you create component-based GUIs and then compile them for display in the user's Web browser."

I think that's how ASP.NET components have worked for years too. So, I wouldn't say that it's unusual unless you're coming from a completely "my text editor is my development environment" world.

Re:Mingling of server and client code is "unusual" (2, Interesting)

hey! (33014) | more than 8 years ago | (#15621140)

I think that's how ASP.NET components have worked for years too.

Not to mention EchoPoint.

It's a good idea, but the devil is in the details.

App developers are overwhelmed with details they have to manage. And we all know that the essence of good design is not having to worry about details until the appropriate time. The flip side is when you do focus on some other details you'd been ignoring up to this point, you don't want to have to worry about details you've already taken care of.

So, the idea is that programmers should be able to program with your framework without worrying that they are doing something web based. That's good. But the flip side of that is that designers should be able to design without worrying about the fact the programmers are using your framework.

The problem with past attempts at this paradigm fall short of ideal because they enforce non-standard or proprietary ways of doing things. They may be good enough, but they could be improved on.

Re:Mingling of server and client code is "unusual" (1)

MobyDisk (75490) | more than 8 years ago | (#15621593)

The Computer Science terms you are looking for are "coupling" and "cohesion." [ugolandini.net] A good design minimizes coupling and maximizes cohesion.

Re:Mingling of server and client code is "unusual" (4, Funny)

Alexandra Erenhart (880036) | more than 8 years ago | (#15621673)

Now I understand why computer science geeks don't "couple". They have a whole different meaning of the word from the rest of the world ;)

Re:Mingling of server and client code is "unusual" (1)

Randolpho (628485) | more than 8 years ago | (#15623079)

Couplin done right results in cohesion.

Sticky, sticky cohesion. :D

Re:Mingling of server and client code is "unusual" (0)

Anonymous Coward | more than 8 years ago | (#15621156)

The main difference is that ASP.NET generates the HTML/Javascript at runtime, whereas GWT compiles Javascript applications beforehand. So performance on the server is not affected by Java at all -- seems like a good use of a managed language.

I'm working on a project that exposes a similar code design environment to GWT, but does so in managed .NET code on the server at runtime, generating rich client side widgets and managing the client-server communication. It's sort of like a cross between GWT and ASP.NET, I like it because it gives you the full stack of language functionality, and server functionality when you want it, rather than restricting what available libraries you can use when you're writing your code.

The project is GPL'd, and the website is www.emergetk.com [emergetk.com] if you're interested.

--ben

Re:Mingling of server and client code is "unusual" (2, Informative)

Hoolala (976766) | more than 8 years ago | (#15621344)

There are developers who still use VI for Web developments :)

GWT is the heavy favorite to serve as the core for our new webapp.

====

Beaches & Casinos: http://buddytrace.com/ [buddytrace.com]

Does it have an "I'm feeling lucky" feature? (5, Funny)

purpledinoz (573045) | more than 8 years ago | (#15621050)

Does it have a "I'm feeling lucky" feature, where it will deploy your project for the first time without bugs?

Re:Does it have an "I'm feeling lucky" feature? (1)

moochfish (822730) | more than 8 years ago | (#15622071)

Sometimes.

Othertimes your computer might explode, your hard drive might vaporize, or your program might erase itself.

google web server? gwis? (1)

Wikipedia (928774) | more than 8 years ago | (#15621054)

HELLO WORLD
94732 94732
HELLO WORLD
1D9BA67D23125E86CB9C2766A10181239F1CA5837518E57308 3EBFB33F2246EB
701EF312163B68F68B8A2B495DFDBF7B10723415C482D8A9EB 897A74180D41D4
5AA2D6C72FD377A6595210A184A4FEE0C5A624386CAF068889 338E1479AB03DC
3070EFA41430C2BAB39CA4F4976EDAE9481C4C868233DC0434 7535C51E66D577
K-BYE

Short answer: No. (2, Informative)

xxxJonBoyxxx (565205) | more than 8 years ago | (#15621095)

GWT does have a couple of fairly significant flaws. First among them is its lack of provision for graceful degradation. Best practice in modern Web application development is to create pages that work without JavaScript, and then use it where available to embellish and add extra behavior. In GWT, if JavaScript isn't available, you won't get any UI at all.

In other words, if you want to make sure your site "just works", GWT isn't a good technology to use. If your management team is paying attention, that should pretty much stick a fork in this technology.

Re:Short answer: No. (1)

purpledinoz (573045) | more than 8 years ago | (#15621206)

I think this would be useful in developing internal corporate web-apps, where people don't want to spend a lot of time developing, and where everyone in your company would be using the same web browser (or at least where everyone has access to the same web browser). I use Firefox mostly at work, but I use IE to view the internal corporate website, since some things don't work with Firefox. Actually, now that I think about it, it's really stupid that I have to change browsers to make a website work.

Accessibility? (5, Interesting)

metamatic (202216) | more than 8 years ago | (#15621247)

Also, what's the state of the art in screen readers? Do they have sufficient JavaScript support? (*)

If not, using GWT for a corporate web site is just a lawsuit waiting to happen.

(*) This is not an idle question, I'm sincerely interested in real answers and pointers to software.

Re:Accessibility? (5, Informative)

xxxJonBoyxxx (565205) | more than 8 years ago | (#15621354)

If I had mod points today, I'd boost you up. If you go by the ADA provisions*, I think you need to provide enough content in plain old HTML code and text (Javascript doesn't count) so that all the content is available inline and enough links, text boxes and other items (also in plain old HTML code) so that someone can navigate your entire site without any Javascript.

*Section 508 Standards for Electronic and Information Technology;
SubSection 1194

Re:Accessibility? (1, Informative)

NutscrapeSucks (446616) | more than 8 years ago | (#15621679)

Well, I'm glad that someone finally provided a reference to this claim that Javascript is somehow prohibited by the ADA. But you have completely misreprsented what the regulations state -- there is NOT a prohibition on javascript navigation:

When pages utilize scripting languages to display content, or to create interface elements, the information provided by the script shall be identified with functional text that can be read by assistive technology.


So, basically your script navigation has to provide text labels or alt tags, which they nearly always do.

Re:Accessibility? (1)

metamatic (202216) | more than 8 years ago | (#15622185)

You've kinda missed the point of my question.

I don't want to provide the bare minimum legally mandated accessibility. I want to provide actual accessibility, so real people with real special needs software can access my sites.

So I'm not really interested in what the law says, I'm more interested in what the actual software out there can do.

Re:Accessibility? (1)

NutscrapeSucks (446616) | more than 8 years ago | (#15622482)

I'm more interested in what the actual software out there can do

Actually, me too -- I'd love to get a testing copy of a screen reader. I'm just reacting to the assertation which gets floated here that "works in Lynx" is somehow legally requried.

Re:Accessibility? (1)

POWRSURG (755318) | more than 8 years ago | (#15623032)

Yes well, the courts have previously ruled that ADA does not apply to the web [com.com] . Sure, there are other laws out there that cover similar topics, but not the ADA.

Re:Accessibility? (1)

wavedeform (561378) | more than 8 years ago | (#15621695)

How do loathsome Flash sites get around this? They must run into the same issue, no?

Re:Short answer: No. (1)

Rombuu (22914) | more than 8 years ago | (#15621371)

Sounds perfect for intranet and extranet sites where you get to dictate the browser users may access the site with.

Re:Short answer: No. (2, Interesting)

misleb (129952) | more than 8 years ago | (#15621416)

I think the policy of graceful degradation has gone way too far when it comes to the web. I think it is just fine to assume a client has Javascript. Javascript is far too valuable when it comes to writing sophisticated web apps to work without it. It multiplies the workload on coders and it dumbs down the applications. And for what? Cell phones with an incomplete web browser? The 1% of users who are too paranoid to allow Javascript? Screw 'em. If they want to cripple their browsing experience, that is their business. Why should everyone else suffer?

Of course, i depends on the application. There are cases (most cases?) when Javascript really does nothing but add "flare" to a site which would otherwise work fine without JS. But then there are some apps which actually leverage JS to work around the significant limitations of HTML/HTTP. The latter is becoming more and more common.

-matthew

Re:Short answer: No. (4, Insightful)

big_gibbon (530793) | more than 8 years ago | (#15621633)

Disabled users? Blind users? Screw 'em. If they want to be cripples, that is their business. Why should everyone else suffer?

Ever think that it's not always someone's *choice* whether they can use JavaScript enhancements?

P

Re:Short answer: No. (0, Troll)

Opie812 (582663) | more than 8 years ago | (#15622228)

Disabled users? Blind users? Screw 'em. If they want to be cripples, that is their business. Why should everyone else suffer?

Agreed!!

Re:Short answer: No. (3, Insightful)

Rogerio Gatto (967932) | more than 8 years ago | (#15622590)

I really think the problem is on screen readers/browser interface. Can't they monitor DOM changes and read the new content, or signal that some part of the page changed and prompt the user if it should be read? I believe that there's enough technology to do that already. If there isn't, it should be built. Javascript and DHTML can be made accessible if screen readers learn how to handle them. I just don't think it's fair to non-disabled users that javascript/DHTML should not be used because screen readers can't read them.

Re:Short answer: No. (0)

Anonymous Coward | more than 8 years ago | (#15622783)

Blind users? Screw 'em.

While I agree with your overall message I could not get over the irony of mod'ing your comment as 'insightful.' Perhaps if you had written about mute users I would have stayed quiet

Re:Short answer: No. (3, Insightful)

Steffan (126616) | more than 8 years ago | (#15622144)

I disagree with your assertion. I often use lynx (a text-only browser) to access sites, both internal to my company and externally. Sometimes when you are connected via an SSH connection, console is all you have. It is very annoying to me when sites make use of javascript as the only method of navigating a site, especially when it detracts from normal functionality. It is not that difficult to make a very basic site that allows for at least a minimal level of functionality to a text-based user.

Don't even get me started on *flash* sites...

Re:Short answer: No. (2, Insightful)

morgan_greywolf (835522) | more than 8 years ago | (#15621543)



        GWT does have a couple of fairly significant flaws. First among them is its lack of provision for graceful degradation.


In other words, if you want to make sure your site "just works", GWT isn't a good technology to use. If your management team is paying attention, that should pretty much stick a fork in this technology.


Why? You can still do graceful degradation -- Google does this with it's own properties. Turn off Javascript and go visit Google Maps or Gmail. You'll get a 'non-interactive' version of the Web page. They just develop it two different ways, detect JavaScript, and then go to the appropriate version. What's wrong with that? It's a perfectly valid development approach.

Re:Short answer: No. (1)

Seraphim_72 (622457) | more than 8 years ago | (#15622904)

Just did this in elinks. If by "graceful degredation" you mean no map and no link to find the map - then yeah, I can still zoom in and out on a blank slate.

Sera

Re:Short answer: No. (2, Insightful)

SashaMan (263632) | more than 8 years ago | (#15622074)

Like many slashdot replies, the parent is only thinking from a consumer website point-of-view. A huge market for this technology is corporate web applications where the company can dictate browser support (and "you must have javascript enabled" is a pretty minimal requirement from the corporate application perspective). Company XYZ doesn't care if it's sales quoting app doesn't work in lynx.

GWT feels like GUI programming (1)

aymanh (892834) | more than 8 years ago | (#15621111)

From a web developer point of view, and as the article states several times, the Google Web Toolkit uses an approach similar to Swing, code written for GWT feels like GUI code more than web code, while I don't have anything against this and I believe it does have audience, I think many would prefer a more web-like approach such as Prototype [conio.net] or the Yahoo UI library [yahoo.com] .

Re:GWT feels like GUI programming (2, Informative)

stratjakt (596332) | more than 8 years ago | (#15621272)

That's because that's what it is.

From TFA: GWT essentially exploits the browser as a run-time environment for lightweight GUI applications, and the result is much closer to what you might develop with Morfik, OpenLaszlo, or even Flash, than to normal Web applications

It seems more suitable for client development in intranet-type situations, rather than for stuff to go on the web at large. GWT is walled off from the traditional web page, it seems, and the article says there's no way to take values out of widgets to use in a form submission.

It's interesting, the company I'm working for finally caught "browser based applications" fever, and this is another possible platform we could use. Of course since we aren't a Java house, we'll end up using ASP.NET.

Re:GWT feels like GUI programming (1)

jimktrains (838227) | more than 8 years ago | (#15621303)

I find it funny that I know alot of people who are trading swing code for HTML-like (XML based, but HTML-like for comparison) GUI design langs like JAXX. I always hate writting GUI code, and JAXX works for me, because it is like HTML and I can jsut type up the form and it makes it. I am just wondering if a good AJAX library would do better for developers than things such as GWT (well, I know it woudl be me and I was jsut wondering if I was a minority).

My thoughts exactly (1)

metamatic (202216) | more than 8 years ago | (#15621326)

When I saw the announcement I was initially excited... then I saw that the first stage was to write a Java Swing application.

Well, I'm writing a Java Swing application at the moment for non-GWT purposes, and it's a horrible, painful process. I'd rather write raw HTML and JavaScript any day. It's not just a Swing issue; there are still too many things in Java that are way, way more difficult than they ought to be. (Like date and time handling, for instance.)

I really wonder why they built this thing using Java as the source language, when they could have chosen something easy and painless to learn and write like Scheme, Ruby, Python, or even (shudder) BASIC.

Re:My thoughts exactly (0)

Anonymous Coward | more than 8 years ago | (#15622463)

"DateFormat provides many class methods for obtaining default date/time formatters based on the default or a given locale and a number of formatting styles. The formatting styles include FULL, LONG, MEDIUM, and SHORT. More detail and examples of using these styles are provided in the method descriptions.

DateFormat helps you to format and parse dates for any locale. Your code can be completely independent of the locale conventions for months, days of the week, or even the calendar format: lunar vs. solar."

Re:My thoughts exactly (1)

metamatic (202216) | more than 8 years ago | (#15623048)

OK, AC smartass, now show us the "simple" code to generate a date in ISO 8601 format given a Calendar object.

Re:My thoughts exactly (0)

Anonymous Coward | more than 8 years ago | (#15622801)

There are still too many things in Java that are way, way more difficult than they ought to be. (Like date and time handling, for instance.)"
If you think date and time handling are difficult you must be totally incompetent. I admit that the date and time handling part of the API isn't great and could use some improvement, but it's still incredibly trivial to use.

"I really wonder why they built this thing using Java as the source language, when they could have chosen something easy and painless to learn and write like Scheme, Ruby, Python, or even (shudder) BASIC."
Is this a joke or are you actually this dense? I know this may be hard to believe, but when you step into the real world of large scale application development, which is the target market for this product, practically no one uses Scheme, Ruby, Python or BASIC. And don't bother giving a couple of bullshit examples of companies who do as the number of enterprises using Java as an application development platform is not even remotely comparable to any of the languages you mention. The only platform that is remotely comparable in this aspect right now is .NET.

I'm sure some dumb ass will come out and say that Google uses Python, however, as always they'll fail to mention that they only use Python for very small internal scripts. Practically everything else, in terms of web development, is deployed with a Java back end; including Gmail, Google Search, Google Maps etc.

Why I like YUI (4, Interesting)

HotButteredHampster (614950) | more than 8 years ago | (#15621657)

The two things I like about the Yahoo! UI toolkit are that:

- it is a la carte
- it represents pretty advanced, human-readable Javascript, which has allowed me to learn advanced Javascript techniques

The first, a la carte, means that the entire web application does not need to be dedicated to YUI. Recently I incorporated a YUI DHTML window (Panel, in YUI-speak) into an existing ASP.NET application. It required only a few lines of Javascript and some HTML. Ditto for another application (JSF, this time), where I added an AJAX data lookup to dynamically populate sample values in a dropdown list. I love the DOM and Event libraries: they really clean up the cruddy job of adding small DHTML things to a website, regardless of how it's put together.

The second, that YUI is a learning experience, is also very important to me. I've come late to the DHTML game, and most books and tutorials on Javascript deal with the basics, and stuff like OO programming is either glossed over or omitted entirely. However, Javascript is a language that is suited to OO programming in a unique way, IMHO. By studing how the YUI toolkit works and seeing what Javascript is capable of, it has opened the doors for new ways of tackling problems and reducing the number of lines of JS code I write.

HBH

Re:Why I like YUI (1)

schon (31600) | more than 8 years ago | (#15622137)

I agree with everything you said, but there is one thing about YUI that bugs me: having to include a dozen (or so) separate .js files to make it work.

I wish it was just a single library, rather than one file for each function (which really isn't, because every function I've used doesn't work unless all of the other files are included as well, even if I'm not explicitly using them.)

As if.. (1, Funny)

misleb (129952) | more than 8 years ago | (#15621114)

Using GWT is far closer to developing with Swing or SWT than the usual experience of Web application development,

As if GUIs in Swing or SWT weren't slow and clunky enough. Now Java developers have a slower and clunkier alternative. Yay!

-matthew

Re:As if.. (1)

An Onerous Coward (222037) | more than 8 years ago | (#15621809)

That's a little off-the-mark. It's not saying that your users will suddenly have Swing GUIs running in their browser. It's just saying that writing code for GWT feels an awful lot like writing code for Swing.

Feeling Inadequate (2, Funny)

ruben.gutierrez (913239) | more than 8 years ago | (#15621119)

I had to stop after the third line... "Level: Advanced"

we just weren't right for each other (1)

revery (456516) | more than 8 years ago | (#15621126)

I mean, I tried to make it work, but I couldn't ever get her to give me a callback...

haxe (3, Interesting)

ncannasse (976609) | more than 8 years ago | (#15621226)

There's been several JS code generators recently. Apart from GWT there's also haXe [haxe.org] which is more ambitious. haXe can also be used on the Server Side and includes some facilities for Dynamic programming (whereas Java is strongly typed 100% of the time).

Re:haxe (1)

mrchaotica (681592) | more than 8 years ago | (#15621725)

...facilities for Dynamic programming (whereas Java is strongly typed 100% of the time).

What, are generics (in Java 5) not good enough?

Re:haxe (1)

ncannasse (976609) | more than 8 years ago | (#15621836)

Far from being enough. Having structural signatures, first-class functions and method closures are big plus. Watch the haXe Language Reference [haxe.org] for more infos. Also, I was not talking about "Dynamic" as reusable but as dynamicly typed.

Re:haxe (0)

Anonymous Coward | more than 8 years ago | (#15622176)

http://haxe.org/api/js/lib

This is the entire haXe javascript API?

Needs more time in the oven. I can do more with mochikit.

Re:haxe (1)

larry_larry (669612) | more than 8 years ago | (#15622165)

> Java is strongly typed 100% of the time

With Jython or Groovy you've essentially got dynamically typed Java.

Re:haxe (1)

ncannasse (976609) | more than 8 years ago | (#15622265)

Yes but having dynamic typing 100% of the time or static typing 100% of the time is maybe not the best. While typing helps for general application architectures, there are times (like when accessing the HTML DOM) when you simply want to turn it off locally or it becomes a bother.

YAHOO UI Toolkit (4, Interesting)

Foofoobar (318279) | more than 8 years ago | (#15621280)

We've already got an MVC LAMP architecture here at work and I have limited Javascript development until the framework was further along. But now the designers are getting edgy because I won't let them incorporate Javascript.

My issue was that I wanted a unified javascript library so we didn't have redundant code snippets all over the place and some way to standardize the development. So after a little searching, I found the Yahoo UI toolkit that is still in beta. It's a unified javascript library released under a BSD license that has been tested in multiple browsers.

No I have a unified library, tested in multiple browsers and standardized that all I have to do is drop into a directory and hook into the framework.

I know this is probably unrelated but since we were talking about toolkits, I thought this would be handy to mention this as well since it saved us a month of work.

Re:YAHOO UI Toolkit (2, Interesting)

Reality Master 101 (179095) | more than 8 years ago | (#15622149)

Google gets the lion's share of publicity, but there are a lot of AJAX toolkits [ajaxlistings.com] out there that do a lot of the grunt work. I've been thinking about using some AJAX in a project I'm working on, and Yahoo was definitely one of the ones I'm considering. The "Sajax" one also looks interesting.

Why not learn the tools instead (5, Insightful)

Anonymous Coward | more than 8 years ago | (#15621445)

Hmm, all the examples in the article look pretty much the same than they were written in JavaScript, but in a more complex way. Why not actually learn the trade. Its easier to fix problems if you're working with the actual code that runs in the browser, not the "meta code".

Re:Why not learn the tools instead (5, Insightful)

richdun (672214) | more than 8 years ago | (#15621534)

Almost modded up, but hopefully someone else will take care of it for me.

Expanding on parent's point, a lot of problems I see in my short time in web development is that too many people are getting into it not by learning basics (like how to build a well-formed XHTML/HTML document with DTD and such, or how to make an image swap sources onmouseover or whatever) but by diving straight into frameworks. I understand the want (and need, in some case) to make programming of all flavors more non-programmer friendly, but without that base foundation we'll end up with a bunch of forums full of "how do i make it do this" questions that are elementary in nature and, even worse, a bunch of web apps that are riddled with problems in security, UI, or other. There's no harm in asking questions, but when everyone is asking the same question that is answered in chapter 2 of any good HTML book, that's a lot of wasted time.

I'm not saying everyone needs to learn how to build Slashcode from the ground up using only Notepad, Mountain Dew, and a bag of Doritos, but learning the basics first then going to a framework to speed up your work on complex projects would seem like a better option. It will almost always be cheaper and faster to write simple things in the base language, but so many are so fixed on frameworks they wouldn't know how to do that.

Re:Why not learn the tools instead (1, Interesting)

Anonymous Coward | more than 8 years ago | (#15622624)

HTML/Javascript developer - Mountain Dew and a bag of Doritos

Java developer - Evian and arugula salad with roquefort dressing

Fortran developer - coffee and ham sandwich on Wonder Bread

XML developer - cyanide

Google Map's GWT API 1.1.5 (1, Interesting)

lenulus (737004) | more than 8 years ago | (#15621481)

Hey, this is a bit of a shameless plug for my open source project, but it's on topic to GWT. Speaking to the subject of the post, regarding the utility of GWT, I point to my API and API like it so say there is probably a larger market for GWT than this fellow is speculating, and frankly from my experience with the interface I don't see how he could reasonablely charictarize it as all-or-none (the project google generates is example of how to integrate google GWT into your current HTML using named elements and replacing them....). Features: Fully implemented all the major classes including the new Geocoder and events. Available for download on SourceForge (http://sourceforge.net/projects/gwt/). For anyone interested in helping help please e-mail me (developers, testers, documenters welcome).

In all fairness (-1, Troll)

argoff (142580) | more than 8 years ago | (#15621490)

In all fairness, untill Sun works out the java problems reguarding their control and non-free implementation, it's simply not worth it for developers to lock themselves in like that.

Re:In all fairness (1)

toriver (11308) | more than 8 years ago | (#15622494)

Bah. Until certain whiners in the OSS community gets off their asses and work on the existing OSS implementations instead of demanding a non-OSS implementation should be opened up, it's simply not worth it debating with them like that.

It's not like GCC was written by AT&T.

Article misses the point a bit? (4, Informative)

Penguin Programmer (241752) | more than 8 years ago | (#15621548)

I would never, ever, ever even _think_ of trying to write an Ajax application. I hate javascript way too much for that, and the whole asynchronous web-page dynamicness scares the shit out of me. However, I can stand writing GUI code in Java, and I already have some knowledge of how it works. GWT enables me to write super-cool Ajax websites without worrying a bit about javascript. I think this is the true power of GWT: it enables _application_ developers (rather than web developers) to write nice web applications without learning a whole new skillset. This is a win for developers because we can do cool things without learning a whole new trade, and it's a win for consumers because web apps can be written by skilled application developers instead of photoshop gurus.

Also, just because GWT provides some server-side machinery doesn't mean you have to use it. GWT will happily make asynchronous calls to any old URL, so you can write your backend in PHP or Perl or C or whatever you like. Personally, I've been playing with GWT using PHP/SQLite as my backend (following Juan Hurtado's great tutorial [googlepages.com] ). It works great, and since I'm already comfortable with Java, PHP and SQL, it doesn't require a steep learning curve to create very nice web apps.

That said, I will certainly be taking a deeper look at TFA later and perhaps following its example to learn how to use the Java server-side machinery. Could be interesting.

Re:Article misses the point a bit? (1)

An Onerous Coward (222037) | more than 8 years ago | (#15621731)

Anything in particular about Javascript that draws your ire? Last year, I knew almost nothing of it, and my mind associated it with nothing but ugly, hackish code to deliver ugly, annoying popups and redirect you to malicious websites.

Under duress, I've had to become familiar with it these last few months, and it really does have some impressive capabilities. Try investigating the prototype.js library; lots of things in there that show just how elegant Javascript code can be, especially if you're a Python/Ruby fan.

Re:Article misses the point a bit? (1)

pkulak (815640) | more than 8 years ago | (#15622021)

I've programmed extensivly in Java and JavaScript and I prefer JavaScript + Prototype. There are plenty of advantages of an interpreted language, with the disadvantage of execution speed. By writing JavaScript in Java you get the rigidness of a compiled language with the slowness of an interpreted one... yay!

counter = 0;
rows.each(function(row) {
   counter++;
   row.onclick = function() {
      alert("You clicked on row " + counter);
   };
});

You can't do cool stuff like that in Java (sytax may be a bit off, but you get the idea).

Re:Article misses the point a bit? (0)

Anonymous Coward | more than 8 years ago | (#15622948)

Actually, you can achieve the exact same thing in Java by using an anonymous inner class. Obviously, the syntax would be different but that is most definitely doable. It would be at the most 2 or 3 lines longer, possibly 2 or 3 lines shorter, depending on your coding style.

GWT vs. Echo2 (4, Interesting)

arigi (932824) | more than 8 years ago | (#15621560)

This seems like a useful article. At work we were just discussing the possibilities of using the GWT. Currently we use NextApp's Echo1 and are also pondering upgrading to Echo2 [nextapp.com] . The demo app for Echo2 is actually mighty impressive; I'd say moreso than GWT's. Though I wonder how much of it is just more time spent on fancy graphics as opposed to a better quality framework.

Re:GWT vs. Echo2 (2, Informative)

distributed (714952) | more than 8 years ago | (#15622923)

The team I used to work for 3 years ago wanted a web gui layer framework similar to this back then.. and i remember Echo 1.x was one of the first ones we prototyped. Then there also was millstone http://www.millstone.org/ [millstone.org] And i think echo was also featured on slashdot http://developers.slashdot.org/article.pl?sid=03/0 9/09/2337216 [slashdot.org]
Echo 2.x seems to have now added support for ajax.. a demo is available here: http://demo.nextapp.com/Demo/app [nextapp.com] ..and it runs smoother than the ajax controls found on flickr atleast. In the end it seemed that the world wasnt ready for this... and higher management didnt like the risk associated with trying something completely new.

I'm confused... (0)

Anonymous Coward | more than 8 years ago | (#15621580)

Does using Java to write JavaScript make you some sort of super Java ninja?

Why GWT Isn't A Good Framework (4, Interesting)

WombatControl (74685) | more than 8 years ago | (#15621626)

As a disclaimer, I'm a huge fan of Ruby on Rails, and not at all a fan of Java.

The problem with the GWT and other framworks like it as it ignores the reality that browsers today suck. IE's rendering engine is suckier than Monica Lewinsky holding a Dyson at the event horizon of a black hole. Firefox doesn't quite yet pass Acid2, but is as close to a reference platform as one can get. Safari shows promise, but it has a weak JavaScript environment that doesn't support things like ContentEditable. The whole problem is that the GWT assumes a much more stable platform than actually exists.

The real challenge for web application developers is that there are no frameworks (that I know of) that provide for things like fully semantic code, graceful degradation of capabilities, and full separation of content, behavior, and presentation. (For why that separation is important A List Apart has a great article on the subject [alistapart.com] .) Not even Ruby on Rails gets this right by default.

GWT tries too hard to abstract the actual code that user agents see from the code the programmers create - and that level of abstraction just doesn't work yet. Just like trying to translate a passage in French to English and Japanese with a machine translator, the GWT tries to take Java code and translate it into a mish-mash of XHTML, CSS, and JavaScript - and the results are as mangled as one would expect.

Until someone comes along with a framework that creates clean, semantic code with full separation of behavior, presentation, and content, web application developers have to be mindful of their code and do a lot by hand. Frameworks can save time, but they also cause a trade-off in terms of code quality and compatibilty. The GWT goes too far in that balance IMHO, and isn't something I'd use to develop public applications. Like ASP.NET, it's too reliant on abstracting XHTML/CSS/JavaScript from what the programmers deal with, and that always leads to bloated masses of code that frustrate users and hog bandwidth.

Re:Why GWT Isn't A Good Framework (3, Insightful)

kevin_conaway (585204) | more than 8 years ago | (#15622058)

IE's rendering engine is suckier than Monica Lewinsky holding a Dyson at the event horizon of a black hole

Mod -1: Trying too hard.

Seriously though, you say GWT tries to take Java code and translate it into a mish-mash of XHTML, CSS, and JavaScript - and the results are as mangled as one would expect. and then go on to say Until someone comes along with a framework that creates clean, semantic code with full separation of behavior, presentation, and content.... Isn't that kind of contradictory? If its spitting out xhtml, css and javascript, that seems like content, presentation, and behavior are all clearly defined.

Re:Why GWT Isn't A Good Framework (0)

Anonymous Coward | more than 8 years ago | (#15622158)

That's not the point of GWT.

GWT is an attempt, as I see it, to create intranet applications where everyone is expect to be running Safari or the latest build of Firefox.

full separation (1)

airdrummer (547536) | more than 8 years ago | (#15622308)

is terence parr's mantra: http://www.cs.usfca.edu/~parrt/papers/mvc.template s.pdf [usfca.edu]

i've used his http://stringtemplate.org/ [stringtemplate.org] in a webapp with pretty good results...even if stringtemplating is itself a form of programming, at least it keeps java out of html:-)

Unobtrusive JavaScript (1)

booch (4157) | more than 8 years ago | (#15621646)

I'd prefer to see a toolkit that provides unobtrusive JavaScript [adactio.com] . Basically, you'd tag (with a specific class) the HTML elements that you'd want to act as UI widgets. Then include the JavaScript file, and the JavaScript file does all the work. This provides graceful degradation -- if they don't have JavaScript, they just get the original HTML. And it lets you use all your standard HTML tools, so your designers can still handle all the look and feel, without having to deal with anything besides HTML and CSS.

application development, web interface (1)

radarsat1 (786772) | more than 8 years ago | (#15622419)

Interesting, I'm not really a web developer except for a bit of custom javascript DHTML stuff I've done.
(Yes, most of my web experience comes from the days when it was just called DHTML..)

This is the first time I've peeked into a platform like this... it's really interesting how close it is to writing a GUI application, like in SWT or something. (Again, I've only done a little bit of SWT, since I don't prefer Java most of the time, but it definitely has its place.)

But I find it amazing how it seems totally incidental that it happens to use the web for rendering its interface. What it really makes me think of is the possibility of writing multiple back-ends for it. Imagine using it to write applications that can compile to both a GUI environment, using native Win32/GTK/Cocoa elements, and then also be able to easily re-compile to a web application. Not sure there'd be any point to that, come to think of it, but the idea sounds cool for some reason. ;-)

Or imagine writing an application which is totally local, but happens to use a browser for its interface. It could embed a mini HTTP server in it.. well, I know this has been done before, but this is the first time I've seen an API that actually makes the idea somewhat attractive to me. It would solve the multiplatform GUI problem by just using whatever browser the user happens to prefer.

Anyways, now if only I could use GWT from Python instead of Java.. ;-)
(Same goes for SWT by the way.. the PySWT project isn't very useful yet. Sigh..)

Google Web ... (2, Funny)

kompiluj (677438) | more than 8 years ago | (#15622761)

Did you say "Google Web Rootkit"?
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?