Welcome! Log In Create A New Profile

Advanced

What happened to MVP?

Posted by Steve Hodgman 
Steve Hodgman
What happened to MVP?
April 05, 2016 03:18AM
G'day All.
I know that I am late to the V20 party but I figured that V21 would be looking to build on the V2 features and extend MVP.
I cannot find any reference to MVP in the V21 Features PDF.

I was very interested when this was presented initially and I am wondering if anyone is using this development paradigm?

If so, Are you happy with what it does? Any tips for someone starting into it?
Thanks,
Steve H.
DerekT
Re: What happened to MVP?
April 06, 2016 06:15PM
Steve
I too was hoping for a few refinements being added to MVP but 90 views and no responses seems to indicate that no one else is on here actually using it.
Except me that is as I am currently developing an app based solely on this methodology.
I should clarify this by saying that this is Property Letting app being written for a friend and as such I am under no real pressures but none the less it will still need to provide all the necessarry functionality when finished.

There are a few points worth noting if you are going to have a go with this.

It is only available in WD so no option to share functionality with WB or WM.

The examples whilst using the MVP functions was not actually made using the RAD.
Not an issue in itself as you can learn a lot by stepping through the code but you will need to be wearing a 'Sherlock Holmes Deerstalker' as information on a most of MVP is pretty hard to come by.

MVP RAD is, like most RAD, pretty simplistic in that it assumes you will be making an app that only requires a number of tables that call an add/update window.
If you use ribbons or tabs you are on your own.

Each RAD operation can/will only produce one form or table for the selected data file.
So 50 data files would require 100 RAD operations to produce the classes.
The corresponding form/table is always generated wether you want/need them or not.

The code produced in the 'Request for refreshing' section of the window is useless as it will always select the row you were on prior to editing regardles of whether the sort order of the array has changed.
I did send PCS a project highlighting this with a proposed solution - had an email thanking me but as yet no change.

The provided error handling class is pretty much a skeleton - no had time to investigate this one yet.

So why am I using it I hear you ask......
Well actually now I am used to it and understand most of what is going on I do like it.
It is based on SQL (roll your own) queries, arrays and bound (to the array of the <presenter>)tables which is right up my street.

I use 4 codebricks following creation of a form/table pair so within a couple of minutes I can get the code cahnges I need.
Outside of that all the provided class methods work without any interference from me.

The <presenter> variable enables me to see (in debug) not only the values of the record but also, when in table mode, the contents of the array.
When creating a new record it is a new (empty except for DB default values) presenter that is sent to the form therefore any information required can be added at this stage - no need to send rafts of parameters to, or use HReadSeeks in, the window to be opened.
When updating it is the currently selected record that is sent so all that is needed on the form is 'SourceToScreen()'

The only other thing you will need to consider is how you put your app together.
I am using ribbons that frequently have tabs on the individual panes which poses a couple of issues.
Every table or form on a window needs its own <presenter> declared.
These are always declared as dynamic and therefore would need allocating (with or without data) in the global declarations of the window to avoid runtime errors.
The 'Request for refreshing' section of the window is only designed to operate with a single table control so this would need adaptation to be able to work.

My solution to these issues is to use internal windows which enables me to keep all MVP functionality where I need it.

OK, enough - you may be losing the will to live by now.
If you decide to have a go then please PM me if you have any specific questions - I may not know thw answer.
I do have a document somewhere I put together showing the basics of how I got this to work - send me your email and I will send a copy if you so require.
Steve Hodgman
Re: What happened to MVP?
April 11, 2016 12:56AM
Thanks for the detailed reply Derek.
I have been developing with my own paradigm using classes for all data access and a GUI based on internal windows. It was inspired by my understanding the the MVC way of doing things. Works for me. However, I am always looking to exploit new ideas and so was interested in the MVP feature as it debuted in V20.

On looking at it I have definitely not fully comprehended their design structure and methods but I will continue to review the examples and construct my own to see how it fares in a real world app rather than their simplistic example. (Real work is currently intervening so I have to limit my play time).

I was curious to see that they do not go the UML path. i.e from the Analysis -> UML -> Classes. Unless you do that then you will always suffer problems when the data files are modified and forget to change the classes and queries. I keep doing it and I imagine it will only get worse as I get older.

I had been hoping that V21 would extend this but it seems not to be....
Anyway, I await the release of the new version and the doco to accompany it.
Cheers,
Steve H
P.S. Yes, I would be interested in your general design structure. I will PM later this week.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: