I am quite used to creating user interfaces with HTML/CSS/JS. However, I am working on a JAVA application that utilizes Wicket.
Can anyone point to me anything that shows how to create a ui with Wicket, from a stand point such as mine? If that makes sense. I have been trying to understand how I am going to develop the UI after reading many articles and meeting with our developers. I am just not wrapping my head around how to do it.
Also, from what I know, does it make sense to actually use Wicket when you have a ui designer and developer on staff who can create an MVC UI from scratch?
Please, if this doesn't make sense I hope you feel compelled to ask questions to pull whatever info you need and I am not saying. I am desperately trying to figure a.) does wicket make sense still, b.)how in the heck do I build a UI using it!
I think it can't get better than the examples in wicketstuff. You can just parse through the forminput sample. The sourcecode button is on right top.
There is indeed a small curve related to getting started with wicket as it changes the complete direction of thinking towards web GUI.
Basically, the idea of wicket is to have HTML template pages with some wicket markup placeholders that will be filled by the parallel java class.
The best way is to start looking at wicket tutorials on the official Wicket website. Then there is wicketstuff, which also has a very comprehensive collection as mentioned by Suraj Chandran. Most examples show you both Java and the associated HTML markup.
Even if you are not a Java developer it would be beneficial for you to understand how different Wicket markup tags get interpreted and how a Wicket-based application is built from several HTML pages, borders, panels and other Wicket-related components.
Wicket is very good for separating Java code from HTML (much better than frameworks that use JSP, PHP, and other technologies that mix code with HTML). Because there is no Java source code in the HTML pages it makes it easier for designers to work independently of the developers. Also HTML files can be edited in HTML editor programs like Dreamweaver directly.
If you are a Dreamweaver user and are familiar with Template and Library functions, then in the Wicket world you will find very similar concepts. Dreamweaver Template = Wicket Border, Dreamweaver Library Item = Wicket Panel, for example.
Related
Some background, normally when I start a new project, a designer creates the HTML template, images, and css for it, and then passes it on to me. I then write the javascript and PHP code needed to get the site working.
However I'm considering moving to google web toolkit so I can code the site using Java rather than Javascript/PHP. The obstacle however, is how I would import the designer's HTML and CSS into GWT.
From what I've seen there doesn't seem to be any easy way of doing so? Alternatively if I coded everything in GWT first, and he was able to just style everything using CSS to make them look how he needs them to, that would also work. But would he be able to do that using just css alone?
Any ideas?
We are a one-designer two-programmer team and we have been having a great time with plain UiBinders, no GWT Designer involved. Our process has two basic modes:
The designer writes plain HTML and we convert it to UiBinder later, or
We make the basic UiBinder and he finishes it up with the necessary structure and Css.
We choose either mode based on how the chips fall in our design process. It's really natural and works great.
The designer had to learn:
CssResources (e.g. addStyleNames='{resources.css.style}' instead of class='style')
ImageResources (e.g. adding them to ClientBundles with the GPE)
UiBinder syntax (e.g. <g:TextBox> instead of <input>)
It was pretty natural. The correlation to HTML and CSS is extremely high, and he can transfer his html/css skills directly to UiBinder.
I have no experience with GWT designer, but I see it as another tool in the middle of our process. Maybe it's worth it, but it's not so hard to avoid it. I used an early iteration right after it joined the official GWT repository and it was super obnoxious.
Pay attention to the GWT Designer. It's UI creating wizard that supports GWT. GWT Designer has visual tools to generate a code for you.
Can anyone suggest a good UI framework that can be used in a Java EE web application?
I will be doing a project that requires to generate a web UI on the fly. Regular JSP page coding makes it hard to do. There is a framework called Vaadin. It looks good to do a dynamic UI implementation. However, I don't know if it stable for production use. If there is any other good suggestion, please let me know.
I'd suggest Wicket. It's been in production use for years, it's very stable, it's very programmer-friendly, and it can easily handle dynamic UIs.
(But I have to agree that the Vaadin demos look hot)
I would say vaadin would be easier over wicket as the default UI elements look really good.
Wicket, you will need to create your own css to make things look good (other than default html UI)
vaadin 6.5.0 was released a couple of days ago and has been there for a long time but recently made open source probably around 2-3 years ago at most if i remember right.
I love both Vaadin and Wicket and my opinion is that they are the best 2 frameworks out there.
However, for this case, I would choose vaadin cause it is easier to get better looking UI elements
I have the following question:
First of all, I know (and have some academic experience on) JSP and Struts but I know nothing at all about JSF.
There is a project that has its front-end already made using applets.
I was asked to look into to change/upgrade it to JSF.
So my question is, is this an easy or at least straightforward task?
I am asking this since i)I do not know the learning curve of JSF and ii)I have given up on learning applets long time ago (I presumed this technology dead)
Any input on this is highly welcome!
UPDATE: If it makes any difference, they want to leave applets due to the sandbox restrictions.
Thanks
Programming in JSF requires solid knowledge of the Servlet API and understanding of the ideology behind using a (component based) MVC framework on top of Servlet API. It also requires solid understanding of the "client side" and "server side" aspects in web development. If you lack any of those understandings, then the learning curve will indeed be pretty steep.
With JSF you basically end up with a JSP or XHTML (Facelets) page as View and an ordinary Javabean class as Model. You also need to realize that an applet is basically a piece of software which runs at the client machine and that JSF runs on webserver, generates HTML/CSS/JS which get sent to the webbrowser where it get interpreted/applied/executed. It doesn't run Java code at the webbrowser as an applet can do. It's a huge difference.
To get started with learning JSF, you need at least to have the minimum required skills for Java webdevelopment, then you can start with either of the following tutorials:
Java EE 6 tutorial - JSF 2.0
Coreservlets tutorials - JSF 2.0
Moving from Struts to JSF is a paradigm shift in the way you approach a problem (my opinion). Struts uses action based model while JSF uses component model (something like writing a desktop GUI application using Swing etc). And to make things even harder for developers, JSF comes with complex request processing life cycle backed up by a no-good-for real world problems implementation in JSF 1.1.
I've seen people moving from struts to JSF struggling a lot and thus producing a code base that is mix of both the worlds (action based and component based). This mixed code base is very hard to maintain and debug.
Having said that, JSF is still the spec and if you can use JSF 2.0 (or atleast JSF 1.2) with Facelets, then my suggestion is to do a simple proof of concept considering the below factors
Learn the basics JSF 2.0 or 1.2 with Facelets
Take up a complex use case (in terms
of dynamic UI) supported by the
current applet
Build it end to end covering validation, templating, listners, actions
Then do the same usecase in GWT or Vaadin. I am suggesting this because your users are currently used to thick clients using applets and GWT is meant for this
And if you finally happen to choose JSF 1.2 or 2.0 then I highly recommend using the PrimeFaces component suite. It is fast, simple and rich with components.
In general I don't think I'd call that an easy and straight forward conversion, because the environments are so different. With the applet the java code runs on the client system and communicates back to the server with some kind of protocol. JSF runs all the code in the server and can access your data directly. For planning purposes, I would not expect to be able to use any of the existing UI code.
There are libraries out that that take your Swing program and turns it into a web based application. I haven't used any of them, but I know people that have had good success. It would depend on which direction you want to take the application. JSF is gaining ground so the tools based on it will only get better.
I'm a complete noob when it comes to portlet development. I have a task which is to take a fairly small static html site and incorporate it into a portal/portlet environment.
My first thought is to develop one portlet that contains the entire html site within it.
Is this just a terrible idea?
If not, then I know I could make a simple portlet with an iframe to pull in the html for the site, but is there some other way to make a portlet that is a full functional little website?
Any help is greatly appreciated.
That's a pretty vague question, but I don't see why ou can't do what you're trying to do.
The Portlet API is pretty unpleasant, though, and makes the servlet API look fluffy and joyous. I suggest using Spring's Portlet MVC support to make it a bit less painful.
I dont think that you can and want "put" a whole website into a portlet because of the limitations of the api. Even if the website is servlet based that seems not to be a good idea.
From a user perspective you should perhaps focus on your widget idea. Think about a smaller subset that encapsules the functionality of the website that should be embedded or write an aggregator for the information of the site.
Think about why the website should be integrated and which information of the site are the most important ones. Perhaps there are any other information exchange interfaces like rss or atom feeds that you can use.
Another solution would be to use an existing cms-like portlet that can be "filled" with content. Here are some examples: http://www.jboss.org/portletswap/portlets_collab.html
Coming from PHP with some Java Struts 2.0 experience any tips/tricks on learning GWT? I have been looking at some tutorials but just wanted to know if anyone has some great gems to pass along?
As someone that has done PHP, Struts2 and GWT, a good tips from me for someone that is coming from web framework like Struts2.0/PHP would be:
Throw away the old mindset, the mindset that a web framework works in request-response way. That's not how GWT works. GWT is a full ajax framework. Get a good understanding of AJAX and throw away those old mindset to get a good grasps of GWT.
Think in application development and not website development. That would affect the way you build navigation in your application with GWT.
You are not building hyperlinks to navigate between html pages, but you are using an event listener to update a partial content in your application. Get a good understanding of this.
With that in mind, always remember that you are not throwing back full html pages, but just updating a partial content in your application
Get a good understanding of Java anonymous class and inner class because you will use this alot in GWT. This is something that is used rarely if you are building with Struts2.0
The last tips would be to learn how to organize your code. If you can do it from beginning, please do so. Because you can write everything in one class if you want to. A good tip would be to take a look at this video on best practice on GWT.
Nothing beats Google's GWT quickstart (IMO):
http://code.google.com/webtoolkit/gettingstarted.html
I agree with karim79. Also add this to your list: http://examples.roughian.com/
GWT developers still need good HTML and CSS skills. It is sometimes useful to build up chunks of HTML on the client or server side (performance, skinning etc.) and not build every part of your GUI using GWT Widget trees in Java code.
Our framework (GWT Portlets) will help you structure your application. It includes a simple demo application in its own directory that you can copy to start a project.