Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Presetation - SALESPOINT: A Java framework for ...

Presetation - SALESPOINT: A Java framework for teaching object-oriented software development

Bleu (Jia-Huei Ren)

October 15, 2014
Tweet

More Decks by Bleu (Jia-Huei Ren)

Other Decks in Education

Transcript

  1. SALESPOINT: A Java framework for teaching object-oriented software development 49941131

    任家輝 National Formosa University Department of Information Management
  2. • Authors: Steffen Zschaler a, Birgit Demuthb, Lothar Schmitz •

    Journal title: Science of Computer Programming No.79 (2014) 189–203 • Journals’ Impact factor : 0.548 • Its ranking : 86/105 National Formosa University Department of Information Management
  3. Problem • Teaching systematic object-oriented software development to undergraduate students

    is difficult. National Formosa University Department of Information Management
  4. Solution • The solution that in our experience satisfies all

    these requirements is to use an application framework for an everyday application domain for example, the business domain. National Formosa University Department of Information Management
  5. In academic & industrial • In academic as well as

    industrial settings beginners will often join projects that are already well in progress. Finding out enough about the project’s structure to be able to do one’s job is similar to learning how to apply a framework. National Formosa University Department of Information Management
  6. For the organizers • It is easy to define a

    number of similar projects and to scale their complexity from moderate to reasonably hard. Since they are based on the same framework, all the different tasks are still comparable. National Formosa University Department of Information Management
  7. For the students • It is simpler to extend the

    application architecture predefined by the framework than to design it for each application from scratch. National Formosa University Department of Information Management
  8. • Beginners get a chance to learn good design by

    example: Frameworks by definition are designed for change. Therefore, they typically exhibit patterns that increase flexibility. National Formosa University Department of Information Management
  9. Object-Oriented Programming, OOP Main Class Implements Interface Extends Interface Extends

    Interface Extends Class Extends Class National Formosa University Department of Information Management
  10. Studying OO thinking • Education in object-oriented (OO) technologies has

    become a core part of any modern education in software engineering. • A well-known problem with education in this field is the relatively long period of time that is required to get accustomed to ‘OO thinking’. National Formosa University Department of Information Management
  11. Studying OO thinking • learn to solve problems by building

    small communities of interacting objects; students with a strong procedural programming background may first have to unlearn their previous algorithm-centered approach; National Formosa University Department of Information Management
  12. Studying OO thinking • adopt the habit of reusing existing

    classes instead of inventing new ones; this requires them to know where to look for reusable components; National Formosa University Department of Information Management
  13. Studying OO thinking • start to think flexibly about the

    organization of the software development process; beginners have to be taught the importance of a formal software life cycle and of a proper requirements analysis National Formosa University Department of Information Management
  14. Studying OO thinking • begin to understand and apply patterns

    and frameworks National Formosa University Department of Information Management
  15. Object Relational Mapping, ORM • An ORM (Object Relational Mapping)

    is a tool that lets you query and manipulate data from a database using an object paradigm. National Formosa University Department of Information Management
  16. ORM Example $user = new ORM('user'); $user->name = 'fancy'; $user->save();

    National Formosa University Department of Information Management
  17. HyperSQL DataBase • HSQLDB (HyperSQL DataBase) is the leading SQL

    relational database software written in Java. It offers a small, fast multithreaded and transactional database engine with in-memory and disk-based tables and supports embedded and server modes. National Formosa University Department of Information Management
  18. Cookie VS Session Cookie • 儲存在Client端,因此能 夠由Client端修改。 • 能夠長時間的儲存 •

    僅能儲存序列化的資料 • 通常用來儲存需要長時間 留存且不敏感的資料(例如: 記住登錄狀態) Session • 儲存在Server端 • Client端關閉連線後則須 重新請求新的Session • 能夠儲存任何物件型態 • 通常用來儲存較敏感的資 料(例如: 會員帳號及權限、 牽涉到現金的訊息) National Formosa University Department of Information Management
  19. System Design 類別 • 管理者 • 消費者 • 產品分類 •

    產品分類 / 產品 函數 • 帳戶設定、網站參數設 定 • 購買產品 • 設定分類及產品…等。 物件操作 • 帳戶新增/刪除/修改/ 查詢 • 存貨增加/減少 • 分類及存貨的編輯及新 增...等 National Formosa University Department of Information Management
  20. Core classes of the application control part of Salespoint. National

    Formosa University Department of Information Management
  21. Core classes for data management within Salespoint. Associations between interfaces

    are implemented through appropriate getter and setter operations in the interfaces. For example, interface Catalog provides operations for adding, getting, or removing CatalogItems. National Formosa University Department of Information Management
  22. System functions • Selling goods • Buying goods • Hiring

    out equipment • Accepting orders • Handling complaints or refunds • Taking on goods for sale or return • Repairing or cleaning things • Special services • Accounting • Regularly checking the supplies • Refilling stocks and cash registers • Ordering goods in time • Adding new items to the catalog • Removing slow-moving articles • Adapting the retail prices National Formosa University Department of Information Management
  23. Experimental Methods • group students into teams of about 4

    to 6 each • ask them to adopt a chief programmer team organization • Technical questions and requests for framework correction or extension are handled in online forums as well as in face-to-face meetings by student tutors specializing in technical support. National Formosa University Department of Information Management
  24. 資料庫設定 • 系統預設透過JDBC的方式將資料儲存至檔案中 • spring.datasource.url=jdbc:hsqldb:db/videoshop • 也可以更改為jdbc:hsqldb:db:mem/videoshop 將資 料儲存至記憶體中。 •

    透過hibernate去設定ORM的方式 – validate: validate the schema, makes no changes to the database. – update: update the schema. – create: creates the schema, destroying previous data. – create-drop: drop the schema at the end of the session. • pring.jpa.hibernate.ddl-auto=update National Formosa University Department of Information Management
  25. Conclusions(Students) • Salespoint has been used successfully in approx. 730

    student projects since its inception in 1997; a total of approx. 4380 students have passed the project course. • In general, student reactions have been favorable: While many complain about the amount of work required, they enjoy the opportunity to work as a team on a realistic project for an extended period of time. • The reported total time effort including all project phases in this semester averaged 17.9 h per student and week. In subsequent discussions however, most students acknowledge the fact that learning real software development with ‘toy example applications’ is not possible. National Formosa University Department of Information Management
  26. PDO != ORM National Formosa University Department of Information Management

    來源: http://blog.roga.tw/2010/06/淺談-php-mysql-php-mysqli-pdo-的差異/
  27. 設計模組 – Blue Framework System View Template HTML CSS JavaScript

    Config DataSource Template Path System Parameters Controller UserController Model User Model PageController Model Page Model NewsController Model News Model SalesController Model Sales Model National Formosa University Department of Information Management
  28. 框架運行步驟 Load Config File Setting Class Path Get Module Set

    Module- Controller(Extend From Core/Controller) Set Route Execute Action National Formosa University Department of Information Management
  29. Disadvantages • 程式耦合度還是過高。 • 使用RDBMS作為資料庫引擎,在大量資料 處理上較為耗時。 • 樹狀階層採用Nested set model建立巢狀

    資料表,在新增或移動節點時消耗過多的 效能,不過對於一般應用來說,等同是用 後台儲存操作的效能來換取前台讀取的效 能。 National Formosa University Department of Information Management
  30. Further works 應用面 • 加入社群的功能,除了既 有廠商外,讓使用者有自 己專屬的商品牆,將系統 轉變為線上購物社群 (雲 端市集)

    • 結合FB及Google+既有的 社群會員系統,讓使用者 不用在註冊新的帳號 系統架構面 • 部分資料以JSON格式儲 存至檔案中,減少資料關 聯時浪費的多餘時間 • 修改程式架構,降低模組 間的耦合度。 National Formosa University Department of Information Management