• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

not enamored by JSF 1.1

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This rant-esque post is likely rooted in my ramping up with JSF, two plus years behind the power curve. But how does a web tier developer firmly rooted in best practices of web development in 2006-2007, i.e., CSS and a11y, and a practicing coder of semantic markup using techniques of separating presentation from structure, abide by JSF, let alone take it seriously. Right now, I can't see JSF being taken seriously by Java web tier coders like myself: SCJPs that enjoy good design in web apps.

Please, help me get past the following prejudice(s):

The RI of JSF v1.1 hijacks and pollutes the id attribute of HTML for its own use, thus rendering CSS stylesheets almost useless and making work with the DOM in Javascript a PITA. This is probably the single greatest problem I'm staring down the barrel at.

I work with talented Java programmers, but when tasked with writing HTML, it is as if they jumped in a TARDIS to 1999 to deliver the most horendous HTML code with layouts bound to tables and demonstrate an understanding of CSS that is laughable. While the developers of JSF have a solid understanding of the HTML 4.01 spec, they show almost no understanding of how it is used today. Instead it is as if they would be happy with Netscape Navigator 3.01 Gold, and only use Firefox because NN is no longer available.

The hijacking and pollution of the id attribute pushes CSS into class attribute assignment, limiting the CSS stylesheet and nearly eliminating semantics in the HTML. JSF also appears to assume that pushing CSS to the style attribute is good practice. Not. It makes for bloated HTML, increases code repetition by ten-fold or worse, and makes maintance a nightmare. But I suspect the JSF engineers, all smarter than me, didn't think about this or consult a web designer.

So, what is JSF like today? Any better? Myfaces looks to correct some of this, but I haven't got into using it yet. Where are the XHTML RenderKits (no, I don't have time to write one)?

Please, bring back into the fold. I'm disheartened at what I'm seeing in books like JSF in Action (Mann).

PS. And JSF HTML output appears to have some serious problems with HTML validation. At least v1.1 does. Ugh.

[ December 28, 2006: Message edited by: Timothy Stone ]
[ December 28, 2006: Message edited by: Bear Bibeault ]
 
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you say TARDIS?

Good rant.

-Cameron McKenzie
 
Timothy Stone
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. Indeed, I'm still on the rant high. Ugh, what JSF engineer thought that rendering the HtmlSelectManyCheckbox in a nested table, a NESTED TABLE!, was semantic HTML? Come on, who does that anymore!?

Re: TARDIS, Time And Relative Dimension (or Dimensions) In Space
TARDIS
TARDIS is a registered trademark of the BBC.

Maybe you already knew what TARDIS meant. If not, I just revealed how much of a geek I am to have referenced it in a rant.
[ December 28, 2006: Message edited by: Timothy Stone ]
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a bit less ranty; I examined JSF, found it lacking, and moved on. Simple.
 
Timothy Stone
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I examined JSF, found it lacking, and moved on.



And moved on to what? That is the crux of my rant. Either JSF has a future, or there is something else that a) builds on JSF to correct its flaws or b) replaces the RenderKit. There are possibly other options too.

What are the folks that have been working with JSF doing? Are they saying, "Great stuff, I wish I was still in 1999! Give me more!"? I want to know where the crowd playing Twisted Sister's We're not gonna take it! is today?
[ December 29, 2006: Message edited by: Timothy Stone ]
 
Cameron Wallace McKenzie
author and cow tipper
Posts: 5009
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A discussion about the future of JSF would be interesting.

Bear, where do we find more about your opinion on JSF?

I haven't used JSF much, except for small portlets. Isn't JSF supposed to be the Struts killer? Is it really lacking? What's the smart alternative? AJAX?

-Cameron McKenzie
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What's the smart alternative? AJAX?

Well, since Ajax is a methodology and not a framework, I'd say the answer to that question is no.

Bear wrote his own front controller that does everything he needs it to do. Most frameworks try to do so much that they can hardly do one thing well, except confuse it's users. I tried to like JSF. There are parts of it I do like. But I spent more time trying to find work arounds to bugs and missing features that I moved on long ago. Component oriented frameworks in general leave a bad taste in my mouth these days. I want something simple, simple, simple that doesn't get in my way.

