Easy!Hints Archives - Easy!Appointments https://easyappointments.org/blog/category/easyhints/ Online Appointment Scheduler Mon, 15 Apr 2024 15:30:52 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.3 https://easyappointments.org/wp-content/uploads/2020/11/cropped-easyappointments-logo-512-32x32.png Easy!Hints Archives - Easy!Appointments https://easyappointments.org/blog/category/easyhints/ 32 32 Best practices on code refactoring https://easyappointments.org/blog/best-practices-on-code-refactoring/ Mon, 15 Apr 2024 15:23:46 +0000 https://easyappointments.org/?p=2904 Find out all the best practices of code refactoring and how to apply them correctly on your own project.

The post Best practices on code refactoring appeared first on Easy!Appointments.

]]>
Easy!Appointments is currently going through great code refactoring and structure optimizations and as with any modern software, doing this the right way is vital to the successful upgrade of all the existing installations. Any new version aims to provide a smooth migration from the any previous release so anyone get get to the latest version by following a couple of simple steps.

But what is code refactoring?

Refactoring in software development refers to the process of restructuring existing code without changing its external behavior. The main purpose of refactoring is to improve the design, readability, maintainability, and sometimes even performance of the code. This process involves making small, incremental changes to the codebase, such as renaming variables, extracting methods, consolidating duplicate code, or rearranging code blocks.

Refactoring is essential in software development because codebases often evolve over time, and as new features are added or requirements change, the code can become messy or difficult to understand. By regularly refactoring code, developers can keep it clean, organized, and easier to work with, reducing the likelihood of introducing bugs and improving overall development efficiency.

Refactoring is typically done in small steps, each of which should be tested to ensure that the behavior of the code remains unchanged. Many modern integrated development environments (IDEs) provide tools and automated refactoring to assist developers in this process, making it safer and more efficient.

Refactoring best practices for your project

Code refactoring is a crucial part of maintaining a healthy codebase. Here are some best practices to follow when refactoring code:

  1. Understand the Code: Before refactoring, make sure you understand the code you’re working with. This includes understanding its functionality, dependencies, and potential impact on other parts of the system.
  2. Start with a Plan: Have a clear idea of what you want to achieve through refactoring. Identify specific areas of improvement, such as reducing duplication, improving readability, or enhancing performance.
  3. Use Version Control: Always use version control systems like Git when refactoring code. This allows you to revert changes if something goes wrong and provides a safety net for experimentation.
  4. Refactor in Small Steps: Break down refactoring tasks into small, manageable steps. Each step should be focused on a single improvement and should not introduce new functionality. This makes it easier to track changes and reduces the risk of introducing bugs.
  5. Write Tests: Before refactoring, ensure that the code you’re working with is adequately covered by tests. Writing tests helps ensure that the behavior of the code remains unchanged after refactoring and provides a safety net for future changes.
  6. Use Automated Refactoring Tools: Many IDEs provide automated refactoring tools that can help streamline the process. These tools can automate repetitive tasks like renaming variables, extracting methods, or inline functions.
  7. Keep It DRY (Don’t Repeat Yourself): Eliminate duplication wherever possible. Duplicated code is harder to maintain and increases the risk of inconsistencies. Extract common functionality into reusable functions or classes to improve maintainability.
  8. Focus on Readability: Refactored code should be easy to understand for other developers. Use descriptive names for variables, functions, and classes, and structure the code in a logical and consistent manner.
  9. Refactor Regularly: Refactoring should be an ongoing process rather than a one-time task. Regularly review and improve the codebase to keep it clean, maintainable, and adaptable to changing requirements.
  10. Measure Impact: After refactoring, measure the impact of your changes. Assess whether the code is easier to understand, maintain, and extend, and gather feedback from other team members if possible.

By following these best practices, you can ensure that your refactoring efforts lead to a more maintainable and efficient codebase over time.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Best practices on code refactoring appeared first on Easy!Appointments.

]]>
Using the official Docker image https://easyappointments.org/blog/using-the-official-docker-image/ Tue, 09 Apr 2024 08:23:19 +0000 https://easyappointments.org/?p=4100 In today’s fast-paced world, managing appointments efficiently is crucial for businesses and individuals alike. Whether...

The post Using the official Docker image appeared first on Easy!Appointments.

]]>
In today’s fast-paced world, managing appointments efficiently is crucial for businesses and individuals alike. Whether you’re a small business owner juggling client meetings or a freelancer coordinating project timelines, having a reliable appointment scheduling system is indispensable. This is where Easy!Appointments comes into play – a powerful open-source appointment scheduling application that simplifies the process of managing bookings.

