Sun releases tutorial for J2EE 1.4

Discussions

News: Sun releases tutorial for J2EE 1.4

  1. Sun releases tutorial for J2EE 1.4 (41 messages)

    Sun has released an updated tutorial on J2EE 1.4 to go along with the updated SDK. The tutorial adds information on JavaServer Faces, an advanced CMP chapter, J2EE CA 1.5, and some cleanup.

    Change log for this update
    Release 4 for the J2EE 1.4 SDK with Sun Java System Application Server Platform Edition 8 FCS
    Added 5 chapters and two examples on JavaServer Faces technology.
    Added a JavaServer Faces technology version of the Duke's Bookstore example.
    Added a JavaServer Faces technology version of the Coffee Break server.
    Expanded CMP chapter with new advanced example.
    Updated J2EE Connector appendix to 1.5 specification release.
    Updated Glossary and Index.
    Fixed style inconsistencies, broken links, typos, etc.
    Read the new J2EE 1.4 tutorial

    Threaded Messages (41)

  2. http://sys-con.com/story/?storyid=43952&DE=1

    Even stupid C# from Borland (FREE) is better.
    After you read above article.... try Flex, see FlexStore.war, its out Monday, free download.
    W/ Flex, you no longer have to code to html and http; THANK YOU, THANK YOU, THANK YOU. Clients LOVE Rich UI, with client side DataGrid, cient side Tree, etc.

    .V
  3. http://sys-con.com/story/?storyid=43952&DE=1Even stupid C# from Borland (FREE) is better.After you read above article.... try Flex, see FlexStore.war, its out Monday, free download.W/ Flex, you no longer have to code to html and http; THANK YOU, THANK YOU, THANK YOU. Clients LOVE Rich UI, with client side DataGrid, cient side Tree, etc. .V
    What I have seen so far is that most people that complain about JSF either haven't really tried it even on a test environment, or dont understand how it will be used when tools and more UI components for it start to come up.
    So far I haven't seen one technical argument against JSF, just vague opinions, like "it is complex" (IMHO it is simpler than struts), "the spec doc has too many pages" (maybe we should use a balance to find out if a framework can be considered lightweight then?)... Seems like people haven't grasped what JSF is about yet. Pity. Maybe all these flaks are just "fear of the new", after all.

    Regards,
    Henrique Steckelberg
  4. I completely agree. There were no techincal reasons given even in the article that Vic posted except the "its too complex" schpill...

    I think the release of JSF (finally) is a good thing - its gives us another CHOICE and thats the most important thing. Also since its standard it encourages IDE vendors to support it. Lets just wait and see what offerings they come out with....

    Cheers,

    Smythe
  5. <blockquoteClients LOVE Rich UIMacromedia is doing something right, see chart:
    http://news.netcraft.com/archives/2004/03/23/aspnet_overtakes_jsp_and_java_servlets.html

    Is there a link to FlexStore.war?

    Best Regards,
    Michael
  6. Clients LOVE Rich UI
    Macromedia is doing something right, see chart: http://news.netcraft.com/archives/2004/03/23/aspnet_overtakes_jsp_and_java_servlets.htmlIs there a link to FlexStore.war?Best Regards,MichaelFirst, what this misleading chart has to do with macromedia? (BTW, netcraft survey uses a bogus way to count JSP web sites, so the chart may be completely off the mark)
    Second, if you take a look at how flex works, you will see that it is almost IDENTICAL to JSF in many aspects, the only difference being that Flex uses flash at the client-side, and it already has a tool for development. So the day we get both for JSF, there won't be any difference between them. And I can't see why there won't be both for JSF in the future.

    Regards,
    Henrique Steckelberg
  7. Glad you asked[ Go to top ]

    Cold Fusion is a Macromedia product, as well as Flex. Hellooooo.

    The only advantages I see of JSF is the ability to create event-driven
    web apps and more clearly defined reusable components. This is all fine
    dandy but the UI is still kinda plain. If Flex/Flash/Coldfusion etc. were free and/or open source I'd be all over it because the Rich UI provides for a "smoother" experience that I happen to like. I got the backend down, I need a frontend.

    I know your points about the misleading aspects of the chart. I got that when it came out. The point I am making, as futile as it is, is that Rich UI is popular and the sooner a UI comes out that you can put on top Struts/JSF or any other "framework" the better. There are so many different frameworks but the typical UI still depends on legacy HTML controls (lamo).

    Henrique: "So the day we get both for JSF, there won't be any difference between them. And I can't see why there won't be both for JSF in the future".

    That's great to have both JSF and Flex but one is still dependent on legacy UI while the other is represents of the future of web UIs.

    Cheers,
    Michael
  8. Glad you asked[ Go to top ]

    Henrique: "So the day we get both for JSF, there won't be any difference between them. And I can't see why there won't be both for JSF in the future". That's great to have both JSF and Flex but one is still dependent on legacy UI while the other is represents of the future of web UIs. Cheers,Michael
    You will be able to use JSF with XUL, SVG, XLST, not just JSP, so it is not dependent on legacy UI. I imagine that if Flex uses a templating mechanism for its client-side UI, it can be adapted to work with JSF, AFAIK.

    Cheers!
    Henrique Steckelberg
  9. JSF + Flash[ Go to top ]

    Ok, who has the guts to create this? ;)
    I've found a very interesting project, http://www.flashgap.com/, which allows you to generate SWF (Flash files) using Java APIs. So what we need now is someone to integrate that with JSF, by creating a JSF UI rendering extension using that API. I haven't taken a deep look at the API, so I am not sure if Flash UI and JSF can be easily integrated that way, but if I find the time, maybe I'll take a look at that. Anyone up for the task? ;)

    Regards,
    Henrique Steckelberg
  10. JSF + Flash[ Go to top ]

    That is interesting and better yet, free. At least you recognize that there is a need for better, more interesting/animated UIs. A while back when I was reading about Jaron Lanier, I could swear that I saw an article that eluded to being able to "touch" things on the internet through magnetic waves. Maybe I was dreaming but since then, I have often imagined much more interesting ways to display and navigate web sites.

    Flash is one way into this as far as being more interactive/interesting/life-like. I wish more emphasis was placed on rich UIs/visual manipulation sometimes rather than frameworks.

    Michael
  11. My 2 cents about Flash[ Go to top ]

    In the advent of mobile world, do you _really_ want to use Flash?
    I mean, think about how you will satisfy your client's need, when he demands his website mobilized, i.e. viewable on the PDA/Mobile device...
    Rgds, Kris
  12. JSF + Flash[ Go to top ]

    I haven't taken a deep look at the API, so I am not sure if Flash UI and JSF can be easily integrated that way, but if I find the time, maybe I'll take a look at that. Anyone up for the task? ;)Regards,Henrique Steckelberg
    I would like to look at it, too !
    If you have some interesting ideas, you can contact me as mariso(at)site(dot)lv

    regards,
    Maris
  13. Glad you asked[ Go to top ]

    Cold fushion is a J2EE Application :)
  14. Glad you asked[ Go to top ]

    Hmm... I have mentioned Macromedia so many times today, that I feel they
    should compensate me for the plugs but anyway, at the info screen for ColdFusion there is no mention of J2EE (except for being a related product on bottom of right column) but thanks for trying.

    http://www.macromedia.com/software/coldfusion/?promoid=home_prod_cf_082403

    Michael
  15. Glad you asked[ Go to top ]

    Michael

    As I understand it, the last versions of Cold Fusion require a J2EE App Server to run. I don't think there is a stand-alone version anymore. Therefore, Cold Fusion is really just another J2EE Framework (even though it predates J2EE). Check here:

    http://www.macromedia.com/software/coldfusion/productinfo/systemreqs/

    And this from Macromedia's ColdFusion/J2EE page:

    Macromedia ColdFusion MX is built on the Java 2 Enterprise Edition (J2EE) platform and has completed and passed the Sun Microsystems Java Verification Program. As a result, developers can fully leverage the ease of use and productivity of ColdFusion within their enterprise Java environment.
  16. Okay[ Go to top ]

    MichaelAs I understand it, the last versions of Cold Fusion require a J2EE App Server to run. I don't think there is a stand-alone version anymore. Therefore, Cold Fusion is really just another J2EE Framework (even though it predates J2EE)
    Right on. My mistake. I am not that familiar with it but have always been under a different impression. I have wanted to use Flash and J2EE for a while but the cost has been a deterent. Know of an inexpensive way to get into Rich UI and J2EE? If so, let me know mboyd at firstam dot com. Thanks.

    Michael
  17. Strange survey[ Go to top ]

    Clients LOVE Rich UI
    Macromedia is doing something right, see chart: http://news.netcraft.com/archives/2004/03/23/aspnet_overtakes_jsp_and_java_servlets.htmlIs there a link to FlexStore.war?Best Regards,Michael
    First, what this misleading chart has to do with macromedia? (BTW, netcraft survey uses a bogus way to count JSP web sites, so the chart may be completely off the mark)Second, if you take a look at how flex works, you will see that it is almost IDENTICAL to JSF in many aspects, the only difference being that Flex uses flash at the client-side, and it already has a tool for development. So the day we get both for JSF, there won't be any difference between them. And I can't see why there won't be both for JSF in the future.Regards,Henrique SteckelbergI don't understand this survey : "Java Servlets - local references to .jhtml, .jsp, .gsp file extensions, or a local url starting "/servlets".".
    What about Struts application for example with .do (or some other application defined extension) ? They just count for nothing ?
  18. Notice what netcraft considers what are java servlets: local references to .jhtml, .jsp, .gsp file extensions, or a local url starting "/servlets".

    Now, with the multitude of web frameworks available out there, and with the naming flexibility you get with servlet mappings, those naming conventions are quite deceptive. For example, a struts-driven site wouldn't count as a "Java Servlet" site for netcraft, since none of it's URL's end in jhtml, jsp or gsp.
  19. yes, J2EE is very complex for new developers like me .. how do I start .. thick volumes of specifications and books scares me

    any advise ..
  20. I'd start by becoming familiar with how to deploy a servlet/jsp based web app.
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/introduction.html

    From there, adopt a framework (struts, webwork, spring and the list goes on). Then delve into the wonderful world of EJBs and/or Hibernate to take care of O/R mapping. The sky is the limit!

    Michael
  21. yes, J2EE is very complex for new developers like me .. how do I start .. thick volumes of specifications and books scares me any advise ..
    Don't read specs ! For begining try to start a WEB container and write a simple JSP page. IMO J2EE is not complex, but it might look like it is, because of so many frameworks, tools and specs. To be a successful developer you dont need to know them all !
  22. Learning J2EE[ Go to top ]

    My advice would be if you're interested in using J2EE to build web based enterprise apps then start with Servlets (Jason Hunter's Java Servlet Programming is a good text and will introduce you to a couple of other useful API's like JDBC along the way) and then JSP (which is built on top of the servlet API). After that pick up a copy of Richard Monson-Haefel's Enterprise Java Beans and work you're way through it. Between them, that should give you enough of the core stuff. I'd also get hold of Fowler's Patterns of Enterprise Application Architecture which, though not exclusively a J2EE text, has a bunch of very useful patterns and info in it and can point you at other good books. J2EE is great tech, enjoy!

    At first glance JSF looks extremely interesting to me - I'm really looking forward to having a chance to examine it properly.
  23. Flex, FlexStore[ Go to top ]

    try Flex, see FlexStore.war, its out Monday, free download.W/ Flex, you no longer have to code to html and http; THANK YOU, THANK YOU, THANK YOU. Clients LOVE Rich UI, with client side DataGrid, cient side Tree, etc. .V
    fyi: IBM is providing a Flex plugin for Websphere Studio Application Developer

    http://www.alphaworks.ibm.com/tech/wsadflex
  24. http://theserverside.com/talks/index.tss

    Above you can see an MVC Seimnar in NYC coming up. Flex, Struts and other MVC frameworks are discussed.
    .V
  25. JSF[ Go to top ]

    Sun has released an updated tutorial on J2EE 1.4
    thanx a lot, all J2EE developers are very excited about JSF !!!
    well... at least I am.

    BTW some parts of it are very similar to STRUTS, like "managed beans" and "navigation model". It's very great, since it will facilitate move from STRUTS to JSF.

    Maris
  26. JSF[ Go to top ]

    J2EE is about choice, so many ways just to display a bean property !

    // JSF
    <h:outputText value="#{UserNumberBean.maximum}" />

    // EL
    <c:out value="${requestScope.custNumber}" />

    //JSP
    <bean:getProperty name="UserNumberBean" property="maximum" />
  27. Hi Maris:

    I may agree with you on other aspects of J2EE [like Entity Beans etc] however, JSF is much more than what you have observed.

    Just download the example war from:

    http://myfaces.sourceforge.net

    of [1.1 Alpha] and run it under tomcat.


    It will blow your conclusion away. Also look at the code and notice the sheer Simplicity. I have not seen any (ANY) other framework that makes building webapps this easy.

    It has dynamically included tabbed panes and spreadsheet style table editing in addition to whole bunch of other features.

    Please take a look again.

    Hope you find it useful

    Vinay
  28. Hi Maris:I may agree with you on other aspects of J2EE [like Entity Beans etc] however, JSF is much more than what you have observed.
    Well... I am not saying that JSF is too complex. Not at all!
    JSF looks very promising, let's hope it will start very soon and finally we will have real WEB components.
  29. I have not seen any (ANY) other framework that makes building webapps this easy.
    I think PHP makes building webapps more easy, and I see you are using it for myfaces homepage too :)
  30. JSF[ Go to top ]

    J2EE is about choice, so many ways just to display a bean property


    And do you think the difference in your
    JSF and EL examples is good? ;-)

    Dmitry
    http://www.servletsuite.com/
  31. JSF[ Go to top ]

    >J2EE is about choice, so many ways just to display a bean property And do you think the difference in yourJSF and EL examples is good? ;-)
    Of course not, they should have used either $ or # prefix, but not both! It may confuse novice developers.
  32. Re: JSF[ Go to top ]

    Of course not, they should have used either $ or # prefix,
    > but not both! It may confuse novice developers.

    We tried ... we tried *really* hard ... but there are some significant semantic differences between the two expression languages, in terms of when they are evaluated and what they actually do. The best we could do this time around is ensure that the expressions are as *syntactically* compatible (other than the delimiter) as possible, so that the differences only matter to advanced users. Aligning the two approaches will definitely be a focus in the next round of specifications for JSF and JSP.

    In the mean time, for output purposes, the syntax of what goes inside a JSF expression is identical to what you can do with a JSP 2.0 expression, other than the use of the (new to JSP 2.0) functions syntax. But that means you can do some pretty interesting things, such as the following:

      <h:outputText value="Offer valid from #{bean.fromDate} to #{bean.toDate}"/>

    Craig McClanahan
    (JavaServer Faces 1.0 co-Spec Lead)
  33. Re: JSF[ Go to top ]

      <h:outputText value="Offer valid from #{bean.fromDate} to #{bean.toDate}"/>
    It it possible to use something like java.text.MessageFormat for JSF output format ?

    <h:outputText>
      Offer valid from #{bean.fromDate,date,yyyyMMdd}
      to #{bean.toDate,date,yyyyMMdd},
      price #{bean.price,number,0.00}
    </h:outputText>

     or

    <h:outputText locale="#{request.locale}"
                  value="Offer valid from #{bean.fromDate} to #{bean.toDate}"/>
  34. Re: JSF[ Go to top ]

    <h:outputText value="Offer valid from #{bean.fromDate} to #{bean.toDate}"/>
    It it possible to use something like java.text.MessageFormat for JSF output format ?<h:outputText> Offer valid from #{bean.fromDate,date,yyyyMMdd} to #{bean.toDate,date,yyyyMMdd}, price #{bean.price,number,0.00}</h:outputText> or<h:outputText locale="#{request.locale}" value="Offer valid from #{bean.fromDate} to #{bean.toDate}"/>
    You can indeed use message formats, but with <h:outputFormat> instead of <f:outputText>. Instead, your example would be created like this:

      <h:outputFormat value="Offer valid from {0} to {1}">
        <f:param value="#{bean.fromDate}"/>
        <f:param value="#{bean.toDate}"/>
      </h:outputFormat>

    Craig
  35. Re: JSF[ Go to top ]

    I think it is not a good idea to have two tags for this trivial use case.
    "toString" format in "outputText" is useless for text formating and MessageFormat is very criptic in "outputFormat" for large text.

    I think it is better to drop both ways to format text and to add simple and intuitive tag like java.text.MessageFormat, but designed for JSF and "beans".

    It will be a very big difference if you will try to format large text:


     <h:outputFormat value="Offer valid from {0,date} to {1,date}">
        <f:param value="#{bean.fromDate}"/>
        <f:param value="#{bean.toDate}"/>
     </h:outputFormat>

     and

     <h:format locale="US" >
      Offer valid from #{bean.fromDate,date} to #{bean.toDate,date}
     </h:format>
  36. FlexStore vs PetStore[ Go to top ]

    http://www.macromedia.com/flex/samples/flexstore/flexstore.mxml?versionChecked=true

    And more
    http://www.macromedia.com/devnet/flex
    .V
  37. JSF[ Go to top ]

    There are resources out there that show how to integrate the two as well.

    For example:

    http://www-106.ibm.com/developerworks/java/library/j-integrate/

    http://www.jspolympus.com/JSF/JSFIntegrationStruts.jsp

    Best Regards,

    Michael
  38. J2EE Tutorial[ Go to top ]

    The Dark Side of J2EE is the folks that feel they must use every single feature availble with the architecture in their application, and that's simply not true.

    This tutorial (according to the PDF version) is over 1500(!!!) pages long!

    But, if you write a brain dead "Hello World" JSP, you've written a "J2EE Application". You basically need to learn web.xml and how to package the JSPs into a WAR. From there, you can write the most horrid, paradigm smashing java/html code you wish, and still be a "J2EE app".

    The promise of J2EE is that you can take this WAR file full of JSPs and plop them into one of literally a dozen containers on any number of platforms, and expect it to work.

    Then, as the developer finds the need, they may clean up their code with some servlets. As scope expands, they can push back towards EJBs, or leverage the other features of the platform.

    When they discover that they need to integrate their system with something else, you discover that there is some semblance of support there as well. J2EE is really an integration platform as much as a web app platform.

    What this means is that you have a large J2EE system that is complicated when considered as a whole, because it is so large and covers such an enormous scope.

    But what you also have is a system that you can grow into, and ideally keep much of your code.

    It is easy to be intimidated by this platform, but it can be approached from any number of angles and have everything else cast aside.

    A simple example here is that we're just getting our feet wet with JMS, to handle a specific task queueing up customer imports. So, we have an entire J2EE server instance handling nothing but 4, low volume, JMS queues, with cron scheduled jobs feeding them.

    Seems like overkill.

    But now we realize that maybe we could expose some more information regarding the whole import processes by feeding statistics and such through a simple web portal. So, already, the scope expands, and this same instance will be able to support that as well.

    Now, it's a bit less overkill.

    More importantly though, is that it leverages our Java expertise and keeps us focused in that domain.

    That's the magic of the platform, having all of these services available, and being able to leverage them as we see fit, WHEN we see fit.
  39. Take it from me ![ Go to top ]

    J2ee is all about interactivity and clever comps . If u use flash as the rich interface u are simply making life harder for yourself. Remote Invocation rubbish is a nonsense. It create extra security holes in your application . Can u just imagine yourself running Eclipse ,Marcomedia Flash IDE and a j2ee server on the same machine?
    Fa
  40. Thank you, Sun[ Go to top ]

    Everybody is quick to bash Sun but how many realize that it takes $$$ to do something like this? And what do they get in return: more brickbats. Not from me. I say, Thank You, Sun.
  41. Thank you, Sun[ Go to top ]

    Yeah I completely agree. Sun Java System Application server 8 is an absolute bargain (FREE!). Its very easy to use and administer with free docs as well. I guess the descision to make it free and distribute it with J2EE1.4 SDK was to enable them gain alot of market share (and hey.... it might help them sell their higher end application servers as well). The free version is pretty descent...

    I was wondering... (don't want to start a flame war just asking for techincal info, etc...)... why should anyone consider say... JBoss as an alternative to Sun Java System App server 8? Anyideas?

    Cheers,

    Smythe...
  42. Thank you, Sun[ Go to top ]

    The free version is pretty descent...I was wondering... (don't want to start a flame war just asking for techincal info, etc...)... why should anyone consider say... JBoss as an alternative to Sun Java System App server 8? Anyideas?Cheers,Smythe...
    Probaly The "FREE" is not the single argument to use open source software.