473,785 Members | 2,736 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

From java packages to C# assemblies, how to redesign?

Hi

I am a new c# programmer since my project let java on the tablet to do
programming on windows. I was building an application all customized.
I had :
1. my own custom widgets (text areas, buttons, backgrounds).
2. what I called my components (group of widget ) ex: group of my
buttons to build a keypad
3. the main application instanciating a keypad that is draw in the
main window.

Each of these level was a package with different classes inside
extending java composite.

Or, in C#, the first level seems to be flushed, because the common
widget already have the custom features I added to my java version.
My problem is that I have some difficulties to imagine how to group
and rearrange my 3 levels from java to c#.

I have read on the subject, and it seems essential to have the
smallest winform application as possible, and use class library for
my components to have separate dll for each functionnalitie s. Is it
true?

More, suppose I already have my main application and a keypad
component in c#, is it preferable to draw the keypad on the main
window or popup a keypad in another window form? In fact, what I am
wondering is if it's possible to create a component with labels or
buttons inside but without winform and only display the positionned
buttons or labels in the main window?

Note I don't want use properties of winforms because I want it as
small as possible and I project use different skins for my
application.

A lot of questions that becomes quickly confusing... as my brain is
becoming :)

So please indicate me the "standard" if it exist or a prefered
solution or philosophy for a full custom application design.

Thanks
François

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 16 '05 #1
2 1524
Hello François,

You could create custom graphical classes and draw them onto a custom
control, or onto your main form. You need System.Drawing for that. However,
to get events and even to create a form you need a reference to
System.Windows. Forms. So the only reason for creating your own graphical
components would be for the custom gui and skinning. It would not be any
smaller in terms of referenced assemblies.

Here is an example of what I am talking about. The buttons, dials, back
panels are all custom graphical components:
http://weblogs.asp.net/frank_hileman...23/192509.aspx

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor
"Efkas" <fl**@rfranco-dot-ca.no-spam.invalid> wrote in message
news:41******** @Usenet.com...
Hi

I am a new c# programmer since my project let java on the tablet to do
programming on windows. I was building an application all customized.
I had :
1. my own custom widgets (text areas, buttons, backgrounds).
2. what I called my components (group of widget ) ex: group of my
buttons to build a keypad
3. the main application instanciating a keypad that is draw in the
main window.

Each of these level was a package with different classes inside
extending java composite.

Or, in C#, the first level seems to be flushed, because the common
widget already have the custom features I added to my java version.
My problem is that I have some difficulties to imagine how to group
and rearrange my 3 levels from java to c#.

I have read on the subject, and it seems essential to have the
smallest winform application as possible, and use class library for
my components to have separate dll for each functionnalitie s. Is it
true?

More, suppose I already have my main application and a keypad
component in c#, is it preferable to draw the keypad on the main
window or popup a keypad in another window form? In fact, what I am
wondering is if it's possible to create a component with labels or
buttons inside but without winform and only display the positionned
buttons or labels in the main window?

Note I don't want use properties of winforms because I want it as
small as possible and I project use different skins for my
application.

A lot of questions that becomes quickly confusing... as my brain is
becoming :)

So please indicate me the "standard" if it exist or a prefered
solution or philosophy for a full custom application design.

Thanks
François

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 16 '05 #2
Inline

--
-Philip Rieck
http://philiprieck.com/blog/

-
"Efkas" <fl**@rfranco-dot-ca.no-spam.invalid> wrote in message
news:41******** @Usenet.com...
I had :
1. my own custom widgets (text areas, buttons, backgrounds).
2. what I called my components (group of widget ) ex: group of my
buttons to build a keypad
3. the main application instanciating a keypad that is draw in the
main window.
...
I have read on the subject, and it seems essential to have the
smallest winform application as possible, and use class library for
my components to have separate dll for each functionnalitie s. Is it
true?
Well, "smallest winform application as possible" is not really essential.
Instead, look at it as a series of goals
1. Logically partition your application. This will not determine size,
content, or count of assemblies( a .dll or .exe is an assembly, in general)
2. Look for points of reuse. If you are going to write several applications
that will have common functionality, can you package up the common
functionality? Would you want to reuse these someday? Sometimes it helps to
write your components to be reusable, so as to reduce coupling. This will
help determine your assembly makeup.
3. Optimize your assembly makeup for load time / response time while
running, etc.

Instead of going in with the goal of "make my exe smaller", think in the
normal terms of functionality partitioning and reusability.
More, suppose I already have my main application and a keypad
component in c#, is it preferable to draw the keypad on the main
window or popup a keypad in another window form? In fact, what I am
wondering is if it's possible to create a component with labels or
buttons inside but without winform and only display the positionned
buttons or labels in the main window?

You can do any of the above. In general, if the component you are creating
is not a full form, it's best to create either a Control from it (derived
from Control or base control), or a composite UserControl (lighter weight
than a form, but allows you to use a visual designer to easily create
composite controls.) It sounds like what you want is a UserControl
Note I don't want use properties of winforms because I want it as
small as possible and I project use different skins for my
application.

If by this you mean that you don't want to have a titlebar, border,etc, no
problem. Use a UserControl (although you can get rid of these in a form as
well.)
Nov 16 '05 #3

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

Similar topics

4
9094
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the same port to change the direction of the robot. The trajectory frame is managed by an applet, and the project works good when the applet is called by a html document allocated in the same local machine under W98 where the classes and the serial port...
1
1381
by: Robert Maas, see http://tinyurl.com/uh3t | last post by:
According to an online manual: http://www.croczilla.com/~alex/reference/javascript_ref/packages.html#1193137 all the Java API packages in java.* and sun.* are available from JavaScript. There's fine online documentation for java.*, but I can't find any documentation for sun.* Does anybody know where to find such? Also just for Java, where's API documentation for com.sun.media.sound.* etc. which BeanShell's class browser shows me are...
10
2624
by: vivekian | last post by:
Hi , New to dot net and C# and was wondering what is the equivalent of a java package in dot net ? thanks, vivekian
10
2297
by: vivekian | last post by:
Hi , New to dot net and C# and was wondering what is the equivalent of a java package in dot net ? thanks, vivekian
0
9480
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10087
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.