I wanted to move above methods outside this class, so that they can be used elsewhere in a functionality such as Undo/Redo which will create/delete an employee using AddEmployee/RemoveEmployee methods.
There's usually no undo/redo on the database-level. Check out the Memento-pattern, you'll see that it'd be a bit work to implement correctly.
One solution is to move those methods to a helper which i don't feel to be appropiate as I need to pass all the dependencies of AddEmployee() method as a parameter. Other solution can be to create a separate class to which will perform all the operations and keep the dependencies.
What dependencies? FWIW, I'd put it in a separate class, which would be embedded in the UserControl. Similar to;
class MyControl: UserControl
class MyControlHelper: object
Referring from the UC to the helper-class, is like creating a mini-DAL for your control; all IO is situated in that class. The biggest advantage is that you could write another MyControlHelper-implementation (for say, supporting another database like Oracle or Sqlite) and hook it in there.
Which parameters would you be passing? The way I see it, you'd minimal pass an Employee object. Perhaps a ConnectionString, but that'd be it. If you want to prevent writing a long signature (lot's o' params), then wrap them in their own object (like MyControlHelperAddEmployeeArgs).
Is it correct to show the database table in class? I have a class diagram that has objects that save records to a database. So i don't know whether i should show the database table in the class diagram or not. If not allowed then how can I show the relationship between the object and a database? That is how do map objects to a database?
So i don't know whether i should show the database table in the class diagram or not.
Probably not. Instead you would have a object data model diagram.
However if the project is small enough such that there is only one or two diagrams and only a couple of tables then yes that is ok. However you need to make it clear that that they are data objects rather than class objects.
You seem to be describing Table Data Gateway pattern (Fowler, Patterns of Enterprise Application Architecture). This class inserts or updates records in a particular table. The convention is to name the class after that table. e.g. The class that updates rows in User table is called UserGateway (or simply User).
Hence, the association between the class (which contains code in C++/C#/Java language to update the table) and the table is described by the name itself. There is no need to explicity show the relationship.
However, there is no restriction to show tables in a class diagram. For example, you may want to describe database schema in UML. All you need is to create a new stereotype, e.g. <>. This stereotyped class can then represent database tables.
I'm very new to all this. I'm learning a lot however I feel like there are certain fundamental concepts that I'm not understadning and that is holding me back. Right now, what I really don't understand is how files containing programs and directories on my operating system work.
On my Windows operating system, It seems like whenever I download something new it goes to a file called C:\Program Files. Each file in there will have a lot of little files named bin, lib, include, db, and other things like that. All of THOSE file have files with extensions .dll and .exe. What are these?? Why cant i open them? How do they all work together to produce a single functioning program?
When a computer program is executed how does it know what files to read, where to look for them, what to do with them and so forth?
Can anyone explain this to me?
Thank you very much in advance
That's rather a long question for a forum like this. Files (which usually have extensions) are held in directories, which may themselves be held in directories. Directories are generally now referred to as folders. Think of it as a set of filing cabinets. Each cabinet has drawers and each drawer has sections, and within each section are individual documents. When you click on a file the shell knows what to do with it by looking up the extension name in a table. So a file with a .exe extension is sent to the program loader and starts running as an independent program. A file with the .doc extension causes the loading of a program that can process it (probably Microsoft Word), and so on.
I think that they are well documented and despite that, still poorly understood. Guess I'm not really understanding the question here.
There's examples on authentication, which is what most customers refer to as security. OTOH, you'd also want to limit the number of consecutive requests, prohibit malformed requests, and log everything that seems "out of the ordinary".
If the communication needs to be 2-way then I would suggest that each system (you seem to be describing 2 but there could be more) have its own private output file which is read by the other(s). Each system writes its 'output' info to the file which would be seen as 'input' to the other(s). This avoids problems with 2 or more programs trying to write to the same file.
I have created a nice desktop application and I have no time (or money) to port it to metro. The good thing is that windows marketplace is selling desktop application too. Do you know the procedure and the cost of money that is needed to publish such a desktop application to windows 8 marketplace?
Do you know the procedure and the cost of money that is needed to publish such a desktop application to windows 8 marketplace?
No idea on the cost, but the procedure is here[^]. There are two types of accounts that you can create, a "individual" and a "company" account. Docs say that only the company-account supports the old desktop.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]