473,231 Members | 1,625 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,231 software developers and data experts.

If not CAB, then what?

I want to design/develop a Win app with an Outlook-like feel. That is, lots
of different modules. If I don't go with Composite UI Application Block
(CAB) design, how else could I do it? In other words, what could allow for
"master/parent" functions without having to duplicate them to every single
form?

I've used user controls (instead of forms) for various "modules" and insert
them onto a master form, but is this my only other alternative?

Thanks,
Ron
Jan 29 '07 #1
1 1246

You have to look into the MVC (Model View Controller) pattern.

Basically.

Somewhere, there exists a "model". A model is usually some data.

You build views .... which will work with the model.

The controller acts as in in-between.

-- that's a quick, wayyyyy to little explanation. As in, don't expect to
learn MVC from reading 6 lines of a newsgroup post.

However, here is a winforms tip:
Then.. (in a winforms app), you can do some some bindings.
Binding titleIdBinding = txtTitleId.DataBindings.Add("Text", this.m_model,
"TitleId");
//this is another "hint" .. after you get past the initial learning
curve//titleIdBinding.Format += /* might be wrong, please check */ new
EventHandler(BindingNullCheck);

this.txtTitle.DataBindings.Add(new Binding("Text", this.m_model, "Title"));
this.txtType.DataBindings.Add(new Binding("Text", this.m_model,
"TitleType"));
this.dtpPubDate.DataBindings.Add(new Binding("Value", this.m_model,
"PublishedDate"));
this.txtPubDate.DataBindings.Add(new Binding("Text", this.m_model,
"PublishedDate"));

// a child sub object
this.txtPubId.DataBindings.Add(new Binding("Text", this.m_model,
"CurrentPublisher.PublisherId"));
this.txtPublisher.DataBindings.Add(new Binding("Text", this.m_model,
"CurrentPublisher.PublisherName"));

here, my "model" is a class
(abbreviated represenation, all the items are properties)
class Title
public string TitleId
public string Title
public string TitleType
public DateTime PublishedDate
public Publisher CurrentPublisher // child object

class Publisher
string PublisherId
string PublisherName
................
..Net 2.0 has some improvement handling NULL values. Which is important when
you're adding a new item.. and don't have a populated model .
'Improved in .NET 2.0 //
http://msdn2.microsoft.com/library/y...us,vs.80).aspx
'titleIdBinding.NullValue = "Type a TitleID Here";
Good luck....

"Ronald S. Cook" <rc***@westinis.comwrote in message
news:%2***************@TK2MSFTNGP06.phx.gbl...
I want to design/develop a Win app with an Outlook-like feel. That is,
lots
of different modules. If I don't go with Composite UI Application Block
(CAB) design, how else could I do it? In other words, what could allow
for
"master/parent" functions without having to duplicate them to every single
form?

I've used user controls (instead of forms) for various "modules" and
insert
them onto a master form, but is this my only other alternative?

Thanks,
Ron


Jan 29 '07 #2

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

Similar topics

2
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
92
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
12
by: Dario | last post by:
The following simple program behaves differently in Windows and Linux . #include <stdexcept> #include <iostream> #include <string> using namespace std; class LogicError : public logic_error {...
125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
47
by: Neal | last post by:
Patrick Griffiths weighs in on the CSS vs table layout debate in his blog entry "Tables my ass" - http://www.htmldog.com/ptg/archives/000049.php . A quite good article.
121
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode...
8
by: Midnight Java Junkie | last post by:
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.