Hello all, Anyone willing to discuss the Objects and classes for the following JFC Swing front end, Database Server backend application. Objective: Design an Application that you can use to Administer the Menu System of an intranet application. This can be done through manipulating the tables in the backend database server. DATABASE: 1. The back end database will have four tables related to menu system. MENU_GROUPS, MENUS, MENU_ITEMS, USERS MENU_GROUPS: This table has the names of the various menu groups, for example, HR group, Sales group MENUS: This table has the names of various menus and their parent menus. Also the menu group this menu is part of. So the information in this table lends itself to a JTree structure. MENU_ITEMS: This is the table which hold the different Items which and link them to the various Menus. This table lends itself to a JTable structure on the user interface. USERS: This table just holds the username and password, required to execute this Menu Administration System (MAS) Application. 2. These tables can reside in different DBMS, starting with mySQL, MS-SQL 7.0 and Oracle 8x. USER INTERFACE: 1. One login dialog screen, which will just verify a username and password the USERS table. 2. One main user screen which will have 3 panels. The first panel will have a JTree component which will show: * at the root a list of Menu Groups from the Menu Group table. * Expanded each of these groups will list the Menus and Sub Menus. * Each of the Menus and Sub Menus may hold the various Menu Items as leaf items of the JTree. One should be able to add Menu Groups, Add Menus to groups, Add Items to Menus from the 2nd panel and clone entire Menu groups. The second panel will hold in a JTable the list of Menu Items. These menu items may be dragged to the JTree in the first panel to add them the various Menus and Sub Menus. The third and final panel will just receive system messages, including database error messages. If anyone can discuss the general classes needed to have a robust object oriented design?? For example it seems to me that each the tables will have class that will implement the TableModel or TreeModel. However should I make interfaces for a generic table first? Given this system will need to access various backend databases, should I make a DataSource interface first. A class what would implement the various common methods and then subclass this class specific to the different dbms, forexample a mySQLDataSource, OracleDataSource etc? I will try to put my final design here, if I can finish it. thanks all zulfiqar
I am not very clear about the objecttive of the application. Do you want to show the entitled items in a tree for each user?
Joined: Oct 18, 2000
Hi, thank you for reply. The first panel would have a JTree. The root of the Tree will list all the available Menu Groups from the Menu_groups table. For example HR Group, Sales Group. If you expand the root of the JTree, you will get all the Menus associated with a Menu_Group, from the Menus table. The Menu table links each Menu to a Menu Group. Since Menus can have sub menus, this table also links each Menu to a parent menu (if it has a parent menu). Each Menu will have a list of Menu Items from the Menu_Items table. The database Schema is the following: Table: Menu_Groups Fields: Menu_Group_Name Table: Menus Fields: Menu_Name, Parent_Menu, Menu_Group_Name Table: Menu_Items Fields: Menu_Items_Name, Menu_Name, Menu_Group_Name Table: Users Fields: UserName, Password The application Interface might look the like the following:
In the above ASCII sketch .. I have the standard Swing JMenu on top. We dont have to worry about this one. The first panel has the expandable JTree The 2nd Panel has the JTable. The 3rd Panel just shows system messages. I hope this makes it more clear.
[This message has been edited by zulfiqar raza (edited March 01, 2001).]
Joined: Dec 20, 2000
Basically, this may a navigation system if I was not wrong. If you are going to use swing, JTree classes should be used as a basic framework. Of course you will need a lot of support classes. IMHO, these of following should be considered:
User Permission Authenticator ConnectionManager Item Menu Since you request to give user the ability to modify the tree, I think this may indicate you could have user to modify the data table. In this case, objects should be considered to match the each table role.
subject: Discussion on the various classes needed for an Application --- Anyone?