Model II Architecture- The Flpw?

Ok in Model II Architecture,
1. What's the convention - always JSP's instantiate the PageBean or the Controller (through another class) instantiate PageBean or is it dependent on specific requirements?
2. I have first.jsp and upon submission I get second.jsp , and in between FirstPageBean.class will process the request (suppose form validation) and SecondPageBean will process the request and I get second.jsp.
What's the convention of passing around action and next page.
Please provide me the basic flow instead of just mentioning something like servlet mapping. Thanks

The general convetion used in Model 2 MVC is to have a servlet or framework process an incoming form request (e.g. a POST), create a JavaBean object (or simple object), place that object in the request scope, and dispatch to the next JSP page.
HTML FORM ---> Serlvet----> JSP PAGE
Keep in mind many frameworks other there will do this for you. There is no need to go out there re-inventing the wheel.

Similar Messages

  • Model II Architecture - The Flow?

    Ok in Model II Architecture,
    1. What's the convention - always JSP's instantiate the PageBean or the Controller (through another class) instantiate PageBean or is it dependent on specific requirements?
    2. I have first.jsp and upon submission I get second.jsp , and in between FirstPageBean.class will process the request (suppose form validation) and SecondPageBean will process the request and I get second.jsp.
    What's the convention of passing around action and next page.
    Please provide me the basic flow instead of just mentioning something like servlet mapping. Thanks

    Struts is a commonly used MVC system, so in relation to that...
    1) In Struts, the controller creates the form beans for the forms. But for other beans that aren't related to that could be created anywhere.
    2) In Struts, the submission goes to the controller which creates the form bean, which has a validate method that is called and errors are returned from that, if any. If any errors, it fowards to the page it came from. If not, it goes to the action, which can to further validation, but the action specifically directs a forward based on the results of the action, which could be back to the input page or some other results display page(s).
    You might want to get Struts and play with it.

  • Comparing ABAP development process with Model Driven Architecture concept

    My Background
    I am a postgraduate student writing a Masters Degree Dissertation titled “An Investigation into how compatible ERP Development Process is with Model Driven Development Philosophy: A SAP R/3 Case Study”.
    The aim of this project is to compare ERP system development process with Model Driven Development (MDD) and to identify whether and how they can be used together. Model Driven Architecture (MDA) is Object Management Group’s (OMG) flavour of the MDD philosophy and is the paradigm that will be used here.
    I have chosen SAP R/3 as my case study in order to narrow the research and want to explore the development processes/cycle involved in using ABAP/4 to reconfigure/customize SAP R/3 system during implementation.
    An overview of the MDA concept according to OMG is given below. Following this, I’ve provided some questions that are open to discussions.
    Overview of the MDA Concept
    The Model Driven Architecture (MDA) is an approach to software systems development that separates the specification of system functionality from the specification of the implementation of the functionality on a specific technology platform. The MDA concept provides an open, vendor-neutral approach to system interoperability.
    A recent study by the Middleware Company summarizes MDA paradigm as a development process that makes use of the following steps:
    1.     Secure business requirements for an application.
    2.     Develop UML diagrams for the domain model, independent of any particular technology (J2EE, Microsoft .NET, CORBA, etc). This UML model represents the core business services and components. This UML model is called Platform Independent Model (PIM) because it is completely technology-independent and will be the same regardless of whether you decided to use J2EE or .NET. You develop this UML model using UML modelling capabilities of an MDA-specific modelling tool.
    3.     Build UML diagrams for the application, specific to a particular technology (J2EE, for example). This UML model will have design patterns. This UML model is called Platform Specific Model (PSM). You can build this manually, or you can generate much of it using an MDA tool and hand-tune only pieces of it that require customisation.
    4.     Finally, generate the application code using an MDA tool. That is to say, instead of writing the application by hand based on the UML model, you generate the majority of it from the UML diagrams.
    To develop an application using MDA, it is necessary to first build a PIM of the application, then transform this, using a standardised mapping into a PSM, and, finally, map the latter into the application code.
    A mapping is a set of rules and techniques used to modify one model in order to get another model. In MDA, mappings are used for transforming:
    1)     PIM to PIM. This transformation is used when models are enhanced, filtered or specialized during the development lifecycle without needing any platform dependent information. One of the most obvious mappings is the analysis to design models transformation. PIM to PIM mappings, are generally related to model refinement.
    2)     PIM to PSM. This transformation is used when the PIM is sufficiently refined to be projected to the execution infrastructure. The projection is based on the platform characteristics. Describing these characteristics should be done using UML description. Going from a logical component model to a commercial existing component model is a kind of PIM to PSM mapping.
    3)     PSM to PSM. This transformation is needed for component realization and deployment. PSM to PSM mapping are generally related to platform dependent model refinement.
    4)     PSM to PIM. This transformation is required for abstracting models of existing implementations in a particular technology into a platform-independent model. This procedure often resembles a “mining” process that is hard to be fully automated. It may be supported by tools, though. Ideally, the result of this mapping will match the corresponding PIM to PSM mapping.
    Questions/Discussions
    1.     What specific stages are involved in development using ABAP/4? (e.g., requirements gathering, analysis, design, coding, etc)
    2.     Do these stages fit into any traditional software development lifecycle? (e.g. waterfall model, v-model, etc)
    3.     Which of the stages in (1) above best describes the Platform Independent Model (PIM) of the MDA concept above?
    4.     Which of the stages in (1) above best describes the Platform Specific Model (PSM) of the MDA concept above?
    5.     How does the Accelerated SAP roadmap relate to the MDA concept above?
    6.     Assuming there’s a change in business requirements of a company that could lead to reconfiguring/customizing the R/3 system, how is this achieved? For instance, if a model has earlier been developed for that particular process, how does the change in the model affect coding/modification?
    7.     How is coding achieved with respect to the reconfiguration of the business models or reference models?
    8.     Are all coding manually done or are there tools in the ABAP Workbench that enable codes to be generated automatically from the models of the system?
    9.     How much time is spent in coding compared to developing business models like EPC models?

    I've also read about the SAP Composite Application Framework (CAF).
    But it seems that it's only for Java development....

  • Model 2 architecture only works with forms?

    Hi,
    I want to implement model 2 architecture for my application i have model as java classes, Controller the servlet and JSP the view.
    I want to know if this architecture is only for forms?.
    I want to implement for a event like when a hyper link is clicked then some method in my Java class is invoked and the result displayed on JSP.
    Can this be implemented using model 2 architecture ?
    Thank you.

    I want to know if this architecture is only for forms?.Forms are irrelevant.
    They just provide a way to enter and submit parameters from the user.
    You can just as easily use hyperlinks with parameters encoded on the URL. The server side handling for retrieving parameters remains the same: request.getParameter().
    However there are a couple of limitations because Hyperlinks can only use HTTP "GET", where forms can use HTTP "POST" as well.
    - parameters will be visible in the address bar
    - you have a limitation on a length of the parameters (Post doesn't have this limitation)
    The Model2 architecture is completely independant of whether you use get or post to submit your parameters. What makes it model2/mvc as opposed to model1 is that you run through a servlet layer, rather than doing absolutely everything in JSPs
    Cheers,
    evnafets

  • What are model I & model II architecture

    hi,
    Can anyone help me to understand what is a model I & model II architecture and what is the diffrence between the two

    See:
    Identifying iPod models

  • Migrating Model 2 Architecture

    Hello,
    I am writing an application which needs to be migrated to different servers.
    If I were to write this using model 2 architecture, can the framework be encapsulated within the application, or would I need to install the framework on each server.
    I suppose what I am asking is whether frameworks can be installed at the level of a Web-App, or are they installed at the root of the Web-Server?
    Thanks,

    Hmmm,
    Well I wanted to learn more Java rather than someone
    elses tags.
    :), tags are a lovely feature of jsp. I agree that writing it is far far pleasant than using other people's.
    Im also put off by the number of simple things that
    people get stuck on in these forums, really basic
    things that they dont know how to achieve with the
    framework.
    Agreed, but for every technology there's a learning curve and that probably is steepest in java. You will be surprised to see that there are an equal number of 'Cant get Hello World to Work' threads in the core java forum, but that shouldnt be a cause for a person to shun java :)
    Also, I tried using Studio Creator, which uses JSF, I
    got really nasty un-recoverable errors, which I could
    not resolve because their source lay in the third
    party code.I would rather recommend to lay off jsf for now atleast until we begin to see some good server side support for that. I know of atleast one project that started off with jsf on websphere and then had to quickly switch to struts for want of support and bugs on jsf.
    >
    Also, once you tie your app into a framework your
    stuck with it, which also put me off a little.
    Perhaps I will re-visit struts, I paid for a book on
    the subject so may as well get something from
    it.....
    Dont you find using Java classes pushes your
    knowledge??
    There is a world of API's to play with, even you cant
    know them all !!Yes, agreed. If asked to create a web application using struts, I may have to turn to the books/tutorial for it.
    However I had studied it once and the way they use tags + beans is an incredible thing - you define a bean, bind it to a scope and use the bean in your tags (the html tag library is awesome)
    Now it would have taken a lot of learning the core api to graduate to a level where you could have thought this up of your own. Every framework has a neat way to do things and even if you dont use them you can learn from them and that makes you better - you would learn to use the apis better.
    Personally the way I think of it is - the core apis are the underlying force and you have to master them. I have seen lots of people who are supposedly good on struts and who dont know what scope bindings mean :)
    The frameworks gives you a way to harness the apis to make your web application so easily configurable and lends a touch of elegance to it. You neednt use it, but you can learn from it.
    I am not a great fan of frameowrks, btw :). IMO they are over engineered the level of which is inversely proportional to the documentation ;)
    cheers,
    ram.

  • Using model 1 Architecture for inserting row into DB...

    The question is on the design of a JSP using Model 1 architecture.
    I have a html form with 3 fields taking input from user. I have made a java bean with 3 instance varibales in the name of the field names and with getter() setter() methods too.
    I dont want to hardcode the database access in the JSP. How do i acheive modularity or make use of object orientation concepts in the JSP to open aconnection and save the record into a database.
    I dont want the conventional way of harcoding like registering DriverManager... Creating Statement opject and OPening Connection...... and with Statement object to call executeUpdate() method...
    These all should be encapsulated in class and methods so that my JSP looks simple......
    Java Gurus, How do i get going.........

    Untill now, I have motsly written java web applications merely showing information; there's no insert or update available. nevertheless, the design pattern MVC or Model-View-Controller can work just as good for display-only web apps as for the rest.
    You're right if you don't want to have the database connection inside your JSP's. So how do you have to deal with it. The letters MVC already tell a part of the story. You have 3 kinds of objects :
    - Model : the so-called Java Beans; these objects refer to the concepts known to the usezr of the web app, like Client, Product, Order, Orderline, Invoice, Payment
    - View : these are the JSP's
    - Controller : this is the heart of the web app; Java uses the servlets to be the controller.
    But there's another kind of object you will need, namely the DAO or Data Access Object. These objects define the contact with the database, contain the SQL-statements and make objects of the Model type.
    I'll give 2 examples. The first is the GeneralDao which you define just once. This GeneralDao contains the database driver you're using.
    /** Java class "GeneralDao.java" generated from Poseidon for UML.
    * Poseidon for UML is developed by Gentleware.
    * Generated with velocity template engine.
    package org.gertcuppens.dao;
    // import java.util.*;
    import java.util.ResourceBundle;
    import java.sql.*;
    /* import org.apache.log4j */
    import org.apache.log4j.Logger;
    public abstract class GeneralDao {
    // operations
    * de GeneralDao is de algemene klasse waar alle andere DAO's of Data Access
    * Objects van erven. Het is de bedoeling om in deze klasse ��nmaal de
    * getConnection te defini�ren
    * <p>
    * getConnection() connecteert met de databank afhankelijk van de JDBC-driver
    * die voorhanden is. Deze methode zorgt ervoor dat alle afgeleide DAO's van
    * dezelfde driver gebruik maken terwijl er toch maar op ��n plaats de naam
    * van de driver gedefinieerd is.
    * </p>
         protected Connection getConnection()
              throws java.sql.SQLException
         Connection dbconn = null;     
         ResourceBundle resBundle;
         Logger mopoLogger = Logger.getLogger("mopo.log");               
         mopoLogger.debug("start connectie databank " );      
              try
              Class.forName("com.mysql.jdbc.Driver").newInstance();
              resBundle = ResourceBundle.getBundle("gcoConfig");
              mopoLogger.debug("ophalen resourceBundle (gcoConfig) " );
              String dbConnectie = resBundle.getString("databaseconnection");
              mopoLogger.debug("lezen databaseconnection in resourceBundle " );
              //dbconn = DriverManager.getConnection("jdbc:mysql://localhost/gco");
              dbconn = DriverManager.getConnection(dbConnectie);
              mopoLogger.debug("maken connectie databank " );
              } catch (InstantiationException e)
                   System.out.println("GeneralDao - Fout bij getConnection - instantiation " );
                   mopoLogger.fatal("GeneralDao - Fout bij getConnection - instantiation " );
                   e.printStackTrace();
              } catch (IllegalAccessException e)
                   System.out.println("GeneralDao - Fout bij getConnection - illegal acces " );
                   mopoLogger.fatal("GeneralDao - Fout bij getConnection - illegal acces " );
                   e.printStackTrace();
              } catch (ClassNotFoundException e)
                   System.out.println("GeneralDao - Fout bij getConnection - class not found " );
                   mopoLogger.fatal("GeneralDao - Fout bij getConnection - class not found " );
                   e.printStackTrace();
              return dbconn;
    } // end GeneralDao
    Each object of the Model type should have a corresponding DAO. In my webapp I had 3 kinds of model objects, so I've defined 3 DAO's. All these DAO's are children of the GeneralDao. I'll give an example of this.
    package org.gertcuppens.dao;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import org.gertcuppens.general.Gebruiker;
    /* import org.apache.log4j */
    import org.apache.log4j.Logger;
    public class GebruikerDao extends GeneralDao {
    * Zoekt de gebruiker op aan de hand van de opgegeven naam en wachtwoord
    * @return Gebruiker
    * @param _naam
    * @param _wachtwoord
    public Gebruiker findGebruiker(String naam, String wachtwoord)
    throws SQLException
         Logger mopoLogger = Logger.getLogger("mopo.log");               
         mopoLogger.debug("start findGebruiker" );      
    StringBuffer zoekString = new StringBuffer();
    zoekString.append ("select * from gebruiker ");
    zoekString.append("where naam=? and wachtwoord=? ");
         Connection con = getConnection();
    PreparedStatement ps = con.prepareStatement(zoekString.toString());
    ps.setString(1,_naam);
    ps.setString(2,_wachtwoord);
    ResultSet rs = ps.executeQuery();
    if (rs.next() )
    Gebruiker gebruiker = new Gebruiker(rs);
    rs.close();
    ps.close();
    con.close();
    mopoLogger.debug("gebruiker gevonden " + gebruiker.getNaam());
    return gebruiker;      
    else {
                   ps.close();
                   con.close();
                   mopoLogger.debug("geen gebruiker gevonden");
                   return null;
    } // end findGebruiker
    } // end GebruikerDao
    Want to know more about this ? Just give me a sign.

  • Satellite Pro A300D - What is the model number for the keyboard?

    My husband managed to dislodge a keycap on my keyboard, and broke the white scissor clip that holds hit on...(don't ask me how)
    He spoke to the authorised service centre here in Norway, and they sent us replacement scissor clips (actually they sent an old non-functioning keyboard) but the clips are of a different design to the ones on my laptop.
    I was wondering if anyone has an idea of the model/serial number of the keyboard used in the Satellite Pro A300D-151 (PSAK9E) so I can get the correct replacement part.
    I really don't want to have to replace the whole keyboard when it's just 1 of the scissor clips that is broken...the laptop is only 5 months old.
    Here are some photos of the scissor clip in question & the where it attaches to the keyboard (sorry about the quality)
    Link:[http://img31.imageshack.us/gal.php?g=1000683o.jpg]
    Thanks
    notsure

    Hi
    Sorry buddy but its not possible to exchange some single keys on a keyboard so in this case you must replace the complete keyboard. But normally this should not be so difficult.
    Either you exchange the keyboard yourself or you sent the notebook to the authorized service provider.
    The model number for the keyboard is not known to me but contact your ASP!! They can order all Toshiba parts and they should know the right part number.
    Bye

  • Can i Bind more than one Model object to the Custom controller or not

    Hi All, I trying to bind more than one model object to the custom controller, Both the model objects contains same attribute name called ( output). Both model objects created on to top of the BAPI. So when i bind first model object to the custom controller will work fine. When i am trying to bind the second model object to the same controller. This second model object also having the same attribute name called "output" . So it is giving an error of "Duplicate context element "Detail". Rename or uncheck duplicate elements.
    can i assign more than one model object to the single controller or not?
    But in the reference document, it has given that , we can create model object with more than one bapi.So in this case if both the bapis contains any element with the same name will also be problem. Any body give me the solution.
    Initially we have created one custom controller for each model object. But later i realized that, why con't we use same controller for all the model object. Because, the custom controller context is the public context. this context shared across all the view controllers.
    The concept which I am trying to do is right or wrong?

    Hi Vishal,
    of course, you can bind one controler to many models. When the same name occours you can simply RENAME binded node in controler.
    Regards
    Bogdan

  • Best practice for modelling rediects using the threat modelling tool

    I'm in the process of modelling systems using the threat modelling tool.
    There services in question do a lot of redirecting and handing off to one another on the client side, including things like ACS and identify providers.
    If Web App A redirects to Web App B what is the best way to draw this?
    1) App A (process) > HTTPs redirect > browser > request > App B (process) or 
    2) Can I just model it as HTTPS from A to B?
    Obviously 2 simplifies diagrams hugely , but does that then exclude a range of potential threats or does the tool cater for this implicitly?

    Storing documents outside the web root and using
    <cfcontent> to push their contents to the users is the most
    secure method.
    Putting the documents in a subdirectory of the web root and
    securing that directory with an Application.cfm will only protect
    .cfm and .cfc files (as that's the only time that CF is involved in
    the request). That is, unless you configure CF to handle every
    request.
    The virtual directory is no safer than putting the documents
    in a subdirectory. The links to your documents are still going to
    look like:
    http://www.mysite.com/virtualdirectory/myfile.pdf
    Users won't need to log in to access these documents.
    <cfcontent> or configuring CF to handle every request
    is the only way to ensure users have to log in before accessing
    non-CF files. Unless you want to use web-server
    authentication.

  • What is the model number of the processor used in MacBook Pro 13 inch late 2011 ?

    What is the model number of the processor used in MacBook Pro 13 inch late 2011 ?

    Click on the Apple logo in the upper left corner of your screen and select About This Mac. Click on the More Info...  button and you should see what your processor is.

  • What is the model number of the MAcbook Pro 15inch which i bought in 2011 sometime

    What is the model number of the MAcbook Pro 15inch which i bought in 2011 sometime  ... ? i want to check whther it supports WIFI - Direct with my sony TV for screen mirrirong

    Model Number
    A1286

  • What is the model Number for the ipod touch 5g.

    What is the Model Number for the ipod touch 5g?

    http://www.apple.com/euro/compliance/
    http://images.apple.com/euro/compliance/pdf/EU_DoC_A1421_2600.pdf
    It was a tough one.

  • Tcode  PFAL there is no model view for the distribution of HR Data.

    Hi friends ,
    i am facing new problem,i want to send iDOC to other system.
    previeous its working fine.
    but to day  when i open tcode PFAL.
    it give me Error:"There is no model view for the distribution of HR master data"
    what is the solution for that.
    i want to send HR Data.
    its urgent please give me any solution ithat will help me alot.
    thanks in advance

    There is already Distributed Model Created.
    can u give me annother tcode so i can  send Metarial data, by IDOC.
    please help me.
    Thanks

  • How to open the Transported model Object in the Target Portal Story Board

    Hi All,
    How To Transport Applications Modeled in Visual Composer from NetWeaver 2004s to NetWeaver 2004
    I have transported one VC model from Development  portal to Testing Portal. But Once i transported , under the
    PortalContent -> Visual Composer -> Models folder , i am able to see the transport model and the view. If i want to edit that model in the VC story board , I am not able to see that model name in the list when logged into the visual composer Tool of the Testing portal server.
    Is there any thing need to do the work around it.
    And onemore thing, In the development portal server, when i am working on that model , it will be depended on on system object for retreiveing the BAPI data. In the Testing protal server after i transported. , i need to map some system object to run the model in Testing portal.
    What is the work around this to map the system object  with the Transported model in Testing portal server.
    should i need to create the new system object even if the R3 server is same as in Testing portal server also. or the System object need to be create only if the mapped  R3 server is different from the Development portal server.
    Please let me know how to do this.
    Regards
    Vijay

    Hi Marcel,
    Thanks for the reply,
    I have exported the .gml file from the dev server Then i trying to import that .gml file in the production server. when i click on the import file option .it is opening the popup and disappearing immediately with out browsing the file I dont know wht is the problem around it.
    But agin in the production server, i have just opend one existing model. then i clicked on the Import file option. then the popup is allowing me to browse the .gml file. but after i browsed the file,  if say ok, it will be merging with the already opened model itself.
    Can u please tell me , what is the problem, i am not able to browse the file ,when no model is not opened in the VC.
    REgards
    Vijay

Maybe you are looking for