Giter VIP home page Giter VIP logo

reactive-nfe's Introduction

NFe-Logo

Reactive-NFe

Table of contents

About the project

Reactive-NFe is an old project(begin 2019), wherein I was training interface design for Delphi. I decided to resume it because I was missing Delphi, after 10 months of programming in Java without stopping, hahaha.

Description

This project basically contains:

  • A simple example of how to create application interfaces that are very attractive and provide rich interaction to the user
  • An introduction to Reactive Programming, using two of its four pillars (see more):
    • Responsive - A system of NFe which the user can monitor the status of each NFe in real-time
    • Resilient
    • Elastic
    • Message Driven - We use an asynchronous message to establish communication between our view-layer and infrastructure-layer
  • Cache service to the principal numbers in user dashboard
  • My vision of how to would be a software development approach in which design is domain-driven(DDD), described in the book of Uncle Bob, applied in Delphi

Built with

Installation

  1. To clone and run this application, you'll need Git installed on your computer(or no, if you want to download .zip). From your command line:
# Git CLI
git clone https://github.com/zevolution/reactive-nfe.git

# Github CLI
gh repo clone zevolution/reactive-nfe
  1. You must have Redis installed on your computer. We use PUB/SUB of Redis to insert and change the state of the NFe's in the view-layer. Below in Notes, I will provide some links that can help you.

  2. To use Redis as a primary cache service, you must add the 3 primary keys to the cache. After connecting in Redis via redis-cli use the commands below:

SET numerodeclientes 18729
SET numerodeusuarios 719246
SET valortotaldenotas 932669872
  1. Open the project in your IDE.

  2. Configure the Redis connection properties into Redis.Config.pas and Redis.Cache.Service.pas

  3. Configure which cache service you want to use in FormCreate method into Principal.View.pas

  {* You can choose between Redis and MemCached as a cache service *}
  //FCache := TRedisCacheService.New(TRedisConfig.New);
  FCache := TMemCachedCacheService.New(TMemCachedConfig.New);
  1. In this application, we have a personalized ListBox to present the NFe's. You must import the file ListBoxItem1-StyleNFeNegrito.style, which are in directory Styles (inside project directory) into StyleBook1 component, in PrincipalView (see more).

Run

You can modify Build configurations to Debug or Release. And use the shortcut SHIFT+F9 to build application and F9 to run with debugging.

Notes

Redis

  • You can use Redis in RedisLabs as a cloud service. They provide you a dedicated database for free, with a memory size with up 30MB and with up to 30 connections concurrent
  • You can use a Docker Image. For non-production uses, in this case, a simple test, I recommend the Alpine version. I believe that is one of the lightest version, collaborating in the initialization of the container. Use the command docker pull redis:6.0.5-alpine
  • ATTENTION: For windows installation read this article

Delphi

If you do not have Delphi, you can do download and use Delphi-CE.

Acknowledgments

  • Thulio Bittencourt - Maintainer of the Thulio Bittencourt channel on Youtube, where he passes on much of his knowledge in his videos for free, talking about UI&UX and many other topics such as clean code, NoSQL, high-performance servers and how to make your business go high.
  • Mário Guedes (What Mario? haha) - Known as the great software artisan, he works as an architect of high-performance solutions. He helped me with his lectures (TDC2018) and examples on Github, showing the power of Redis
  • Alan Franco - Thanks for reactive programming tips

License

MIT

reactive-nfe's People

Contributors

zevolution avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.