Monthly Archives: December 2021

Object-oriented programming

Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which can contain data and code. It is used by nearly every developer at some point in their career. OOP is the most popular programming paradigm in the field of computer science. It relies on the concept of classes and objects. It is used to structure a software program into simple, reusable pieces of code blueprints. There are many object-oriented programming languages including JavaScript, C++, Java, and Python. 

Objects:

This is the basic unit of object-oriented programming. Object can be a combination of variables, functions, and data structures, in particular in class-based variations of the paradigm it refers to a particular instance of a class. Objects can be declared several times depending on the requirements.

Classes: 

Classes are a blueprint or a set of instructions to build a specific type of object. It is also a basic concept of Object-Oriented Programming which revolves around real-life entities. Class in Java determines how an object will behave and what the object will contain. A class is used to bind data as well as methods together in a single unit.

Principles of OOP:

There are four principles of object oriented programming(OOP).

  1. Inheritance
  2. Encapsulation
  3. Abstraction
  4. Polymorphism

Inheritance:

Inheritance is a mechanism of acquiring the features and behaviors of a class by another class. Using inheritance, we can create a derived class from a base class such that it inherits the properties and methods of the parent class(base class) and can have its own additional properties and methods. The derived class is also known as the child class.

There are 6 different types of inheritance in OOP.

  1. Single inheritance
  2. Multi-level inheritance
  3. Multiple inheritance
  4. Multipath inheritance
  5. Hierarchical Inheritance
  6. Hybrid Inheritance

Encapsulation: 

Encapsulation means carrying all the important information inside an object. encapsulation is also often used to hide the internal state of an object from the outside. This process is called information hiding. The general idea of this mechanism is that If you have an attribute that is not visible from the outside of an object, and bundle it with methods that provide read or write access to it, then you can hide specific information and control access to the internal state of the object. 

In Encapsulation, Only public methods and attributes are accessible from the outside. Code is hidden in a class, only public methods are accessible by the outside developers.

Abstraction:

In Object Oriented Programming, abstraction means implementation is hidden from the user and only required functionality will be accessible or available to the user. Abstraction uses simplified high level tools to access a complex object. Abstraction is an extension of encapsulation.

Abstraction also plays an important security role by only displaying specific or selected data to users.  

Polymorphism:

The word polymorphism means having many forms. Using inheritance, objects can override shared parent behaviors, with specific child behaviors. Polymorphism allows the same method to execute different behaviors in two ways: method overriding and method overloading.

What is Object Oriented Programming? OOP Explained in Depth (educative.io)

What is object-oriented programming (OOP)? (tutorialspoint.com)

Object-oriented programming – Wikipedia

From the blog CS@Worcester blog – Syed Raza by syedraza089 and used with permission of the author. All other rights reserved by the author.

How to Develop Software

For my final blog post I wanted to write about an important topic: software development processes. This relates to another class I am taking, Software Process Management, but I wanted to write a blog post about the topic in this class because it encompasses everything we have done in this class. In the same way that design patterns lay out a method for solving problems, the software development process lays out a method for designing software.

In a blog post published by Diceus, “Step by step software development: 7 phases to build a product”, the software development life cycle is laid out in 7 steps: Brainstorming, Feasibility Analysis, Design, Programming, Integration, Quality Assurance, and finally Release. Some of these steps relate more to this class, and others relate more to Software Process Management, but all of them are necessary to release a functional product.

Brainstorming, also called planning, is the most important part of the software development life cycle. This is the step where you think of products that customers would want, and an abstract thought of how you would implement the idea.

The next step is the feasibility analysis. This step does not relate to this class so much, but it is important to decide if a project is worth working on.

The next step is the Design step. This is the step where you design the product. I would imagine this is where the API is designed (not programmed) since you have to build your product around the API. I would also assume that design patterns are discussed and chosen based upon the product requirements in this step. I am not sure if UML diagrams would be designed here or during the programming stage since the source does not say, but I would not be surprised if class hierarchy is considered when planning.

The fourth step is Programming. This is the longest step, and is the grunt work of the designing phase. If UML diagrams were not already designed, they certainly will be during this step when programmers actually implement the code. I would also imagine this is the step where docker containers are set up.

