Critique my Web App design. (very long, maybe interesting)

Hi all
I guess this is really a design issue, and I was just looking for confirmation that what I have done is good practice.
I am writing a web application with the works, forms, beans, client validation, server validation, everything. In the future, I envisage there may be a requirement for the functions of this web application to be utilised by some kind of desktop application (perhaps a stand alone swing or an extension to some existing software or something like that).
I guess maybe the best way to do this is to explain the dataflow.
A client is presented with IE window, invoked by a third party application which also hands in some URL parameters. This window consists of a menu frame on the left, and a "form frame" on the right. The client selects a form from the menu frame, by clicking a standard html link. The link adds a "command" parameter to the URL and passes the request to a servlet. The servlet reads the "command" parameter to determine which form the user would like to see and displays it in the "form frame". It then uses getRequestDispatcher and forwards the request to the appropriate JSP form.
The form that is displayed initialises a unique bean (scope=request) for the form that is displayed. The bean is initialised with a few default values which are set in the constructor of the bean.
The first thing the JSP does is check the "process" parameter (which should not have been set yet), if it is "true", the properties of the bean are set from the fields on the form (introspection). The user enters some values on the form and some hidden parameters (including process=true) which are taken from the URL are set. The form is submitted to itself (the same JSP) after running some basic client side validation (numbers in numbers fields, field length, etc).
If process=true, then the properties of the bean have been set and the request is forwarded (<jsp:forward>) to a validation servlet.
The validation servlet looks up a properties file and creates a JDBC connection from those properties. It extracts the bean from the request, and makes a call to it�s validate() method which takes the JDBC connection as a parameter.
The validate() method runs some queries against the database and returns true or false or throws an SQLException back to the validation servlet. If validate returns false, it sets an error message in a hashtable in the bean.
If the validation servlet catches an exception thrown from the validate() method of the bean, it writes the response to the screen (form frame).
If the validate() method returns false, the validation servlet, using getRequestDispatcher() forwards the request back to the original form. The form renders its fields based on the values in the bean in the request, and also writes out any error messages that the validate() method of the bean may have put () into its errors hashtable.
If the validate() method returns true, a new Statement is created on the original JDBC Connection object. A method in the bean is accessed which returns an SQL INSERT statement which is inserted via statement.executeUpdate(). The request is then forwarded, using getRequestDispatcher() to a confirmation page that simply displays the properties that have been set in the bean.
Hope I'm not boring you to death yet...
My comments/questions are:
Firstly, is this proper MVC design? I've read tutorials and things like that and have tried to fit the MVC architecture.
Should the servlet, which initially determines which form is displayed to the user (I believe this is an implementation of the "command" pattern), in fact be an interface of the package that contains all the beans? This way, when it comes time to stick a different front end on all this, all that needs to be done is implement that interface. E.g. for my current set up, I would implement that interface and have it extend HttpServlet and have its doPost() method to display the correct form...
...or... is it acceptable that if a different application is to call my code, a new interface or command type structure will be required anyway?
Because the beans contain their own validation methods and their own method to create a sql insert statement. When it comes time to use the same functionality but called from a different client application, they will look after themselves, provided the calling application can supply them with a connection. Correct?
The servlet that calls the validate() method of my bean, instantiates a JDBC connection and a statement. The validate method of my bean also creates a statement. I have explicitly closed the statements in the validate method of my bean, and that method throws SQLExceptions which the servlet will catch (in case something goes wrong). However, what is the life of a servlet? Will the connection and statement objects opened created by the servlet be destroyed when the servlet forwards the request on (which happens based on the results of the beans validate() method). there is a point just after the values of the bean have been inserted into the database that I can explicitly destroy the connection and statement object, it just makes things a little more messier (just code readability).
Ok, this is really long now, thank you very much to anyone who bothered reading that. Even bigger thanks to anyone who can be bothered responding. Even links are appreciated.
Hey, at least I�m not just asking you to do my homework assignment. :-)
PS. I�m sure ill come up with more questions.... ;-)

