MIDPS

12
T ECHNICAL U NIVERSITY OF M OLDOVA C OURSE NOTES Medii Interactive de Dezvoltare a Produselor Software Author: VASILICA VICTOR Supervisor: M. BALAN Wednesday 3 rd April, 2013

description

MIDPS

Transcript of MIDPS

Page 1: MIDPS

TECHNICAL UNIVERSITY OF MOLDOVA

COURSE NOTES

Medii Interactive de Dezvoltare aProduselor Software

Author:VASILICA VICTOR

Supervisor:M. BALAN

Wednesday 3rd April, 2013

Page 2: MIDPS

Contents

Lesson 1:Practical Principles of GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Lesson 2: Practical Principles of GUI(continuation) . . . . . . . . . . . . . . . . . . . . . 4

0.1 Program development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Lesson 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Lesson 4: Version Control Systems(VCS) . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Lesson 5: Evolution of IDEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

0.2 Classical IDEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80.3 Visual IDEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Lesson 6 : Case tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90.4 Characteristic of a case tool are . . . . . . . . . . . . . . . . . . . . . . . . . . 100.5 Case product generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

Lesson 7 :Java Platforming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110.6 Java SDK file structure : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110.7 Executable class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

1

Page 3: MIDPS

List of Theorems

0.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30.1 Definition (IDE—Integration Development Environment) . . . . . . . . . . . . . . 6

2

Page 4: MIDPS

Lesson 1: Practical Principles of GUIMonday 4th February, 2013

• The principle of user profiling:

1. know who your user is:

– what are user’s goals?– what are user’s experience?– what are user’s needs?

• The principle of metaphor:

1. borrow existing features from applications and systems familiar to your user;

2. position of the tools on the interface.

• The principle of feature exposure:

1. let the user know which feature are available.

• The principle of coherence:

1. the behavior of the program should be internally and externally consistent;

2. it must follow general rules.

• The principle of internal consistence:Means that the program behavior makes sense with respect to other parts of the

program

Example 0.1For example: if one attribute of an object is modi�ed using a pop-up menu, then it is tobe expected that other attributes of the object will also be editable in a similar way.

and the same will refer to any other object in the application. One should strike towardsthe principle of least surprise.

• The principle of state visualization changes and behavior:

1. Should be reflected in the appearance of the program.

One of the most important kind of state is the current selection, in other words, theobject or several objects will be affected by the following command. It is important thatit’s internal state will be visualized in a way ambiguous.

Example 0.2For example: One common mistake seen in multi-document editors is forgetting to diminactive docs or forgetting to dimResult of this is that a user looking at several windows at once, each one containing similarselection, will be confused about pressing the lead key,

3

Page 5: MIDPS

• The principle of shortcuts:

1. provides complete and abstract date of getting a task done.

• The principle of focus attract attention:

1. some aspects of the UI attract attention more than others do.

A human eye is not a linear device that’s why it is attracted more by some elementsthan the others. It is mostly attracted to highlighted or animated elements, that’s whyit is important to use different styles for the cursor and other styled elements which willsignal a number of different and useful state changes.

• The principle of grammar:

1. a user interface is a kind of language;

2. know what the rules are.

Many of the operations within a user interface require both: a subject(object to beoperated upon) and a verb (an operation to perform on the object).

The 2 most common grammars are know as:

1. action object;

2. object action.

Lesson 2: Practical Principles of GUI(continuation)Monday 11th February, 2013

• The principle of help:Understand the different kinds of health a user needs. There are 5 basic types of

health which correspond to 5 questions:

1. Goal oriented – "What kinds of things can I do with this program?"

2. Descripted – "What is this? What does this do?"

3. Prosigeral – "How do I do this?"

4. Interprety – "Why did this happen?"

5. Navigational – "Where am I?"

• The principle of safety:

1. Let the user develop confidence by providing a safety net.

It’s important for new users that they feel safe. They don’t trust themselves or theirskills to do the right thing. Many of this users think orally not only on their technicalskills but on they intellectual capabilities as well. In many cases this fears are groundlessbut they need to be addressed. Now this users need to be assured that they will beprotected against the own lack of skills. Are you sure ?(the dial box) and multilevel undofeatures are vital.

4

Page 6: MIDPS

At the same time an expert user must be able to use the application as a virtuoso.

• The principle of constant:

1. Limit user activity to one well-defined context unless there’s a good reason notto.

User action takes place within a given context — the current document, the currentselection, the current dial box It’s usually a good idea to avoid mixing this levels.

• The principles of aesthetics:

1. Create a program of beauty.

An interface example can be seen in the placement of buttons — imagine 5 buttonseach with 5 different labels that are almost the same size.

• The principle of user testing:

1. Recruit help in spotting bugs in yours design.

Having a group of users we perform the following steps:

– talk about and demonstrate the equipment in the room;

– explain how to think aloud;

– explain that will not provide help;

– describe the task and introduce the product;

– ask if there are any questions before you start, then begin the observation;

– conclude the observation, tell them what you found out and answerer all theirquestions.

• The principle of humanity:

1. Listen to what ordinary people have to say.

0.1 Program development

Generals

Software development based on the efficiency criteria leads to increase work productivity.Using software tools which assist the developer in creating food quality software in restrainterms and at lower costs. Initially all the efforts were concentrated in building tools for editing,compiling and debugging> Then this efforts was extended to other phases of software devel-opment. This way there a process of obligation of spare tools an a specialization in complexinstruments like ... products which would assist the software product developments. At differ-ent phases are used different tools as follows:

1. Analysis – case tools are used;

2. Design stage – we also use case tools;

3. Implementation – at this stage we use IDE’s, keys partially, version tools;

4. Testing and Debugging – here we use IDE’s and testing tools.

5

Page 7: MIDPS

Lesson 3Monday 18th February, 2013

Definition 0.1 (IDE—Integration Development Environment)An IDE(Integration Development Environment) is a software tool which a�ects a code and helpsthe developer to implement applications faster and in a more reliable way. �

An IDE is an aggregated tool consisting of several entities:

• Code editor;

• Compiler(Interpreter);

• Linker;

• Debugger.

Computer Aided Software Engineering – are tools which are used priorily as such steps asanalysis, design and some times for code generations

Software Spare Tools

This type of tools include strongly specialized applications for performing programming subactivities. This tools were prior to IDE development.There are 3 types of such tools:

1. programming tools;

• code editors – performs opening, editing, searching, replacing, auto-competitionand optionally highlighting.

• compilers – perform the transformation from the source code to object codeindicating syntactic errors. This tools place a cursor on the line were the erroroccur thus helping the developer.The compiler also provides features regarding op-timize compiling according to different criteria from hardware platforms to somenew standard versions.

• link additors – are used to obtain executables by linking the code subprogramsand libraries some times. Linker are called automatically and if they are run itmeans that the code had no errors.

• interpreters – directly and execute program source code.

• assemblers – allow the access to any hardware functions or operating systemsubroutines(primitives).

• preprocessors and precompilers – increase the portability of the programminglanguage.

• emulators – allow writing the instructions specific for another platform(softwareor hardware).

2. testing tools – are designed to partially automate the process of test;

6

Page 8: MIDPS

• capture and play tools – are tools which allow recording running of the pro-grams registering test to a script-file for a future analysis by repeating and compar-ing.

• automated testing tools – perform the same tasks as capture and play toolsbut writing the script-files automatically.

• test cover analysis – allow determining the parts of the code which were nottested yet.

• test cases generator – is a tool which automatically generates significant testcases based on requests data models and object models and other. The advantageof this tools is redundancy elimination.

• test data generation – are tools which populate different forms, data bases andothers for cd

• logical complexity analyzer – many such tools offer the graphical representa-tion of the possible paths in code structure .

• error tracing tools – allow management of the information related to errorsand their correction stage as well as data centralization to follow the tendency ofthe path .

• testing management tools – assists scheduling and organization of testing ele-ments such as script files , test cases and results .

Lesson 4: Version Control Systems(VCS)Monday 25th February, 2013

At the stage of implementation, tools that control and manage the teamwork in your projectand its versions can be used .

Version management process has to assure the consistent work with program building ele-ments like : source code files, binary files , executables and documents.

The need for such management is obvious for medium and large projects where a largenumber of so called artifacts is continuously modified by more developers .

At the individual level of development, management comprises evidence and successivearchiving of the files , with the possibility of previous version access. Thus the developer canidentify the modifications which could lead to errors .

At a teamwork level ,version management is extended to centralized file management to al-low developers to use the newest validated version . Simultaneous work management assuresfile consistency when these are modified simultaneously by more team members . This is doneby granting access only to 1 file, then integrating the changes into that file with specificationsof the conflict zones modified by more than one developer .

Versioning tools are usually built around a repository which contains successive versionsof the files of one or more projects . The operations used with such a tool are :

• CheckoutThe extraction of the file from a repository with the intention of changing it .

• CheckinUpdating the modified file together with differences analysis and merging and highlight-ing zones

7

Page 9: MIDPS

•Examples of Version management tools : Rational clear case , Microsoft visual source save

, CVS(concurrent version system ) , SVN , GIT , MercurialMost of the VCS tools contain also configuration management . Such features are included

also in some case tools another option being integrating case tools with VCS tools .GIT advantages

• Distributed nature with advantage of multiple redundant repositories and branch-ing .

• Access control .

You decide when , what and from whom will be merged a branch .

• Branch handling

Every developer’s working directory is a branch

• Performance and smaller space requirements

• Line ending conversion

•SVN advantages

• User interface maturity

• Single repository

Little doubt about where something is stored

• Access controls

Specify access rights for a single location

• Binary files

Git interprets by default every file as binary while SVN doesn’t

• Partial checkout

With SVN you can checkout only a subdirectory which is not possible with git (thoughthere are some other ways to work with this in git)

• Shorter and predictable revision numbers

SVN assigns revision numbers starting form 1 to , while git uses SHA1

• Ability to represent richer histories (meh...)

Lesson 5: Evolution of IDEs