The fifth step is Integration. This is the step where a product is integrated into all sources and environments. This step might also be where docker is set up, but I am not sure since the source does not mention containers.

The sixth step is Quality Assurance. This is another step which does not relate to this class very much, although I suppose excess technical debt can be managed during this step if it was not already during the programming step.

The final step is Release. This is the final step when your product is released to the consumer. This is the goal of every software development process.

I think that a good, organized roadmap is crucial for any product’s development, but it is also very important for software. Software is hard to develop, and systems like this make it easier.

From the blog CS@Worcester – Ryan Blog by rtrembley and used with permission of the author. All other rights reserved by the author.

PlantUML, revised and expanded

As a big fan of LaTeX, I really enjoyed learning and using PlantUML in class. For those of you who do not know what UML is, UML stands for the Unified Modeling Language which is a language that allows us to create models/diagrams. It is commonly used to create some sort of visual to convey information to an audience. In class, we used PlantUML to show the relationship between classes but there are still a lot of things you can do with the language that we did not have time to cover in class.

In this first blog post by Rachel Appel, she goes over most of what we covered in class at a slightly slower pace.

In addition to covering what was covered in class, in her blog post, Ms. Appel also shows another way of using PlantUML diagrams. She shows us how to create USE diagrams. USE diagrams allow us to describe the relationship between users (or actors in Ms. Appel’s USE diagram) and the software and its components. I find this especially useful when describing to others the principle of user privilege or even from a managerial standpoint describing to your employees what information or resources, they have access to.

In the previous blog post, it talked about what kinds of diagrams you can make using PlantUML, and in this blog post, it talks about some style choices you can make in your diagrams and informs you about some features in PlantUML to organize your diagram.

https://www.codit.eu/blog/plantuml-tips-and-tricks/?country_sel=be

The blog post talks about many different features you can find in PlantUML. It talks about how to change the direction of the arrows, changing the box shape, changing the arrow color, and even adding a legend at the end of the diagram. The next topic that the post talks about text alignment and adding a background to your diagram. The post also talks about a couple of other really cool features you can do in PlantUML so be sure to give the post a quick read!

I picked this topic to do this week because it was in fresh in my mind after talking about it with one of my professors. It is also a topic that I found really interesting when we covered it in class at the beginning of the semester and is something I always wanted to learn more about. In the past, whenever I had to create a model for another class I used LaTeX, Excel and/or MatLab to generate the diagram and sometimes I had to jump through so many hoops to get the diagram to look the way that I wanted to. With PlantUML, there are a lot of built-in features that I can choose from and use so I can see myself using this knowledge in another class.

From the blog CS@Worcester – Just a Guy Passing By by Eric Nguyen and used with permission of the author. All other rights reserved by the author.

Different kinds of API’s

This week I have chosen to continue to write about API’s and specifically the differences in all the API’s out there as REST shouldn’t be the only type of protocol used and learning more about the different kinds of API’s used will be a great boost in the future. I have chosen a blogpost that I think goes over these different kinds of API’s well enough for someone to start learning about the different kinds of API’s

In summary, Castellani goes over the main types of API,s which are Open API’s, Partner API’s, Internal API’s, and Composite API’s. An Open API is also called a public API in which it is publicly available to developers and user without much restrictions. The focus of this API is on the outside external users for third party services/data. A partner API is an API that is only given access to specific business partners and are used for outward communication outside the company. An internal API is also called a private API has many restrictions and is only worked on by the internal development teams. A composite API is a combination of multiple API’s and services. Castellani also goes over different protocols such as SOAP which stands for simple access object protocol which came before REST. It was the first to bring standardization in how to manage service using network services but was seen as too strict. There is also RPC protocol which stands for remote procedural call protocol which is the oldest out the three given. This protocol is hard to maintain and update and was used for client code execution.

This blogpost has given new bits of information on the different kinds of API’s out there. The way we have changed from the different rules and protocols to what we mainly use today. The previous versions were restrictive in their own ways and eventually were let go for what we have today. I wonder if eventually we will let go of REST and create a new set of rules to follow. There might be some situations where a certain protocol would be preferred over the over but people just mainly go for REST which is what we are working with in our API’s. There is also the parts on the different types of API’s and the one I have worked on is perhaps and open API and would like to see on how something like a composite API would look like to work with and handle.

