473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Provide simple objects for UI

I have a given page which displays data that while related, is spread
across different tables. I don't want the UI to call ThisBC.Select(),
ThatBC.Select(), OtherBC.Select(), etc and then "know" how to map data
from these result sets to its fields. I think that is too much
responsibility for the UI to handle.
Instead, I'd like the UI to use a "helper" class which will do
ThisBC.Select(), ThatBC.Select(), OtherBC.Select(), then map the
result set into an easy to use object which mimics what should be on
the screen. The helper class would return this object to the UI,
which would then easily map the object's properties to its form
fields. Saving data would be similar, the UI would populate the
object, then give it to the helper, which would know to start a
transaction, persist the data across the three tables, etc.
Would the "helper" class in this case qualify as a controller? Would
MVC or MVP be overkill? Thanks for any thoughts/advice. Adam
Jun 27 '08 #1
2 775
It sounds to me that you just need to create a class, which Visual Studio
will off to place in the App_Code folder. Put a reference to the class's
namespace and call the helper methods in one of your page's handlers.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

<cl*******@yahoo.comwrote in message
news:2e**********************************@i36g2000 prf.googlegroups.com...
>I have a given page which displays data that while related, is spread
across different tables. I don't want the UI to call ThisBC.Select(),
ThatBC.Select(), OtherBC.Select(), etc and then "know" how to map data
from these result sets to its fields. I think that is too much
responsibility for the UI to handle.
Instead, I'd like the UI to use a "helper" class which will do
ThisBC.Select(), ThatBC.Select(), OtherBC.Select(), then map the
result set into an easy to use object which mimics what should be on
the screen. The helper class would return this object to the UI,
which would then easily map the object's properties to its form
fields. Saving data would be similar, the UI would populate the
object, then give it to the helper, which would know to start a
transaction, persist the data across the three tables, etc.
Would the "helper" class in this case qualify as a controller? Would
MVC or MVP be overkill? Thanks for any thoughts/advice. Adam
Jun 27 '08 #2
I think the pattern for this is View Helper....
http://java.sun.com/blueprints/corej...ViewHelper.htm.
Thanks for the suggestion!
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michele Petrazzo | last post by:
I want to create a simple image editor (with wxPython) for my application. Now I'm able to zoom, draw with a pen, insert a text into the loaded image, and undo changes (for this I reload the image...
0
by: Tal Sharfi | last post by:
Hi everyone I recently had the need for StringGrid object same as the one that Delphi has. An object that helps show lists of other objects in a simple grid. I searched the news groups and...
10
by: Andrew | last post by:
Sorry about this but I'm new to ADO.NET (finally coming from simple ADO, bless it) and I'm trying to create a simple three tier program. Ie, User interface Layer / Business object layer / Database...
4
by: Shawnk | last post by:
This post is intended to verify that true value semantics DO NOT EXIST for the Enum class (relative to boolean operations). If this is true then (thus and therefore) you can not design state...
52
by: lovecreatesbeauty | last post by:
Why the C standard committee doesn't provide a standard implementation including the C compiler and library when the language standard document is published? C works on the abstract model of low...
4
by: Dmytro Bablinyuk | last post by:
I came across several possible ways of allocating memory for objects, for example: 1. malloc(sizeof(T)*3)/free - raw memory 2. new T/delete - buffer would be initialized to...
1
by: softwaredeveloper | last post by:
Hi friends, I am very new here, could you please give me some suggestions? Is FLASH the right technology? Or if there is any better solution? Purpose - To generate multiple simple moving...
5
by: Rowan | last post by:
Hi there, I am planning/building an n-Tier system with 2 presentation layers (web, windows) which will share the BLL and DAL. This is my first experience with .Net. As a VB6er I had to work...
10
by: Phillip Taylor | last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm having some trivial issues. In Visual Studio I create a web services project and change the asmx.vb file to this: Imports...
17
by: Chris M. Thomasson | last post by:
I use the following technique in all of my C++ projects; here is the example code with error checking omitted for brevity: _________________________________________________________________ /*...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.