• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Current market usage

 
Ranch Hand
Posts: 55
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi All,

I am preparing for SCWCD. As I did not work in any java project as of now, I wonder which standards are followed by the IT industry for JSP and Servlets, just for example: Is simple tag handlers are prefered over classic tag handlers in case of JSP? Is there anyway to find out ideal coding standards or is it vary from project to project?
 
Sheriff
Posts: 7345
1404
IntelliJ IDE jQuery Eclipse IDE Postgres Database Tomcat Server Chrome Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Job Discussions forum.
 
author & internet detective
Posts: 42003
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nipun,
Welcome to CodeRanch!

Standards vary by project but best practices are pretty constant. For JSPs, the most important things are to keep scriptlets and logic out of the JSP. I hardly ever need to write a tag handler at all. JSP fragments and tag files allow me to extract common presentation. And logic is handled in Java code (Servlets and code they delegate to) or model methods. And there are so many common standard tags available these days.
 
Nipun Bahr
Ranch Hand
Posts: 55
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jeanne,

Thanks for the reply, what is the benefit of using JSP fragments over JSP?
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As far as I experienced web development (Java / J2EE), I'v e never had the need to code JSP / Servlets but rather use them indirectly through frameworks like Struts / JSF / Tapestry. But of course you need to understand the basics of JSP / Servlets specifications.
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Joe Harry wrote:I'v e never had the need to code JSP / Servlets but rather use them indirectly through frameworks like Struts / JSF / Tapestry.


This will vary. As an experienced web developer, I almost always use JSP and Servlets directly, and only use a framework when it' s part of a legacy application that I've inherited.
 
Jeanne Boyarsky
author & internet detective
Posts: 42003
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Nipun Bahr wrote:Hi Jeanne,

Thanks for the reply, what is the benefit of using JSP fragments over JSP?