bump?
:(

Similar Messages

  • Last Data Update in Visual Composer and Web App Designer

    Hello,
    We want to show the last data update in query result and we used 2
    differents ways to do it: throught Web Application Designer (SP 12) and
    Visual Composer (SP 10).
    In query result of Web Application Designer, the last data update came
    in GMT0 and in visual composer came ok (GMT - 3, that's our time zone).
    This value (ROLLUPTIME) is taken out of the RSMDATASTATE table and this is used in SAPLRSMDATASTATE program, that is called by Web App Designer.
    Why does the difference exist between: Web App Designer and Visual Composer for last data update?
    So, I need more information how the Visual Composer brings the correct value (in our time zone) and Web App Designer in GMT0.
    Best Regards,
    Pablo Moraes

    Hi Mario,
    Yes, i used the same user and the same query to access the information. But, how can i check the mapping from my VC user to the BI user?
    Regards,
    Pablo Moraes

  • Performance of Web Templates Apps that are created in Web App Designer

    I have created a Dashboard using Web App Designer in BI7 SPS 10.
    The Web Template has 12 queries/DataProviders that are used for 12 charts.  Buttons at the top control the view to show 4 Charts Each.   When these buttons are selected, command sequences are executed that Hide and Show containers (each chart has its own container).
    Also, there are 8 Dropdowns which are used to filter all 12 charts.  These Dropdowns are using Posted Values because the requirement is to only show the values that actually exist in the InfoProvider.
    When this template is run in Development where the data is minimal, it is taking 17 seconds to load the page.  When running each query individually, it is taking each query between less than 1 second or at most 1.5 seconds.  Also, the queries have been broadcasted to the OLAP Cache.
    Other approaches that I have tried but have not changed the performance:
    1.  Created this template with Tabs and each template calls a template which contains 4 of the Charts (I believe this is called the “Template in Template” Approach.
    2.  Created 3 templates  that each contain 4 of the Charts.   The Command Sequence “Change Template" is used to switch to another Template (e.g. from “Monthly Trends” to “Top 10” and retain/pass the filters that are already selected in the Dropdowns.  However all of the dataproviders are needed in each template in order to pass the filter values.  Therefore, all 12 queries are executing  when you load the main page.
    I am looking for suggestions on what I could do differently to speed up the performance to get the Dashboard to respond within 10 seconds.
    Thank You.

    Dear Kristen,
    well, one of the things that I do remember, a solution that we provided for a similar scenario, but, not exactly the same. Another difference is that it was in BW 3.5.
    We had few reports that was responding slow. There were reports that was viewed by both sr. managers as well by his team. Sr. Mgr looked only at the high level data while the team looked at the item level data in the same report. So, we provided two links in the same report. Initially it will come up with a static data. To get a detailed data, the user has to click the next link to view item level data.
    Now, how this works is through Reporting Agent. The first static data was provided as a cache(pre-calculated) hence, faster. It comes in just 2 secs. But, when the user needs a item level data, he clicks the lik provided, only in which case, it fetches data from the infoprovider(hybrid mode).
    We will need to schedule periodically, accordingly, to refresh the cache to provide faster data.
    Iam really not sure how far this will help you, but, can spark something( I hope!).
    Thanks

  • Filtering dates in Web App Designer

    Hiya
    I've been trying to find a way to filter my queries so that my sales information is up to a certain date.
    I don't want to use a prompt to specify the range since my users do not like prompts. Instead, they want to be able to use a dropdown or radio button within the report to select the month/year. Based on that selection, they want all sales data to be returned up to that selected month/year. I've noticed that the radio button/dropdown list in Web App Designer filters sales data of that particular month/year instead of up to that month/year. Do you guys know if there is any other way of doing this?
    I.e.  Users selects October 2005 in the dropdown and the report is filtered to only display data up to october 2005.

    This can be done using custom Javascript. You will have to use the BW Web item dropdown box assign cal month and select the option display only values which will render all the possible values with the option tag. Use a Javascript function to read the value the user selects and form the URL with the high and low value you want as filter. The attached How to document has similar kind of scenario.
    https://websmp201.sap-ag.de/~sapdownload/011000358700003825382001E/HOWTOMULTIPLESELECTION.DOC
    Thanks.

  • Web Application Designer 7 - Long Runtime

    Hi,
    I'm working in BI-7 environment and to fulfil the users' requirement we have developed a web template having almost 30 queries in it.
    We are facing very long runtime of that report on web. Afer analysing with BI Statistics we came to know that DB and OLAP are not taking very long time to run but its the front-end (web template) which is causing delay. Another observation is maximum time is consumed while web template is being loaded/initialized, and once loaded fliping between different tabs (reports) doesn't take much time.
    My questions are;
    What can I do to reduce web template intialization/loading time?
    Is there any way I can get time taken by front-end in statistics? (currently we can get DB and OLAP time through BI statistics cube and consider remaing time as front-end time, because standard BI statistics cube is unable to get front-end time when report is running on browser)
    What is the technical processes involve when information moves back from DB to browser?
    Your earliest help would be highly appreciated. Please let me know if you require any further information.
    Regards,
    Shabbar
    0044 (0) 7856 048 843

    Hi,
    It asks you for a log in to the Portal, because the output of the Web Templates can be viewed only through the Enterprise Portal. This is perfectly normal. BI-EP Configuraion should be proper and you need to have a Login-id and Password for the Portal.
    For using WAD and design the front end, go through the below link. It would help you.
    http://help.sap.com/saphelp_nw70/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm

  • Advance Options in Web APP Designer

    Hi,
      Although we have BI for NW04S , we are still using Web APP designer3.5. Using the Drop down box we can have a dropdown based on  a info object ( for example if the report has a charateristics/info object "0CALQUARTER", I can easily build a dropdown which can show all the quarter that the infoprovider has and then user can select that perticular Quaerter or All Querter( or with another drop down for Year). This combination allows the user to see the data for a perticluar( or for all year) and for a perticular quater( or for all quarter in that Year, selected in previous dropdown). What I really want to do a rolling quarter( for example ( would like to show the data based the current and previous 3 quarter based on a drop down, or only current quarter etc).. One way to do this is to have the report using variables replaced by user exit. Is there any other way directly in the web app desiner?
    Thanks
    Arun

    If you are talking about different screens for the associated reports - you could have a user entry variable for quarter and the value for the same can be passed through the URL and you can use the required offsets in the query design..
    Arun

  • Free Text section in Web App Designer

    I'm creating a dashboard through Web Application Designer which contain queries and charts to be used to show monthly financial results.   The user would like to include a 'comment' section where they can show the explanations of the results (such as why Actual Revenue is lower than Plan, etc).   This comment section needs to handle free-form text so that user can enter any length of information.   Furthermore, this comment section has to be dynamic based on what month the Dashboard is executed for.    So, if they executed it for Jan 2007, the comment section should show the explanation for Jan data.   If, they execute it for Dec 2006, the comment should show the explanation for Dec data. 
    If any of you can give us pointers or guidance on this, it would be much appreciated and points will be rewarded. 
    regards,
    Lanny

    Hi Lanny,
    There are the web items for documents as well, but may be they will also not provide the flexibility you are looking for. May need some custom solution for this one...
    http://help.sap.com/saphelp_nw04/helpdata/en/dd/b2143b54afb405e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/94/f0133ba5e0f562e10000000a114084/content.htm

  • Netbeans visual web app design tab won't load?

    Is there anybody that has the following problem when trying to start a new visual web application in Netbeans 6? If so, could you help me fix the problem?
    Every time I try a new visual web application in Netbeans, the design tab won't load and I get an error message. I can use the Java tab and the JSP tab with no problems. It's just that the design tab says "please wait loading" but it nothing ever shows up. I can basically do everything else, except for dragging things from the palette to the design tab. The error message is:
    java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
         at org.apache.jasper.runtime.JspApplicationContextImpl.getExpressionFactory(JspApplicationContextImpl.java:80)
         at com.sun.faces.config.ConfigureListener.registerELResolverAndListenerWithJsp(ConfigureListener.java:1595)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:419)
         at org.netbeans.modules.visualweb.jsfsupport.container.RaveConfigureListener.contextInitialized(RaveConfigureListener.java:93)
         at org.netbeans.modules.visualweb.jsfsupport.container.FacesContainer.initialize(FacesContainer.java:182)
         at org.netbeans.modules.visualweb.jsfsupport.container.FacesContainer.<init>(FacesContainer.java:130)
         at org.netbeans.modules.visualweb.insync.models.FacesModelSet.getFacesContainer(FacesModelSet.java:497)
         at org.netbeans.modules.visualweb.insync.models.FacesModelSet.<init>(FacesModelSet.java:403)
    Caused: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at org.netbeans.modules.visualweb.insync.ModelSet.createInstance(ModelSet.java:257)
    Caused: java.lang.RuntimeException
         at org.netbeans.modules.visualweb.insync.ModelSet.createInstance(ModelSet.java:261)
         at org.netbeans.modules.visualweb.insync.ModelSet.getInstance(ModelSet.java:242)
         at org.netbeans.modules.visualweb.insync.ModelSet$1.run(ModelSet.java:209)
    [catch] at java.lang.Thread.run(Thread.java:619)

    Hello,
    Adobe has provided these things:
    Creative Cloud Help/Troubleshoot download and install issues
    https://helpx.adobe.com/creative-cloud/kb/troubleshoot-cc-installation-download.html
    and: Creative Cloud Help/App doesn’t open; progress wheel spins continually
    http://helpx.adobe.com/creative-cloud/kb/creative-cloud-app-doesnt-open.html
    If necessary and for further questions click through http://helpx.adobe.com/contact.html and if "open" please use chat, I had the best experiences. I quote from Adobe's employee Preran: The chat button is activated as soon as there is an agent available to help.
    Please have a look there, good luck!
    Hans-Günter

  • Apps take very long to update and with not much progress

    Hi, i have tried to download some new apps and update some of my apps with my itouch, but it takes super long to update without success. Tried cancelling and installing again, tried off-ing and on-ing and even resetting the itouch but to no avail.
    Even attempted to update through itunes but once again, it takes super long and super slow and end up with connection timed out. Please advise. Thanks.

    Craig,
    Thanks for the tip. I'll call my customer to make him try it. I will know
    in a couple of days.
    Abel Julien
    > My guess is that you are all of a sudden pulling info from a remote replica.
    > Enabling the option "Always Evaluate Referals" in your launcher configuration
    > may help. This will force ZEN to try and ensure it is using the closest
    > replica.
    >
    > Normally this is set to off since it does add a little overhead, but if you
    > are accidentlally crossing some slow links, it could be a real help.
    >
    > [email protected] wrote:
    >
    > > Hi,
    > >
    > > I have ZfD 3.2 and I use NAL explorer to find and deliver applications. It
    > > works just fine most of the time but, from time to time, it can take
    > > extremely long to find the applications (15-30 minutes).
    > >
    > > This installation is in a large tree with containers spread all over a WAN
    > > and I have the local OU with the option "set as top of configuration tree"
    > > checked. I have to use groups to associate applications to the users but
    > > they are in groups don't expand the local partition.
    > >
    > > I have not been able to find a cause/effect relationship. I get it working
    > > fine and wrong in the very same workstation during the same day. Also,
    > > there seems to be no different among users.
    > >
    > > Any suggestions? It would be interesting to be able to track what the hell
    > > the application launcher is doing when it does not find the applications.
    > >
    > > Thanks
    > >
    > > Abel Julien
    >
    > --
    > Craig Wilson
    > CNE3, 4, 5 - MCSE - CCNA
    > NSC Sysop (http://support.novell.com/forums/)
    >
    > Tech Writer - http://www.ithowto.com
    > (I Peter 4:10)
    >
    >

  • Web App Designer Export to Excel - Issue

    Hi Gurus,
    I was able to sucessfully configure export to excel feature in WAD. However the issue we are encountering is, we have a button which runs a script function, this manupulates data in some columns of the report. So when I perform export to excel after the script function is excuted, the export gets the old state of data and not the data after the script function is run. Is there are way to fix this issue. Please advise.
    Thanks Again!

    Dear Customer,
    WYSIWYG (What You See Is What You Get) is not supported on Export to Excel.
    If you are using some script AFTER data comes to screen, you will NOT see the effects on Excel.
    This is documented in the note:
    1178857 - Additional information: Export to Excel functions
    " Layout
         o  Currently WYSIWYG export is not supported.
    Sorry to not provide a better solution.
    Best regards,
    Edward John

  • Web App Designer - Graph - "Data table" text font size

    Hi,
    In the graphs, I am showing the data table by using this piece of code.
    <param name="SHOW_DATATABLE" value="X"/>
    How should I control the font size of the text displayed in data table.
    Thanks
    Gova

    Oh, my mistake. I thought you were talking about the table. The graph fonts are not maintained in a stylesheet. You have to go to the graph element (double click) and make changes to the fonts there.

  • How to create a date range in Web Application Designer

    I am using 3.1 version of Web App Designer.  I need to create a report with date ranges.  I can get one date to work but not two (I need a start date and end Date).  My Query has 0CALMONTH with a variable for Interval.  When I select it as a dropdown (??) in Web App Designer, I only get one date prompt in web app designer.
    Any suggestions??
    Thanks
    Kristen

    Hi Kristen,
    I'm sorry i'm not coming to solve your problem,but for the trouble I have had,and I want to create a date picker in Web Application Designer,so if you have solved the problem ,please email to me? [email protected] ,thx very much!
    best regards
    zegion chan

  • Where is the Command Wizard in BEx Web Application Designer(WAD) 7.0

    Hi,
    I am new to SAP and BEx Web App Designer and am reading through the help about the so-called Command Wizard. I have looked all over the app and I see nothing called a Command Wizard.
    I am I missing something obvious or is this buried somewhere in the app?
    Based on how much it is mentioned in the help, I would assume it should be somewhere visible.
    Brian

    Hi,
    "Command Wizard".  When you design Web template one of your web item called ' Button ' have this ' Command Wizard'.
    Go to Button properties -
    select internal display-----select list of button---there you will find action  Command trigger-----Command Wizard.
    Ali.

  • Variable entry in Web application designer

    Hi,
    In the Variable entry screen in the Web app designer on executing a template, when I open the drop down menu for possible values, it leads to two more new variable entry screens wherein the selected values are populated instead of the original entry screen. This repeats for every additional variable entry selection, including the from and to selections. Any idea how this can be fixed? We are on SP7.
    Thanks.
    Param

    Hi,
    I solved this by changing the configuration in the WAD by changing the open dialogues in new window to 'do not open window'.
    Param

  • WEB application designer - Web items - How to create new

    Hi!
    Is there a way to create new web item in web application designer, and <b>NOT</b> a copy of existing with different parameters (Web items located under Standard tab).
    It would expand possibilities of web app. designer a lot!
    Another question is, how to use BSP elements in BEX WEB reports (templates). Is this possible or not?
    Thank you in advance!
    Egi

    Hi,
    in principal you can write new web items but this is not supported by SAP as this is a modification.
    You would inherit from a standard web item class (for example CL_RSR_WWW_ITEM_VIEW) and maintain tables rsrrenderer rsrrendereratr rsrrenderert and optionally rsrrendererdep
    BSP itself can not be used, unless you include a BSP Application via Iframes in your Web template.
    Heike

Maybe you are looking for

  • Relation between RV_DELIVERY_CREATE and WS_DELIVERY_UPDATE

    Hi! RV_DELIVERY_CREATE creates a delivery... how to pos goods issue (PGI) I know that I need to pass Delivery nr to WS_DELIVERY_UPDATE, but how to retrieve this nr? Is it a result of RV_DELIVERY_CREATE? CALL FUNCTION 'RV_DELIVERY_CREATE'       EXPORT

  • How do I sync multiple ipods with nike plus

    My wife and I have seperate (6th gen) ipods, with seperate nike plus accounts, but one itunes intall and one library.  How do I prevent itunes from syncing the wrong ipod to the wrong nike plus account?  Currently both ipods are trying to sync to the

  • How do i change my security questions because I tried changing them through manage account password but to get in i need the security question answers :|

    I did as people said to go the apple iD manage account and password and security and to get in i have to answer the security questions but i dont know what they are please help because im trying to purchases something on this computer as it is my fir

  • Error updating table 37

    HI, When I am generating a excise invoice the system triggers u201CError updating table 372" I have not maintained of table 372 in access seq (Cd type (JEXP) . Previous i have maintained this table in my access seq and its working fine but I am not a

  • Where do I download iTunes 11.2?

    Where do I download iTunes 11.2? I need to connect an iPad to my MacBook with OS X 10.6.8. Updating the OS is not an option for me. I tried to "Software Update" but that does not happen that does not update. thank you very much