Object-oriented Information Systems

An Introduction to Python Programming and the OO Programming Paradigm

Unit 1

Welcome to Unit 1 of the module Object-Oriented Programming. The first unit introduces Python and the Object-Oriented Programming Philosophy. Object-oriented programming is a programming paradigm based on the concept of object-orientation. The basic idea is to align software architecture with the basic structures of that area of reality which concerns the respective application. Also included in this unit is a Python course on classes and objects. Furthermore, in addition to a collaborative discussion with students on the topic "Factors Influencing Reusability", there will also be a subjective discussion on the article "The Power of ePortfolio Development" by Di Silvestro & Nadir (2021).

Outcomes

  • Summary of the learning outcomes

This unit aims to:

  • Describe the major features of an object-oriented program, in the sense of having abstract classes, applying inheritance, using encapsulation, and including polymorphism
  • Define a Python class
  • Define a variety of data types to variables in a Python program and adapt the access modifier applied to each
  • Reflection

What exactly have I learnt and how?

The first insights into object-oriented programming were exciting but also challenging. It is pretty tricky for a beginner; nevertheless, after many articles, books and videos on this kind of programming, I realised that it is a powerful concept for reflecting on reality rather than using function and logic. Furthermore, after completing the python coding course classes and objects, I finally understood how to create an object-oriented program. As a result, learning by doing is still the most effective way of learning programming languages.
  • Notes

Notes from the elaboration of the unit, various meetings, and feedback from team members and tutors

Here are few insights from the first "Python" course:

Feedback from a student on the collaborative discussion "Factors Influencing Reusability"
I think this is a great analysis, and glad that your first point on your list is also the same as mine which is looking into RA and totally agree with you that without looking into RA developers cannot find out which software development exists that could potentially be reused. I've listed test cases as the very last, purely because as you say - its time consuming and I think these are cases where users can understand how other pieces of software have worked in different scenarios.

Feedback from a student on the collaborative discussion "Factors Influencing Reusability"
Hi Gianluca,
Well presented list, especially with the Requirement Analysis, I also chose this as my most important criteria; receiving requirements initially is very important as it sets a clear path to achieving what is desired from the project, as it also provides a clear structure on how the project should start, resulting in better quality especially with code reusability, since it can be planned for at the start.

Feedback from a student on the collaborative discussion "Factors Influencing Reusability"
Hello Gianluca,
Your analysis on code reusability was an excellent read and your prioritization is also well presented. I agree with your statement in regards to requirement analysis, developers must know what they are doing before they embark on that task, therefore it is critical that RA leads the list as this sets precedence of categorizing importance of reusability.

Reply to a student on the collaborative discussion topic: "Factors Influencing Reusability"
Software reuse is a fundamental factor to make progress in the field of software engineering and design robust software, and to benefit from the research and progress that the software engineers and developers have made until today. Regarding the reusable properties listed by N. Padhy et al. (2018), from my point of view, the order of priority is as follows:
  1. An algorithm used in the program (AP)
  2. Models in the project (MP)
  3. Design patterns (DP)
  4. Modules in the program (MIP)
  5. Test cases/test design (TCTD)
  6. Used in the data project (UD)
  7. Knowledge requirement (KR)
  8. Requirement analysis (RA)
  9. Documentation in project (DIP)
  10. Architecture driven approach (ADP)
  11. Service contracts (SC)
As all developers and practitioners know by experience, libraries which include off-the-shelf algorithms and codes that can be used in a variety of cases are the greatest timesavers (Kang, 2005). Since it is evident that the libraries, which include AP and partly MP, are the backbones of software reusability and they make the biggest impact on the code reuse, I think the AP and MP belong to the top of the list.
In my opinion, software design is one of the most challenging aspects of software engineering. However, at the same time, it is relatively easy to benefit from the existing design patterns (DP) and modules (MIP) and implement them to another project. For instance, in the case of web applications, Flask provides a framework which saves the developers from the burden of starting the design process from scratch.
Finally, the development of test cases and test data could be quite tedious, especially for big projects that are working on a sizable database. In such cases, standardized test cases and test data may come in handy (TCTD) and help developers to test their software more efficiently.
According to me, the remainder of the factors rank below these five properties.
References:
Kang, W. B. F. &. K., 2005. Software Reuse Research: Status and Future. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 31(7), pp. 529-536.
Padhy, D. N. &. S. S. &. S. R., 2018. State-of-the-Art Object-Oriented Metrics and Its Reusability: A Decade Review. In: V. B. S. D. Suresh Chandra Satapathy, ed. Smart Computing and Informatics. s.l.:Springer Singapore, pp. 431-441.
- Post by Gianluca Cannone:
You have provided an interesting initial post, and I agree with you at every point except the first and second factors. I agree that reusable algorithms are the greatest timesavers, but they are not always practical because of the software's individuality. In many cases, the algorithms must be specially adapted to the software. Correct me if I am wrong; I am still learning too :)
- Reply to Gianluca Cannnone from the student:
Hello Gianluca,
Thanks a lot for your reply and sharing your views. I agree with you that each piece of software is unique, but I think each software is comprised of several algorithms that are reusable (and several others that are unique to that piece of software).
For instance, let's think about Security Helpers of Werkzeug (2007) which I use frequently in my own coding practices to hash passwords. With its generate_password_hash method, you can easily hash a password and likewise, with check_password_hash method, you can check the password provided by a user. Thanks to these already available methods, regardless of the type of software, you can easily secure and validate user passwords without needing to invent an algorithm to hash and check a password.
To summarize, I think such kind of off-the-shelf algorithms and codes save the developers from a lot of trouble in many ways, the most important of which are:
  1. They save time, especially in complicated situations like hashing a password as in our example.
  2. They stand the test of time. If we go back to our example, a proven password hashing algorithm like this is most likely to be more secure than you can come up with on your own. It will take time to validate the security of your own algorithm and it might lead to vulnerabilities that may harm your users.
References:
Werkzeug, 2007. Werkzeug Documentation. Available from: https://werkzeug.palletsprojects.com/en/2.1.x/utils/#module-werkzeug.security [Accessed 16 June 2022].

Contact Me