Web-tier design question

Hello,
The web tier framework I'm working utilizes Struts, and I have a question about using interfaces in base action classes. We have created static utility wrapper methods for accessing different scopes and services. Now in our base action class we have wrapper methods which wrap calls to the static utility methods. Now my colleague suggested that we create an interface that defines these wrapper methods to be used in the base classes and implement this interface in all our web-tier base classes i.e. BaseAction, BaseFilter, BaseTilesAction.
Is this overkill? I don't see the advantage because we're never instantiating these classes. However, we would be placing a rule that these classes must contain certain functionality.
Any insight would be greatly appreciated.
Thanks

Does it make sense to wrap calls to utility methods which are static?Depends - what does that accomplish? Fewer lines of code? Is there state involved in the calls (create object - set state - call method - get results)? If it accomplishes nothing concrete within the current requirements specification, refactor it later if you find a concrete reason to do so.
There may be reasons to do the non-easy thing. Such as you are going to sell the classes and customers will subclass them. But if that isn't about to happen soon, try hard not to gold plate and complexify the code.
How big is your application - how many servlets do you expect? How many concurrent developers (1, 2, 10, 100)?

Similar Messages

  • A web service design question

    Hello,
    I�d like to ask for your help in the following design issue:
    I need to create an email sending web service (with Axis). Only just one method which returns with an integer return code. This handles the following:
    - based on the given parameters gets the email addresses from an
    LDAP server (with netscape ldap for java)
    -     makes a cache from them (only after a timeout period will be the cache
    refreshed) (don�t know what tool to use for this)
    -     selects html templates which to be sent based on the given parameters
    -     sends emails with the appropriate templates (with Velocity)
    -     the whole process is logged (with log4j)
    I have to write the code as generic as possible. I know that some design pattern should be used for this. (some from GoF , and I know there exists design patterns specially created for web services as well).
    Could you enumerate me which patterns (and for what part of the program) would be the best choice to solve this problem? I have read through some books about patterns, but don�t have the knowledge to pick up the right one for a concrete problem like this..
    Thank you in advance,
    nagybaly

    This sounds like a known issue which is tracked in ADAPT01103681. Code from a .NET DataProvider is executed twice if the provider has input parameters.
    At this time there's no known solution for this. This was submitted to the development team and a fix is expected in Service Pack 2. At this time we have not announced a release date for SP2.
    Edited by: David Hilton on Jun 18, 2009 3:02 PM
    Corrected spelling.

  • Web service design question

    we have to create a web service that will be deployed to oas 10.1.3.0
    the web service has to consume a lot of parameters describing a membership iof a motorclub. the incoming data has to be validated and if all the validations pass, stored in the database. we already have some logic implemented in plsql, but the code cannot be reused completely because some rules get changed for the project. a membership can have 0-n associates
    what would be a preferable approach (performance, flexibility, maintenance, etc) to design such an application:
    1. create a stored procedure that consumes an sql object and wrap it into a web service using jpublisher or jdev wizard
    or
    2. design the wsdl and create the web service using top->down approach, use O-R mapping framework (toplink or jpa) to insert data into the underlying tables.
    thank you

    Hi,
    actually from a data perspective it doesn't matter if you display the app on iPad or smart phone. The Service could be easily build with EJB and ADF BC (your choice as both support nested objects (for ADF BC you need to ensure you set it on the view link as explained in the documentation)). Here are some design considerations
    1. expose a method on the service that takes an input argument for the order to display (usually Long or Integer)
    2. The service should return a collection (List)
    3. The compoent on the mobile to allow master/detail views is the list item. In your case though you only have a single master record (order) and multiple detail records so that I would a read only form for the order and a panelList for the details. On click on a detail item in the list you can then navigate to the detailed detail information
    Frank

  • Web Application Designer questions

    Hello,
    1. I want to write a Java script function to display system date in WAD. I don't know the exact format for writing Javascript code in WAD. I tried with some code. It did not work. Could someone point me to any links for writing the code in WAD (in Script web item)?
    2. I inserted company logo in a report web item (In report designer, I inserted the logo in page header section. There is only header in the report). in the web template, apart from the report item, there are some ext and analysis web items. When i execute the web template, only the logo comes on first page and the text and analysis web items come on the next page. How to fix it? How to see that the text and analysis web items continue below logo.
    3. Also, one of the query title (text element) comes at the end of 2nd page and the data comes in next page. Is there a way of binding the title and data to come in one page?
    Please suggest.
    Regards.

    Hi,
    Hope this helps. You are using WAD 7.0 or WAD 3.5 ?
    WAD 3.5
    1. Use of Text Item: In the Standard Tab, select the  TEXT Web Item and drop it in the template. Bind the Query or Analysis item or Data Provider.
    Then do not tick any of the options under Specific. Instead, go to List of Text Elements. In the first column, select General Text Symbol. In the next column type SYUZEIT.
    This will give the technical name of the query in the output.
    Common text elements:
    u2212 technical name of the query (REPTNAME)
    u2212 description of the query (REPTXTLG)
    u2212 InfoProvider (INFOCUBE)
    u2212 key date for the query (SRDATE)
    u2212 accuracy of the data (date and time) (ROLLUPTIME)
    u2212 the person who wrote the query (AUTHOR)
    u2212 the last time the query was changed (date and time)
    (MODTIME)
    u2212 the last person to make changes to the query (MODUSER)
    u2212 current user (SYUSER)
    u2212 the last time the query was refreshed (date and time)
    (SYUZEIT)
    WAD 7.0
    Go to Misc Tab on the left hand pane and select the Text item. Drag n drop. Bind the Query or Analysis Item. Then select General Characteristics and select "Last Refreshed".
    2.Bind the corresponding Text Element to the Query for the name . Or you can use the option of "Display with Tray".
    Can you give some clarifications here,
    What format do u want to export them to ? Depending on that make the settings.

  • Simple Bex Web Application Designer question

    Hi,
    i have a web template with a Hierarchical Context Menu web item. I'd like to use one of its hierarchy with all node but without only one.
    How can i exclude a hierarchy node from hierarchical context menu? How can i use only a part of a hierarchy?
    Thanks a lot
    Richard

    Hi,
      You need to restrict the hierarchy values in the query design. Select all those hierarchy values without that only one hierarchy for that particular characteristics in query design.
    Hope it helps
    arun

  • Web dynpro design question

    Hi,
    I have a requirement where there are around 5 web dynpro applications required to fill in some data in a particular order. The differentiation between these 5 applications is in the fact that there could be different navigational paths between the related views. The views themselves are re-usable. Following are 2 ways by which this can be implemented-
    1)By having multiple components, the views shared between these components, each application corresponds to one component, each of which only one window with navigational links between the used component interface views of the other components involved.
    2)By having a single web dynpro component, with multiple windows, which in turn will have different navigational links between views. Each application will access different windows and its interface views and hence the navigation can be different. The views share a common component controller and different custom controllers, one each for each model.But because different people are sharing this component during development(using DTR and JDI), I dont know whether there are any issues with 2 people working on the same component.
    I feel method 2 is better. Do you agree? Do you see any issues?/any suggestions?
    Cheers
    LM

    LM,
    I would go for the first option in a team oriented development environment because it would definitely avoid all the dependency issues that would arise in option 2.
    Also, option 1 is better if you are thinking about reuse of certain components for future implementations. Refer this <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/bd0e0401-0801-0010-aaab-d0e1742da383">tutorial</a> for further details about Componentization.
    Good luck.
    Bala
    <b>PS: Sorry,initially I've numbered the options incorrectly. It has been corrected now.</b>
    Message was edited by: Bala Krishnan

  • Integrated Planning & Web Application designer question

    We have a planning application that has an associated web template along with it.
    We have a button on the template and it executes a planning function. The issue i see is the planning function has a filter within it at a higher level (say it returns 1000 rows).
    On the web template we set the filter at a much lower level (say the filtered records are only 50). When we execute the planning function I see that it says 1000 rows read and x changed etc. How do i ensure that the planning function executes for the records that are only in the filter in the front end.
    Here is the setting on the button -
    Command - Execute Planning Function
    Binding type - Web Item Selection
    Web Item - Filter1
    Any suggestions?

    Hello Expert,
    Now if i use '0calyear' as info object, and 'year' as my variable for 0calyear info object in the query. This Info object is under column.
    And i use Navigation block to publish this Info object in the web template. The coding are as below:
    </object></TD>
        <TD vAlign=top><object>
             <param name="OWNER" value="SAP_BW"/>
             <param name="CMD" value="GET_ITEM"/>
             <param name="NAME" value="NAVIGATIONBLOCK_2"/>
             <param name="ITEM_CLASS" value="CL_RSR_WWW_ITEM_NAV_BLOCK"/>
             <param name="DATA_PROVIDER" value="DATAPROVIDER_QUERY"/>
             <param name="GENERATE_CAPTION" value=""/>
             <param name="CAPTION" value="Period"/>
             <param name="HORIZONTAL_NUMBER" value="1"/>
             <param name="SHOW_ROWS" value=""/>
             <param name="SHOW_FREE_CHARACTERISTICS" value=""/>
             <param name="SHOW_NAVIGATION_ICONS" value=""/>
             <param name="ITEM_NAV_BLOCK_IOBJNM_1" value="0CALYEAR"/>
             <param name="BOOKED_VALUES_1" value="Q"/>
             <param name="ITEM_NAV_BLOCK_IOBJNM_2" value="4458DUVKT8KDWAW4TFD0SGPCW"/>
             <param name="BOOKED_VALUES_2" value="Q"/>
             ITEM:            NAVIGATIONBLOCK_2
    </object></TD>
    So, When i run the web template, the first screen prompts to key in variable year. So, right now, the variable year is 2006.
    So, how should i take/enable this variable '2006' to publish in my navigation block?
    If you say javascript, where should i add in between the coding above?

  • Web design questions (Was: A number of questions..)

    Ok so!
    What fonts are known to go well together when making banners or headers? I have been messing around with a lot of fonts and im really just looking for some new ones!
    I know this question really depends on the banner itself but what is a recommended size of a font when making a header? lets say 860x250 ?
    Are there any real kind of "must nots" when designing banners?
    When Placing text onto A banner where is the usual place you would see it? I know it changes from site to site but from just looking around a lot of text seems to be in the left bottom corner, is this a norm of some sort?
    Are there any known font combinations which would go together well when making a full webpage? As in fonts for the sidebar, content area, footer etc, any combinations?
    Thank you very much!

    You are asking design questions, but most web designers, including those who frequent this forum, have  no design expertise.
    Your questions are good, but  incomplete. The right typeface and size depends on the impression you are trying to create. For instance, you wouldn't want to use the typeface "Comic" for a website selling financial services.
    Many corporations have lengthy documents detailing their identity for graphic design and advertising. Such documents define which typefaces may be used where, and how. Assuming that you don't have such a document to work with for the creation of this web banner, think about the business, organization (or whatever) the website is for. Should it convey conservative dependability? Edginess? Family friendliness? The typefaces you choose should take such qualities into consideration.
    There's no definite answer to any of the questions you have asked. But that's OK. You should research websites that create the kind of impression you want to make and study how they accomplish it.

  • To use Web Application Designer release 2004s do we need to have portals???

    Hi
    I would like some clarity regarding whther we need a portal or not.
    If you use Web Application Designer (SAP BW 3.x) it works fine, you can create reports and then it shows in SAP Easy Access under favourites. Executes fine, no portal is used.
    Now when I want to use the new Web Application Designer I can not execute the reports. Gives me error
    "Java communication error: RFC destination NOT_CONFIGURED does not exist", the window it appears in has a text saying it can't conect to the portal. Then notes that I look at regarding this seems that the connection between SAP BW and Portal must be set up.
    So can please someone tell me whether you need the portal to use the new Web Application Designer release 2004s
    Thanks in advance

    YOu neeed BI Java configured
    If you do not use any new BEx Web functions, do you have to install the usage types BI Java and EP?
    answer -SAP EP 6.0 Portals could be integrated into a federated portal system landscape using URL iViews.
    For more insights - FAQ
    Pls read carefuly should answer all your current and future questions.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/43008b6a-0901-0010-90af-c848d878bac3?rid=/library/uuid/a5067965-0901-0010-6f8a-bbf0b7424283
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/43008b6a-0901-0010-90af-c848d878bac3?rid=/library/uuid/cea68c65-0901-0010-f5a4-fd34189d8078
    Hope it Helps
    Chetan
    @CP..

  • Web Application Designer: Column width on analysis_item with BW 7.0

    Hi,
    I'm new to SAP world and I have found a problem I'm not able to solve. I'm working with the Web Application Designer and I want to modify the cell properties (such as cell width) for aligning different queries. In fact, my question are:
    <b>
    1. Is it possible to hard-code/specify column widths of the analysis_item?
    2. The property width of the analysis_item doesn't work, does it?
    </b>
    Thanks for your time and efforts.
    Message was edited by:
            Daniel Rubio

    Hi,
    I have just discovered the capability of modifying columns widths with css properties.
    So if I add to the head section of the html:
    div.prueba2 .urSTTDBdr1
    div.prueba2 .urSTTDBdr
    div.prueba2 .urSTTDBdr2
    And later I put the AnalysisItem between a div class="prueba2" and /div, the columns widths are changed.
    Do you know where can I find all the style properties (such as urSTTDBdr1) and its functions?
    Thanks

  • Print PDF file with the lay out created in the BEx web application designer

    Got the following questions (problems) when print a web report created in BEx Web Application Designer to a PDF file:
    1. The tile (which has a company logo and report name in it) was not printed, is it possible to print a title (with company logo) on each page of the PDF file?
    2. Want print the filters that have value specified on the PDF file, is it possible to do this?
    Any help is appreciated, thanks.

    Hi Simon,
    you can achieve this requirement i.e. using this way of implementation:
    1. Create a new template which contains the required fields (company logo etc) and set the visibility of the top container to "hidden". Add a empty data provider to this template and add the filter values (variable names) you want to display on the PDF. However be aware that the name for the (empty) data provider must match the name of the data provider within the original template you want to print.
    2. Open your original template and include the template you created in step 1 (Advanced: Web Templates). Choose the appropriate location (above/below the analysis item.
    3. Check the settings of your export command: do not set a special web item to be printed.
    If you export the template within web the second template should be printed correctly.
    Brgds,
    Marcel

  • SOA real-time design question

    Hi All,
    We are currently working with SOA Suite 11.1.1.4. I have a SOA application requirement to receive real-time feed for six data tables from an external third party. The implementation consists of five one-way operations in the WSDL to populate the six database tables.
    I have a design question. The organization plans to use this data across various departments which requires to replicate or supply the data to other internal databases.
    In my understanding there are two options
    1) Within the SOA application fork the data hitting the web-service to different databases.
    My concern with this approach is what if organizations keep coming with such requests and I keep forking and supplying multiple internal databases with the same data. This feed has to be real-time, too much forking with impact the performance and create unwanted dependencies for this critical link for data supply.2) I could tell other internal projects to get the data from the populated main database.
    My concern here is that firstly the data is pushed into this database flat without any constraints and it is difficult to query to get specific data. This design has been purposely put in place to facilitate real-time performance.Also asking every internal projects to get data from main database will affect its performance.
    Please suggest which approach should I take (advantage/disadvantage. Apart from the above two solutions, is there any other recommended solution to mitigate the risks. This link between our organization and external party is somewhat like a lifeline for BAU, so certainly don't want to create more dependencies and overhead.
    Thanks

    I had tried implementing the JMS publisher/subscriber pattern before, unfortunately I experienced performance was not so good compared to the directly writing to the db adapter. I feel the organization SOA infrastructure is not setup correctly to cope with the number of messages coming through from external third party. Our current setup consists of three WebLogic Servers (Admin, SOA, BAM) all running on only 8GB physical RAM on one machine. Is there Oracle guideline for setting up infrastructure for a SOA application receiving roughly 600000 messages a day. I am using SOA 11.1.1.4. JMS publisher/subscriber pattern just does not cope and I see significant performance lag after few hours of running. The JMS server used was WebLogic JMS
    Thanks
    Edited by: user5108636 on Jun 13, 2011 4:19 PM
    Edited by: user5108636 on Jun 13, 2011 7:03 PM

  • Configuring Oracle Access Manager to work with Oracle Web Tier (11.1.1.3)

    I am trying to follow http://docs.oracle.com/cd/E14571_01/core.1111/e12035/oam_11g.htm to setup a load balanced OAM configuration. Following the documentation from the article (section 11.5) I'm not able to quite get this working. I believe there is a typo in 11.5.1 step 4 as admin.mycompany.com should be pointing to the IDMHOST1 and IDMHOST2, but please correct me if I'm wrong.
    My question more comes in with 11.5.2. When you declare that the OAM Server Host is sso.mycompany.com and port to be 443 you are expecting that OAM makes a call back up to the webcache but I don't believe this is happening. When I define OAM Server Host as a single machine name with OAM installed it works but when I use the load balanced URL that points to the web tier it is unable to find the server. If the call was making it up to the webcache then it would have the definition of sso.mycompany.com but if it never makes it there then it will never have that definition and the 'no server' error makes sense. Can anyone please clarify this for me?

    I am trying to follow http://docs.oracle.com/cd/E14571_01/core.1111/e12035/oam_11g.htm to setup a load balanced OAM configuration. Following the documentation from the article (section 11.5) I'm not able to quite get this working. I believe there is a typo in 11.5.1 step 4 as admin.mycompany.com should be pointing to the IDMHOST1 and IDMHOST2, but please correct me if I'm wrong.
    My question more comes in with 11.5.2. When you declare that the OAM Server Host is sso.mycompany.com and port to be 443 you are expecting that OAM makes a call back up to the webcache but I don't believe this is happening. When I define OAM Server Host as a single machine name with OAM installed it works but when I use the load balanced URL that points to the web tier it is unable to find the server. If the call was making it up to the webcache then it would have the definition of sso.mycompany.com but if it never makes it there then it will never have that definition and the 'no server' error makes sense. Can anyone please clarify this for me?

  • Errors when compiling the web service (SAP Web Service Design Tool)

    After downloading and installing the SAP de Web Service Design Tool (for Crystal Reports Server) I created a connection, a simple query and was able to deploy a web services. I tested the web service with an Xcelsius dashboard within InfoView. Thereafter I created a second connection (other name but same ODBC connection / server) and created another simple query with two date(range) parameters and a group by year and month function in order to do a select count(). It executes fine, but when I try to publish the web service I get an error.
    There are errors when compiling the web service.
    Is does not say whatu2019s wrong or how I can solve this problem.
    Who can help me?
    Some notes:
    1) Within expert mode I used a MONTH() SQL function which does not show in the normal mode.
    2) It seams that the u2018administrationu2019 of Web Service Design Tool got u2018corruptedu2019 after only creating the two connections, queries and services mentioned above. I believe so because I could select one of two queries when I created the second service, but within the current connection I had only one query.
    Thanks for any help,
    Ron
    ADDITIONAL INFO: The parameters seam to be the problem. After removing the parameters I can publish the service. But without parameters it is NO SOLOTION.
    Edited by: RonKoudijs on Aug 26, 2010 6:28 PM

    Hello Taylan,
    I think the error that you received was due to packaging issues.I placed the
    UtilClass.java file under a directory called data which was present under
    the project directory.
    When you want to access a java class, you can either place the compiled
    class file in the WEB-INF/classes folder or you can place the java file
    under the project directory.
    I have attached the sample project that I created with your files.
    Let me know if you have any other questions.
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "taylan" <[email protected]> wrote in message
    news:3d6351b0$[email protected]..
    >
    I am trying to write a simpe web service in WebLogic Workshop, but havingan error
    which I could not understand. Could you please help me? Thanks in advance.
    Regards,
    Taylan
    My web service code is like belows:
    import weblogic.jws.control.JwsContext;
    import data.*;
    public class WebService1
    /** @jws:context */
    JwsContext context;
    * @jws:operation
    public UtilClass testType(UtilClass tTest){
    UtilClass returnObj=new UtilClass();
    if(tTest.getName()!= null){
    returnObj.setName(tTest.getName());
    return returnObj;
    and my UtilClass is placed in the data directory under the same directorywith
    my web service code. It is a simpe class as belows:
    package data;
    public class UtilClass
    private String name;
    public void setName(String name){
    this.name=name;
    public String getName(){
    return name;
    However I got an error when I try to compile the webservice class. Theerror is
    like belows:
    File Line Message
    WebService1.jws 0 Resource found on system classpath: data.UtilClass
    Build complete - 1 error(s), 0 warning(s)
    [ngroup.zip]

  • Method design question...and passing object as parameter to webserice

    I am new to webservice...one design question
    i am writing a webservice to check whether a user is valid user or not. The users are categorized as Member, Admin and Professional. For each user type I have to hit different data source to verify.
    I can get this user type as parameter. What is the best approach to define the method?
    Having one single method �isValidUser � and all the client web service can always call this method and provide user type or should I define method for each type like isValidMember, isValidAdmin ?
    One more thing...in future the requirement may change for professional to have more required field in that case the parameter need to have more attribute. But on client side not much change if I have a single isValidUser method...all they have to do is pass additional values
    isValidUser(String username, String usertype, String[] userAttributes){
    if usertype == member
    call member code
    else if usertype = professional
    call professional code
    else if usertype = admin
    call admin code
    else
    throw error
    or
    isValidMember(String username, String[] userAttributes){
    call member code
    One last question, can the parameter be passed as object in web service like USER object.

    First of all, here is my code
    CREATE OR REPLACE
    TYPE USERCONTEXT AS OBJECT
    user_login varchar2,
    user_id integer,
    CONSTRUCTOR FUNCTION USERCONTEXT (
    P_LOGIN IN INTEGER
    P_ID_ID IN INTEGER
    ) RETURN SELF AS RESULT
    Either your type wont be compiled or this is not the real code..

Maybe you are looking for

  • IPOD NANO WON'T SYNC WITH ITUNES 11.1

    Can someone please help? I have just bought an ipod Nano (7th Generation) and when I try to sync to iTunes I get the message: This copy of iTunes does not support iPod, iPhone or iPad syncing. I am running Snow Leopard 10.6.8 and iTunes 11.1. The box

  • Multiple JScrollPanes in one window

    Hi. I've been trying to figure out how to make multiple scrollable text areas in one window. I'm trying to use JEditorPanes for the text areas so that they can display html. Does anyone know how I can make multiple scrollable JEditorPanes appear side

  • No aerial connection but cable box

    I am in a rented property and just signed upto BT vision. I connected to my tv aerial connection but cant get any tv channels at all.  Got a friend to look at it and then realised my aerial has been cut off and does not go to the roof aerial now!!. 

  • Speed while updating through pc suit

    How much speed is required while updating my nokia 6131 through nokia pc suit? Is there anyone knows that?

  • How do i get my photos to back up on icloud?

    I believe my phone over heated and I need to go purchase a new phone. I do not want to lose all my photos that are curently on the phone. Is there a way to back up my photos to iCloud? I do not want to back them up on my laptop (I dont have much spac