Why should i use JSF rather than Struts?

What makes JSF useful than Struts? In my project I am using like
<h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
From what i understand is Presentation Layer should be shielded from whatever is going on in the backend. So, this doesn't do good right?
Please suggest.
How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..

srikanthradix wrote:
What makes JSF useful than Struts? In my project I am using like
<h:commandButton action="#{loginbean.execute}" actionListener="#{loginbean.handleEvent}" ..../>
In the above commandButton as you can see that i am not exposing the beanName. However i am exposing the beanMethod which are execute and handleEvent. Is there any other way to hide the name of the method because
From what i understand is Presentation Layer should be shielded from whatever is going on in the backend.You can use "binding" and define everything in Java code if you want. You can rename your method to reflect what you want to see in the front end if you want. You can use JSFTemplating to use handlers which can be mapped to any name you want to see and do not have to match the method name of the java class (although I suspect this is the opposite direction from what you are suggesting you want).
EL in jsf (i.e. #{bean.login}) is meant to do the mapping in JSF pages rather than externalize this in a separate file and force the page developer to edit multiple files for simple tasks. Although in some cases navigation is broken out into a separate file (i.e. faces-config.xml file using the default NavigationHandler navigation rules), this can also be done inline. It's a different way of doing development and has its pros and cons (easier, but mixes up presentation and controller somewhat). That said... JSF is very flexible, it CAN externalize any of this information, it just requires you to provide a different ViewHandler information that allows you to enter the data the way you like to see it (imo, you won't realize any benefit from the separation, though -- I used to think it was worth doing but have changed my opinion).
So, this doesn't do good right?Perhaps in theory... but in practice, I don't think it really has a drawback. One caveat, I like how I implemented event handling in JSFTemplating as opposed to action/actionListener attributes which are not configurable and are more opaque than I prefer. My parameterized handlers allow for better code-reuse, but arguably mix up presentation and controller code even more (depending on how they're used).
Please suggest.
How does Component and Renderers help. I am using encodeEnd() method in Renderer to render what the input or the output should look like. Do we need to switch to JSF from Struts just because of this... I don't see how and why components and renderers could help me..The idea of a component helps tremendously as someone else can create a component for you and you can benefit from it. There are many great component sets available on the market (for free and for purchase). For example: Woodstock (which has drag/drop support inside NetBeans), RichFaces, IceFaces, Tomahawk, Scales, etc.
Renderers allow you to cleanly separate the presentation of a component with the data of the component. You can then switch out the presentation to support multiple markups (i.e. client devices). In addition, JSF's rich lifecycle provide logical places for certain types of operations to occur, the renderers participate in this so that they are performing their tasks at a well defined time. And finally, many different components may re-use the same renderer, or a single component may use one of several renderers. The separation of data and display (model and view) makes this very clean.
JSF is not Struts. If you expect it to be struts, you may be disappointed (or if you expect struts to be JSF, you'll be disappointed). JSF has a lot to offer (as does struts), you have to decide what is important to you and your organization. Some things to consider wrt to JSF: very strong vendor support; many large set of components to choose from; multiple standards-based tools to choose from; very flexible (most parts of the framework are pluggable); active growing development community; component-based model which encapsulates complexity for things like Ajax, pagination, and other things (often complicated in a non-component architecture); good integration with other frameworks.
I don't know if this makes your decision any easier, but hopefully it helps clarify how you should be viewing JSF & Struts.
Good luck!
Ken Paulsen
https://jsftemplating.dev.java.net

Similar Messages

  • When should you use widgets rather than advanced actions?

    HI,
    We have a few very complicated projects using lots of advanced actions and widgets that simulate laboratories.
    1/ Should you always use advanced actions if it possible OR
    2/ Should you use widgets when you reach a certain level of complexity ?
    Are there any differences in the field in terms of reliability ?
    regards Renovator

    Hi Renovator
    I'll take on the last thing you asked about. Differences in terms of reliability.
    Unfortunately the answer to that one is actually a question.
    The question? How long is a piece of string?
    Of course the answer to that is "it depends". Likewise, whether an Advanced Action or a Widget is more "reliable" depends on how the code was implemented. Folks can create Advanced Actions that don't work as they think they will. The same can be true of widgets. So I'd say that they are on equal playing ground when it comes to "reliability".
    Cheers... Rick

  • Mail - why does it use Firefox rather than the default, Safari?

    Hi,
    I have both Safari and Firefox on this iMac that's running 10.6.8.  Safari is my default browser.
    Within Mail Preferences, the Default RSS Reader is set up to use Safari.  However,  Mail always links to Firefox.  Why is this and how do I change it?
    Thank you,
    reluctantuser

    Nevermind, I've figured it out!
    Thanks,
    reluctantuser

  • Why won't Compressor let me submit? And why use compressor rather than FCP?

    Hey I'm using Compressor with Final Cut Hd and a Powermac g5.
    So from Final Cut I've gone to 'Export' using 'Using Compressor', for a piece of Quicktime that I want to convert to Mpeg 4. IN compressor, I've set a MPEG 4 conversion, and I've set a destination. But the 'submit' button hasn't come on, and I can't go ahead with the operation. Can anyone tell me the basic things that would prevent me going ahead with the conversion here - no matter how obvious? I'm a new user, and I don't know what I'm doing wrong... any hints?
    Secondly, why do I need to use compressor for this - what's the advantage of using Compressor rather than using the QTconversion panel export from Final Cut Pro?
    Thanks for your help with these issues - you guys rock!
    Best
    Richard

    You may not have enough free hard drive spacein your destination folder or your destination folder is Write protected. I've had that problem and compressor will not always tell you why its not giving you the ok to submit yu kind of have to figure it out. *** far as the benifit of useing it the only rel one is that you can continue to use final cut to do other work while compressor is working, ut that only works if you first export it as a fcp Quick time move and then open compressor and drag and drop the fcp full dv or hdv quick time movie into compressor for compression. affter that you can quite compressor without even saving it and it will continue to work in the background only using what ever cpu power you aren't using allowing you to continue to work on other parts or projects.

  • Why should we use DSO instad of Infocube i BW7.4-SAP BW7.4

    Dear All,
    now I'm working with HCM- Payroll (BWreports) Standard reports, data flow is datasource--->Infocube--->Reports, but my architecture given data flow datasource--->DSO--->Multiprovider-->Reports, this is in SAP BW7.4, could any one explain me why should we use DSO instead of infocube..
    Thanks for your helping...
    Regards,
    Narasimha

    Hi
    In Loading purpose:
    Better to use DSO, becouse it involves 3 tables ie New data table, Active data table and Change log table.
    in case of INFO CUBE, here it involves more than 3  tables ie by default 3 dimension tables are existedby SAP... at least we will create 2 tables ie 1 dimension table and 1 fact table ....here it involves 5 tables.( 3 default+1 dimension+1 Fact table)
    Conclusion: When we create INFO CUBE it will takes more time compared to DSO because it involves 3 table
    Conclusion: Best practice is when we load data to taget, better to use DSO
    In Reporting:
    Cube will give summerised data whyle reporting and it is multi dimensional,ie we can analyse the data in multiple ways.
    DSO will give detailed data whyle reporting and it is 2 dimensional , ie we can analyse the data in 2 dimensional way only
    Conclusion: Best practise is Whyle reporting better to use INFO CUBE
    Regards
    Raj

  • Why should I use SQLJ

    Why should I use SQLJ instead of JDBC, is it for faster Acess than JDBC, or for any other reasons

    Why should I use SQLJ instead of JDBC, is it for
    faster Acess than JDBC, or for any other reasonsJust guessing...
    It should be faster - but you should test.
    I would suspect that it is going to be harder to maintain because it is less used (thus less tested), less known (so harder to hire people to maintain) and less 'standard' (thus figuring out what went wrong can be harder.)

  • Why should I use xinetd?

    Im using inetd, but in mandrake I had xinetd, and somewhere I had read that it is better. Is this true?, and if so, ahow do I install it, cause it's not in pacman (i know I cant install it from source, but I wonder if it's hidden somewhere in the distro)

    http://www.xinetd.org/faq.html
    Q. What is xinetd ?
    A. xinetd is a replacement for inetd, the internet services daemon.
    Q: I am not a system administrator; what do I care about an inetd replacement ?
    A: xinetd is not just an inetd replacement. Anybody can use it to start servers that don't require privileged ports because xinetd does not require that the services in its configuration file be listed in /etc/services.
    Q. Is it compatible with inetd ?
    A. No, its configuration file has a different format than inetd's one and it understands different signals. However the signal-to-action assignment can be changed and a program has been included to convert inetd.conf to xinetd.conf.
    Q. Why should I use it ?
    A. Because it is a lot better (IMHO) than inetd. Here are the reasons:
    1) It can do access control on all services based on:
         a. address of remote host
         b. time of access
         c. name of remote host
         d. domain name of remote host
    2) Access control works on all services, whether multi-threaded or single-threaded and for both the TCP and UDP protocols. All UDP packets can be checked as well as all TCP connections.
    3) It provides hard reconfiguration:
         a. kills servers for services that are no longer in the configuration file
         b. kills servers that no longer meet the access control criteria
    4) It can prevent denial-of-access attacks by
         a. placing limits on the number of servers for each service (avoids process table overflows)
         b. placing an upper bound on the number of processes it will fork
         c. placing limits on the size of log files it creates
         d. placing limits on the number of connection a single host can initiate
         e. place limits on the rate of incoming connections
         f. discontinue services if the load exceeds specified limit
    5) Extensive logging abilities:
         a. for every server started it can log:
              i) the time when the server was started
              ii) the remote host address
              iii) who was the remote user (if the other end runs a RFC-931/RFC-1413 server)
              iv) how long the server was running
              (i, ii and iii can be logged for failed attempts too).
         b. for some services, if the access control fails, it can log information about the attempted access (for example, it can log the user name and command for the rsh service)
    6) No limit on number of server arguments
    7) You can bind specifc services to specific IP's on your host machine

  • 64 bits: why should I use it?

    Just for the sake of discussion: If I have a program offered in 32 and 64 bit modes, why should I use the 64 bit version?
    For example, the well known Videolan Player, aka VLC Media Player, recently updated to version 1.0.2, comes in 32 an 64 bit flavors. When would one version be used in lieu of the other?
    And saying "because it is bigger and hence better" is not true. Even Apple points out in the developer pages about the 64-bit fallacy: in that mode, all data structures duplicate in size and if the hardware remains the same, performance will suffer cause you have to push twice the amount of information.

    I just did a test with VLC Player (version 1.0.2), I played the same video in both 32 bit and 64 bit modes (NOTE: NOT talking about the kernel, but the program). Played it several times in both modes and even alternated between modes. In 64 bit mode it caused one of my processors to spike to 104% usage for the first 20 sec before dropping to 4-5%. In 32 bit mode processor usage remained at 4-5% the entire time.
    Played the same video in Quicktime Player X in both modes and saw no difference (used 5-8% processor usage).
    So to answer the question about when to use one version over the other I would say if one version causes notable problems/issues and the other doesn't than use the one that doesn't. Generally you shouldn't see a noticeable difference except in high-end programs that are crunching massive amounts of data.

  • WHY WE GO FOR SESSION RATHER THAN LSMW ?

    WHY WE GO FOR SESSION RATHER THAN LSMW  , AND I WANT TO KNWO THE DIFFERANCES BETWEEN THEM AND IN WICH CONDITIONS  SESSION AND LSMW ARE  MOST SUTED? THANKING U

    hi,
    In BDC ,we can run session as per our need, you can run in foreground ,background or even you can run on periodic wise ,where as in LSMW
    you cant run as your wish .
    BDC (Batch Data Communication) is a technology used for data transfer. it is meant for transferring data thru SAP transactions itself. when u use BDC for data transfer, the sequence of steps is the same as when u use standard sap transaction screens for data upload. the only difference is that u can use different options for foreground/backgrou nd processing.
    LSMW on the other hand is a tool that helps migrate data from a legacy system (non-sap system ) to SAP system. it offers u various options to use either batch input, direct input, BAPIs or idocs. it involves a series of some 17-18 steps to migrate data.
    BDC:
    Batch Data Communication (BDC) is the process of transferring data from one SAP System to another SAP system or from a non-SAP system to SAP System.
    Features :
    BDC is an automatic procedure.
    This method is used to transfer large amount of data that is available in electronic medium.
    BDC can be used primarily when installing the SAP system and when transferring data from a legacy system (external system).
    BDC uses normal transaction codes to transfer data.
    Types of BDC :
    CLASSICAL BATCH INPUT (Session Method)
    CALL TRANSACTION
    BATCH INPUT METHOD:
    This method is also called as ‘CLASSICAL METHOD’.
    Features:
    Asynchronous processing.
    Synchronous Processing in database update.
    Transfer data for more than one transaction.
    Batch input processing log will be generated.
    During processing, no transaction is started until the previous transaction has been written to the database.
    CALL TRANSACTION METHOD :
    This is another method to transfer data from the legacy system.
    Features:
    Synchronous processing. The system performs a database commit immediately before and after the CALL TRANSACTION USING statement.
    Updating the database can be either synchronous or asynchronous. The program specifies the update type.
    Transfer data for a single transaction.
    Transfers data for a sequence of dialog screens.
    No batch input processing log is generated.
    LSMW:
    The LSM Workbench is an R/3-based tool that supports You when transferring data from non-SAP systems ("Legacy Systems") to R/3 once or periodically.
    The tool supports conversion of data of the legacy system in a convenient way. The data can then be imported into the R/3 system via batch input, direct input, BAPIs or IDocs.
    Furthermore, the LSM Workbench provides a recording function that allows to generate a "data migration object" in an entry or change transaction.
    The main advantages of the LSM Workbench:
    • Part of R/3 and thus independent of individual platforms
    • A variety of technical possibilities of data conversion:
    • Data consistency due to standard import techniques:
    Batch input
    Direct input
    BAPIs (Business Application Programming Interfaces)
    IDocs (Intermediate Documents)
    The import technique to be used in an individual case depends on the business object.
    • Generation of the conversion program on the basis of defined rules
    • Clear interactive process guide
    • Interface for data in spreadsheet format
    Reward points if this helps you.
    Siva

  • [svn:fx-3.x] 9493: Applying patch (SDK-22435) submitted by Aaron Boushley which updates ObjectUtil to use toXMLString rather than toString for XML objects .

    Revision: 9493
    Author:   [email protected]
    Date:     2009-08-23 16:09:56 -0700 (Sun, 23 Aug 2009)
    Log Message:
    Applying patch (SDK-22435) submitted by Aaron Boushley which updates ObjectUtil to use toXMLString rather than toString for XML objects.
    QE notes:  None
    Doc notes: None
    Bugs: SDK-13919
    Reviewer: N/A
    Tests run: Checkin
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-22435
        http://bugs.adobe.com/jira/browse/SDK-13919
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/utils/ObjectUtil.as

  • Why should I use BO BI 4.0 for my existing SAP NetWeaver ?

    Dear Sirs,
    Question about BusinessObjects BI 4.0 & SAP Netweaver 7.0.
    In my company we use NetWeaver for a year. We have some reports on portal, so we have some analysis via www. It seemed to me that this is enough for us.
    Now on the market is available new version of BusinessObjects - version 4.0.
    My question is :
    Why should I use BO BI 4.0 for my SAP BW?
    What will I gain by implementing BO BI 4.0 in conjunction with SAP BW?
    Can I use existing reports on the new platform?
    Can you give some links to documents, presentations and notes to answer these questions?
    Best regards,
    Emmo

    Hi Emmo2000,
    Please see my answers below:
    Why should I use BO BI 4.0 for my SAP BW?
    What will I gain by implementing BO BI 4.0 in conjunction with SAP BW?
    Please see this SDN article which covers a lot of the new features of BI4.0 :
    /people/ingo.hilgefort/blog/2011/03/24/sap-integration-update-9--should-you-start-with-sap-businessobjects-40-or-wait-for-41
    Can I use existing reports on the new platform?
    There is the ability to integrate BexWeb applications via our BI Launchpad. I'm not sure if this is what you are referring to but the following should clarify:
    http://wiki.sdn.sap.com/wiki/display/BOBJ/HowtointegrateBExWebApplicationsintoBI4.x
    Can you give some links to documents, presentations and notes to answer these questions?
    For detailed information on the BI4.0 suite, I would direct you towards our product documentation:
    http://help.sap.com/businessobject/product_guides/
    I hope this is helpful and fully answers your question.
    Kind regards,
    John

  • When I click on a website in my reading list, why does top sites open rather than the site I've clicked on?

    When I click on a website in my Reader list in Safari, why does Top Sites open rather than the website I've clicked on?

    Go step by step and test.
    Reset Safari.
    Click Safari in the menu bar.
    From the drop down select "Reset Safari".
    Click "Reset".
    Delete Cookies
    Safari > Preferences > Privacy > Cookies and other website data:
    Click “Remove All Website Data”.
    Empty Caches
    Safari > Preference > Advanced
    Checkmark the box for "Show Develop menu in menu bar".
    Develop menu will appear in the Safari menu bar.
    Click Develop and select "Empty Caches" from the dropdown.
    Turn off Extensions if any, and launch Safari.
    Safari > Preferences > Extensions

  • Why should I use EJB

    Hi,
    My name is Gandharv Sirohi. I am a student, and new to EJB. I want to know why should I use EJB, before I can start learning it if every thing can be done using Java Servlets and JSP.
    I tried to find out the answer to this question in books but there is no satisfactory answer.
    Can some body help me understand this simple question. I will be thankfull

    Hi gandharv,
    It's true there are a lot of services available to both the web tier and the EJB tier. One of the
    real strengths of EJB is support for transactional business logic. Web components can
    explicitly demarcate transactions via UserTransaction, but container-managed transaction
    support in EJB components at the business method level offers a much simpler approach
    for developing and maintaining such applications. An example of some EJB services not available
    in the web tier are : method-level security, RMI-IIOP access, message-driven beans,
    transactional/persistent timer service, stateful components, extended container-managed
    persistence contexts, guaranteed single-threaded execution, and interceptors.
    Of course there are many services available to the web tier that are not in EJB. It's not
    about picking one of the two that should always be used. Like any tool/technology, each has its strengths, weaknesses, and design center.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Why should i use Apple 'Mail' if i use others like G-Mail?

    Simply:  Can or should i just remove 'A-Mail' so it's icon stops jumping & bothering me to sign up? 
    •THANK YOU, and gratitude to whoever can help me unerstan.
    *I'm 67 and not up to speed on such things.
    BACKGROUND, if necessary:
    •For years I've used only the Mail service of my ISP, Dslextreme ('DSLX').
    I've never used Apple 'Mail' , & never set it up to service mail from any of the mail services that i do use.
    I never activated 'A-Mail'  and i don't think there is mail in it.  Nor have i deactivated 'A-Mail', and it's still on my screen in the 'Dock'.
    •But from time to time, and inexplicably to me,  the 'A-Mail' icon seems prompted to start 'jumping' and wanting me to use it somehow, like sign up for it.  This was a minor annoyance so i just clicked to close it and so ignored it and moved on.
    This seems to happen when a website i'm on wants me to e-mail them and on their page i seem only have a choice to use 'A-Mail', none other, so i am pre-cluded from communication.
    •Just recently DSLextreme switched all us users over to G-Mail.   They turned over their mail operation to GMail and urged us to also getting a G-Account, which i have finally done.
    •I know that A-Mail 'works with the most popular email systems' like G-Mail.
    •"A-Mail"  = Apple's 'MAIL'.   To avoid confusion caused by the generic word 'Mail',  I'm going to call Apple's 'Mail' "A-Mail".
    I've spent over an hour trying to make my problem clear to you.    I hope i have succeeded.

    Apple mail is simply the default email application in OS X. It is not an email service/email address.
    Using an email application, you can read all your email in the same place and store them on your local drive.
    To answer your question, "Why should i use Apple 'Mail' if i use others like G-Mail?"
    You use a mail application for the same reason you use the internet when you could simply drive to the store to buy things or go get a newspaper or go to the library or go to the movie theater, etc.
    But from time to time, and inexplicably to me,  the 'A-Mail' icon seems prompted to start 'jumping' and wanting me to use it somehow, like sign up for it.  This was a minor annoyance so i just clicked to close it and so ignored it and moved on.
    This seems to happen when a website i'm on wants me to e-mail them and on their page i seem only have a choice to use 'A-Mail', none other, so i am pre-cluded from communication
    because the website is attempting to open your email application.
    Sounds like you simply use a web browser to view all your email.
    If you want to send an email from a web page, you need to copy an email address,  open your email account in your web browser, create a new email and paste the address.

  • Why should we using ABAP code in RSQ02

    Hi,
    I want to know why should we using ABAP cobe in RSQ02 ,
    while we creating the infoset we writing code using extras icon .
    with out abap code we can't creat infoset query in SAPBW?
    Regards,
    Goodyear.

    Hi dear,
    this is only an additional possibility to manipulate your data, but this is not due !
    Did you know that Marc Bernard wrote a very useful doc about ABAP and BW ?
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/events/bw-and-portals-05/five ways to enhance sap bi backend functionality using abap.pdf
    Hope it helps!
    Bye,
    Roberto

Maybe you are looking for