Source: https://blog.axway.com/amplify-products/api-management/different-types-apis

From the blog CS@Worcester – kbcoding by kennybui986 and used with permission of the author. All other rights reserved by the author.

CS 343 Post #6

I wanted to do my next blog post on backends and frontends because we learned about them through the past few activities and while I have a general idea of how they operate, I want to clear up some confusion and get a better understanding of them. I was having some technical issues with my Visual Studio Code and Docker while working on those activities and spent some time getting them working, so I feel that I missed out on some parts of the work.

Based on the activities and my own understanding before doing more research, I saw the backend as the background code that makes the program work, while the frontend is what the user interacts with and uses the backend. The backend works with the API, endpoints, and paths that use the HTTP methods. The frontend works with the application and design, as well as being the interface for the user. They cooperate to run programs because they worked together in the activities to run the LibreFoodPantry data.

When looking more into the frontend and backend from an article from GeeksForGeeks called “Frontend vs Backend”, it was saying similar things about the two that were covered in the activities with the frontend and backend working as client and server sides of a program respectively. The frontend is the client side that the user directly interacts with, while the backend is the server side that runs the program and manages the data. The programming languages that the frontend uses are HTPP, CSS, JavaScript, and the ones that the backend uses are PHP, C++, Java, Python, JavaScript, Node.js, C#, Ruby, and REST.

As mentioned earlier, the frontend and backend sides act as two sides of a program that work together, with the frontend being what the users interact with, while the backend is not able to be seen by users but runs the code and even though it is not directly interacted with by the user, it runs what is interacted.

The main frameworks that the frontend uses are AngularJS, React.js, jQuery, SASS, and Flutter. The main frameworks that the backend uses are Express, Django, Rails, Laravel, and Spring.

I learned more about the fronted and backend aspects of web development through this article and reviewed what I knew from the activities that I may not have understood because I had to dedicate time to fixing the program so I could actually test it. I have a good understanding of how to work with the backend and frontend of a program, and can continue working on activities and homework.

https://www.geeksforgeeks.org/frontend-vs-backend/

From the blog Jeffery Neal's Blog by jneal44 and used with permission of the author. All other rights reserved by the author.

.vue files ?

After learning the backend concept, I have learned about the frontend concept for these weeks. Especially, I have a chance to work with the .vue files to build the frontend in my homework 6. Although I was given some lectures about the .vue file in class, I am not really sure about what I am supposed to do in these files. Moreover, there were a lot of new syntax that I had never seen before. Thus, I did some searches with a hope that I could find a good resource to help me learn about .vue file.

Vue Files is one of the resources that I find useful. This website will introduce to readers an overview of a Vue project, like what folders and files should be included in a Vue project. In particular, the site will focus on describing in detail what a .vue file is and what blocks should be included in a .vue file and how to write each block. From the web, I learned that a .vue file is a custom file format that uses HTML to describe a Vue component. Each component consists of three types of blocks, which are <template>, <script>, and <style>. Each block will contain different types of code. Specifically, <template> contains HTML code; <script> contains JavaScript code, and <style> contains the CSS style of the component.

Moreover, according to the webpage, I have learned a lot of new syntax which is used to build a template of a component. First of all, text interpolation whose syntax is {{myVariable}} is used only to specify any valid JavaScript expressions in the template; and it cannot be used to modify any HTML code. Moreover, the website also introduces to readers about directives which are Vue- specific syntax elements used in the template. For example, v-model is used to take inputs and to update the variable values. v-if/ v-else/ v-else-if is a conditional statement that works in the same way as the equivalent in JavaScript. v-for is used as a loop statement to generate lists of elements in the template. v-on is used to define an action to take if an event occurs, such as click, mouseover, focus, etc.

Furthermore, in the components section, the website also introduce some elements could be written in the vue component’s script block, such as name, data(), methods, props, mounted(), computed, watch, etc. The website also provide syntax and the purpose of each element to help readers understand and be able to write a complete vue component’s script.

