MVC structure- need to follow?

I am new to sap ui5. I need to develop an mobile app using sap ui5 mobile. Do i need to follow MVC structure for it ?Whats the benifits if i follow mvc in my coding.

Hi Meera,
just read this part of the official SAPUI5 documentation for some general information.
Regards
Michael

Similar Messages

  • MVC structure

    I'm some what confused as to how exactly the MVC structure works. Lets say that I have to make a GUI in swing thats just an array of buttons in a grid layout. It's a square, so the number of buttons in each row and column is the same. Now, the number of rows and columns is determined by 1 command line argument. So, the GUI constructor takes in the command line argument in a different class, from the main(). Now lets say that the size of the board of buttons needs to change in increments of 1 depending on the left and right arrow keys. (Left for -1 amount of rows and columns and right for +1 amount of rows and columns ). So I implement a controller class that has a keyListener. Now, I need a model class to keep track of how big the board of buttons is. How would I get the controller class to update the model, which would then update my GUI in the view? Do I make get and set methods in the model that are then called in the controller when the keys are pressed? Would I even pass the command line argument straight to the to view or would I just pass it to the model, then the model passes it to the GUI in the view. Thanks..

    Why not set it up to work just like Swing does? If you look at the code for button models (the DefaultButtonModel class) and for the button (AbstractButton), you'll see much information is passed by using listeners together with getters and setters. So the controller could update the model by calling a setter method, then the model would update the GUI by firing its changelisteners. The GUI which registered a changelistener with the model would receive the notification, check the model's state and make changes accordingly. The model skeleton could look something like this:
    import java.util.ArrayList;
    import java.util.List;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
    public class SimpleModel
        private int sideLength = 0;
        List<ChangeListener> changeListenerList = new ArrayList<ChangeListener>();
        public void setSideLength(int sl)
            sideLength = sl;
            fireChangeListeners();
        public int getSideLength()
            return sideLength;
        public void addChangeListener(ChangeListener cl)
            changeListenerList.add(cl);
        public boolean removeChangeListener(ChangeListener cl)
            return changeListenerList.remove(cl);
        private void fireChangeListeners()
            for (ChangeListener listener : changeListenerList)
                listener.stateChanged(new ChangeEvent(this));
    }One other aside: since you're using Swing here, not AWT, avoid using KeyListeners and instead use KeyBinding.

  • I highlight emails I need to follow up on. Recently these highlights have all just dissappeared. This has happened a few times. How do I prevent this?

    after reading an email, or not I keep highlighted or mark as unread so I know I need to follow up on. 3 times in the last year, twice on my computer, and once on my phone. These highlighted emails lose their highlight status. They are still in the system as a read email,, but now I have to spend hours trying to find them as they are mixed up with the 100's of emails I get.
    Do you know why this happens?
    Is there a way to prevent it from happening?

    Read status is synchronized in IMAP mail accounts between all devices. What triggers a change of read status is really hard to guess. It might be turning on a laptop that has been in the cupboard for 6 months. Might I suggest you try tagging your mail instead. Try pressing the 1 on the keyboard to mark it a important and change it's color to red. The other 8 numeric keys also have an attached label and a different colour
    Note tags are not universally supported by mail servers. Change one and wait a while to see if the server sets it back to black on the next synchronization (about 15-20 minutes usually)

  • Need to follow up on Support question

    10 days ago I worked with an Apple support rep via phone call on an iPhone question which we had to end after 2 hrs of his help.  He was very good, but we needed to follow up on the case the next day.  He provided his phone ext and email, but over the past 10 days, 4 voicemails and 2 emails have gone unanswered.  If this thread is picked up by Apple tech support, can someone tell me how I can continue the discussion to resolve my problem?  The case number is 432920041.

    I'm sorry, Apple does not follow these posts. This is a user to user technical support forum. The only thing I can suggest is to see what happens when you call Apple and instead of asking for that particular extension, try getting to a real person and see if they can find out what the problem is with contacting this particular agent. You may have to talk to a supervisor.

  • I need to transfer settings from my Macbook to a new Macbook pro. what are the steps I need to follow?

    I need to transfer the settings (mail, safari, etc.) from my Macbook to a new Macbook pro. what are the steps I need to follow?

    Time Machine will sort that out, you got an external HD ?

  • What steps i need to follow to create new P6 8.1 envionment from existing production setup?

    Hi Team,
    We had existing running P6 8.1 Production environment.
    We wanted to create new P6 8.1 DEV environment just same as our production.
    May i know what is easiest way to create new environment as same as to existing production setup.
    What steps i need to follow for creating new environemnt?
    Thanks in advance

    What you need to :
    Create the App server as the same prod -- WLS as example,
    Create the p6 domain in WL;
    Install the P6 r81 software;
    Clone the Prod's P6 db to the Dev;
    Dbconfigure the cloned P6db
    Deploy the P6 8.1 ear file which should be the same as the prod's;
    Reconcile the P6 81 patches with Prod's.

  • What are the steps i need to follow to refresh the database

    Hi Team,
    I am the junior DBA first time i need to do Database Refreshment on UNIX platform.
    1. Database Names are different and mount points are diffrents.
    2. Synonyms and dblinks are should be retained.
    How to do this and what are the steps i need to follow.
    Please suggest any one.
    Regards,
    Venkat.

    Venkat wrote:
    Hi,
    Version is Oracle 10g.
    Venkat..Start here: http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmconc2.htm#i1006532

  • How to show "An app on your PC needs the following Windows feature." dialog programmatically?

    When I try to run .NET 3.5 applications on Windows 8.1 which has not .NET 3.5 Framework, Windows will show the "An app on your PC needs the following Windows feature. .NET Framework 3.5 (includes .NET 2.0 and .NET 3.0)" dialog automatically.
    But I want to show this dialog programmatically. I think that the dialog is much more friendly than DISM command.
    Any help would be appreciated.

    Hello lzhangwdk,
    I'm thinking that the issue is more related to a Setup issue now.
    Anyway, may I ask one question, have you include the .NET 3.5 feature in your prerequisite list when creating a installer?
    To raise a dialog is possible but it still require you use a kind of depolyment technology then customize your installer. If you use the ClickOnce technology, you can consider use isFirstRun to customize something to run:
    https://social.msdn.microsoft.com/forums/windows/en-us/b3bca1fb-d2f3-417d-a7f9-e174e32ed3b0/clickonce-custom-actions
    In setup project you may consider use custom actions to raise a dialog.
    http://www.codeproject.com/Articles/335516/Custom-Action-in-Visual-Studio-setup-projects
    So in general I need more info from you to redirect you to the right direction. And actually in my mind, just use the prerequisite list is OK. It is better than try any dism command, it will ask your users to install or enable .NET 3.5 themself.
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • What are the coding standards we need to follow?

    While developing SAPUI5 applications what are the coding standards we need to follow.

    Hi,
    Refer SAPUI5 SDK - Demo Kit
    Regards,
    Chandra

  • Which steps we need to follow in order to IE 11 can send requests using AES 128.

    Internet Explorer 11 by default send requests to servers using AES256 algorythm instead of using AES128 bits (used for PKI Service). Which steps we need to follow in order to IE 11 can send requests using AES 128.

    Shuffling the cipher suits should do the trick.
    See Prioritizing Schannel Cipher Suites
    http://msdn.microsoft.com/en-us/library/windows/desktop/bb870930(v=vs.85).aspx
    At a command prompt, enter gpedit.msc. The Group Policy Object Editor appears.
    Expand Computer Configuration, Administrative Templates, Network, and then click SSL Configuration Settings.
    Under SSL Configuration Settings, click the SSL Cipher Suite Order setting.
    In the SSL Cipher Suite Order pane, scroll to the bottom of the pane.
    Follow the instructions labeled How to modify this setting.
    It is necessary to restart the computer after modifying this setting for the changes to take effect. The list of cipher suites is limited to 1023 characters.
    examples
    TLS_RSA_WITH_AES_128_CBC_SHA                
    TLS_RSA_WITH_AES_256_CBC_SHA                
    TLS_RSA_WITH_RC4_128_SHA                    
    TLS_RSA_WITH_3DES_EDE_CBC_SHA               
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P256     
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P384     
    TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA_P521     
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P256     
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384      
    TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P521
    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P256   
    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P384   
    TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA_P521   
    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P256   
    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P384   
    TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA_P521   
    TLS_DHE_DSS_WITH_AES_128_CBC_SHA            
    TLS_DHE_DSS_WITH_AES_256_CBC_SHA             
    TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA
    TLS_RSA_WITH_RC4_128_MD5                                      
    SSL_CK_RC4_128_WITH_MD5                     
    SSL_CK_DES_192_EDE3_CBC_WITH_MD5            
    TLS_RSA_WITH_NULL_SHA
    TLS_RSA_WITH_NULL_MD5    
    At which point you may place AES 128 suites before AES-256 suites, which is actually the default I believe even for TLS 1.2.

  • What are the central organizational structures for the following SAP applic

    What are the central organizational structures for the following SAP applications ?                                   
    a)     FI                              
    b)     SD                              
    c)     MM                              
    d)     CO                              
    thanks
    manoj

    hi,
    Inventry and Finance
    regards,
    varma

  • Mvc structure in the ejb layer

    hello
    i am familiar with the mvc structure in the web layer,but i wonder how can i implement the mvc struction in the ejb layer.
    i can use the stateless session bean as the controller,but in the web layer,i can use the url to identify the different request,and path information,but in the ejb container,it seem like there isn't such machanism,how can the controller(session bean) reforward the different request?where can i find the sample code of the sessin bean controller?is it included within the petstore?
    thank you!

    Hi,
    If u have got the code for the same, please let me know.
    Seetesh

  • Name of the structure needed for sales order user exit

    Hi,
    I am planning to write a user exit which will insert the data into my ztable the moment the new sales order is created and is saved.
    I have identified FORM USEREXIT_SAVE_DOCUMENT as the necessary user exit. But the problem is that while inserting the data into the ztable I cannot insert the data from vbak as the data will be inserted into this table after the SO is saved.
    Thus I need to identify a structure which is used to populate the vbak table so that it simultaneously inserts the data in the ztable as well. Can anyone help me with the name of the structure so that these fields i.e. vbeln, vkorg, vtweg, spart are inserted into my ztable?
    Also need to know how to convert the net value i.e. vbak-netwr in Indian Rupees as it gets stored as Dollars ....
    Thanks,
    Vinod.

    Hi,
    One of the structure being used is RV45A, there are several other str's being used as well for various calculations,
    check out program SAPMV45A for the same.
    & in order to convert vbak-netwr to rupees use the below statemetnt,
    WRITE vbak-netwr TO zvbak-netwr CURRENCY INR.
    Regards,
    Raghavendra
    Message was edited by:
            raghavendra ay

  • HT4367 My Apple TV needs restoring following a failed update and iTunes won't pick it up?? Any ideas anyone - never had to link it to comp before

    Hi - my Apple TV had a failed up date and now I need to restore it. I have hard wired to my comp but iTunes's does not see to be picking it up? Just have the apple device blinking its light and comp timer is just going round? Any ideas anyone? Thanks

    Welcome to the Apple Community Mvt1976.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)
    Check that you have correctly followed the instructions for your model of Apple TV.
    If not already, try using a powered USB port.
    Repeat the process but this time try connecting the cable while iTunes is closed.
    Repeat the process with another cable.
    Try restoring the Apple TV on another computer in another location.

  • Do I need to follow a procedure for reinstalling acrobat 7.0 professional?

    I need to perform a system recovery on my laptop and I wonder if I am going to have any issues reinstalling acrobat 7.0 professional.

    Or if you can deactivate before the recovery it might do the job. Sometimes a recovery is not needed, but you can reinstall the OS without recovery. To do that you will find instructions on the new, but if you follow the install button rather than recovery you should reach a screen that gives you a choice to reinstall or repair. The repair is more likely what you want. In that case, system files are replaced, but your system retains most other parts of your setup.
    Here is a link with directions for XP (Note the page where it says to NOT use the restore). http://pcsupport.about.com/od/operatingsystems/ss/instxprepair1.htm
    Similar processes are available for Win 7. The steps that MicroSoft provides that suggest to use Restore to repair your machine are misleading. The repair you want is part of the install process (review the screen shots in the line). I have done this several times and it is a life saver for someone like me who has a lot of software that is not part of the original installation included in the system -- in fact most of the software I use regularly.

Maybe you are looking for

  • Print the head text in a Smartforms - READ_TEXT Function

    Hello, I have a huge problem to print a MM document's. I need show the text head in the footer of the document. For this i use the READ_TEXT function. To use this function i enter to vl03n transaction, enter the document number, go to the text head,

  • Looking for more columns in Address Book

    Hello, I am a long time (over 10 years) Palm user so I have gotten used to the Palm Desktop displaying a good amount of information in the Contacts area. I just got an iPhone so I am converting over to iCal and Address Book world. Some thing are driv

  • Cannot add Gmail to Apple Mail in Mavericks

    I cannot add Gmail to Apple Mail in Mavericks.  I have tried adding it as a Google account AND as an "other" account.  I have tried manually filling in the settings, using the instructions from Gmail's website: Incoming Mail (IMAP) Server - Requires

  • Oil industry

    Hi, What is the process flow in an oil industry starting from oil production to service station? Regrds, Ajay

  • Problem with my 5530 and its camera

    Hey, i've got a big problem with my nokia 5530. I bought it five weeks ago. But since two weeks photos and videos don't appear in my photo gallery. I can take a photo, but i can't save it and when I want to take a new photo the old one isn't there an