Is MVC a architecture or Design Pattern?.

Hi,
It may be simple question,but i need clarification on this.
Thanks in Advance.

Model View Controller is an object-oriented design pattern.
Some individuals may choose to use it (questionably) to describe a piece of a software architecture. In this case they are using the design pattern to describe only an element of an architecture.
MVC outlines how objects will communicate in a three-tier system consisting of a business model and a presentation layer.
MVC does not describe hardware configuration, load balancing, clustering, firewalls, routers, security constraints, resource pooling, and other critical details of a software architecture.
A software architecture design may include and/or use the MVC design pattern to indicate how the technical design of the application should be designed. Here the decision to use MVC is part of the architectural design. It is one specification of the architecture design. There are many other elements of a software architecture design that have nothing to do with MVC.
MVC by itself is a simple object-oriented design pattern. It cannot be used to describe and/or design a software architecture.

Similar Messages

  • Best architecture and design pattern to use

    I am currently designing a moderately sized LabView application and cannot decide on the best architecture/design pattern or combinations thereof to implement.
    The program basically polls an instrument connected to a serial port continuously at a 2-10Hz rate. When operator clicks a button to start a run, the polled data is then filtered, has math functions performed on the data, writes collected data to files, and produces reltime graphs and calculates point-by-point statistics. At the completion of a run, some additional data files are written. I pretty much know how to accomplish all these tasks.
    What is also required is main-vi front panel interaction by the operator to access a database (via a C# dll with .Net) to query for specifications to apply in order to determine pass/fail status. Setup conditions also need to be changed from time to time by the operator and applied to the data in real time (ie- a measurement offset). I have prototyped the database portion successfully thus far.
    For the main vi, I started off using the Top Level Application Using Events design pattern (Event structure within a while loop). Copious use of bundled clusters and shift registers keep the database data updated. I cannot figure out how to have the top level vi concurrently poll the serial device as outlined above. The Event structure is only active when defined control values change, and use of a timeout is no help since it prevent data from being collected while the user is accessing the database. All database and setup parameters must be applied to the data as it comes in from the serial port. Error trapping/recovery is a must.
    I believe what I need is two parallel processes running under my main vi (one for database and setup, the other for polling and data processing/display, but what would be the preferred choice here?
    Revert back to a polled loop in lieu of Events, use notifiers, occurrences, user-defined events, Producer-consumer loops?
    It�s been about 3 years since I have had an application on this level (which used a state machine architecture), and a lot has changed in LabView (using 7.1 Prof Devel). I am currently having a mental block while trying to digest a lot of features I have never used before.
    Suggestions Welcome!
    Thanks.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    I suggest a (3) state machine(s) architecture. The first is the user interface. Your main VI is a good start. Another state machine handles the instrument I/O (your serial polling). The third handles all data processing. The three loops run independently. Each has a wait to allow LV's scheduler to share CPU time among the loops. I like queues or functional globals for inter-loop communications.
    This allows a lot of flexibility. Each portion can be tested alone. Each can have different timing and priority.
    Spend some time thinking about what needs to be done and plan the structure carefully before you do any coding (except for little test programs to try new ideas).
    I also like Conway and Watts "A Software Engineering Approach to LabVIEW", published
    by Prentice Hall.
    Lynn

  • Is MVC is Design Pattern or Architecture

    Is MVC design pattern or architecture.i think at high level it's architecture and low level it's design pattern.is my view correct.any suggestions appreciated.
    thanks,
    srikanth

    A pattern is used to define an often used architecture. You take it from there.

  • Is MVC2 a design pattern or architecture? for yes and no why?

    I am using JSF which follows MVC2. Is MVC2 a design pattern or architecture? For yes and no why? what is the difference between design pattern or architecture?

    Hi There,
    Maybe this will help answer your questions...
    Firstly, MVC2 is a proprietary name for the Microsoft .NET framework based around the Model-View-Controller pattern - it is an updated version of their first attempt - MVC.
    The Model-View-Controller pattern harks back to the days of SmallTalk, and as far as I am aware is not included in the original Gang Of Four design patterns, although there is no reason why it can't be considered a design pattern.
    Software architecture is about how different parts of the system fit (interface) together and how they relate, including static relationships (cardinality relationships, state) and processes (what happens when), it most often consists of many design patterns each used to address the various needs of a complete system.
    Hope this helps
    Rich

  • Can anyone take me in step by step to understand MVC design pattern

    Hi Everybody,
    I just killed myself trying to understand what is MVC and how to apply it to flash (AS3) the easy way but I could not, there is a lot of information on MVC on google but it is very hard I can not understand it and apply it to anykind of application or game, I had created a lot of games but using flash timeline (puzzle, multipel choice, simple physics interaction) and I understand that we must separte the design interface and the data of the application and the code into diffrent blocks, but what I understand is:
    1- making a SWC for the design. (View)
    2- use XML or TEXT file for the data.(Model)
    3- classes for the code.(Controller)
    this is MVC that I understand, but all the tutorials on the net is about creating 3 classes and calling each other in a very diffuclt code to understand, I realy need to work the proffessional way but it is very hard and far away from my understanding.
    if any body have a way to let me understand it like making a template for every MVC application or game and explain to me his/her code it will be great, some of my questions are:
    1- how we say about a class that it is the view part of the pattern while we have a SWC that hold the intreface graphics?
    2- dose making a sepreate class to load and fetch external data sources like xml and text means I had created the model part of the pattern, and why the tutorials on the net do not say that if it is true?
    3- making the logic of the application or game sepreated into class for each logic block, makes the controller part of the pattern?
    I realy do not know what to ask more because I do not understand the MVC design pattern
    Please note: if someone can chat with me on skype it will be great, but if you want to explain here also good but I need to understand it is making me crazy!
    thanks in advance

    I'm not a pro in this either, but a few things about it make sense to me.
    First you don't need to have only three parts, but all the parts you have should be one of the three things (maybe). And they don't need to be a swc, XML/text, or a class.
    I recommend the Clock tutorial from Colin Moock's book, Essential Actionscript.And here is someone walking you through it. http://flylib.com/books/en/4.14.1.137/1/
    In that example there is a model which keeps track of time like the hours, minutes, seconds, if the clock is running.
    There is a controller that lets you set the time, reset the clock, stop the clock, that kind of stuff. This isn't the buttons and stuff that allow you to do that, this is the code that takes the input from the buttons and communicates with the model.
    So there would be a view of the buttons that the user would want to push to set the clock or what have you.
    And there is a view presenting the time. Now there might be two (or more views). For example you might have an analog clock and a digital clock.
    Work through that tutorial. It helped me.

  • Calling standard funtion module in BSP using MVC Design pattern

    HI Everyone,
    I am trying to create one BSP application using MVC Design pattern,
    I want to call standard function module LSO_TRAINING_GET_DETAIL_C, in my BSP Model class,
    can any one tell me how to do this?
    I want to do the model binding also,like i want to retrive data on the frontend bsp screen from the above function module.
    Thanks,
    Vinay
    Edited by: vinay kumar on Jul 3, 2008 12:02 AM

    Hi Vinay,
    If you want to call the FM on some user action , ie on some event than you have to do it in
    DO_HANDLE_EVENT method of your controller class.
    For eg. if you want to call the FM on click of the button, you can do some thing like:
    DATA: button_event TYPE REF TO cl_htmlb_event_button.
    IF htmlb_event IS NOT INITIAL.
      IF htmlb_event->name = 'button'.
          button_event ?= htmlb_event.
         IF htmlb_event->server_event CP 'press'.
              call function LSO_TRAINING_GET_DETAIL_C
                                        exporting
                                         param_exp = val1
                                        importing
                                           param_imp = val2.
                  endif.
          endif.
    endif.
    here press is the OnClick event of the button.
    Now you can use this VAL2 , in the view .You can use the  HTMLB:TABLEVIEW element , if your FM's importing param is a table.
    Hope it helps a bit,
    BE,
    Anubhav.

  • Complex architecture - design pattern?

    I am trying to determine which architecture, or combination woudl best suite my application: 
    The core aspect is a client receiving data from a network at variable speeds - I have this working using a producer consumer loop (data) design pattern, that starts and stops by placing it inside a case structure with start button. I'd now like to combine this with an event driven user interface, which also uses the serial port to talk to external hardware every now and then. I have that working seperately with a producer consumer (event) design pattern. I'd like to combine them and include regular events (handshaking with the external hardware) to take place whilst the producer-consumer (data) reads from the network.  
    How can I mix the two design patterns?! I'm struggling to get my head 'round this.
    Thanks

    Here is an example of two Producer-Consumers in one vi.  Notice the two queues.  One is for commands to the event loops.  The other is for the serial data loops.  When certain data is received, you can send commands to the event loop (actually to Consumer loop, 2nd from top) to cause some action.  So the user can initiate some action via event structure, and received data can also initiate some action.
    This is complex and it might not do all you want.  But its a start.
    - tbob
    Inventor of the WORM Global
    Attachments:
    DoubleProducerConsumer.vi ‏29 KB

  • Difference between n-layer software architecture and MVVM design pattern?

    hello everyone,
    I am not clear with this concepts of Software architecture pattern and design pattern.
    I am developing an wpf application using MVVM. Now, my question is, does MVVM come under n-layered architecture? 
    or n-layer architecture and MVVM both are different? 
    Regards,
    Rakesh.N
    Rakesh murthy

    "
    Now my question is, i want to process the data which i get from database. where should i write that processing logic after getting the data from database? in model classes? or in view model classes?
    The model is however the data comes from wherever it comes from.
    If there is any processing after you get it then that would be in the viewmodel.
    The viewmodel adapts your data to the view.
    If it needs any adapting then the viewmodel does that, not the model.
    EG here
    protected async override void GetData()
    ThrobberVisible = Visibility.Visible;
    ObservableCollection<CustomerVM> _customers = new ObservableCollection<CustomerVM>();
    var customers = await (from c in db.Customers
    orderby c.CustomerName
    select c).ToListAsync();
    foreach (Customer cust in customers)
    _customers.Add(new CustomerVM { IsNew = false, TheEntity = cust });
    Customers = _customers;
    RaisePropertyChanged("Customers");
    ThrobberVisible = Visibility.Collapsed;
    That logic is in a viewmodel.
    in this context , in which layer the viewmodel and model classes are put under in n-tier architecture?
    They're in two of the n layers/tiers.
    Or they're in one.
    Depending on how someone decides to classify a layer or a tier.
    There is no absolute definition.
    Why would you care?
    Hope that helps.
    Technet articles: Uneventful MVVM;
    All my Technet Articles

  • Suggest what design pattern is applicable for my case

    I have an object called GrantAward , these awards I have to show to the user for selection
    1. I call a web service to get list of GrantAwards.
    2.for each GrantAward check if this is present in my database
    a. if not there insert
    3.for each GrantAward check some conditions
    a if satisfied add to the list to show to user
    b if not satisfied do not add to list .
    these are the steps involved before I can show the GrantAwards to user for selection , please suggest me what design pattern can I use ?

    I'm not sure you want to hunt for patterns when you already know what you are implementing. A lot of people have pattern fever. Patterns are useful constructs for communicating design ideas and enforcing best practices. But I rarely go out and hunt for a specific pattern (or name my objects after patterns). If you are doing a heavyweight methodology with RUP or something similar, I could see stereotyping your UML with patterns.
    That having been said, you already have a Facade with your service. You are undoubtedly using DataAccessObject to fetch your records. Your conditions could be implemented with a ChainOfResponsibility and/or Strategy pattern. What you return could be a Composite. Potentially the request and response are a Command. And your overall architecture could be MVC.
    But IMO that is overkill.
    - Saish

  • Producer/Consumer Design Pattern with Classes

    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Jason

    JTerosky wrote:
    I'm starting a new project which involves acquiring data from various pieces of equipment using a GPIB port.  I thought this would be a good time to start using Classes.  I created a GPIB class which contains member data of:  Address, Open State, Error; with member vis such as Set Address, Get Address, Open, Close...general actions that all GPIB devices need to do.  I then created a child class for a specific instrument (Agilent N1912 Power Meter for this example) which inherits from the GPIB class but also adds member data such as Channel A power and Channel B power and the associated Member Functions to obtain the data from the hardware.  This went fine and I created a Test vi for verfication utilizing a typical Event Structure architecture. 
    However, in other applications (without classes) I  typically use the Producer/Consumer Design Pattern with Event Structure so that the main loop is not delayed by any hardware interaction.  My queue data is a cluster of an "action" enum and a variant to pass data.  Is it OK to use this pattern with classes?  I created a vi and it works fine and attached is a png (of 1 case) of it.
    Are there any problems doing it this way?
    Including the error cluster as part of the  private data is something I have never seen done and ... well I'll have to think about that one.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Choice of design pattern for data acquisition system

    Hello all
    I have a trouble about selecting the suitable design pattern / architecture for a data acquisition system. 
    Here is the details of the desired system:
    There is data acquisition hardware and I need to use it by observing parameters on User interface. 
    the data acquisiton period, channel list to scan should be chosen on User interface. Besides, there are many user interface interactions. e.g. if user selects a channel to add scanlist, then I need to enable and make visible some other parts on user interface. 
    When user completes the channel selection, then he will press the button to start data acquisition. Then I also need to show the scanned values on a graph in real time and log them in txt file.
    I know that I cannot use producer consumer pattern here. because the data acquisition loop should wait for parameters to scan channels. and it works in a given period by user. so the user interface loop performs higher rate then consumer loop (data acquisition loop). it means queue will be bigger bigger. if I use notifier it will loss some data come from user interface. 
    is there any idea about that ? is there any suitable design pattern for this case ? 
    Thanks in advance
    best regards 
    Veli BAYAR
    Embedded Systems Software and Hardware Engineer 
    "You live in a graphical world. Why not program in one?"
    Solved!
    Go to Solution.

    johnsold wrote:
    Veli,
    I recommend the Producer/Consumer model with some modifications.
    You might need three loops.  I cannot tell for sure from your brief description.
    The User Interface loop responds to the user inputs for configuration and start/stop of acquisition.  The parameters and commands are passed to the Data Acquisition loop via a queue. In this loop is a state machine which has Idle, Configuration, Acquisition, and Shutdown states (and perhaps others). The data is sent to the Processing loop via a different queue. The Processing loop performs any data processing, displays the data to the user, and saves it to file. A notifier can be used to send the Stop or shutdown command from the User Interface loop to the other loops.  If the amount of processing is minimal and the file write times are not too long, the Processing loop functions might be able to occur in the Timeout case of the UI loop Event structure.  This simplifies things somewhat but is not as flexible when changes need to be made.
    I am not sure that a Design Pattern for this exact setup exists but it is basically a combination of the Producer/Consumer (Events) and Producer/Consumer (Data) Design Patterns.
    Lynn
    Check out this thread: http://forums.ni.com/t5/LabVIEW/Multiple-poll-case-structures-to-event-help/td-p/2551309
    There are discussions there about a 3-loop architecture that may help you.
    Jeff
    Jeffrey Zola

  • ABAP objects design patterns

    hi all,
        can any one send me the Design patterns used for ABAP objects programming in ABAP. eg mvc and sample code which uses the design patterns
    cheers
    senthil

    Of course that program is not an object design pattern
    (Its just a little ABAP Objects syntax demo that I wrote  years ago
    I don't know about a list of OO design patterns implemented in ABAP Objects.
    A very simple one, a Singleton might look like this:
    <b>* cl_singleton: Eager Variant
    CLASS cl_singleton DEFINITION FINAL
                                  CREATE PRIVATE.
      PUBLIC SECTION.
        CLASS-METHODS: class_constructor,
                       get_singleton RETURNING VALUE(singleton)
                                               TYPE REF TO cl_singleton.
      PRIVATE SECTION.
        CLASS-DATA singleton TYPE REF TO cl_singleton.
    ENDCLASS.
    CLASS cl_singleton IMPLEMENTATION.
      METHOD class_constructor.
        CREATE OBJECT singleton.
      ENDMETHOD.
      METHOD get_singleton.
        singleton = cl_singleton=>singleton.
      ENDMETHOD.
    ENDCLASS.
    cl_singleton: Lazy Variant
    CLASS cl_singleton DEFINITION FINAL
                                  CREATE PRIVATE.
      PUBLIC SECTION.
        CLASS-METHODS get_singleton RETURNING VALUE(singleton)
                                              TYPE REF TO cl_singleton.
      PRIVATE SECTION.
        CLASS-DATA singleton TYPE REF TO cl_singleton.
    ENDCLASS.
    CLASS cl_singleton IMPLEMENTATION.
      METHOD get_singleton.
        IF cl_singleton=>singleton IS INITIAL.
          CREATE OBJECT cl_singleton=>singleton.
        ENDIF.
        singleton = cl_singleton=>singleton.
      ENDMETHOD.
    ENDCLASS.</b>

  • Design Pattern and ABAP Objects

    Hello Friends,
    I would like to know, if ABAP Objects can be used to do pattern oriented programming ?
    For example GANG of four has provided almost more then 30 design pattern ( MVC, singelton, Obserable, FACADE,,,etc) can we implement patterns using ABAP ??
    Many thanks
    Haider Syed

    Hi,
    Take a look at the following site:
    http://patternshare.org/
    It has all the basic patterns from the GOF and a lot more. I can recommend the ones from Martin Fowler but be sure you start with the ones from the GOF.
    All patterns are described by using UML so it's very easy to translate them into ABAP OO code.
    Regarding your other question. For the observer pattern I used an interface which the SAP had already created if_cm_observer and created my own abstract observable class. The observable class is nearly a 100% copy of the java.util. one
    regards
    Thomas

  • Design patterns in portlet development

    Hello,
    I am a student at the Technical University in Munich, Germany and I am working on a university project on design patterns for portlets.
    The focus of my work is researching the best practices when developing a web portlet, especially which design patterns are the most suitable for portlets development.
    For example, the MVC pattern is one of the most popular design patterns for portlets.
    I am writing to you to ask which design patterns are used in the development of your portlets from the SAP Enterprise Portal.
    - What design patterns do you use for your portlets?
    - Do you use MVC among others?
    - Do you have your own design patterns?
    - Do you use any templates or guidelines for portlet development that involve design patterns?
    I am looking forward to your answer. Any answer would help with the research, as experts’ interviews are part of my work in the project.
    I appreciate any references you consider to be related to my search.
    Thank you,
    Julia Alexandrescu
    Department of Informatics
    Technical University Munich
    Email: [email protected]

    Hi raaj,
    I have a query related to this.
    I am a beginner to portlets.
    Say I have an existing struts application.What all do i need to modify or add to make a .portlet file out of it so as to make it deployable in Weblogic 8.1 SP3?
    Is adding a portlet.xml enough?
    if yes, what would the portlet.xml look like?
    Do i need to add a separate class as well?
    I couldnt get any sufficient answers from other forums.
    Can you please help?
    Thanks & Regards,
    Nishant

  • Design patterns concern

    i am designing a graph api. i have defined interfaces for a node, arc, and graph. there are multiple interfaces defined (using inheritance) defined for each of these three interfaces.
    all my implementations of these interfaces have not considered fields relevant to display on a x-y coordinate graph. now that i have coded the implementations, i am ready to display these objects.
    the problem is that i have many implementations, but they now have to extend another interface for display. i find that i have to create a new class to implement the existing one and implement the new interface for each implementation.
    to illustrate, i have a Node interface. there are only two methods i.e. String getId() and void setId(String id). i have two additional interfaces that extends this Node interface i.e. SimpleNode and ComplexNode (these have their own pertinent methods, not listed). I have implemented the Node interface with NodeImpl, and implemented the other 2 interfaces with SimpleNodeImpl and ComplexNodeImpl, both of which extends NodeImpl and each implementing SimpleNode and ComplexNode interfaces, respectively. at this point, i define another node interface for the purpose of drawing i.e. DrawableNode (which extends the Node interface and has getters/setters for x and y coordinate.
    my problem is, how do i get SimpleNodeImpl and ComplexNodeImpl to implement the DrawableNode interface? i have considered the following approaches:
    1. have SimpleNodeImpl and ComplexNodeImpl implement DrawableNode as well as what they are already implementing (i.e. SimpleNode and ComplexNode).
    2. extend SimpleNodeImpl and implement DrawableNode interface i.e. DrawableSimpleNodeImpl (and likewise with ComplexNodeImpl).
    3. create an implementation of DrawableNode, DrawableNodeImpl, and use composition to place type Node as a field member.
    i find option #1 problematic because that means i have to define getters/setters for x and y in SimleNodeImpl and ComplexNodeImpl. this would NOT take advantage of inheritance.
    i find option #2 problematic because this would mean i would have to extends all my node implementations just to have them drawable. (i actually have more than 2 extensions of nodes that i want to draw). moreover, i would also run into the problem in option #1, where i have to define getters/setters for x and y in each of these subclasses.
    i am currently leaning towards option #3, but i find the relationship clumsy and even counterintuitive to myself; i plan to use the MVC design pattern, and i have calculated that this approach will result in a web of event/listener complications.
    i am sure there are more options, but these are the ones that i have thought of. the goals are to keep the inheritance simple, implementations to a bare minimum, and have something that will fit nicely in with the MVC design pattern.
    the general question may be: how do i design the relationships so that they will operate in the business logic layer and then be displayable on some GUI layer? is inheritance the way? or is composition the way? or is there yet another way that i have overlooked?

    really long questions dont usually get answered here.

Maybe you are looking for