Wednesday, June 5, 2019

Project Design for IPMS

Project Design for IPMS1. Scope Statement.In order to develop an effective toil for IPMS within 12 weeks with limited cost using limited resources provided by Whitireia using IPMS to monitor and handle software package companys projects, roles, employee information, skill level and measuretables for its lymph gland and third party1.1 Functional requirement1. To everybody nominate spend the IPMS well, they must can create at least four kind of roles in the formation, one is the administrator, who can chief(prenominal)tain the system the second is average employee who can login to update details, the third is project handler, the fourth is project team instalment. Each employee has only one unique employee ID.2. IPMS must can add, update and expect the project, and the project omnibus can assign for each one task to available employee. And the project jitney can add, delete, update and search employees.3. The employee must put on a job code, job title and other details such as the date to commence, hourly rate etc.4. IPMS can let project manager add new job titles and details. And add new client.5. The system must be able to depute who responsible to each different tasks6. The program manager and the team member must can be bell ringer the discover card, and they must be able to fill daily record and time sheet.8. The clients must be able to check the projects time sheet.9. The team member must be able to show the test result, and fix them.10. The project must be show the project details.1.2 Non-Functional Requirement (Optional Req)User may or could1. IPMS should add more skill levels, or delete.2. E.g. DB storage3. Upgrades/ Maintenance4. Reliability5. Scalability1.3 Technical Requirements software OS-Windows 10, Visual Studio 2015, SQL Server 2014, Visio 2016, Word 2016, Excel2016, Languages C.Hardware CPU, Ram, Disk, Mainboard, MainBox2. Case diagram.3. IPMSs purport kin details4. Ten Questions.4.1 Interface and Inherited.InterfaceThe int erface is a special abstract class it cannot be instantiated, the same as abstract class (because it contains abstract members, and abstract members do not contain method body). When you loss to declare the interface, C required you to use the Interface keyword, the same as class.There is no knowledge domains in the interface, so it is not possible to externaliseate explicit attri hardlyes in the interface. If you want to inherited interfaces, you must implement all the abstract members of the interface. And in inheritance class, no need to use the override keyword in interface members realization. And you must keep the same sign to achieve the interface. The different between abstract class and interface are you can find the evoke class when you use the abstract class, and hope the parent class inherited to some subclass members. If you use interface, it is a purely to achieve the norms of the class.In this project, it can use the interface in bring out, like print the invoic e, just getInvoice(), because use print interface, or getReport(), then use print interface. That mean it can print everything. Just print.InheritedInheritance allows us to define another class based on a class, which makes it easier to create and maintain an application. It also conducive to reprocess code and save development time.When creating a class, the programmer does not need to completely rewrite the new data members and member functions, only need to rule a new class, inherited the existing members of the class can be. This existing class is called the base class, and this new class is called the derived class.C only supports single inheritance, that performer a category can only inherit from a parent class. But we can use interfaces to implement multiple inheritance.In this system, the project manager can look as the employees subclass, and inherited all the attribution from the employees.4.2 PolymorphismPolymorphism means that the sender of a stimulus does not need to distinguish the receiving instances class. The receiving instance can be login to an arbitrary class. Object-Oriented Software Engineering A Use Case Driven Approach page 55.In polymorphism, sender doesnt develop the meaning of a message or final result or stimulus, it is explained by the recipient (the object that received the message). So, in the runtime if the recipient is changed to different object or instance, the system ordain change the behavior.In this system, if we need to calculate each employees wage, different kind of employee has different salary, but they all need to calculate wage, here(predicate) the procedure (calculate wage) is same, but each employee has different result way to do it, it depends on the Runtime().Iemployee list= getAll employee()For(i=0 list.length, i++)listi.calculatewage()4.3 Event Handlers and Delegate.Delegate has the reference-safe, secure managed feature to witness that the delegate points to the existing function (method), if the delegate has not stored any way to call, the CLR will throw an exception. More precisely Delegate is a special lineament of C , employ to define the method / function of the signature, delegate entity (instance) can store one or more method with signature.It need 4 travel to declare a delegate declare, create, point and invoke.To declare an event within a class, you must first declare the delegate type for the event.delegate subsequently(prenominal) the class declares an event, the event can be processed as if it were processing the field of the delegate type indicated. If no client will be entrusted with the event, the field will be empty Otherwise the field references the delegate that should be called when the event is called. Therefore, when the event is called, it is usually checked whether it is empty, and then call the event.From the context of declaring events, the event is like a field, but access to that field is very restricted. Only can do the pursualWrite a new delegate on this field.Removes a delegate from a field (possibly a compound field).Use the + = and = operators to do this.To start receiving an event call, first creates a delegate of the event type in the client coding, which should be referenced from the event call.Then it uses + = to write the delegate to any other delegate that the event may connect to.When the client coding completes the receive event call, it will use the operator = to remove its delegate from the event.There are three handlers in my design for the IPMS. They are login handler, print invoice handler, print report handler, and fix handler. unrestricted class ProjectmanagerAApublic static ward off PintReport() //Print the project reportpublic static void PintInvoice() //Print the Invoice of the project.class Teammember public delegate void PintReportEventHandler() public static void Main(string args) PintReportEventHandler printDelegate = new PintReportEventHandler(ProjectmanagerAA.PintReport) printDelegate += ProjectmanagerAA.PintInvoice printDelegate() Console.ReadKey() 4.4 Controller classThe controller class happened in MVC software architecture model, and MVC is one of the architectural pattern. That means the IPMS system is divided into three core parts model, View, Controller.View is provided to the users user interface, is the program shell.Model is the core of the data layer, that is, the program needs to operate the data or information.Controller is responsible for the user from the view layer input instructions, select the data layer in the data, and then its corresponding operation, produce in the result.From the design class, I added many methods and events in the controller, if changed some code out of the controller, there is no effect to the controller. It can protect the algorithm in the controller. Then I can utilise the code easily. The controller can increase maintenance, scalability, and flexibility of the program. It better for testing. The code hierarchy is cl ear. They are through subclasses to complete the operation.The details in controlleraddEmployee()updateEmployee()delEmployee()searchEmployee()getEmployeeInfo()settingAndAssigning()addclient()addProject()updateProject()closeProject()getProject()searchProject()addTask()updateTask()delTask()getTask()searchTask()getInvoice()getReport()print()4.5 Design praxis(s)I chose the following design patterns when I design it, but it very difficult for me to draw all of them in the design class, I will try to used them all in the system.1) Template manner jell the skeleton of an algorithm in operation, and delay some steps into subclasses. Template Method makes it possible for subclasses to redefine some of the limited steps of the algorithm without ever-changing the structure of an algorithm. - design pattern GOF.If we need to simply read the Employee database records and display the table. For database operations, we know that no matter which table to read, it should generally go through the following steps1. Connect to the database (Connect)2. Execute the query command (Select)3. Display data4. Disconnect the database connection (Disconnect)These steps are fixed, but the query for each specific data table is not the same. Obviously, this requires an abstract role that gives top-level implementation. As shown belowpublic abstract class DataAccessObject protected string connectionString protected DataSet dataSet protected practical(prenominal) void Connect() connectionString = Server=.User Id=saPassword=Database=Northwind protected abstract void Select() protected abstract void Display() protected virtual void Disconnect() connectionString = // The Template Method public void Run() Connect() Select() Display() Disconnect() Obviously in this framework DataAccessObject gives a fixed outline, the method Run() is the template method, Template Method model also hence the name. And for the Select() and Display() these two abstract methods are left to the specific sub- class to achieve.2) Command Pattern The Command pattern encapsulates the command, separating the responsibility of the commander and the responsibility of the commander. We know that a class is a set of operations and the corresponding set of variables.3) Observer Pattern it can be used in the task class, once a task completed, via commentator pattern to notify the project manager and project team and showing the team member is available, then project manager can give the member a new task.4) Chain of Responsibility Pattern let multiple objects have the opportunity to handle the request, thereby avoiding the coupling between the sender and the telephone receiver of the request. Connect these objects into a chain, and pass the request along the chain, until there is an object to deal with it so far.This happened when the project manager assign the tasks to the project member.5) Strategy Pattern Define a system of algorithms that encapsulate them one by one and make them replace eac h other. This mode allows the algorithm to change independently of the customer who uses it. design pattern GOF.It used in our controller class, we protect all the algorithm in the controller, and we give it an interface to access.6) State Pattern We have to have the state pattern, Objects have different states and tend to exercise different behaviors. We have many spatial relation need to record in this system, employees status, project status, task status etc. and the handler is a typical state pattern.7) Singleton Pattern used in Invoice, each project has only one Invoice.8) Prototype Pattern used to isolate the coupling between the user of the class object and the specific type (variable class) which also requires this some variable classes have stable interfaces. It is used in the system, like the controller.9) Facade Pattern In the software development system, the use of Facade Pattern simplifies the simplification of the interaction between the client and the subsystem. De coupling the dependencies between the inside subsystems of the complex system and the client program. In this system, it can be used in project manager, the project manager need to deal with lots of work for the project team and the project.10) Proxy Pattern is used here like the interface class.4.6 DatabaseADO.NETADO.NET has three database client namespaces one for SQL Server, another for Open Database Connectivity (ODBC) data sources and a third for any database exposed through OLE DB. Data-sharing consumer applications can use ADO.NET to connect to data sources and retrieve, manipulate, and update data.Connect database code connectionString=Data Source=.SQLEXPRESSAttachDbFilename=DataDirectoryBooks.mdfIntegrated certificate=TrueConnect Timeout=30User Instance=True providerName=System.Data.SqlClient / 4.7 Some Ways to Generate ReportsCreate a report view, and create a report structure. And call the details (such as project code, client details, the project start date, end da te, the project status, budgets, and employee assigned) from the database. And the report must be able to create each tasks detail report. We can use handler here.It should mention who can create the report directly and who can see the report. using SystemLocal Reports LocalReport report = new LocalReport() DataTable dtable1 = rdlcbiz.Get_tj_sqdlx_hd(tjr, tjs) DataTable dtable2 = rdlcbiz.Get_v_tj_tjdjb(tjr, tjs) report.ReportPath = Application.StartupPath + /rcreport/Report.rdlc report.EnableExternalImages = true ReportParameter r1 = new ReportParameter(tjs, str_tjdw) ReportParameter r2 = new ReportParameter(barcode, str_path) report.DataSources.Clear() report.SetParameters(new ReportParameter r1, r2 )ReportDataSource(PEISDataSethd, dtable1)) report.DataSources.Add(new ReportDataSource(PEISDataSethd, dtable1)) report.DataSources.Add(new ReportDataSource(PEISDataSetjb, dtable2)) RdlcPrintNew rdlcprint = new RdlcPrintNew() rdlcprint.Run(report, Report Name, false, A4)The above code i s when I click to print a report, call a method. in spite of appearance rdlcprint.Run (report, report name , false, A4) this method can be transferred to the hardware printer. The principle is use LocalReport class to design the report, and store it on the local then tight in the parameters and data sources in the report to the specified report call rdlcprint.Run (report, report name , False, A4) to achieve printing.CrystalReportsThe CrystalReportViewer control allows you to view Crystal Reports in your application. The ReportSource attribute is used to set which report to view. After the property is set, the report is displayed in the viewer. The report source can be either the ReportDocument, the path to the report file, or the strongly typed report. In this system, we can create report from ADO.NET datasetusing Systemusing System.Windows.Formsusing CrystalDecisions.CrystalReports.Engineusing CrystalDecisions.Sharednamespace WindowsApplication1 public partial class Form1 Form public Form1() InitializeComponent() private void button1_Click(object sender, EventArgs e) ReportDocument cryRpt = new ReportDocument() cryRpt.Load(PUT CRYSTAL REPORT PATH HERECrystalReport1.rpt) TableLogOnInfos crtableLogoninfos = new TableLogOnInfos() TableLogOnInfo crtableLogoninfo = new TableLogOnInfo() ConnectionInfo crConnectionInfo = new ConnectionInfo() Tables CrTables crConnectionInfo.ServerName = YOUR SERVERNAME crConnectionInfo.DatabaseName = DATABASE NAME crConnectionInfo.UserID = USERID crConnectionInfo.Password = PASSWORD CrTables = cryRpt.Database.Tables foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables) crtableLogoninfo = CrTable.LogOnInfo crtableLogoninfo.ConnectionInfo = crConnectionInfo CrTable.ApplyLogOnInfo(crtableLogoninfo) cryRpt.Refresh() cryRpt.PrintToPrinter(2, true, 1, 2) 4.8 TestingClassification of software testingAccording to the testing process (development stage), the software testing is divided into the following catego riesUnit Testing Its known as module testing, software design is the smallest unit testing the program module for the correctness of the test work.Integration Testing its known as assembly test, according to the design requirements, assemble modules for testing, the main goal is to find the interface-related issues.Confirm testing Verify that the function and performance of the software and other features are consistent with the users requirements.System testing it is carried out after the integration test, the purpose is to fully run the system to verify whether the subsystems can work properly and complete the design requirements.Acceptance Testing user-oriented, developers to participate in the test to the specifications for the model.The testing procedure as follows4.9 Additional FunctionThis system has a lot of features, if it also can add HR to manage the supply and calculate the salary, it should be betterIf we can set the completion date and time for this project, when you log in the system, the message window will show the countdown time for the project team member to remind them to obey the time wellEach task can be automatically assigned to the free project members, when a task is clicked at the end of the time, the system will automatically test it, find out the problem and solve itAfter repaired the problem then click the button to notify all the relevant personnel of this task has been completed and so on.4.10 For Growing RequirementsDevelopment principlesThe design should be open when the design to adapt to change Database design should be standardized Design framework should also be standardized, standardized system and documents have significance significant for system upgrade and maintenance To unify the development process when system planning.Development and change, information technology with each passing day, the internal and external environment of enterprises will be changed, which requires us to re-develop the time to focus on the sc alability of the system to meet the changing needs of enterprises.And we should use the modular structure, object-oriented technology, middleware technology and other software reuse technology for the growing requirements.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.