FAQ Database Discussion Community


Shared Element Transitions Between Views (not Activities or Fragments)

android,android-5.0-lollipop,mvp,android-transitions
Let's say I'm using a view-based approach to develop an Android application like for example described in the following article: http://corner.squareup.com/2014/10/advocating-against-android-fragments.html So now I have two full screen views. One is visible and contains a grid of images. The other is hidden and is a detail view of the to-be-clicked...

Injecting Generics in Dagger

android,mvp,dagger
Is it possible in Dagger to do something like the following: public abstract class Presenter<T extends BaseView> { @Inject T mView; public void showLoadingIndicator() { mView.showLoading(); } } (example module) public class MyModule { private MyView mView; //extends BaseView public MyModule(MyView view) { mView = view; } @Provides public BaseView...

Can I create View and Presenter in different Project in MVP Pattern

c#,mvp,webformsmvp
I am learning MVP pattern for my current project(Windows Application). I have good work experience in MVVM using it in Silverlight and WPF. In MVVM my view and ViewModel use to be in separate project and using the strong binding of WPF they use to communicate to each other. But...

In what scenario will this event be null?

c#,events,mvp
I'm building an application using the MVP pattern. In order to make things happen in the presenter I'm creating events in the view, and the presenter will watch for them. ReSharper is giving me warnings about a possilble null reference exception, and I see tutorials that check for null before...

Cannot convert method group to non delegate type System.Data.Datatable

c#,datatable,mvp
Cannot convert method group to non delegate type System.Data.Datatable. Did you intend to invoke the method? i'm using design pattern MVP (Model View Presenter) So i have a DataTable in my Model DataTable _GetPendingTestOrders24Hours() { var connSettings = ConfigurationManager.ConnectionStrings["MyDB"]; { string CN = connSettings.ConnectionString; MySqlConnection conn = new MySqlConnection(CN); MySqlCommand...

Qt sub-project undefined reference to `main'

c++,qt,debugging,mvp
I'm learning The Model-View-Presenter (MVP) Pattern with Qt and have the follow example. I can build it and run it from build folder, but can't debug it due to the error: .../glibc-2.19/sysdeps/x86_64/start.S:118: error: undefined reference to `main' error: collect2: error: ld returned 1 exit status I can't figure out what's...

Data from Database Using MVP-VM Design Pattern

c#,design-patterns,mvvm,mvp
In my quest to understand MVP-VM design pattern in preparation for a new project which will be using DevExpress, I am unable to find an example with a database example. Viewing DevExpress, I am unable to locate an example with this design pattern. So, my question is this, does anyone...

Searching for an example of class-binding by a interface

java,interface,mvp
I am trying try to implement a MVP-Pattern example in Java but I do not know how the interface connection between the Presenter and the View works! Does someone know a good example of this? More details: In some sources a class diagram looks like this diagram The arrow between...

Correct use of Model in Presenter with MVP-VM Design Pattern

c#,design-patterns,mvp
I am self-studying the Model View Presenter View Model Design Pattern in preparation to joining a new project, which will be using the pattern with WinForms (NOT WPF). In my research I am seeing different uses of the pattern when comes to using Presenter. Some sites I have seen pass...

MVC pattern. The relationship between Model, View and Controller

model-view-controller,mvp
The relationship between Model, View and Controller make me confused. This topic shows an arrow form View to Controller, an arrow from Controller to Model and an arrow from Model to View: http://www.codeproject.com/Tips/31292/MVC-v-s-MVP-How-Common-and-How-Different However, this topic shows a dual-arrow between Model and View; a dual-arrow between View and Controller ;...

MVP Pattern with WinForms - Proper way to access user input?

c#,winforms,mvp
I'm writing an application using the MVP pattern, and am curious if there is a "correct" way to pass user input from the View to the Presenter. For example, I have a simple search form with a text box and a "Search" button. In the Presenter, I have a function...

MVP: should the Presenter carry out bootstrap tasks?

php,model-view-controller,mvp
I'm converting a bespoke PHP site to use MVP. This is preferable to me than MVC. Plus most of the tutorials and frameworks that claim to be MVC seem to be more MVP, in my opinion. Anyway, my site site has a bootstrap that contains: PSR-0 autoloader for namespaced classes...

WPF MVVM Data Binding issue

c#,mvvm,data-binding,datagrid,mvp
My ViewModel is as follows: public class ShipDataCollectViewModel : ViewModelBase { //private ObservableCollection<Item> _scannedItems; //private Item _scanningItem; public ObservableCollection<Item> ScannedItems { get; private set; } public Item ScanningItem { get; private set; } public ShipDataCollectViewModel() { ScannedItems = new ObservableCollection<Item>(); ScanningItem = new Item(); AddItemCommand = new RelayCommand(AddItem, CanAddItem); }...

MVP in WinForms ( presenter & program.cs)

c#,winforms,mvp
I'm learning an MVP pattern and have the following issues: If I have one form(project MainForm), one model(project Model) and one presenter, should I create a new project for my presenter or it's ok to put it in MainForm project? 1)If presenter must be located in separate project, it obviously...

Best practices for REST-API models

rest,design-patterns,model-view-controller,model,mvp
I am working on a REST-API and have run into an architectural problem. The model 'Book' represents a single book with properties and CRUD-based functions. It loads itself from a database via a read function. However, what if I want to get all books in the database? The current book...