Is it considered poor design to create "black box" User Controls that communicate directly with the service layer (to perform CRUD operations, validation, etc)?
By "black box", I mean that they retrieve/persist data independently of the page they are hosted on (using IoC injected services). Each UC can be dropped onto a page and it w...
Hi guys,
Short question - how do you define your view models?
Here are some of the options:
Pass the actual model into the view.
Create a view model with a reference to the model (like Model.Product)
Create a view model with the properties needed from the model, and set those from the model.
Probably a lot more.
All with their own ...
Hello fellow SO-ers.
I'm at the beginning of my road concerning Programming and Software Development and Design. I want to develop some applications in .NET(C#) WinForms with a SQL server as back-end (haven't decided yet: PostgreSQL, MSSQL or other). What I want to ask is where do I get information on:
How do i structure my SQL tables...
I am new to the whole MVP thing and slowly getting my head around it all. The a problem I am having is how to stay consistent with the MVP methodology when populating GridViews (and ddls, but we will tackle that later).
Is it okay to have it connected straight to an ObjectDataSourceID? To me this seems wrong because it bypasses all the ...
We're gonna build a line of business app, and do it using asp.net membership for security.
What is your recommendation on building application that should be easy to maintain and as hopefully future proof? The idea being to have a really complex and customized user experience and hopefully basing it on existing third party components to...
I am using Web Forms MVP to write an DotNetNuke user control. When the 'SubmitContactUs' event is raised in my unit test the presenter attempts to set the 'Message' property on the Modal. However the View.Modal is null in the presenter.
Shouldn't the Web Forms MVP framework automatically build a new View.Model object in the presente...
How does one handle a user confirmation when using MVP/MVC in a Web environment?
Presenter:
if (_view.AskUserForConfirmation())
{
// do something
}
In a winforms project this won't be any problem but in a web environment the confirmation answear will come one postback after the preseter code, how does one handle such a thing?
...
Hello, I'm a little bit confused about these two programming patters: MVC and MVP.
Which are the main differences between them?; I have been searching on the net and I made a couple of examples of both of them, but I'm even more confused, because in some sample web pages MVP uses more than 2 interfaces to communicate the presenter with ...
Hi,
I am working on an ASP.NET WebForm application using MVP pattern. For every Web Form, there is a Presenter class associated to handle UI and Business logic. However, I had problem when writing unit tests for Presenters, since session values are used in presenters. And there is no HTTP context exists during execution of the unit tes...
Hi All,
I am implementing MVP pattern in my application.
But I am getting NullReferenceException on the Page_Load of my view class.
Here is my presenter class:
using Microsoft.Practices.CompositeWeb;
namespace PresenterDLL
{
public class NamePresenter : Presenter<IProduct>
{
public void SayHello()
{
...
In my experience I have only had 2 patterns work for large-scale desktop application development when trying to keep the model and UI in sync.
1-An eventbus approach via a shared eventbus command objects are fired (ie:UserDemographicsUpdatedEvent) and have various parts of the UI update if they are bound to the same user object updated ...
I've seen a little buzz on the open-source ASP.NET Web Forms MVP project, but where can I get resources?
http://webformsmvp.com is pretty much stubbed out for now. This appears to be a compelling refresh of the Web Forms paradigm and bring into the fold things that make ASP.NET MVC great. I hear it's going to be put out there at MIX10...
Should the view have nothing event specific in its interface and call the presenter plain methods to handle events and not have any official EventHandlers? For instance
// ASPX
protected void OnSaveButtonClicked(object sender, EventArgs e)
{
_Presenter.OnSave();
}
Or should the view have event EventHandlers defined in its interfac...
Does ICommand implementation in MVP (Model - View - Presenter) belong in Presenter or its own class?
...
With MVP, you normally bind the View (UI) with the Presenter in the Presenter. However with the latest version of GWT, especially with UIBinding, you can do the following in the View:
@UiHandler("loginButton")
void onAboutClicked(ClickEvent event)
{
// my login code
}
Which basically exchanges a lot of anonymous inner class code ...
I am using IDataErrorInfo to validate my data in a form in WPF. I have the validation implemented in my presenter.
The actual validation is happening, but the XAML that's supposed to update the UI and set the style isn't happening.
Here it is:
<Style x:Key="textBoxInError" TargetType="{x:Type TextBox}">
<Style.Triggers>...
In an N-Tier app you're supposed to have a business logic layer and a data access layer.
Is it bad to simply have two assemblies: BusinessLogicLayer.dll and DataAccessLayer.dll to handle all this logic? How do you actually represent these layers. It seems silly, the way I've seen it, to have a BusinessLogic class library containing class...
Is the "Presenter First" MVP pattern the same as the "Passive View"? If not, how do they differ?
...
Hi,
I'm using MVP in WPF and I came across a design doubt and I would to get your opinion on this:
At some point I need to refresh my view and perform the same initial queries, like when the view was loading. The view's DataContext is my presenter and I have a couple of collections and other variables that are bound to the view. When I ...
hi,
I have this weird problem that I cannot handle myself. A class in the model of my mvp-project designed as singleton causes an InvalidCastException. The source of error is found in this code line where the deserialised object is assigned to the instance variable of the class: engineObject = (ENGINE)xSerializer.Deserialize(str); It oc...