GWT with a Content Management System - java

After seeing some of the benefits of GWT, my partner and I decided that it would be a good front end for the web app we hope to build. A main part of this web app will be content management. We were hoping to use a CMS framework and put GWT on the front end, but all the open source CMS systems we find seem to be very tied to their front end.
Does anybody know of a CMS that would work well with GWT?

I think it all depends on how much integration you want, specifically, what you want to do with GWT. We have successfully integrated GWT with Documentum + Java on the back end.
With that said, our integration is fairly light. The site is largely a content oriented website, but we use GWT to:
Implement certain more dynamic widgets (e.g., text box with intelligent auto completion, font size changers).
Enhance content in the CMS to make it more animated (for instance, instead of displaying lots of content in a single screen, we use GWT's tab panel to display chunks at a time, while still allowing content authors to manage our content).
Implement "mini-apps" within the site.
Unfortunately, since this is something I do for a client, I cannot specifically mention the site by name in public, but if you're interested, I can share some details with you via e-mail.

No, but I can tell you that using a Java based CMS will make your life much much easier. GWT lives on RPC calls, and while translation / JSON overlays are possible, you're much better off with a Java backend.
You mind find this difficult, though, because when you want to use GWT you're doing a massive amount of work on the front end, leaving the backend mostly data processing and storage. Since very few CMSs are designed to do nothing more than processing and storage, you might be better off building your own.
That said, you might find it very easy if you're open to using App Engine. The GWT + App Engine stack works really well, now has a great Eclipse plugin dedicated to it, and is free to get started with.

Try the Nuxeo CMS/EMS, which is implemented in Java. Search google for "nuxeo", and also search for "nuxeo gwt" for a variety of tutorials on integrating GWT with Nuxeo.

Related

GWT Strength compared to other framework?

One of the main strength of GWT is to code in java and everything gets compiled and is loaded by several browsers through gwt deferred binding??
Apart from this, i.e. working only on a single code base, do GWT has any other advantage compared to other existing framework??
Edit:
I'm trying to say why should we use gwt and not another framework?? What is there in GWT that makes it special for web application development?? What GWT makes for us and another framework or toolkit don't do??
As i said above GWT makes deferred binding which is a plus, so I wanted what other things it do that makes it special and unique??
My point of view :
Pure Java : In standard web application you write html, css, php, javascript, mysql and others and others. In gwt you write java and java and java. Pure Java knowledge is enough for everything.
gwt-rpc mechanism is very simple to communicate with server and uibinder or any other tools are enough for ui development. plus there are many widgets that facilitate front-end developing
Debug : Debugging Java code is very very easy than debugging Javascript code
MVP Development with Activities and Places
Compiler that you can do all the thing, that you can do in Javascript, in GWT. In addition, working with JSON and XML is very easy and History management is unbleviable
and at last I'm a big big fan of Google and they did it so they did the right thing
One of the other benefits of GWT is that you can share code between the client and server components of your app. For example, if you're doing a graphical app you can write computational geometry code and have the same code evaluate on both sides. Of course, you can also do the same thing by using server-side Javascript (for example, Node.js), but server-side Java has serious advantages for performance, ease of deployment, and interoperability with other things.
My favorite benefit is their RPC mechanisms. JSON gives you a huge reduction in payload size, but GWT's serialization policies allow the data to be sent over the wire without key labels for each value and reduces payload size by another 30% or so. On top of that, its easy to build those services using Spring and Hibernate.
Another benefit is the use of md5 hashes for the filenames of compiled JavaScript, allowing you to set never expires cache headers for all of your code.
Last but not least (actually, it is the least cool of the benefits), there are free tools now for GUI design so you don't have to build a GUI by writing XML and Java or HTML and CSS.
GWT follows a principle of no compromise high-performance Javascript.
They have already invested a lot of work into making your application highly performant. For instance, the "compiled" Javascript files it generates are actually .html files. This is due to an issue that some browsers do not correctly support compressed .js files. This sort of tweaking is beyond what most people would do manually.
There are easy to use tools to help you improve the performance of your own application. GWT.runAsync, for instance, allows you to define splitting points in your Javascript which will be used to automatically divide up monolithic Javascript files into bite sized chunks to load.
As has been said, the RPC mechanism performance and ease of design is amazing. MD5 hash based names for the compiled Javascript means for great caching.
My biggest plus for GWT still has to be the debugging capabilities. Javascript debugging has always been messy and frustrating. With GWT you can employ the full debugging facilities of Java when working on your client side code.
There are no simple answers to these questions:
I'm trying to say why should we use
gwt and not another framework?? What
is there in GWT that makes it special
for web application development?? What
GWT makes for us and another framework
or toolkit don't do??
There is no silver bullet. Everything depends on the project and requirements. GWT may be good in one project and other frameworks may be good in other projects. It also depends which other frameworks are taken into account.
In my opinion the most significant element which makes GWT different from almost all other Java web frameworks is that the client side is fully in JavaScript while most of other frameworks generate usually plain HTML code. The JavaScript approach to the client has its benefits, to name a few:
it is fully AJAX which creates great user experience,
views state is managed in the browser,
it communicates with the server asynchronously;
it communicates with the server only to get the datal
However, there are also some drawbacks:
browser history support - it isn't as good as in HTML based frameworks; proper use of history mechanism isn't easy and requires extra effort from developers;
applications aren't SEO friendly;
more complicated page layouts may kill web browsers - sometimes it takes a long time to generate a page, especially when using additional component libraries;
For developers it is very important that GWT hides JS from them. You write in Java and you get fully working AJAX based client application in JS usually without touching a single line of JS. This is great especially when you need a lot of AJAX in your application and you don't know JS. This is specific to GWT - using JS and AJAX in other frameworks isn't usually that easy (Vaadin may be an exception but it is GWT based).
It is worth mentioning that in many cases GWT can be combined with other web frameworks - this way you can have most of you application content created in HTML based frameworks and some more complicated AJAX parts in GWT.
If you want a recent comparison of Java Web Frameworks, here is an interesting presentation from Devoxx 2010 :
http://raibledesigns.com/rd/entry/my_comparing_jvm_web_frameworks

I want to make a "Web 2.0" application without using JavaScript directly

I'm a full time Java developer of around 4 years, professionally. I'm a GWT fanatic. I love Java. Here's the problem: In my free time I often fall victim to the verbosity of my favorite tools for doing "heavy" development. I also often fall into the trap of obsessively engineering my software. I'll end up with the most beautiful unfinished implementation, ever.
So, here's what I normally work with.
GWT - I use this for dynamic UI and web layout. I love the ease of re-use and it has taught me to absolutely hate javascript. I really can't even bring myself to do much HTML/JS anymore.
Hibernate - POJO to Database, easy-peasy. What i really need from this other than the mapping is that it allows me to have an application that works across multiple databases.
Spring - Mostly security. I've written my own custom LDAP bits for a project.
XML - I've used dom4j and other implementations, including xstreamer. I'd like to use JiBX for XML transport. The problem with this is that I need XML messages that conform to a specific standard rather than being autogenerated. Object->XML->Object are also common enough that it can be a performance bottleneck with large messages (250KB+).
I tried Lombok for a little while and liked it but had occasional issues with it and then I blew up a partition and lost all that work. I don't really feel like doing the same thing again (half the fun was in learning how to do it, now that I know... meh). This taught me why other people want to reduce the explicit code and replace it with an implicit system.
I've been looking into Grails but that runs me into the JavaScript problem (you know, that I don't like it) pretty quickly. I could use GWT with Grails on the back end but I get back into the problem of getting deep in the weeds with GWT. It has also occurred to me that there might be a way to have Grails tags in GSP that are made up of GWT widgets. I'm not really sure how I feel about that.
Another problem I have with Grails is that validation logic before form submission is separated from validation constraints after submission. I don't see how they can be unified (yet) to produce "pretty" front-end validation. I went out of my way to start a JSR-303 compliant validation project for GWT to help solve some of this problem for GWT and really liked the results. It isn't finished but I still find it useful.
So, help me find a better way!
TL;DR - I want to have a Database (and Database-Independent) to GUI solution that allows for dynamic web programming all in one language. Failing that, as close to one language as possible.
TL;DR is TL;DR - I hate JavaScript now, help.
EDIT: I know that it is techincally impossible to do "Web 2.0" development without JavaScript. I'm just trying to not be the guy who has to write it. (Getting a tool such as GWT to do it for me from a language I do like, for example.)
Just learn JavaScript.
Resistance is Futile
...and you will be assimilated.
PD: I'm an ex JavaScript enemy. Now it's my favourite language.
You can certainly develop an entire Web 2.0 project without coding Javascript using GWT (we have), but at the end of the day you still have to know HTML/CSS & Javascript.
This might sound like a stupid statement, but it's not once you consider that GWT is not a perfect abstraction, nor is it designed to be. It wasn't written in Java so that you didn't have to ever code in Javascript again, instead they did it because Java has better IDE's, is statically typed and makes maintenance a hell of a lot easier.
So yes, by all means go with GWT (and check out the new OOPHM, because it's AWESOME) but don't forget that you'll always need an understanding of the underlying frameworks of the web, if you want to develop for the web.
Have you heard of Echo?
It doesn't provide the database part of the problem, but it would work well with any database that you can work well with.
Echo is a platform for building
web-based applications that approach
the capabilities of rich clients. The
applications are developed using a
component-oriented and event-driven
API, eliminating the need to deal with
the "page-based" nature of browsers.
To the developer, Echo works just like
a user interface toolkit.
The latest iteration, Echo3, features
the ability to write applications in
either server-side Java or client-side
JavaScript. Server-side applications
run in any Java Servlet Container and
do not require developer knowledge of
HTML, HTTP, or JavaScript.
You might want to take a look at some of the AJAX powered JSF libraries. IceFaces and RichFaces are both solid.
Been there, done that. I was a GWT developer for 3 years... I started using it in v1.1! GWT is fantastic, and works really well for small applications. But the development comes to a crawl once you it a moderate application size, even if you divide your application in sub-modules.
It is also quite ironic that a UI framework has such limited UI creation tools. :)
Personally I bit the bullet and learned javascript. It isn't as bad as I thought. Especially with jQuery. :)
Obviously there is no perfect framework. But just the fact that GWT has been out for 3.5 years now, and it still largerly ignored in the Java world should tell you something. Since you're doing this on your free time, I would recommend learning the most popular framework: Struts. You'll see its limitation, and also why it is so popular. Of course, you'll need jQuery for that 2.0 functionalities. :)
Take a look at JRapid, a rapid development platform for Java developers. It generates very powerful Ajax enabled UI without the need of coding.
Not sure if you would like this , but have you heard about Haxe?
You might not like it but its AIO (all in one) solution (sort of).
I can understand your dislike of JavaScript and it certainly has its problems but I think your fighting nature at this point.
Web 2.0 is strongly based on JavaScript for a good reason as it provides the ability to perform tasks on the client machine without requiring page loads.
I'm sure there are alternatives but if you want the look and feel of Web 2.0, you will end up doing a lot more work with little reward. JavaScript is the accepted and functional tool for the job.
I'd say stick with GWT and just drink more of the Koolaid. It's a completely awesome development model that seems to be lost on those who haven't tried it.
If you want to improve your GWT experience, jump to the bleeding edge (I work off trunk, it's quite stable) and use the other Google originated projects like GIN, gwt-incubator and Guice. Especially watch Ray Ryan's GWT best-practices Google I/O talk: http://www.youtube.com/watch?v=PDuhR18-EdM
As for the "framework" part: forget 'em. Just use normal servlets and let GWT take care of the RPC for you. Servlets are a pain when you have to deal with JSP and you're own AJAX calls, but when they're only implementing asynchronous app logic, it's not that bad at all. Guice Servlet makes it all quite easy. You can still use a JVM hosted language to write your servlets if you want.
GWT has an incredible advantage over other JavaScript frameworks in that the layer of abstraction it provides allows for major future advances without any changes to your code. If the GWT compiler and browser detection scripts can take advantage of new browser features then you benefit from a simple recompile.
The big annoyance I see in your requirements in XML... hopefully that's just for integration with a 3rd party service and your client-server communication can just be GWT-RPC.
I don't use javascript or ajax, in medium-large application they create a lot of problem with compatibility, because moving some part of code inside client, create security breaches and problem with different browser.
I use only HTML(5) and CSS2/CSS3, and I have a lot successes.
I use this 2 ways:
using "puzzle-techinque". Write a lot of small and simple template (or tiles) to create the big page. I use only JSTL and Spring tag, with Rich/Prime/Ice-faces I encountered a lot of problem with rendering, page building and flow controller, so I discarded them.
using my custom library to parse HTML pages. I create template with my custom grammar, put inside the parser and write on output stream. This is the best way.
If you say me your preferred language and context, I can help you to perform JS-free.

Can GWT be made accessible for users with JavaScript disabled?

My question concerns Google Web Toolkit (GWT). I'm about to begin development for a project that will reside on an Intranet where some users may have JavaScript disabled. After seeing what GWT has done for Google Wave I've been very interested in learning and applying it to this new project, but if it isn't accessible to those users then I don't think I'll be able to use it. I noticed that the example applications on the GWT website don't work at all with JavaScript disabled. So, can GWT be used in a way where content and functionality is still accessible to users with JavaScript disabled? If not, wouldn't this be a massive oversight by Google?
If it's of any use, this project will be using Spring MVC 3.0 with Hibernate and JPA.
The whole problem that GWT solves is JavaScript and AJAX programming. If you aren't targeting browsers that have that enabled, then GWT is not for your project. I wouldn't say its an oversight at all. Developing a framework that would leave JavaScript optional would either be very lowest common denominator, or very frustrating, as many features would have to be noted as requiring JavaScript.
Q: Can an entirely javascript based framework work with javascript turned off?
A: No
You could of course detect whether javascript is enabled and build an entirely different site for those users, but why bother? Tell them to turn javascript on if they want to use your site. Let's face it 30% of the internet is broken without javascript, and turning it off is very rare these days. That's 90's thinking that is ;)
GWT is a great tool in cleanup the badness of JS that is for certain, but it can't fix the bad developments and the whole world of other bad JS sites. So the cops and govs turn off them perhaps for a reason. The various flash are good looking and very interactive but I always find them over do the presentation as to the content and functionality. The ones that offers both doesn't seems to be very robust.
If you really like GWT and they are turning off the JS for the world, will they willing to turn it back on if the incoming JS contents are striped out at their internet gateway?
GWT: Java->JS "compiler".
So, no.

JavaFX or RIA desktop app (on dvd) also available on the web?

Is it possible to develop an application easily available on the web that also can be distributed on DVD (installer or started from the dvd)?
For the moment, we use static html (frameset!) pages (generated by xml files), with one difference: pdf's are only on the DVD version, the web version only shows a preview of these files.
Can this be done with JavaFX, OpenLaszlo or are there better options?
(for example: turbogears, and using tg2exe for DVD version)
I think if you design it correctly to begin with, a JavaFX app can be interchanged between web-app and desktop-app relatively easily. However, I've only done this with very simple apps (specifically, Tic-Tac-Toe!), so I'm sure there might exist some caveats that I am unaware of (thus the "design it correctly" catch-all). ;)
Why don't you just provide the PDFs in your current web version, rather than redeveloping everything? I'm not aware of any browsers that don't support in-browser PDF reading anymore.
Yes JavaFX or Flash applications can be used to develop applications that run in different contexts.
However, it's not clear from your question why these would be preferable over your current solution.
If the information your sharing is primarily text and you're using DVD because your audience is primarily located in area with bad Internet connectivity, then you're current approach probably makes more sense. JavaFX or Flash might be more fun to write for developers but maybe doesn't serve your audience.
I would suggest that if you are shipping DVD and are looking for ways to make the DVD more useful than as a PDF delivery system would be to add video to the DVDs. And then maybe it would make more sense to use JavaFX or Flash to drive the UI.
Yes, it is possible. If you use JavaFX you will be allowed use multiple deployments. For example, NetBeans 6.7.1 with JavaFX creates several possible deployments from one project. Then you can publish this application on web, DVD, etc. You will need to slightly customize standalone deployment for DVD to be able e.g. start it as autorun if necessary. JavaFX is good choice.
This seems like a job for flex, however I know better little about it to give a better answer.

