473,386 Members | 1,726 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.

Swing vs. WinForms

Hi folks,

I'm a Java programmer and now I have to use C# for a new large
project. The language is the best I've ever seen. In some points it
goes far beyond Java. I like that.

But then there was a great dissappointments about WinForms. Compared
with Java/Swing (skip the performance, I mean the development) it is
very poor at first sight. It reminds me when I startet in 1995 with
Delphi (guess a guy named Heilsberg is the reason :wink: ). Is it
true there is no MVC concept in WinForms? Is there any way (or third
party lib) to use a MVC pattern with WinForms?

Best regards,
Frank.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 16 '05 #1
2 7338
Frank,

There is nothing in the framework that supports this out of the box.
However, that doesn't mean that you can't implement it yourself.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"frank_ulbricht" <fr************@gmx-dot-de.no-spam.invalid> wrote in
message news:40**********@Usenet.com...
Hi folks,

I'm a Java programmer and now I have to use C# for a new large
project. The language is the best I've ever seen. In some points it
goes far beyond Java. I like that.

But then there was a great dissappointments about WinForms. Compared
with Java/Swing (skip the performance, I mean the development) it is
very poor at first sight. It reminds me when I startet in 1995 with
Delphi (guess a guy named Heilsberg is the reason :wink: ). Is it
true there is no MVC concept in WinForms? Is there any way (or third
party lib) to use a MVC pattern with WinForms?

Best regards,
Frank.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 16 '05 #2
frank_ulbricht wrote:
Hi folks,

I'm a Java programmer and now I have to use C# for a new large
project. The language is the best I've ever seen. In some points it
goes far beyond Java. I like that.

But then there was a great dissappointments about WinForms. Compared
with Java/Swing (skip the performance, I mean the development) it is
very poor at first sight. It reminds me when I startet in 1995 with
Delphi (guess a guy named Heilsberg is the reason :wink: ). Is it
true there is no MVC concept in WinForms? Is there any way (or third
party lib) to use a MVC pattern with WinForms?


Sure you can (and should) do MVC in Windows Forms. Unfortunately, there's
little to no documentation on this topic, and all (Windows Forms) books I
know fail in this area as well. So here's my recipe for using MVC in Windows
Forms (just a whirlwind tour, not a methodology ;->):

1. Write the application model. Do not tie it in any way to the UI layer by
having dependencies to it. Test the heck out of it using NUnit, csUnit, etc.

2. Expose all relevant properties of the model and add events for each
property change that needs to be communicated to the UI layer. This can be
done at any level of granularity, from a single ModelChanged event to one
event per property.

3. Design the UI.

4. Implement the UI's event handlers so they update the model's properties
as required.

5. Implement model event handlers in the UI classes that update the UI on
model updates.

As you might realize, .NET events and delegates actually make it easier (or
nicer) to implement MVC. What you're still missing are the default models
that come with Swing for each type of control, but I doubt their value
anyway, because having a model per control is hardly desirable -- the model
should reflect the problem domain in terms of the domain.

Note that there's also a MVC framework for Windows Forms and ASP.NET: The
User Interface Process Block at
http://msdn.microsoft.com/library/de...html/uipab.asp.

Cheers,

--
Joerg Jooss
jo*********@gmx.net

Nov 16 '05 #3

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

Similar topics

0
by: Scott Khan | last post by:
We have a Java Swing position. Need consultants ASAP. Position : Java Swing XML / SOAP - FX / Brokerage Requirements : Swing - JTrees / Jtables. other swing classes. etc. Java/ J2EE. JDK...
5
by: Chris | last post by:
Having been traumatised many years ago when using MFC/C++ to develop front-end code, I've religiously avoided GUI work since and stuck to back-end / server-side projects. So I'm a bit of a novice...
6
by: Joseph | last post by:
hi 1) i plan on having an awt canvas component (to draw graphs) on a JFrame with other swing components..will this be okay? i've read that swing and awt aren't compatible.. 2)Also, if i...
3
by: bergel | last post by:
Hello, Does anyone already have some experience in mixing AWT and Swing? Is it conceptually doable? Does the design of Swing prevent interaction between an AWT and a Swing widget? Regards,...
3
by: Sherrod Faulks | last post by:
I'm using Jython and in the python script I do: from javax import swing result = javax.swing.JOptionPane.showInputDialog(wC, cmd,"Prompt from " + client.serverName, JOptionPane.PLAIN_MESSAGE) ...
1
by: Nandan | last post by:
hello, can I ask a jython question here? when I use the jython interpreter I have no problem with the statement: from java import lang from javax import swing but when I put this in a...
2
by: asj | last post by:
I have to honestly say I was flabbergasted by this report. Obviously, I have no problems asserting that Java is #1 in the enterprise (JEE), or in the mobile space (JME), and I do know it's made...
3
by: Nuwang | last post by:
Hai, I'm using a swing to connect database with swing application... 1. How this swing connect with access database... 2. Important thing is how change Button size and Font size Still I...
6
by: r035198x | last post by:
I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application. Most of the Swing tutorials that I have seen just...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.