1 / 26

Analysis and Design of Software Systems Practical Session 01 System Layering

Analysis and Design of Software Systems Practical Session 01 System Layering. Outline. Course Overview Course Objectives Computer Science vs. Software Engineering Layered Architectures Selected topics in Java Swing Parsing XML file. Course Objectives.

milton
Télécharger la présentation

Analysis and Design of Software Systems Practical Session 01 System Layering

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Analysis and Design of Software SystemsPractical Session 01System Layering

  2. Outline • Course Overview • Course Objectives • Computer Science vs. Software Engineering • Layered Architectures • Selected topics in Java • Swing • Parsing XML file

  3. Course Objectives • Planning a new Information System in Engineering methods. One assignment (5%) • Functional Approach for A&D Two assignments, 5% each • Object-Oriented Approach for A&D Two assignments, 5% each A total of 5 assignments consisting 25% of the course’s grade. Test consisting 75% of your grade, OPEN MATERIAL! Please study accordingly. E2 3 E1

  4. Administration My email is guyrap@cs.bgu.ac.il . Use it! Office Hours: Wednesday, 16:00-18:00, 37/304. Assignments are submitted electronically to FTP, in pairs! Please report problems with submission dates as early as possible (that includes students with reservoir duties). Reservoir soldiers – I need your release slips, not the “invitations”. E2 3 E1

  5. Computer Science stops here. • “Computer science is no more about computers than astronomy is about telescopes, biology is about microscopes or chemistry is about beakers and test tubes. Science is not about tools, it is about how we use them and what we find out when we do." • This quote is actually from Fellows, M.R., and Parberry, I., "SIGACT trying to get children excited about CS", January 1993, Computing Research News. • Focus is often about algorithms – independent of a particular programming language (or implementation at all…).

  6. Software Engineering starts here. • Software Engineering (SE) is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software… • It is also defined as a systematic approach to the analysis, design, assessment, implementation, test, maintenance and reengineering of software, that is, the application of engineering to software. • The term software engineering first appeared in 1968, and was meant to provoke thought regarding the perceived "software crisis" at the time. • Recommended Viewing:Glenn Vanderburg’s – “Real Software Engineering” confreaks.net/videos/282-lsrc2010-real-software-engineering

  7. Example CS Problem: • Narrow-Shallow-Low-Light Trees with and without Steiner Points • Michal Elkin, Shay Solomon • SODA'11 Best Student Paper Award, 2011!

  8. Example SE Problem: • Your senior programmer Alice has called-in sick today. • How do you keep the project’s progress? • …And without introducing new errors into the system? • Software Engineering occurs when people meet programming..

  9. That does not mean people do both… • Of course there are computer scientists who consider the engineering side and software engineers who consider the algorithmic side. • But in our course we shall focus mainly on engineering. • Let’s move on to our first example of applying an engineering concept unto software development.

  10. System Architecture • Architecture • High level design of large software systems. • Captures the gross structure of a system. • Defines software system in terms of components and interactions among those components. • Why not write all of our code in a single file? • Programmer-friendliness – Code readability • Flexibility – edit or replace parts of the code currently in use. • What can we do to further pursue the above objectives?

  11. Introducing: Layered Systems • A layered system is organized hierarchically; each layer provides services to the layer above it and consumes services from the layer below it. • Why layers??? • Modularity: • Separations of concerns • Increased maintainability • In a pure layered system: Layers are hidden to all except adjacent layers.

  12. Layered Systems (Cont.) • In a pure layered system: Layers are hidden to all except adjacent layers. Pure layered system Not pure layered system

  13. NOTLayered Systems • There is more to layers than the ability to draw separate parts on top of each other. • Layers are not a function of just who-uses-what, but are the result of a conscious design decision that allocates software to layers based on considerations such as coupling, cohesion, and likelihood of changes.

  14. The Three Layers Architecture • On the left: an example implementation of a system devoted to sales. • Presentation can be GUI, CLI, forms in a browser… • Some people distinguish the middle layer into Application Layer (Controller layer – queries, UI hooks, etc.) and Domain Layer (Business Logic – data classes, algorithms). • Data layer can be XML, SQL, Mnesia, etc…

  15. Presentation (GUI) Layer • Contains the software components responsible for presenting the user with an application interface, which reasonably facilitates interaction of the user with the software product. • Which tools are you familiar with?

  16. Introducing: NetBeans IDE • NetBeans is a Java Integrated Development Environment which supports building GUI environments in a very programmer-friendly manner, utilizing SWING. • NetBeans employs the “GUI that builds a GUI” work environment. • Unlike in OOP, in this course we expect you to create a Functional GUI but do not emphasize writing it ‘by hand’. • If this is the first time you’re writing Java GUI, this might help you a lot. • Final project will demand GUI. • http://www.netbeans.org

  17. Domain Logic Layer (Application or Business Logic Layer) • Provides the services that implement the functionality offered by the application. • This layer is the heart of the system (application). • During this course we will further elaborate on this layer. • The development process in this course is focused on this layer.

  18. Persistence layer • Provides the services required to ensure the persistence of the data involved in the execution of the application. • We will use Extensible Markup Language (XML). • Why?

  19. Why XML? • Plain text document indicating an order for 12 Birdsong Clocks, SKU 244:

  20. Why XML?(cont.) • An XML document indicating an order for 12 Birdsong Clocks, SKU 244: • Which is better??

  21. Why XML?(cont.) • XML is more understandable to humans. • Given proper names for nodes and attributes, the data’s schema is more understandable. • XML is more understandable to machines. • That is, almost every programming language now ships with an XML parser as part of it’s standard library! • XML is more generic • An XML parser can parse data for many applications. • We can easily add nodes and sub-nodes to an XML document, and add more attributes to these nodes – the same way we add attributes to our data classes. • More on this on the web…

  22. Library Application • The XML file contain information about Library, Books and Magazines. The application read data from XML, and write data to XML again.

  23. Library Application: Architecture Presentation Layer MainFrame class Domain Logic Layer actionOnLibary class Paper class Book class Magazine class Library class DataManipulate class Persistence Layer XMLUtilityManagment class XML

  24. Improvement: Data Mapper • The Data Mapper is a layer of software that acts as a mediator between the Domain logic and the Persistence (Data source). • Using Data Mapper, the in-memory objects need have no knowledge that there's even a database present. • The domain logic (middle layer) will include no SQL interface code, and certainly no knowledge of the database schema. • The database schema is always ignorant of the objects that use it.

  25. One Last Note: Modeling Tools • During the course you will be requested to hand your assignments with diagrams included. • Class Diagrams • Sequence Diagrams • State Machine Diagrams • There are many available tools to create these artifacts. • We recommend you use Visual Paradigm (license can be downloaded from the website). • Direct link (updated 26-10-2011): www.visual-paradigm.com/downloads/vpsuite/VP_Suite_Windows.exe

  26. Summary • Layers partitioning is a common practice to separate concerns and increase maintainability. • The system normally could be separated to Presentation, Domain logic, and Persistence. • The Data Mapper is a layer of software that acts as a mediator between the in-memory objects and the database. • Questions?

More Related