payroll-case-study | learning Uncle Bob 's payroll case study | Machine Learning library

 by   DreamOfTheRedChamber Java Version: Current License: No License

kandi X-RAY | payroll-case-study Summary

kandi X-RAY | payroll-case-study Summary

payroll-case-study is a Java library typically used in Artificial Intelligence, Machine Learning, Deep Learning applications. payroll-case-study has no bugs, it has no vulnerabilities and it has low support. However payroll-case-study build file is not available. You can download it from GitHub.

This is my learning journey of the Payroll Case Study from the book "Agile Software Development principles patterns and practices" by Robert C. Martin (a.k.a. Uncle Bob). It is written in Java, using JUnit and Hamcrest for testing, Maven for dependency management.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              payroll-case-study has a low active ecosystem.
              It has 4 star(s) with 2 fork(s). There are 1 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              payroll-case-study has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of payroll-case-study is current.

            kandi-Quality Quality

              payroll-case-study has 0 bugs and 0 code smells.

            kandi-Security Security

              payroll-case-study has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              payroll-case-study code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              payroll-case-study does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              payroll-case-study releases are not available. You will need to build from source code and install.
              payroll-case-study has no build file. You will be need to create the build yourself to build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 1744 lines of code, 164 functions and 60 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed payroll-case-study and discovered the below as its top functions. This is intended to give you an instant insight into payroll-case-study implemented functionality, and help decide if they suit your requirements.
            • Changes the Compensation of the Employee
            • Sets the payment schedule
            • Sets the payment classification
            • Execute the payment for a recipient
            • Get the payment classification
            • Add a new sales receipt record
            • Create an Employee
            • Add an Employee instance
            • Executes the payment for a person
            • Add a time card
            • Calculates total pay
            • Change the Employee
            • Deletes the Employee
            • Updates the member of the Employee
            • Record membership
            • Assign data to pay
            • Determine if the given date is a pay date
            • Changes the member s membership
            • Sets the postal address
            • Calculates the total pay for a TimeCard
            • Gets the pay period
            • Verify pay date
            • Get the first - of - period start date
            • Executes the union member
            • Get the Monday start date
            • Is pay date
            Get all kandi verified functions for this library.

            payroll-case-study Key Features

            No Key Features are available at this moment for payroll-case-study.

            payroll-case-study Examples and Code Snippets

            No Code Snippets are available at this moment for payroll-case-study.

            Community Discussions

            QUESTION

            In uncle bob architecture, when loading a non DB entity do you always load the entirety of the entity?
            Asked 2022-Jan-06 at 07:05

            Context:
            Uncle Bob has an example called the payroll example. This page has a great downloadable example and walkthrough of what this is exactly: http://cleancodejava.com/uncle-bob-payroll-case-study-full-implementation/#disqus_thread.

            In the payroll example, an employee has 4 classes that represent pay schedule/pay type/etc.. (which could be from 20 different tables theoretically). There are various "interactors" that interact with each of these classes. The interactors use a gateway to access the employee via findById() which returns a loaded employee with all 4 classes also retrieved from the database.

            Question:
            This is great in example but in a larger system I run into some questions around entity fetching. A new use case comes up where we just want to edit the employees name. Using the gateway findById returns an employee (great!) but also does a bunch of unnecessary loading of the 4 extra classes that are unnecessary to the updateEmployeeName interactor.

            So:

            1. Do we partially load the employee based on the use case? This means the gateway may have many many more highly specialized loading methods.
            2. Do we load an entirely new type of stripped down employee? (NamableEmployee) This would mean a lot of entities that all just meet specific use cases.
            3. Does the entity "lazy load" other fields as necessary? This means the entity would need a gateway to access its sub fields that are in other tables.
            4. Any other ideas on how this may work?

            Or did I just misunderstand what entity means entirely? Is this the reason why in this architecture the employee is abstract? So the gateway can return stripped down versions that still "appear" as an employee?

            Thanks a bunch!

            ...

            ANSWER

            Answered 2022-Jan-06 at 07:05

            Using the gateway findById returns an employee (great!) but also does a bunch of unnecessary loading of the 4 extra classes that are unnecessary

            It seems that you are mixing database entities with entities. The entities in the clean architecture are not database entities. You should not have any database details in these entities. This even includes annotations like some frameworks use, e.g. @Entity(table="employee")

            Separate the business entity from the database entity. If you do you can decoupled the entities from how they are persisted. In some cases you might use plain sql and in other cases you use a ORM framework. But if you decouple them you can design the database entities according to the persistene needs and the business entities according to business needs. This is also an application of the single responsibility principle since the two change for different reasons.

            Do we partially load the employee based on the use case? This means the gateway may have many many more highly specialized loading methods.

            Yes you do. But you can also introduce an entity for that type of usage. E.g. an EmployeeUpdate that only has the properties that can be updated.

            Does the entity "lazy load" other fields as necessary? This means the entity would need a gateway to access its sub fields that are in other tables.

            The entity should never load any fields. If it does it is not a business entity it's a database entity provided by some kind of ORM framework. You should separate them as I explained above.

            Any other ideas on how this may work?

            When we load a complete entity to just update a single property we often think about efficiency and performance. But we should also think about the use case itself. Is it executed a lot of times or is it a use case that is only executed a few times. Is the effort to provide an performance optimized rename method worth it or should we just load the whole data?

            Finally I would create a repository that returns an EmployeeUpdate. E.g.

            Source https://stackoverflow.com/questions/70454162

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install payroll-case-study

            You can download it from GitHub.
            You can use payroll-case-study like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the payroll-case-study component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/DreamOfTheRedChamber/payroll-case-study.git

          • CLI

            gh repo clone DreamOfTheRedChamber/payroll-case-study

          • sshUrl

            git@github.com:DreamOfTheRedChamber/payroll-case-study.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Consider Popular Machine Learning Libraries

            tensorflow

            by tensorflow

            youtube-dl

            by ytdl-org

            models

            by tensorflow

            pytorch

            by pytorch

            keras

            by keras-team

            Try Top Libraries by DreamOfTheRedChamber

            system-design-interviews

            by DreamOfTheRedChamberJava

            system-design

            by DreamOfTheRedChamberJava

            leetcode

            by DreamOfTheRedChamberJava

            think-bigger

            by DreamOfTheRedChamberHTML

            java-multithreading

            by DreamOfTheRedChamberJava