In short, I believe this site is well worth my reading as it contains all the information that I need to do my homework-6. Furthermore, I find it useful because besides providing information about the .vue file, it also has specific examples for each syntax, so readers can practice with the new syntax directly on the website.

From the blog CS@Worcester – T&#039;s CSblog by tyahhhh and used with permission of the author. All other rights reserved by the author.

Unified Modeling Language (UML)

The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. The creation of UML was originally motivated by the desire to standardize the disparate notational systems and approaches to software design. It was developed at Rational Software in 1994–1995, with further development led by them through 1996.

UML offers a way to visualize a system’s architectural blueprints in a diagram. The UML represents a collection of best engineering practices that have proven successful in the modeling of large and complex systems. The UML is a very important part of developing object oriented software and the software development process.

UML has many types of diagrams, which are divided into two categories. Some types represent structural information, and the rest represent general types of behavior, including a few that represent different aspects of interactions.

Class Diagram

A Class Diagram in Software engineering is a static structure that gives an overview of a software system by displaying classes, attributes, operations, and their relationships between each other. This Diagram includes the class name, attributes, and operation in separate designated compartments.

 

Structure diagrams

Structure diagrams show the static structure of the system and its parts on different abstraction and implementation levels and how they are related to each other. Since structure diagrams represent the structure, they are used extensively in documenting the software architecture of software systems. Structural Diagrams include: Component Diagrams, Object Diagrams, Class Diagrams and Deployment Diagrams.

Behavior diagrams

Behavior diagrams show the dynamic behavior of the objects in a system, which can be described as a series of changes to the system over time; They are used extensively to describe the functionality of software systems. Behavior diagrams include: Use Case Diagrams, State Diagrams, Activity Diagrams and Interaction Diagrams.

Interaction overview diagrams

The Interaction Overview Diagram focuses on the overview of the flow of control of the interactions.The Interaction Overview Diagram describes the interactions where messages and lifelines are hidden. You can link up the “real” diagrams and achieve a high degree of navigability between diagrams inside the Interaction Overview Diagram.

UML 2.0

UML 2.0 has been an industry standard focusing on model-driven application integration. UML 2.0 is capable of providing better semantics or definitions. It has also worked to improve the internal structuring. UML 2.0 adds the definition of formal and completely defined semantics. This new possibility can be utilized for the development of models and the corresponding systems can be generated from these models.

Unified Modeling Language – Wikipedia

What is Unified Modeling Language (UML)? (visual-paradigm.com)

What is UML | Unified Modeling Language

From the blog CS@Worcester blog – Syed Raza by syedraza089 and used with permission of the author. All other rights reserved by the author.

Week-13

Hello, blog (mood-status: relax and focus), writing this blog after coming home from a work trip and finishing it the last week of classes, studying on exams, and submitting assignments. But anyway, on writing about this week-13. I am writing this as my final blog for the year 2021. I decided to go on the Syllabus once again to look at the course topics. Then I choose the subject of the Framework.


A framework is a platform that provides a foundation for developing software applications. It uses shared resources (libraries, image files, and reference documents) puts them together in one package. The resources can modify that package to suit the project’s specific needs. With a framework, the developer can add or replace features to give new functionality to the application. A working program that Framework can selectively modify by adding code.


What are the different types of frameworks?

The programming languages that many frameworks available from each use to solve different problems that come up in software development for Many industries can use it.

 

Back-End Web Frameworks

Back-end web frameworks are the multiple used programming frameworks. Web frameworks help developers in making web applications and active websites. These frameworks completely changed how web development is done, speeding up the entire software development process by automating everyday tasks for web developers, like providing database access, session management, and page templates. Instead of building websites using HTML, JavaScript, and CSS, back-end frameworks use programming languages to interact with a database to generate content. The work is hosted on a server, consequently the back-end portion.


Front-End Frameworks

Back-end frameworks are loaded on a server and executed in a user’s browser. It allows web developers to design what the users see on the website, manage requests, define file structures, and style its components. As Framework, It gives web developers a base to develop while controlling the final output. 


Why should you use a framework?

