Wednesday, December 21, 2005

GUI designers

I personally prefer GUI coding from scratch.Yes,there is simpler wayes to do it.
For example when there are nice GUI designers like
NetBeans or JBuilder for Java and Boa-Constructor for Python ,
why I Code from scratch?
This is my reply....CONTROL....and more control...
You know , I've already understand this concept !!! Control over what you need to do.
PLease let me to explain more:
When you use designers the unwantedMacros will produce.
This is not disadvantage at all but THAT's not
what you NEED as well....You have to accept them because you
restricted in the preCoded macroes . It may be not honey you realy want !!
On the other side,it's not so time consuming you maybe think :)
With WxPython tha't just 5 or 6 line code to make an frame and
less than 20 line to add panels and menu !check it out(by DevShed magazine):
**************CUT HERE*************************
# Here we import wxPython:
from wxPython.wx import *
# Before we create anything, we must create an "App" object:
application = wxPySimpleApp()
# Now we create the dialog:
dialog = wxTextEntryDialog ( None, 'Enter some text:', 'Title Here', 'Default text here.' )
# If the user presses, "OK", print the value.
#Otherwise, print another message.
if dialog.ShowModal() == wxID_OK:
print dialog.GetValue()
else:
print 'You did not push the "OK" button.'
# Destroy the dialog
dialog.Destroy()
***********CUT HERE*************************
As you see this is all thing you need to make an javascript like Prompt order to get text from end user . or in Java Swing :
***********CUT HERE************************
import java.lang.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class SimpleGui1 {
public static void main(String args[]) {
JButton btn = new JButton("Click Me!");
btn.setMnemonic(KeyEvent.VK_C); // Now you can hit the button with Alt-C
JPanel pane = new JPanel(new FlowLayout());
pane.add(btn); // Add the button to the pane
// Now for the frame
JFrame fr = new JFrame();
fr.setContentPane(pane);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fr.setLocation(200, 200);
fr.pack();
fr.setVisible(true);
}
}
***************CUT HERE**************
humm,NICE , isn't it?control over the code GUI!! it's like cool dream.
Throw the designers on garbage pail and FLY....

1 comment:

Anonymous said...

good...
But designer sare grate for Fast development.I mean Bussiness point of view.