It's not using JSP fragments over JSP. It's JSP fragments in addition to. JSP fragments are good when you have large chunks of presentation code that get reused across pages. (and you don't want to use an iframe).

Joe Harry wrote:As far as I experienced web development (Java / J2EE), I'v e never had the need to code JSP / Servlets but rather use them indirectly through frameworks like Struts / JSF / Tapestry. But of course you need to understand the basics of JSP / Servlets specifications.


What technology do you have Struts use as the view layer? Most people use JSPs with Struts tags. Which are coding JSPs.
 
Nipun Bahr
Ranch Hand
Posts: 55
Eclipse IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

So, As far as JSP/Servlets are concerned, they are to be utilized directly/indirectly whichever advanced java technology we use?
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Even as I speak (with fear since been attached to jsp for a long time) that latest j2ee spec is filled with JSF but nothing of JSP. Now its my interpretation which I wish to confirm with you all is it that Is JSP been being moved out of the picture & the faces being made more prevalent??
 
Bear Bibeault
Sheriff
Posts: 67752
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
Not in my experience. In fact, I've seen movement in the other direction. At least two companies that I worked for, and another that I'm associated with, have tried implementing apps in JSF and reverted back away from it.

Sun (now Oracle) pushes JSF pretty hard, but there are many developers, myself included, who think that it's a stinking pile of poo that should be treated like toxic waste -- keep as far away from it as possible.

Anyone else is, of course, entitled to differing opinions.
 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why JSF should be considered as Dump?... Is it slower framework comparing to others?
 
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mudassar Hakim wrote:Hi, Even as I speak (with fear since been attached to jsp for a long time) that latest j2ee spec is filled with JSF but nothing of JSP. Now its my interpretation which I wish to confirm with you all is it that Is JSP been being moved out of the picture & the faces being made more prevalent??


JSF is a framework ( component framework ). JSP is view technology. JSF can use JSP as a view technology. It would not be appropriate to compare JSP and JSF because they perform different roles.
https://coderanch.com/t/210694/JSF/java/JSP-vs-JSF
 
Jeanne Boyarsky
author & internet detective
Posts: 42003
911
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Mudassar Hakim wrote:Hi, Even as I speak (with fear since been attached to jsp for a long time) that latest j2ee spec is filled with JSF but nothing of JSP. Now its my interpretation which I wish to confirm with you all is it that Is JSP been being moved out of the picture & the faces being made more prevalent??


That's Sun/Oracle's world. You'd also think that everyone uses EJB rather than Spring from reading that document.
 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:
........ Anyone else is, of course, entitled to differing opinions.



Actually JSF is component framework which have few variants like ICFaces, RichFaces, JBOSS Seam and ofcourse Oracle(Sun)'s own implementation of JSF. Since it is part of JEE specification, every application server will include it. It will compete with MVC frameworks like Struts,Wicket, Spring MVC. IMO, no one will will win, every one will have it's own share in market. JSF looks to me ahead in competition.
 
Mudassar Hakim
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well from what I see I dont completely agree with JSF taking the lead, The thing is that I am a software developer & in India there are some good job portals on which I have put my resume stating not more than J2EE (just for the sake of trying ,dont want to loose good opportunities ) & then within a month I start getting mails stating most of the "Spring" or "Struts" as an added advantage including the basic jsp & servlets. SO my inference is that if JSF was really that big by now I should have got mails atleast one of them (might have been one or two if for some reason I dont recall now) stating "JSF" as req. My point is that most of us (well atleast me) look up to such protocols/standards like the J2EE spec to understand what is happening in the software market ,who is in demand, which one is better, to get an idea where I should be focusing on. But then I agree the spec being completely filled with ejbs but not struts or spring & STILL I & many like me go to work on struts/spring ( although ejb3 has been in the buzz but not that big) knowing its better. So all I am saying is I dont want to be left of the league but cant decide if I am actually a part of it. Like how should I determine whats the best for my project that will make it efficient, fetch me a better pay package job, move me up the ladder?? To sum it all I really want to make it to the top but just dont know how to chart it.
P.S= Thanks for reading the entire stuff it took me almost 10-15 minutes.
 
Author
Posts: 3473
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Development is all about using the right tool to get the job done. Tools can be misused to get a bad name. In my view, JSF is pushed by some big players to sell their RAD tools. I am not a big fan of RAD tools. But I have used JSF, and feel that development productivity can be improved by writing clever components (i.e. without using RAD tools). It is okay, provided used correctly.

From my observation, applications developed without JSFs are snappier. Compare the generated HTML code(i.e by "view source" browser option) generated by a JSF (Component based) framework and a non JSF (i.e. Action based fraework -- Struts, Spring MVC) framework, the former is very verbose. Things get even worse when you add rich JSF components provided by Richfaces, ICE faces, etc. The page looks like a dog's vomit. Ajax needs to be carefully used to minimize any adverse impact to performance. The pages need to be designed correctly with proper pagination, etc. So, carefull planning is essential. Build prototypes to validate if JSF is the right choice. Developers get carried away by the rich look of these components, without realizing other downsides like bloated pages, debugging options, bad peroformance, etc. For an internal application, it is not so much an issue, but for any external application, careful planning is very important, and you need to have the right people in the team to devise a proper strategy and approach to use a tool effectively. I have seen many JSF developers don't even understand how it works -- especially the 6 phases a request goes through, what happens in each phase, etc.
 
Sandeep Awasthi
Ranch Hand
Posts: 597
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
  • Every big RAD tool which supports JSF also supports Struts.
  • As rich components are added to application, it is quite obvious it will become complex does not matter if it is JSF or other framework.
  • Anyone who comes from MVC background will have difficult time understanding how JSF works because it has different way in which it works than plain MVC.
  • JSF is included in JEE specification not because of recommendation of only one or two companies.
  • Every six months or a year, new framework is launched. People are having hard time to learn all these frameworks and choose the best one. There has to be one minimum standard and this is where future is moving. JSF will provide one minimum standard in future.


  • At the end, no framework is perfect. Every framework has it's positive and negatives. But none of the framework will be accepted as standard JEE framework. The positive of JSF is it is backed by big players. So it has high chance of getting big market share though it is not matured yet.

    Let's not misunderstand that I am promoting JSF.
     
    Jeanne Boyarsky
    author & internet detective
    Posts: 42003
    911
    Eclipse IDE VI Editor Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Sandeep Awasthi wrote:The positive of JSF is it is backed by big players.


    Who besides Sun/Oracle?
     
    Sandeep Awasthi
    Ranch Hand
    Posts: 597
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    References
    1) Book Java Server Faces in Action Page No : 10, Chapter 1, Topic 1.1.2 Industry Support.
    2) Book JSF2 Complete Reference Page No : 6/7, Chapter 1, Topic : Birth of Java Server Faces.

    And obviously majority of the companies who vote on JSRs to prepare specifications. Otherwise it would not have been possible to include JSF in JEE specification. Sun/Oracle does not alone decides specifications.
     
    author
    Posts: 23958
    142
    jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jeanne Boyarsky wrote:

    Sandeep Awasthi wrote:The positive of JSF is it is backed by big players.


    Who besides Sun/Oracle?




    I too, used to think that JSF is DOA -- in fact, part of me still thinks it is DOA. However, last year, I consulted on a pretty large project for a very large firm, and surprisingly, it was a JSF project... so it is being used.

    Henry
     
    Sandeep Awasthi
    Ranch Hand
    Posts: 597
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Sorry little offtopic.
    The part which I hate about JSF is 1000 pages books(JSF in Action). Who will read so much? I read first few pages and gave up. I am already tired of learning new technologies.
     
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Sandeep Awasthi wrote:
    Actually JSF is component framework which have few variants like ICFaces, RichFaces, JBOSS Seam and ofcourse Oracle(Sun)'s own implementation of JSF. Since it is part of JEE specification, every application server will include it. It will compete with MVC frameworks like Struts,Wicket, Spring MVC. IMO, no one will will win, every one will have it's own share in market. JSF looks to me ahead in competition.


    Wicket isn't MVC framework, it is a component-based framework just like JSF and it is much much (did I say much?) better than it.
    ICEFaces and RichFaces aren't variants of JSF, both are suits of components palettes.
    JBoss Seam definitely isn't a JSF framework, it is a full stack framework that happens to use JSF as a presentation framework among other options (Wicket).
     
    Hussein Baghdadi
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Sandeep Awasthi wrote:
    And obviously majority of the companies who vote on JSRs to prepare specifications. Otherwise it would not have been possible to include JSF in JEE specification. Sun/Oracle does not alone decides specifications.


    Can you really say this again as Oracle now controls the whole Java ecosystem?
     
    Sandeep Awasthi
    Ranch Hand
    Posts: 597
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    John Todd wrote:
    Wicket isn't MVC framework, it is a component-based framework just like JSF and it is much much (did I say much?) better than it.
    ICEFaces and RichFaces aren't variants of JSF, both are suits of components palettes.
    JBoss Seam definitely isn't a JSF framework, it is a full stack framework that happens to use JSF as a presentation framework among other options (Wicket).



    Wicket is not MVC framework. That is a mistake I realized afterwards.
    About ICFaces and RichFaces, since I mentioned in my earlier post, I read only few pages of JSF book and gave up. So my knowledge of JSF is not deep. So you may be correct.

    John Todd wrote:
    Can you really say this again as Oracle now controls the whole Java ecosystem?



    JSR #316 JavaTM Platform, Enterprise Edition 6 (Java EE 6) Specification JSR Review Ballot
     
    Mudassar Hakim
    Greenhorn
    Posts: 25
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Gentlemen thanks for all of your enlightening responses. So I might assume that JSF has another year or two to catch up with Spring (especially Spring 3)& Struts2 so that by then majority of projects would be running on JSF. (call me a pessimist but I dont want that to happen )??
     
    Jeanne Boyarsky
    author & internet detective
    Posts: 42003
    911
    Eclipse IDE VI Editor Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Mudassar Hakim wrote:Gentlemen thanks for all of your enlightening responses. So I might assume that JSF has another year or two to catch up with Spring (especially Spring 3)& Struts2 so that by then majority of projects would be running on JSF. (call me a pessimist but I dont want that to happen )??


    No. Even if JSF became the market leader for new projects, the majority of projects would be "legacy" projects not running on JSF.

    You are also assuming Spring MVC and the like stay still and let JSF "catch up".
     
    Mudassar Hakim
    Greenhorn
    Posts: 25
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Jeanne Boyarsky wrote:

    You are also assuming Spring MVC and the like stay still and let JSF "catch up".


    Didnt quite get that, can you please elaborate.
     
    Mudassar Hakim
    Greenhorn
    Posts: 25
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Well what I meant was that even after 2-3 years spring & struts should continue to grow & make things much better rather than some big daddy telling what others should do.
     
    Hussein Baghdadi
    clojure forum advocate
    Posts: 3479
    Mac Objective C Clojure
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    JSF Expert Group Disbanded With No Successor JSR
     
    Sandeep Awasthi
    Ranch Hand
    Posts: 597
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    2010 JCP EC Election Results

    Comments on JCP EC Election
     
    Ranch Hand
    Posts: 2187
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    And to reiterate the most important aspect of this thread, ..."[JSF is ] a stinking pile of poo that should be treated like toxic waste -- keep as far away from it as possible."

     
    Saloon Keeper
    Posts: 28319
    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

    John Todd wrote:
    Can you really say this again as Oracle now controls the whole Java ecosystem?



    Oracle may think they control the whole Java ecosystem. They're very likely to discover that they're wrong. They've been driving people away from open-source platforms right and left, and a very considerable chunk of what makes Java a viable platform is open-source, with one of the largest contributors (Apache Foundation) now in open revolt.

    I pointed out several years ago that Java and .Net are actually a lot alike in that both are language platforms beholden to an OS vendor. However, .Net comes from a provider that has a longstanding history of locking its languages into its OS products and of making radical incompatible changes that break existing codebases. whereas Java assiduously avoided OS dependencies, has a history of backwards compatability and even a deprecation mechanism that allows a "grace period" for developers. Oracle changes this at their peril.

    Should Oracle put the screws to Java, I think we'll finally see a formal legal challenge made against the idea that programming languages cannot be patented or otherwise IP-constrained, and an independent language certification process that isn't under the thumb of any one vendor, its lawyers and its bean-counters. It may be denied the use of the Java name, but it would be Java in all important aspects - possibly including the most important one of all. There's a lot invested in the status quo of Java. Like it or loathe it, there's too much to walk away from. Rather than do so, I suspect that the community may find the trauma of wresting Java completely out of the hands or Oracle to be a safer bet than being held hostage.

    If Oracle thinks that being an "800-lb. gorilla" means anything, they should visit my fair city and reflect on the fortunes of IBM. We even have banks in this town that are IBM-free shops. They're not as essential or as unique as they'd like to think they are.

    Switching gears...

    I'm a big proponent of JSF because I find it makes me more productive and allows me to produce products that are more maintainable - doubly so for AJAX projects. I don't find it perfect. It's missing some important capabilities yet. It also aspires to "DDD" (drag-drop-drool) design status but doesn't actually achieve it (a common fault of JavaBean-based architectures). Not because it can't, but because Sun never seemed to go that last mile. It's not the only game in town, however.
     
    Thank you my well lotioned goddess! Here, have my favorite tiny ad!
    Gift giving made easy with the permaculture playing cards
    https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    reply
      Bookmark Topic Watch Topic
    • New Topic