Even though setting up and managing Easy!Appointments on your local machine or server is very simple, Docker provides a solution that streamlines the process into a single command, making it extreme easy to run Easy!Appointments in any environment.

What is Docker?

Docker is a platform that allows you to package and distribute applications along with their dependencies in lightweight containers. These containers are portable and can run on any system that supports Docker, making it an ideal solution for deploying applications consistently across different environments.

Getting Started

1. Install Docker

If you haven’t already, install Docker on your system. Docker provides installation instructions for various operating systems on their website: Docker Installation Guide.

2. Pull Easy!Appointments Docker Image

Docker Hub hosts an official Easy!Appointments Docker image. Pull the latest image using the following command:

$ docker pull alextselegidis/easyappointments

3. Run Easy!Appointments Container

Once the image is downloaded, run Easy!Appointments as a Docker container:

# Start a MySQL instance
$ docker run -d --name test-db -e MYSQL_ROOT_PASSWORD=secret -e MYSQL_DATABASE=easyappointments mysql:latest

# Pull and run the app
$ docker run --name test-app -d --link test-db:db -p 80:80 -e DB_HOST=db -e DB_NAME=easyappointments -e DB_USERNAME=root -e DB_PASSWORD=secret alextselegidis/easyappointments

This command starts Easy!Appointments in a Docker container, mapping port 80 of the container to port 80 on the host system. Adjust the port mapping as needed.

4. Access Easy!Appointments

Open your web browser and navigate to http://localhost (or http://<your-server-ip> if running on a remote server). You should see the Easy!Appointments setup wizard, allowing you to configure the application.

5. Configuration and Customization

Follow the on-screen instructions to complete the setup wizard and configure Easy!Appointments according to your requirements. Additionally, you can customize the application further by mounting volumes or providing environment variables to the Docker container.

Docker Compose

You can use the following docker-compose.yml file to locally set up Easy!Appointments with a MySQL database:

version: '3.1'
services:
  easyapointments:
    image: 'easyappointments:1.4.3'
    environment:
      - BASE_URL=http://localhost
      - DEBUG_MODE=TRUE
      - DB_HOST=mysql
      - DB_NAME=easyappointments
      - DB_USERNAME=root
      - DB_PASSWORD=secret
    ports:
      - '80:80'
  mysql:
    image: 'mysql:8.0'
    volumes:
      - './docker/mysql:/var/lib/mysql'
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=easyappointments

Troubleshooting

If you experience problems with the original image, try to check the container output logs for more information and submit an issue to the GitHub repository of the project:

https://github.com/alextselegidis/easyappointments-docker

Finally star and follow the project and get informed for upcoming updates and releases.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Using the official Docker image appeared first on Easy!Appointments.

]]>
How to fix email delivery problems https://easyappointments.org/2022/05/16/how-to-fix-email-delivery-problems/ Mon, 16 May 2022 07:23:11 +0000 https://easyappointments.org/?p=3718 Are you experiencing any problems? One of the most important features of any modern day...

The post How to fix email delivery problems appeared first on Easy!Appointments.

]]>
Are you experiencing any problems?

One of the most important features of any modern day application is the ability to inform its users about certain events or actions within the app core domain. This way each individual user will always stay up to date with the latest activities of their installation.

Notifications may be implemented in various way including Push, SMS and Email, with the later being the standard and simplest one since the dawn of the world wide web. Self hosting applications can take advantage of the running environment’s emailing capabilities and notify all involved users upon important data changes.

Some times though the email functionality of the hosting environment may not be present or not properly configured for successful email delivery, something that may confuse users and lead to misunderstandings. Easy!Appointment installations are no exception to that and even though the application is pre-configured to run on any system, one may still have to apply their own email configuration in order to get notifications to work.

Common configuration issues

By default any PHP installation already has internal email related configuration, that allows the scripts to send emails to any address(es). This configuration is part of the so called “php.ini” file that is used when processing a PHP request.

Problems start to appear when this configuration is missing. In such cases Easy!Appointments will still execute the mail delivery but no actual mail will be sent because PHP does not know how to process such operations.

Another common situation is that the existing mail configuration may be invalid, meaning that it may point to a non existing email relay server or the mail delivery dependencies may be missing from the host operating system or the credentials of the email rely server are wrong. All those situations mean that the server is incapable of sending any Email notification.