Frameworks help reduce time wasted in developing software. It provides a general working system that the user set for a specific application by extending the code. All the lower-level details have been added already. Frameworks allow the developer to save more time to write code specific to the project, not dealing with the Framework’s workaday, redundant functions. Also, It made the code clean and easily adjustable by following the coding convention of the Framework. Finally, frameworks help develop the project quickly, reducing programming time and costs.

From the blog Andrew Lam’s little blog by Andrew Lam and used with permission of the author. All other rights reserved by the author.

Week-13

Hello, blog (mood-status: relax and focus), writing this blog after coming home from a work trip and finishing it the last week of classes, studying on exams, and submitting assignments. But anyway, on writing about this week-13. I am writing this as my final blog for the year 2021. I decided to go on the Syllabus once again to look at the course topics. Then I choose the subject of the Framework.


A framework is a platform that provides a foundation for developing software applications. It uses shared resources (libraries, image files, and reference documents) puts them together in one package. The resources can modify that package to suit the project’s specific needs. With a framework, the developer can add or replace features to give new functionality to the application. A working program that Framework can selectively modify by adding code.


What are the different types of frameworks?

The programming languages that many frameworks available from each use to solve different problems that come up in software development for Many industries can use it.

 

Back-End Web Frameworks

Back-end web frameworks are the multiple used programming frameworks. Web frameworks help developers in making web applications and active websites. These frameworks completely changed how web development is done, speeding up the entire software development process by automating everyday tasks for web developers, like providing database access, session management, and page templates. Instead of building websites using HTML, JavaScript, and CSS, back-end frameworks use programming languages to interact with a database to generate content. The work is hosted on a server, consequently the back-end portion.


Front-End Frameworks

Back-end frameworks are loaded on a server and executed in a user’s browser. It allows web developers to design what the users see on the website, manage requests, define file structures, and style its components. As Framework, It gives web developers a base to develop while controlling the final output. 


Why should you use a framework?

Frameworks help reduce time wasted in developing software. It provides a general working system that the user set for a specific application by extending the code. All the lower-level details have been added already. Frameworks allow the developer to save more time to write code specific to the project, not dealing with the Framework’s workaday, redundant functions. Also, It made the code clean and easily adjustable by following the coding convention of the Framework. Finally, frameworks help develop the project quickly, reducing programming time and costs.

From the blog Andrew Lam’s little blog by Andrew Lam and used with permission of the author. All other rights reserved by the author.

Week-13

Hello, blog (mood-status: relax and focus), writing this blog after coming home from a work trip and finishing it the last week of classes, studying on exams, and submitting assignments. But anyway, on writing about this week-13. I am writing this as my final blog for the year 2021. I decided to go on the Syllabus once again to look at the course topics. Then I choose the subject of the Framework.


A framework is a platform that provides a foundation for developing software applications. It uses shared resources (libraries, image files, and reference documents) puts them together in one package. The resources can modify that package to suit the project’s specific needs. With a framework, the developer can add or replace features to give new functionality to the application. A working program that Framework can selectively modify by adding code.


What are the different types of frameworks?

The programming languages that many frameworks available from each use to solve different problems that come up in software development for Many industries can use it.

 

Back-End Web Frameworks

Back-end web frameworks are the multiple used programming frameworks. Web frameworks help developers in making web applications and active websites. These frameworks completely changed how web development is done, speeding up the entire software development process by automating everyday tasks for web developers, like providing database access, session management, and page templates. Instead of building websites using HTML, JavaScript, and CSS, back-end frameworks use programming languages to interact with a database to generate content. The work is hosted on a server, consequently the back-end portion.


Front-End Frameworks

Back-end frameworks are loaded on a server and executed in a user’s browser. It allows web developers to design what the users see on the website, manage requests, define file structures, and style its components. As Framework, It gives web developers a base to develop while controlling the final output. 


Why should you use a framework?

Frameworks help reduce time wasted in developing software. It provides a general working system that the user set for a specific application by extending the code. All the lower-level details have been added already. Frameworks allow the developer to save more time to write code specific to the project, not dealing with the Framework’s workaday, redundant functions. Also, It made the code clean and easily adjustable by following the coding convention of the Framework. Finally, frameworks help develop the project quickly, reducing programming time and costs.

From the blog Andrew Lam’s little blog by Andrew Lam and used with permission of the author. All other rights reserved by the author.