Currently I am using Stripes for all my web app needs. I am very happy with it.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
I want something simple, simple, simple that doesn't get in my way.



Exactly. I've found that even the biggest and most complex of web applications don't need Rube Goldberg contraptions to put them together.

A handful of good patterns (predominantly Front Controller, Command and DTO) and a solid adherance to good practices takes care of all the plumbing needs.

I dislike Struts as an example of building a Rube Goldberg machine on top of a good idea (Model 2 Pattern). I dislike JSF even more as the whole component-focused nature of it just creates needless complexity in my opinion.
[ December 29, 2006: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF is highly customizeable, don't forget about that ;) For example, you can change the HTML renderkit or even create your own.

JSF is interesting for standalone Intranet B2B webapplications where nobody cares about the W3C validation results and the HTML structure (read: not a showstopper). It's just all about the functionality and the development speed. Once you know JSF well and you have a strong basic JSF platform, then this provides a relatively fast development of webapplications.

For extranet use with a big eye on the HTML/CSS structure, you'd better to go off with PHP and hand-written HTML.
 
Timothy Stone
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

JSF is highly customizeable, don't forget about that ;) For example, you can change the HTML renderkit or even create your own.



Bauke, you're right. And I commend JSF for the customization. But were are the RenderKits? Is MyFaces tackling the corruption of the id attribute?

For extranet use with a big eye on the HTML/CSS structure, you'd better to go off with PHP and hand-written HTML.



I share some agreement and disagreement. PHP, Ruby, [insert dynamic-typing script language here], are great for some externally facing uses and, you know what, they produce semantic, valid HTML. And I think that faster, lighter, Java (as Bruce Tate might call it) has a lot of over these languages. Learning about Stripes in this discussion/debate is the kind of information that I was hoping to find by ranting on the shortcomings of JSF.

All my .NET and C# friends treat HTML/CSS structure as a second class citizen. They all swear by MSIE too so I should not expect more from them I guess. It is this sentiment at the basis of my original rant: the engineers of JSF take a trip to 1999 where crap code is king! If tool support in the promise of JSF, that alone is not going to win me over. I want JSF to give me just the element(s), ma'am. HtmlSelectManyCheckbox should give me back a series of input type checkbox elements, not a NESTED TABLE. It boxes me in. Literally. Some engineer's knowledge of the HTML spec is not equal to the best practice. Best practice appears to be something JSF is only paying lip service, as long as the best practice is actually not in the web tier, the tier that JSF promised to focus on by delivering RAD tools.

JSF, in my opinion, should not be relegated to the intranet, that's where we (where I work), put the bloated, unmanagable code of C# and .NET.
[ December 30, 2006: Message edited by: Timothy Stone ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Having researched JSF a while ago -and finding it to be lacking, which is to say: overly complex- this thread prompted me to take a look at Stripes. It looks very promising indeed, definitely easier to get into than Struts. Of course it helps that it requires Java 5 and Servlets 2.4/JSP 2.0, so it can do/use a number of things Struts can't, especially annotations.
[ December 30, 2006: Message edited by: Ulf Dittmer ]
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently developing with JSF, and I think it's great. Not perfect, but I would not go back to Struts ever, if given the choice.

The current state of JSF, IMO, is still flawed but I think its design is decent with high customizability and extensibility. JSF by itself is quite a struggle to play with, but when combined with Seam, Facelets, Ajax4Jsf, IceFaces, and JPA, development with JSF is such a pleasure. I wouldn't just use JSF by itself because I find it incomplete as a specification.

If you must use JSF, do yourself a favour and look into Jboss Seam-a glue framework for JSF and EJB3(note EJB3 is optional) and offers other features that complement JSF (which are pretty cool). I haven't had the need to look at any other web frameworks after discovering Seam due to its simplicity. Note, I am not affiliated with Jboss in any sort of way. I am just happy to find a set of tools to help me to become that much more productive.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Being a non-web developer. I find HTML to be a real PITA, also the point of renderkit for JSF means that the intention for JSF is not just web pages.

So I find JSF to be easier for me to actually make a web page look nice. You should see my attempts with CSS and HTML on pages I tried to design before.

I am a middle-tier, back-end, rich client guy, I want to be able to build cool rich UI applications, and with JSF and some other tools, I am finally able to do that for the first time in 10 years.

I don't think that JSF is great, but I find it better than what I tried before. Personally, I think with all these technologies, we are trying to solve symptoms and not the actual problem, which in my mind is HTML. Google Web Toolkit seemed pretty cool, I can design my pages like I do Swing apps, that makes sense to me.

Calgon take me away.

Mark
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Alright, I am a little confused. I looked at Stripes and some sample code that they have posted. http://stripes.mc4j.org/confluence/display/stripes/Sample+Application

Please tell me that isn't the best code in the world. And that real developers won't write code like that, it will be half that amount of code, ok not half, but lots of extra stuff (the configuration has completely moved to Annotations here, not a biggie for me, but I would like even less configuration). That is the type of code/html that I have been trying to avoid, not exactly, it doesn't look that bad. ( I have been editing this post as I look more and more at the code)


Mark
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Cameron W. McKenzie:

Isn't JSF supposed to be the Struts killer? Is it really lacking? What's the smart alternative? AJAX?



There are inherent problems with the JSF specification but it is improving, albeit, slowly with each incremental release. But where JSF lacks, other tools like Facelets, Seams, Ajax4Jsf have provided ample support.

Facelets replaces JSP and provides tremendous performance increase and templating features like Tiles.

Seams integrates JSF phases technology with your model, and among other cool features like conversation-scoped context, managed persistence. These help to solve common web problems like refresh, back button, bread crumbs trivially.

Ajax4jsf provides decent Ajax support to JSF.

I think JSF has a great future ahead of it. But it's only a tool, and as such has strengths and weaknesses. It's strength, IMO, is its productivity you can get from it, creating really rich UIs relatively quickly. The biggest weakness is probably performance where action-based frameworks will probably more performant.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, one thing that I love that I get from Seam is the state management. I just created a Stateful Web site accross multiple request/responses without having to deal with the HTTPSession and setting and getting stuff in/out of it. Very simple in my mind.

Maybe we can get Seam to integrate with Stripes.

Mark
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JSF is highly customizeable, don't forget about that ;) For example, you can change the HTML renderkit or even create your own.

How often have you been wishing that JSF had a RenderKit that wasn't HTML? I'd venture to guess never. My opinion is that by making JSF as robust as it supposedly is, they overcomplicated what they set out to do.

For extranet use with a big eye on the HTML/CSS structure, you'd better to go off with PHP and hand-written HTML.

I disagree. A simple framework like Stripes or something like Bears FrontMan works great with HTML/CSS because your left generating all the HTML/CSS youself, which is what I prefer.

Is MyFaces tackling the corruption of the id attribute?

MyFaces is currently the best JSF implementation to date, hands down, bar none. If you simply must develop JSF apps, use MyFaces. I've heard good things about Facelets as well, but since I don't like JSF, I don't care for Facelets either. But worth a look if you do like JSF.

but when combined with Seam, Facelets, Ajax4Jsf, IceFaces, and JPA, development with JSF is such a pleasure.

Wow, that's quite a list. Seems Sun failed to mention all the supporting frameworks you need to learn and integrate to make JSF work correctly.

Being a non-web developer. I find HTML to be a real PITA, also the point of renderkit for JSF means that the intention for JSF is not just web pages.

And web development was not meant to be made easy for non-web developers. I don't see this as a plus for JSF.

I don't think that JSF is great, but I find it better than what I tried before.

What have you tried?

Google Web Toolkit seemed pretty cool, I can design my pages like I do Swing apps, that makes sense to me.

GWT is a joke. If you really want to develop web apps like Swing then I'd suggest looking into Wicket or j-wingS. They are much better than JSF.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:
Oh, one thing that I love that I get from Seam is the state management. I just created a Stateful Web site accross multiple request/responses without having to deal with the HTTPSession and setting and getting stuff in/out of it. Very simple in my mind.

Maybe we can get Seam to integrate with Stripes.

Mark



You don't have to mess with HttpSession in Stripes either, unless you want to. And you don't need Seam to do it.
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Spritzler:
Oh, one thing that I love that I get from Seam is the state management. I just created a Stateful Web site accross multiple request/responses without having to deal with the HTTPSession and setting and getting stuff in/out of it. Very simple in my mind.

Maybe we can get Seam to integrate with Stripes.

Mark



Yes, I also love how Seam handles a lot of the tedious and error-prone state management responsibilities that comes with HttpSession. I now find myself not shying away as much from a stateful architecture. The web user experience is that much more pleasant with stateful applications than stateless applications.

[ December 30, 2006: Message edited by: Hung Tang ]
[ December 30, 2006: Message edited by: Hung Tang ]
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
but when combined with Seam, Facelets, Ajax4Jsf, IceFaces, and JPA, development with JSF is such a pleasure.

Wow, that's quite a list. Seems Sun failed to mention all the supporting frameworks you need to learn and integrate to make JSF work correctly.



To learn the whole stack, one just need to learn Seam. There are like 10 or so working examples, with ample documentation. That's all you really need to whet a developer's appetite and get them going.

W.r.t to learning, it's not like you can take an easy way out. That's the problem inherent while working in the Java space: many choices. So yes, when you say you are confused, that's a natural response. Wicket, Stripes, Seam/JSF, WebWork, Tapestry, the list goes on and on. Developers just got to pick one, based on their gut feeling, and start hacking at it. Or just move over to the .NET camp
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Hung Tang:
Developers just got to pick one, based on their gut feeling, and start hacking at it.



The key word there is hack and I prefer less hacking and more solid developing. With JSF there is too much hacking. Seam makes JSF better? Great! Still not for me though. Still seems (no pun intended) over complicated.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"What have you tried?"

HTML, DHTML, CSS, Struts, JSP/Servlets, FrontPage(Ui building), JSF, Seam, Portlets, ASP, ASP.Net, RoR, GWT

So far, the one that fit my model(thought process) and made the most sense and wasn't overly complicated, to me, was JSF with Seam. So far. Stripes looks similar to Seam, but doesn't have all the features.

Mark
 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I used to work on a large web application using JSF and found it lacking. Of course I think most applications suffer by being forced to HTML as everyone wants web apps for some reason or other. Why do I want to do my UI in one language, my styling in another, my scripting in another, and finally my business logic in yet another??? Why do I want to drop rich event driven widgets (Swing, Win32, GTK, etc) in favor of a handful of clunky HTML widgets?

I try to write in the back end as much as possible. JMS, EJB, etc.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim, I also try to stay on those tiers too, because I have found web UI development so difficult because we have HTML. I have tried to avoid it until some technology comes out that makes it easier, that is why I have been excited by Seam, I don't necessarily have to use JSF, but It seems the easiest to me for what I have been trying to do.

One question for you guys about Timothy's statement "The RI of JSF v1.1 hijacks and pollutes the id attribute of HTML for its own use, thus rendering CSS stylesheets almost useless and making work with the DOM in Javascript a PITA."

What is the actual purpose of the id attribute supposed to be. I don't think it was meant for styling. When I think of id, I think of some unique identifier to identify a section. Isn't that what JSF thinks it is for? How would CSS not look at it this way? Isn't there supposed to be some attribute on HTML tags like 'style="myNameInCSS"', or is there no such tag. Remember I am not an HTML guy, so I don't know. Now what about the DOM and Javascript problem, how does that manifest itself? If you want to do some manipulation of a group of stuff it takes more javascript code because you can't re-use the id in many tags? That would bring up my unique identifier arguement.

Maybe, and I say maybe with my lack of knowledge, maybe people found that they could use the id attribute as a 'hack' to make some things easier, when that was never the intention of the id attribute. My goal here is always using what is there for its purpose and not anything above that purpose that later on might make me weep.

Thanks

Mark
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The ID attribute get's "polutted" by JSF because JSf uses the ID attribute to keep the component tree sorted out correctly. So JSF applies it's own ID values. Typically, this is based on the form id so you might have a component that renders like:



If you leave out the id from the form tag, JSF will make up it's own.

The main use of ID for CSS would be in layer elements like DIV so you would do something like:



I wouldn't say that the ID attribute is too huge a deal when dealing with CSS. However, when dealing with JavaScript, it can become an issue. The trick is basically to always give your FORM component and ID and you really don't have to worry about it. MyFaces has a property you can set in the FacesServlet that let's you specify your own ID values and MyFaces won't "pollute" them.

So the CSS issue isn't much of a valid concern. The fact that JSF components render TABLES for nearly everything which goes against standard best practices in web design is a big deal. Also note that since nearly everything on a JSF page is a custom tag, it makes it very difficult for a producer to do their job. In fact, they would need pretty solid knowledge of JSF, custom tags, and how they will end up rendering themselves to be effective, which nearly takes them out of the development equation.
[ January 02, 2007: Message edited by: Gregg Bolinger ]
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
Also note that since nearly everything on a JSF page is a custom tag, it makes it very difficult for a producer to do their job. In fact, they would need pretty solid knowledge of JSF, custom tags, and how they will end up rendering themselves to be effective, which nearly takes them out of the development equation.


With Facelets, this isn't entirely true anymore. You can write:


https://facelets.dev.java.net/nonav/docs/dev/docbook.html#taglib-use-jsfc
 
Timothy Stone
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you everyone for the wonderful thread. I think that these last posts really have been driving at my initial problems with JSF. The evolution of JSF is full of noise and the "players" and the playing field is very confusing. Seam, MyFaces, Facelets, etc. I can't tell who is winning and good resources for getting up to speed are difficult to find. And is it just me or are many of the ideas overly complex?

Mark Spritzler asked:

What is the actual purpose of the id attribute supposed to be. I don't think it was meant for styling. When I think of id, I think of some unique identifier to identify a section. Isn't that what JSF thinks it is for? How would CSS not look at it this way? Isn't there supposed to be some attribute on HTML tags like 'style="myNameInCSS"', or is there no such tag.



To answer that question, while styling was not probably not the direct purpose of the id attribute, it is absolutely necessary to the DOM. "getElementById" has one intended purpose, to return a unique DOM element identified by its id attribute. It very much is integral to advanced use of CSS and and JavaScript (and Ajax), and the id attribute is vital the "semantic web." It is an attribute of HTML, not JSF.

Contrast this with the assumption of JSF: id is used by CSS and is not needed because "class" and "style" are available. This assumption clearly ignores the DOM in favor of "keeping the component tree sorted out." This is an incorrect, though "technically permissible," understanding of the HTML specification, not unlike the very nature of table-based layouts; neither method intended by, or in the spirit of, the W3C HTML recommendation.

Now, before someone corrects me, I'm aware that this works, or I think it works:

using the JSF corruption of the id attribute. However, this same id value destroys CSS and the semantic web as the colon, ":", is a reserved character for pseudo-classes and -elements. I can't use hovers or other advanced CSS with JSF because of this. (This is not entirely true, I can assign pseudo classes and elements to class level CSS rules, but not at the ID level; this is, at worst, a limiting restriction imposed by JSF.)

Hence, why I got so heated about JSF: Here I am, a web developer with a heavy investment in Java, to find the newest technology, with lots of promise, throwing every best practice out the window.

I see that folks can be opinionated about JSF, and those that offered suggestions for other technologies, or provided JSF fixes, workarounds, implementation ideas, etc. I thank you. I'm looking forward to reading further and contributing.

Because my project is using JSF, for better or worse, I'll be asking questions in this forum, because it is clear there are readers that are very knowledgeable, and helpful.

Thank you! and if no one has said it yet. Happy New Year!
[ January 02, 2007: Message edited by: Timothy Stone ]
 
Hung Tang
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Timothy Stone:
Seam, MyFaces, Facelets, etc. I can't tell who is winning and good resources for getting up to speed are difficult to find. And is it just me or are many of the ideas overly complex?


All what you listed, none of them are competing technologies to each other and certainly not to JSF. They are complementary technologies to JSF, which I believe are essential in today for real JSF development.

Just check out these sample JSF applications, and their source code. You'll begin to realize, just as I did, that it's very simple--once you get it.

http://seam.demo.jboss.com/home.seam
http://dvdstore.demo.jboss.com/home.seam
 
Saloon Keeper
Posts: 28486
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use ID's all over in JSF for both CSS and for debugging purposes without problems. In fact, I use a lot of EXPLICIT ID's, because they show up in stack traces better - helps me find the offending control.

However, iterative constructs are messier, since if you declare once and output many times, a simple ID won't be unique. I don't care much for ":" constructs, but then I don't care much for HTTP variables (a la Struts) named "arg[123]" either. Technically, both are offenses, but in practical use, they have their utility.

JSF is far from perfect, but it's about as pure an implementation of MVC as I've seen so far for a transport that lacks one of the fundamental features of MVC (asynchronous posting from the model back to the view). So far, it has occasionally irritated me, but not enough to want to abandon it.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
...for a transport that lacks one of the fundamental features of MVC (asynchronous posting from the model back to the view)...

Look at Stripes.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I agree, this thread is very good and informative. I do hate the made up ids that JSF creates, and might take the approach of giving everything an id.

I haven't seen the html that the basic JSF tags make, but if they all use a table for each element, the html must look like a big mess and difficult to read and figure out if you went wrong somewhere in creating a custom tag.

Mark
 
Tim LeMaster
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The large web app I worked on with JSF we used developer assigned IDs for darn near everything. This was for Javascript, CSS, and automated testing. That didn't help me like JSF - I wanted to like it - as I dislike the state of web application development.

However I feel the only "fix" is to fix the defination of web application. A swing app available via JWS fits my definition of web app
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
MyFaces is currently the best JSF implementation to date, hands down, bar none. If you simply must develop JSF apps, use MyFaces. I've heard good things about Facelets as well, but since I don't like JSF, I don't care for Facelets either. But worth a look if you do like JSF.



Greg, the 1.2 reference implementation (disclaimer: I am a committer) is fast and rock solid. Ryan Lubke recently posted some performance numbers that might be of interest:

JSF RI Performance/Scalability

Keep an eye on his blog, as I think he has more of that type of information coming.

Wow, that's quite a list. Seems Sun failed to mention all the supporting frameworks you need to learn and integrate to make JSF work correctly.



None of those are necessary, but they are nice. IceFaces is simply more components, and JPA is an ORM. Neither change JSF at all, and robust, enterprise apps can be written without either. The same can be said for Seam and Facelets. I write JSF apps professionally, and love it. Is JSF perfect? Far from it, but neither are Stripes, Wicket, Struts 2, etc. Personally, I can't imagine writing apps in anything else. *shrug*

Jason Lee, SCJP
JSF RI Dev Team
Programmer/Analyst
http://www.iec-okc.com
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have been using JSF for about 2 years now. Two years ago, things were a bit rough. Then, about a year ago, I found Facelets and everything has changed. I now use JSF (Sun's 1.2 or MyFaces, doesn't matter to me), Facelets and Shale and I could not be more productive!

I'm also one of those people who does all styling in CSS and find that JSF is quite easy to do this with. Yes, the default render kits output some pretty 'old style' HTML. You can always write your own, if you think it'll save you tons of time in your stylesheet coding :-)
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the renderkits issue an implementation issue, or is it defined in any spec (I doubt that, too specific), so maybe we can get on the implementation groups case and tell them to create better HTML.

Mark
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Greg, the 1.2 reference implementation (disclaimer: I am a committer) is fast and rock solid. Ryan Lubke recently posted some performance numbers that might be of interest:

That's great! Does it improve development time? ;)

None of those are necessary, but they are nice.

I'd venture to guess that developers using these libraries to make JSF development easier would beg to differ.
 
Jason D. Lee
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

That's great! Does it improve development time? ;)



I don't feel that my development time is slow with JSF. I've been using it for about two years, and feel extremely productive with it. YMMV, of course, but...

I'd venture to guess that developers using these libraries to make JSF development easier would beg to differ.



Well, I'm a JSF developer using a Facelets, Ajax4Jsf, and JPA, and I don't think they make JSF development any easier, necessarily, with the possible exception of Facelets. I use that, though, mainly because I like the markup syntax better. A4j simplifies Ajax in a JSF environment, but is pretty pointless if you're not doing Ajax, as most of my apps aren't, and JPA isn't in any way related to JSF, so it's presence in that list is a little misleading. One could just as easily use Hibernate, JDO, or JDBC.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

JPA isn't in any way related to JSF, so it's presence in that list is a little misleading.



One could just as easily use Hibernate, JDO, or JDBC.



Be careful here, Hibernate is an implementation of JPA, so the "just as easily use" means that Hibernate and JPA are two different Tools. I just want to make sure people don't get the wrong idea and think that Hibernate, and even possibly JDO cannot be used if you chose the specification JPA.

The statement above is like saying. Use JSF, or one could just as easily use Facelets or MyFaces.

Mark
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(I'm not sure how applicable this comment is to the overall debate of JSF, but it is probably applicable to the idea of JSF vs other frameworks)

I'm coming from a Delphi desktop development background, and am pretty new at web development. We are looking for a new set of tools for an in-house web application. We are just looking for something that works and we can work with quickly. While looking in the Java camp, we have to delve through the myriad of frameworks, comparing pros and cons of each and seeing what it going to be easier to work with and is going to fill our needs, and what is going to exist 2 years from now.

JSF (with Hibernate and Spring or Seam) feels like the right choice given that it is Suns standard, it allows for expansion, it can have different implementations, and can possibly be presentation platform neutral (Flash forms coming from JSF forms?). However, it seems that it does have some shortcomings which may or may not be healed over time with further revisions. Also, I doubt it will be going away anytime soon.

We are also considering .net, and one primary reason is that .net has ASP.net as the only choice. Granted, having no choice means being locked in to .net, but at the same time, once we go a struts, JSF, Spring MVC, or a JBoss/Seam route, we are locked in there too.

However, given that .net has one offering of ASP.net, it has the support of the whole community and the backing of the whole development effort. Java frameworks on the other hand have their efforts fragmented across multiple frameworks, all of which solve the same problems in different but similar ways.

JSF at the very least offers a standard solution which can be embraced by different implementations and IDEs. It also offers the kind of event handling that .net shines in.

Since most of this discussion has been related to productivity, then surely IDE integration matters also? A guy I work with spent hours trying to implement a pair of dependent listboxes without success, I did it in .net while eating my lunch with Delphi 2006 for .net. I don't envision IDE makers embracing every MVC framework that comes out, but with JSF as a standard, it makes it easier. (However, I do dislike the net beans implementation with rave controls, especially as it is a bit unstable).

OTOH, I hate to go .net, even though it would be better for me coming from a Delphi and a desktop background, especially since .net would allow me more opportunity to get into the desktop again. However, frankly, I don't really want to get into bed with MSFT, and I always question how long MSFT will stay behind their technology (anyone remember MSFT DNA?)
 
Ranch Hand
Posts: 301
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I'm coming from a Delphi desktop development background, and am pretty new at web development. We are looking for a new set of tools for an in-house web application. We are just looking for something that works and we can work with quickly. While looking in the Java camp, we have to delve through the myriad of frameworks, comparing pros and cons of each and seeing what it going to be easier to work with and is going to fill our needs, and what is going to exist 2 years from now.



Ask yourself first if your really need to use a framework. The only additional 'frameworks' or perhaps tools is a better word in my web apps have been using are hibernate and sometimes spring, displaytag for my tables, and other more specific tools like iText for pdf generation.

The requirement for a framework like Struts/JSF, even spring MVC hasnt become obvious to me yet although part of me is wanting an opportunity to get my teeth into one of the frameworks simply because when I look at the J2EE job market, it seems most high paying financial companies are asking for those skills.
 
Trust God, but always tether your camel... to this tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic