spring boot – manage Jenkins frontend and backend parties

I have a two part application on springboot and angular, I want to deploy this application using continuous integration with Jenkins,
in other words I want to make this application exploitable for front-end clients, this is the devops part of my graduation project, and my question here is how to deploy the two parts and make them communicate with each other through a server application for example, I have micro services in the backend (eureka, zuul, ribbon …)
tools: git, Jenkins, Gitlab …

Create and manage your HYIP program securely – HYIPs

Create and manage your HYIP program securely by the use of the most secure HYIP Script. ECHYIP is the leading provider of it in the HYIP market & well known for their best service. Their script is full of the latest features and unique add-ons that make your website impressive. They have many other crypto services, to get the details to visit the ECHYIP website. Now they are giving the best deal on their products and services so don’t miss the opportunity.
 

code reuse – How to manage versioning in interdependent libraries?

I have a number of libraries that I have developed for various projects, e.g. a web server, some computation tools, some logging tools, etc.

These reside in different parts of my drive.

When I have a project that uses a few of these, I (rudimentarily) just copy the source files from the library’s folder to the project’s source directory, and compile it all together. If I make some changes to a library, I then copy it back to the main repository for the library. This then causes problems as I may want to update the library everywhere else that it is used.

What is a better way to manage this cleanly?

In Visual Studio you can have multiple “projects” which are interdependent, but you have to load all of them in the same solution. I want something like this, but not dependent on Visual Studio, and without having to load everything I’ve ever written whenever I do some work.

document – How will you manage this step inside a wizard? Hard level: external plugins and valid signatures certificates needed

I’ll try to explain myself as best as I can:

I need to create a flow for sign documents in bulk. I mean, the user selects in a table a number of documents, and then the user applies the sign to all these documents.

How am I managing that? With a fullscreen wizard:

1 step: choose the sign type (without certification -easy, add only your name; and with certification -the complex way, using plugins and this stuff)

2 step review the selection of the documents (the list with the documents ready to be signed, nothing complex)

3 step result of the action (signed or error)

So, my problem is in the first step, with when you select the “sign with certificate” option because:

-First, we check (automatically) if there is a browser extension installed. If not, we should redirect to the extension install.

-Second, if we found the previous extension, we show a list of valid sign certificates previously installed by the user. So the user selects one and continues with the wizard. OR, if the user doesn’t have the signature certificate, we show the URLs to install one of the supported certificates

You can see here where all this should happen (low fidelity, sorry, haha):
Step 1 in the wizard

I’m not sure how to add these things inside a selection inside a step. I thought of adding a spinner ie: “checking certificates”. The result of this operation will be:

-No extension found: “You need to install X extension”
-Extension found, but no certificates found: “You need to add any of these valid sign certificates”
-Extension and certificates found: “Select a valid certificate”

In summary: spinner + required action.

spinner

spinner2

What do you think about this approach? I feel that this is a complex situation :/

PS: Sorry for my English

entities – How to properly manage field types for a content type created by a module for Drupal 9?

I’m a bit confused about two different errors I get, which seem to contradict each other. I guess I didn’t register my field types properly. The first one appears when I try to uninstall my module.

DrupalCoreFieldFieldException: Attempt to create a field field_example that does not exist on entity type node. in DrupalfieldEntityFieldConfig->getFieldStorageDefinition() (line 312 of coremodulesfieldsrcEntityFieldConfig.php).

The second one appears as an error message within the UI when I try to fix it by introducing another module which should only create the field type.

Unable to install Helper, field.field.node.content_type_example.field_example already exists in active configuration.

In general, the module calls an external API and fetches data which is then used to create nodes with several fields. These are defined inside the config/install directory. Furthermore, inside src/Plugin/Field there are FieldType, FieldFormatter and FieldWidget classes, more or less as described here.

I used this module when I tried to fix the first error without a helper module. With its help, I removed the field types created by my module in the first place. Unfortunately, I don’t know a lot about drush, which seems to be capable of solving the issue. On the other hand, it would be great if it was possible to “reset” the content type and the field types programmatically whenever the module is installed or uninstalled. So far, I tried the following code, without much luck:

<?php
// mymodule.install file
use DrupalfieldEntityFieldStorageConfig;

function mymodule_install() {
  if (FieldStorageConfig::loadByName('node', 'field_example')) {
    FieldStorageConfig::loadByName('node', 'field_example')->delete();
  }
}

Does someone know how I can fix the error and how I should manage these fields in the future? Thanks!

php – How to effectively manage a large number of exceptions (I18N problematic)

I’m trying to found the best way to manage Exception for all over my application.

Actually, I’ve come with two solutions :

Solution 1

One Exception to govern them all.

namespace AppUtilsException;

class LogicException extends Exception
{
    /**
     * @param MessageI18N $messageI18N A message which may contain parameters for translation.
     * @param string|null $redirectRoute (optional) Route to redirect after exception have been throw.
     * @param string $status (optional) A status for alert msg (default is {@see eNotificationStatus::ERROR}).
     * @inheritDoc
     */
    public function __construct(MessageI18N $messageI18N, ?string $redirectRoute = null, string $status = eNotificationStatus::ERROR, ?int $code = 0, Throwable $previous = null){
        parent::__construct($messageI18N->getMessage(), $code, $previous);
        $this->_redirectRoute = $redirectRoute;
        $this->_status = $status;
        $this->_messageDatas = $messageI18N->getParameters();
    }
}
namespace AppUtilsException;

class MessageI18N
{
    private string $_message;
    private array $_parameters;

    public function __construct(string $message, array $parameters = array())
    {
        $this->_message = $message;
        $this->_parameters = $parameters;
    }
...
}

Now I can use this LogicException class everywhere I need it as :

namespace AppServicesDomainEmail;
class EmailService implements EmailServiceInterface
{
    ...

    public function sendEmailResetPassword(string $email): void
    {
        try {
            $this->_mailer->send($email);
        } catch (TransportExceptionInterface $e) {
            throw new LogicException(
               new MessageI18N(
                  "an_error_occurs.when_sending_email_to_{email}",
                  ('{email}' => $email)
               ), 'send_mail_password' // <-- route to redirect
            );
        }
    }
}
namespace AppController;
class EmailController extends _BaseController
{
    ...
    /**
     * @Route("email/send/password/forgot/", name="email_send_password_forgot")
     * ...
     */
    public function sendEmailResetPassword(Request $request): void
    {
        ... // Get email from request query
        try{
          $this->_emailService->sendEmailResetPassword($email);
          $this->addFlash( // Success message
             "an_email_have_been_sent_to_{email}_(check_your_spams)",
             ('{email}' => $email))
          );
        }catch(LogicException $e){
          $this->addFlash( // Error message
              $e->getStatus, // Status may be warning or error
              $this->_translator->trans(
                  $e->getMessage,
                  $e->getgetMessageDatas()
              )
          );
        }
    }
}

Advantages

  • Easy to handle exception
  • Easy to provide extra parameters for I18N purpose
  • Messages can be personalise at Service layer, where it have all the specific knowledge of why error occurs.
  • The route to redirect can be personalise too.

Disadvantages

  • The exception logic take more space than service logic make it hard to read.
  • The way Exception class is extended look like a terrible mess, as an object is provided, but actualy isn’t a property of LogicException. IDK why but it’s look like so horrible to me.
  • If LogicException need to be change, there might be impact in all place where it is use. A lot of dependecy to this class may require a lot of change !

Solution 2

Solution 2 is about creating a new Exception class for each logic exception wich may occurs.

class EmailInvalidFormat extends LogicException // <-- SPLLogicException{
}
class UserNotFoundException extends LogicException // <-- SPLLogicException{
}
class UserNameMustContainOnlyAlphanumeric extends UnexpectedValueException// <-- SPLUnexpectedValueException{
}
class UserNameLength extends LengthException// <-- SPLLengthException{
}
class UserDupplicateName extends LogicException// <-- SPLLogicException{
}

… I let you imagine that i’ll probably break some records if I create an exception by problem.
I thin you guess that for every Exception class I’ll display a specific translation message wich would’ve been handle by the controller. Service layer only throw Exception class without knowing anything about the message.

Advantages

  • More readable code.
  • Everything related to translation is inside of the controller.
  • If an exception class need to be rename, this don’t have a lot of impacts.

Disadvantages

  • Less flexibility about message, as controller may not have a lot of informations about each exception.
  • The message will be more generic.
  • Controller got too much responsibility as he’s got to manage every exception that’ll be thown.
  • Code can’t get reuse through other application as Exception may be related to Application logic

I will create, setup, manage, optimised and optimize your facebook business page for $3

I will create, setup, manage, optimised and optimize your facebook business page

Hello,I am SohanWelcometo my Gig!! I have an experience in SocialMarketing.Facebook Business is very important for Website or Business or

Products Promotion Brand yourself.Facebook is the largest audience platform. I

will create a professional business page for business or personal use. Benefits of this Gig:

  • Create Page
  • Set Up Page
  • Add Logo
  • Cover Photo
  • CTA Button Setup
  • Add Products
  • Custom URL
  • Add Full Details Of Your Business
  • FB Story
  • Management

Why choose me:

  • Fast Delivery
  • 24/7 Online Support
  • 100% Satisfaction
  • Best Quality Work

.