0.2 Classical IDEsContain:Editor , compiler , linker , debugger .

Classical IDEs were built for specific programming language .Debugging is done by :

• Setting break points

• Step by step execution with the possibility to pas through subprograms

8

Page 10: MIDPS

• Stepping over

• Inspecting variables content (Watch)

0.3 Visual IDEsThey are an evolution (of dance) of IDEs assisting the programmer in creating graphical inter-faces for the applications .

The term Visual Programming refers to application coding from its user interface .Visual programming refers to programming beginning with the visual interface which is

designed intuitively . This has the effect of automatically writing the code for creating visualelements and source files.

The aim of these environments is to save the programmer from writing specific code for theGUI letting him concentrate more on the functionality of the app . Visual IDEs also includeunary management of the files in the projects . A project file is created as well as a workingdirectory . A lot of files related to that project are stored there and managed by the IDE whenthe project is open for editing . Under one project there could be : source files, libraries andother ...

The programs realized by this programming environment are built according to the eventdriven principles .

In classics IDEs follow a procedural paradigm when the code is executed sequentially anevent driven programming supposes writing the code for handling the events generated byusers actions of the graphical interface .

Nowadays there are well known IDEs which provide us with the possibility of choosing theprogramming language from several . Example:

• Microsoft Visual Studios : C++,managed C,C#,J#,F#,visual basic

• Net Beans(based on Sun 1 community edition): Java, C++,C

• Builder:C,C++,Delphi

• Rad Studio

• Eclipse:Python ,C++,Java,C

•>

Lesson 6: Case ToolsMonday 4th March,2013

The term CASE represents a collection of methods , tools and processes for software en-gineering and programming . The term was introduced in 1987 to stand for software devel-opment using tools that put cover .... .... .... .... and wold provide features for graphicalrepresentation used mainly in analysis ................

Nowadays a case product supports one or more analysis or design methods , automating ata larger scale the activities performed at a larger ............... and assisting partially or totally inthe life-cycle activities of the software .

9

Page 11: MIDPS

Nowadays case comprises the usage of software tools which would help at all the stage ofthe development cycle, starting with analysis → code automation .

Practically it can be considered an extension of the previous instruments which serve forcoding stage and previous project development cases . Obviously case technology as well assoftware design methodology assisted by it are useful in software system development , largescale application package and ...... ....... ......

0.4 Characteristic of a case tool are1. Must offer powerful graphical tools to document and describe the system

2. Must be integrated to offer easy data transfer between components .

3. Must store the information referred to the software in a computerized warehouseallowing access to it for all team members.

4. Must be reusable for new systems , apps and program development.

5. Must allow easy GUI creation and expanding interaction with the final user.

6. Must assure app development in high level programming languages .

7.

•The performance of case environment ......... was built on the elements previously described

in a continuous process of evolution . The importance and advantage of case can be summed tothe following :

• Decrease app and project development time

• Assures quality of project and increases reliance on it .

• Assists each step realization , therefore improving quality of the development pro-cess .

• Software development is performed according to some methodology which specifiesthe size of the development stages , the contents and output of each stage differentiatedby the type of project or its field .

• Obtaining a complete definition specification .

• Accuracy of design and development specifications , gaining the possibility of easyfuture development and maintenance of the software .

0.5 Case product generationFirst generation of case included features for different stages of traditional life-cycle in theform of tools usually for strategically planning the system , analysis stage , modeling stageand code generations .

The first generation of case is characterized by a large amount of data processed by thesystem . Next .... ?????

10

Page 12: MIDPS

Lesson 7: Java PlatformingMonday 11th March,2013

Java technology → Platform independent , object oriented , multi-threaded programmingenvironment .

Java fully realizes the platform concept .Programs written in Java and using Java libraries are based solely on the Java platform

tools and they don’t depend on the OS they run on .Java VM is a program which interprets and runs Java byte code .Java sources are contained in files with Java extensions .The program which translates Java source code in byte code is called Javac .The program that runs the byte code is called java.exe .The program translated into byte code has the extension .class .To run a java program java interpreter is called with the name of the class .Java 2 SDK . The environment for running java apps is called jre (java runtime environ-

ment ).JRE contains the realizations of the virtual java machine for the specific OS .The basic

development environment for java apps is called Java SDK .The environment contains a standard set of utilities for the developer.Java 2 SDK includes Java environment for running programs .

0.6 Java SDK file structure :• Root folder contains license agreement and a brief description of the system . It also

contains the source code archive .

• Bin folder contains the developer tools . It contains byte compiler javac and inter-preter java .

• LIB folder contains a set of standard java libs.

• Include contains files which allow interaction with C language programs using javanative interface tech .

• JRE is a folder that contains the jre realization .

Under jre there’s another bin with a set of execs and dlls.

0.7 Executable classAn exec class mandatory contains a main method which is the entry point of the app.

The main method gets a set of strings which are command line arguments.Compiling the fileFor translating the program in byte code the full name must be specified including the

extension because this name describes the path to the source .If javac exec is run without parameters it will print a list of possible parameters with brief

explanation .

11