How to use your own SMTP server

In cases where the server configuration cannot be repaired, the use of a custom SMTP server is advised. Easy!Appointments allows for custom email configuration and can use a remote SMTP server to send all the email notification messages. The email configuration is located in the /application/config/email.php file and looks as follows.

This file can be modified with custom values as described in this framework documentation page. In more detail, the following changes may be performed:

  • The comments from the last file lines need to be removed (//).
  • The $config[‘protocol’] value needs to be changed to ‘smtp’.
  • The $config[‘smtp_auth’] value needs to be changed to FALSE in case the SMTP server does not require a username/password combination.
  • The server host, username and password need to filled accordingly (except when the SMTP server does not require username and password, in which case they remain empty).
  • The $config[‘smtp_crypto’] value needs to be ‘ssl’ or ‘tls’.
  • The correct port value must be set to $config[‘smtp_port’].

Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post How to fix email delivery problems appeared first on Easy!Appointments.

]]>
Staying up to date https://easyappointments.org/2022/04/04/staying-up-to-date/ Mon, 04 Apr 2022 09:11:35 +0000 https://easyappointments.org/?p=3563 Why Is This Important? In the ever evolving software landscape, it has already been made...

The post Staying up to date appeared first on Easy!Appointments.

]]>
Why Is This Important?

In the ever evolving software landscape, it has already been made clear that all production used systems need to stay up to date, in order to perform well. Not only are there many security related advantages to that, but it is almost certain that with time, any software will eventually become harder to maintain.

A Healthy Ecosystem

One of the most important things to do, is to always use an actively supported operating system, with an actively supported programming language version. In the case of Easy!Appointments, the most important thing is to run on the latest PHP version. Most hosting environments will allow you to easily switch between different versions, but even there is no simple version switch, you can switch the installed version with a pair of CLI commands.

PHP has a tight schedule on the supported versions.

The Release Strategy

Following the best practices and aiming for the best user and developer experience, Easy!Appointments is getting new major release once a year, and various maintenance releases after that, ensuring that all compatibility and bugs are fixed and the app will run smoothly into any environment. Such maintenance releases also include updated 3rd party packages, so that your installations always run with the best available software.

Order The Upgrade Service

If you are using an older installation and you are not sure on how to proceed or you have made customizations that you would like to keep, you are not alone! Feel free to reach out to info@easyappointments.org and get a quote on upgrading your installation to the latest version.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Staying up to date appeared first on Easy!Appointments.

]]>
Contributing to release testing rounds https://easyappointments.org/2021/10/25/contribute-to-the-testing-rounds/ Mon, 25 Oct 2021 13:53:51 +0000 https://easyappointments.org/?p=2649 Soon enough, the Easy!Appointments 1.5 development phase will be completed and the first pre-release packages...

The post Contributing to release testing rounds appeared first on Easy!Appointments.

]]>
Soon enough, the Easy!Appointments 1.5 development phase will be completed and the first pre-release packages will become available for download. At this point all new features will be completed, but there is some polishing left to be done. As with any feature release of the past, many things have changed in the underlying code and they have to be thoroughly tested before the first production ready build is released.

software-release-process

You may reach out with your feedback to GitHub, Community Group, Discord or just drop a message to info@easyappointments.org. Of course, make sure you are not running pre-release versions on your live environment as this may produce unexpected implications and data loss.

Your contribution during this phase is crucial, and with your feedback, you can contribute to the completion of the final 1.5 stable release. For that, star and follow the project on GitHub and keep an eye in our Easy!Appointments social media so that you get notified whenever a new package becomes ready.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Contributing to release testing rounds appeared first on Easy!Appointments.

]]>
Chat with community experts https://easyappointments.org/2021/10/18/chat-with-easyappointments-experts/ Mon, 18 Oct 2021 08:01:48 +0000 https://easyappointments.org/?p=2637 For the most part, successful stories involve adequate communication across all project assets, and in...

The post Chat with community experts appeared first on Easy!Appointments.

]]>
For the most part, successful stories involve adequate communication across all project assets, and in the modern world there are endless channels that can serve this need. Reaching out to other people in real time is extremely important and should be part of any collaborative effort out there.

Easy!Appointments is backed by a great community, including many experienced developers that contribute to the project’s success. For this, a new communication channel was recently opened, aiming to allow people to chat in real time and exchange their ideas, feedback and other information: a brand new Chat Group on Discord.

Discord