How can I make the SmartGWT core smaller?

I have recently written a Hello World application using SmartGWT and noticed that the size of the application is huge. In my case it is over 600kb just for that application.
I think that size is obscene so I narrowed the culprit down to two core libraries, ISC_Core and ISC_Foundation which combine for a total size of 649kb. Is there anyway to reduce the bloat of these libraries?
Any help would be appreciated.
SmartGWT is not designed for Hello World applications, but for sophisticated enterprise applications that work with lots of entities and have lots of screens. In that use case, the final delivered size of a SmartGWT application is comparable to, if not smaller than the size you would get working with any other technology.
Basically if you tackle a larger-scale application with a flyweight technology, you end up with application code that re-creates the features that are already in SmartGWT. There's no bloat - SmartGWT is very compact on a features-per-byte basis - there's just more features.
If you really have an ultra-lightweight use case - say, adding minor interactivity to a web site that consists mostly of static content - then JQuery and other ultra-lightweight frameworks are the way to go. A lot of enterprises use a mixture of JQuery and SmartGWT/SmartClient, each for different purposes.
Unfortunately you cannot, as SmartGWT have already stated here the size will remain constant or even increase. I tried SmartGWT but because of this issue and 3rd party framework integration problems I chose another framework.
A possible solution to their problem would be to introduce a dynamic JavaScript loader like is present in ZK. I have used it in my enterprise projects and it works very well.
Nowadays for smaller applications I tend to use jQuery directly.
As Charles stated you have to keep in mind that you actually build a rich client on a single HTML page, so it's loaded just once. You can preload the libraries on a login page where nobody notices it while he is entering the credentials.
Take a look at http://www.smartclient.com/docs/7.0rc2/a/b/c/go.html#group..networkPerformance
If the foot print is really important to you, you might consider Ext GWT. Ext GWT has everything done in Java (and compiled with GWT). It techincally could remove the codes that your application doesn't count on.

Categories

Resources