Discord is a free voice/video/text exchange platform that is used by millions of people to reach out to friends, working groups and communities. The platform initially gained a lot of users within the gaming landscape, but was later adopted by a huge variety of users as it providers great tooling that can back up big communities. The better the support for communities became, the more open source projects got involved with the project.

Our Community

From ideas exchange to hardcore troubleshooting, the new Easy!Appointments’ Discord Chat Group is here to bring you closer to other open source enthusiasts and help you get where you want to be. The community has different channels such as support, contribute and ecosystem, each one aiming to hold relevant only discussions. This way you can find the information you need more easily and connect with the right people depending on your needs.

Use this invitation link to connect with other scheduling enthusiasts and chat in real time.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Chat with community experts appeared first on Easy!Appointments.

]]>
Helping with text translations https://easyappointments.org/2021/06/21/help-with-translations/ Mon, 21 Jun 2021 08:58:06 +0000 https://easyappointments.org/?p=2153 Right out of the box, Easy!Appointments supports multiple languages (29 at the time of writing),...

The post Helping with text translations appeared first on Easy!Appointments.

]]>
Right out of the box, Easy!Appointments supports multiple languages (29 at the time of writing), featuring an automated language detection system that will try to display the right language based on the current user’s browser settings.

How We Got Here

As the user community constantly grows, more and more translations become available to the audience and they are all made by contributors from all over the world. This is a great thing, a brilliant effect of people helping the project back and enabling it to better fit into drastically different environments.

Being said, localization is an ongoing process and is tightly connected to the alterations the application is going through. Although most application screens and actions are described by the same or similar phrases, each new Easy!Appointments version may eventually introduce new labels or messages that will need to be translated.

How To Contribute

Anyone can help with the localization process of the project in many ways, including just sending simple message with your updates or fixes directly. Before you get started, make sure that you download the latest version of Easy!Appointments from the homepage or from GitHub.

All the translation files can be found inside the following directory:

/applications/language/*

All the languages are listed in this directory and each directory has multiple translation files, but the most important file is:

translations_lang.php 

This one contains the UI labels and messages that are being displayed in the user interface. New language entries are initially added in english by default, so you will probably find some entries that are not yet translated in your language and are waiting for your contribution. Replace the english texts with their translated equivalents and send them over to info@easyappointments.org or make a pull request directly on GitHub.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Helping with text translations appeared first on Easy!Appointments.

]]>
User roles and permissions explained https://easyappointments.org/2021/06/14/user-roles-and-permissions-explained/ Mon, 14 Jun 2021 10:13:01 +0000 https://easyappointments.org/?p=2247 Easy!Appointments has a flexible permissions system that enables the app to support multiple different user...

The post User roles and permissions explained appeared first on Easy!Appointments.

]]>
Easy!Appointments has a flexible permissions system that enables the app to support multiple different user roles and with different privileges. This way each logged in user may only perform actions they are allowed to and may only see information that are authorized to them. This post will explain how the default user roles are defined and what each one can do.

Permissions System

The permissions system in Easy!Appointments involves the separation of information into resources and CRUD actions a user may perform. Appointments, customers, services etc are resources in the system and obviously CRUD refers to the create, read, update and delete actions someone may execute on them.

User Roles

By default, Easy!Appointments includes the Customer, Provider, Secretary and Admin user roles. Each user role has different permissions and purposes so that the most common workflows are supported out of the box.

Customer

Customers is the simplest user role and are only able to use the booking page to make and manage their appointments. For this they only have access to the appointments resource and for their own appointments.

Provider

Providers that offers different services accept appointments and thus need to be able to see and manage them. Additionally they are able to manage customer information, as this is required for them to be able to handle all the required information for their schedule. Provider users are not able to manage services, users and system-wide settings as those are administrative tasks an actual administrator should take care of.

Secretary

Secretaries share similar privileges to providers with two main differences: they do not serve appointments themselves and they can be assigned providers to handle. A secretary is a user that is designated to perform organizational tasks such as the management of multiple schedules but only for the already assigned providers. They also cannot manage services, users and system-wide settings.

Admin

Admins have all the permissions unlocked as they do have control over all the resources and actions available in the system and can manipulate all the stored information. That also includes the service definition, the user management, system-wide settings.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post User roles and permissions explained appeared first on Easy!Appointments.

]]>
How to troubleshoot Easy!Appointments https://easyappointments.org/2021/05/31/how-to-troubleshoot-easyappointments/ Mon, 31 May 2021 11:49:31 +0000 https://easyappointments.org/?p=2175 Troubleshooting any software may become a challenge, especially if not performed correctly. Easy!Appointments offers all...

The post How to troubleshoot Easy!Appointments appeared first on Easy!Appointments.

]]>
Troubleshooting any software may become a challenge, especially if not performed correctly. Easy!Appointments offers all the tools and configuration to help you with that, just in case you face a problem or while working on implementing new functionality.

Verify The Installation Environment

A lot of times problems that appear suddenly or during the migration to a new production environment lie in the underlying infrastructure and configuration. It is quite common especially for shared hosting environments that the server setup changes in the background, causing various issues to the execution of not only Easy!Appointments, but also any other web application running on the server. In cases like this one it is advised to contact the administrator of the server or the support service of the hosting provider you are using for your installation.

Enabling The Debug Mode

Easy!Appointments supports the so called Debug Mode, which if enabled, will output more verbose information on things that happen on the server and aims to support enhanced development and troubleshooting experience. For production ready builts and releases (such as from the official website download archive), this flag is by default deactivated so that no sensitive information get displayed in live installations. If you do have a problem nevertheless and want to contact the community support group, your admin or the hosting provider support service it will be very helpful to come up with more information about what happened by first temporarily enabling the debug mode and then getting informative debug messages outputted on the screen of Easy!Appointments. The debug mode can be enabled directly from the root config.php file on your server.

Searching The Logs

One of the most obvious things to do when having a problem is to take a quick look for more information inside the “storage/logs/*” directory, where such information will normally code. Some times it is even useful to additionally check the server error log files, which would typically be found inside the “/var/log/nginx/error.log” or “/var/log/apache2/error.log” directory for a linux server and in similar log directories on other systems. All errors will lead to a log file eventually, so being able to find the right one and read the right information is ultimately the most important thing of any troubleshooting session.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post How to troubleshoot Easy!Appointments appeared first on Easy!Appointments.

]]>
Setup Easy!Appointments from git https://easyappointments.org/2021/05/24/setup-easyappointments-from-git/ Mon, 24 May 2021 09:17:25 +0000 https://easyappointments.org/?p=2163 As an open source project Easy!Appointments has all its source code available on GitHub, one...

The post Setup Easy!Appointments from git appeared first on Easy!Appointments.

]]>
As an open source project Easy!Appointments has all its source code available on GitHub, one of the most popular collaboration platforms. Fellow developers and contributors can star and fork the project and provide their own contributions by submitting issues, participating in community discussions and creating pull requests. This article aims to help you get started with a fresh new git clone of Easy!Appointments.

Setting Up Your Environment

Git is the first thing you will need to install on your machine. There are many git clients available on the web that work in a CLI environment or provide a GUI. The official one is available for download from git-scm.com.

The second thing to do is to make sure you have a working PHP and MySQL/MariaDB environment, something that can be achieved in many different way (e.g. pre-bundled stacks such as XAMPP, WAMP, MAMP etc, native installations, docker etc). The easiest way to get started is to use the XAMPP project, as they offer support for all the operating systems.

Last but not least, you will need to install Node with NPM and Composer to manage the dependencies and building of the project.

Cloning The Project

Before you start working on the code, you will need to check out the latest development state. Git provides an easy way to do that by using the clone command.

git clone https://github.com/alextselegidis/easyappointments.git

Alternatively if you already have configured an SSH key for your project you can use the following command to grab the latest code state.

git clone git@github.com:alextselegidis/easyappointments.git

This command will create a new directory called easyappointments, that contains the latest code state of the master branch.

Dependencies & Assets

The next step includes the installation of the required project dependencies and the build process of assets. Since dynamically including assets to a project has proven to be more efficient than manually managing them, those dependencies are being ignored and are not pushed to the repository. Execute the following command to grab the required files.

composer install && npm install

Finally you will need to build the minified files which are meant to be used on production (for better performance).

npm run build

Additionally you can also start the file watcher that will automatically build the changed files whenever you change them.

npm run dev 

This is particularly helpful while working on the code and making changes to JavaScript or CSS files.

Installing Easy!Appointments

Once all the previously mentioned steps are completed, you will be available to install the application by following the official pre-built package installation steps.


Going Premium

Did you read this article but you’re still not sure on how to proceed?

Reach out to info@easyappointments.org and have an expert take care everything for you in zero time.

Get your free quote and get started now!

The post Setup Easy!Appointments from git appeared first on Easy!Appointments.

]]>