drupal

Peoples Blog: Create a custom Drupal Service and Use as a Helper

Creating a custom Drupal service allows you to encapsulate functionality and access it wherever needed, promoting modularity and reusability within your codebase as a Helper. In this article we are sharing an example of how to create a custom Drupal service and use it as a helper. Step 1: Define the Service Create a new custom module or use an existing one. Define your service in the module&rsq

Drupalize.Me: Part 2: EventDispatcher in Drupal (Spotlight on Symfony in Drupal)

Part 2: EventDispatcher in Drupal (Spotlight on Symfony in Drupal)

In Part 2 of our exploration of Symfony components in Drupal, we focus on the event dispatcher.

The event dispatcher is a tool that enables the application to communicate across objects by subscribing to and listening for events. It achieves this by creating a directory for various event types, and the corresponding registered listeners for each event type. When a specific type of event occurs, the code that has registered a listener for that event is invoked. If you're familiar with the Mediator and Observer design patterns you might recognize similarities here.

Blake Hall Wed, 01/24/2024 - 19:54

The Drop Times: Technology and People Make Drupal Happen: Fran Garcia

Join Fran Garcia, Senior Drupal Developer at the Drupal Association, as he unveils the driving forces behind Drupal's evolution. Fran shares exclusive insights with Kazima Abbas, Sub Editor at The DropTimes (TDT), exploring strategic projects, global hiring initiatives, and the transformative impact of GitLab CI on Drupal's development process. Discover the symbiotic relationship between Fran's role, the Drupal community, and his unique journey from teaching to web development.

LN Webworks: Voice Search Optimization & Set Up for Drupal: A Step-by-Step Setup Guide!

Image removed.

Drupal voice search has evolved from being a mere trend to becoming a standard feature for websites today. If you find yourself wondering, 'How do I enable search based on voice recognition on my Drupal website?' — you're in the right place. 

Integrating voice search functionality into your Drupal site is not only modern but also enhances user experience and is extremely important for SEO ranking. In this blog post, we'll walk you through the steps to set up search based on voice recognition, making your Drupal site more accessible and user-friendly. But before we dive into the steps, let’s understand…

Specbee: (Not Just Any) Drupal VS WordPress Blogpost - Your Top 5 FAQs Answered

Everyone loves a good showdown. Drupal VS WordPress debate has been a hot topic for ages. Businesses want to make informed judgments, and articles like these can play a crucial role in the decision game. While comparing market share and numbers might seem interesting at first glance, beyond the stats, it’s about finding the right CMS that perfectly fits your needs. We're a downright Drupal-centric company. We're all in on Drupal – it's in our DNA. Now that you've got the picture, it’s important to emphasize that we won't engage in a one-sided battle between Drupal and WordPress. The focus is on providing insightful comparisons and that can help you find the right solution for your specific needs. So dive into this article where we're tackling the most popular questions about Drupal VS WordPress, sourced straight from Google and beyond.   Question #1: What's the community support like for Drupal and WordPress? Before answering this question, let’s talk about why community support is important. One of the most common and significant reasons why organizations choose an open-source Content Management System (CMS) is having lean-back support from a strong community. This assures them that their code is in safe hands even if they have to change vendors. After all, open-source code is built by everyone, for everyone. Both WordPress and Drupal boast of a global community of open-source enthusiasts. Due to its sheer popularity and widespread usage, the WordPress community is vast and you can find a solution to almost every query. WordCamps are low-key, local events held all over the world and are attended by WordPress users and developers. State of the Word events are annual events where the co-founders discuss the platform's current state and future direction. Fun fact: the first WordPress community summit took place in the year 2012 at Tybee Island, Georgia. While Drupal’s community is comparatively smaller, although growing every day, it is renowned for its depth of technical expertise and knowledge. This makes it a great resource for complex projects.  DrupalCamps are local community events where developers and users come together to learn and network. DrupalCons are held annually both in the United States and Europe where thousands of Drupal enthusiasts come together to network, learn, contribute, and get inspired. Dries Buytaert, founder of Drupal, presents his keynote speech every year where he discusses the state of Drupal and talks about innovation and new initiatives for the future. Fun fact: the first-ever Drupal community event (DrupalCon) was held in Antwerp, Belgium in the year 2005. No matter how expansive or niche a community is, the crucial question remains: Which community dynamics align better with your goals? Question #2: Is Drupal easier to learn or WordPress? The easy (and blunt) answer to this question is WordPress. WordPress’s intuitive and friendly user interface makes it accessible to beginners. Because of its vast community, and access to tons of online documentation and tutorials, learning WordPress is not hard.  But if you’re looking for a more meaningful explanation, it starts with a question - What are you trying to accomplish with your CMS?   If you want to set up a website and want it to go live before EOD today, WordPress makes it easy. If you want to learn to set up a straightforward personal blog or portfolio site, WordPress is for you. If you’re a small to medium-sized business or e-Commerce store, looking to establish an online presence without help from external agencies, WordPress could work for you.BUT If you're a web developer buff, with Drupal, you'll enjoy learning new skills, and you won't be intimidated by the challenge level. If you like customizing existing modules or building custom modules, Drupal gives you a ton of flexibility with that. If you’re looking at building enterprise-level, complex applications for you or your clients, Drupal offers everything you need. Drupal is notorious for its steep learning curve. Having said that, over the years, there has been a tremendous shift on that front especially since the launch of Drupal 8 in 2015. The evolution of Drupal has seen a departure from traditional Drupal-ly aspects to embrace modern trends like object-oriented programming and standardized frameworks like Symfony. This shift has attracted developers with diverse skills into the community. Initiatives such as the Project Browser are making it easier for site admins to discover and apply modules, creating a marketplace-like experience. Add to that, initiatives like Easy out of the box, Automatic updates, Recipes, starterkits, and distributions are contributing heavily to making Drupal more beginner-friendly. On a side note, this brilliant article written by Kathy Sierra is worth a read if you’re starting your career or looking to become an expert in your field. This "How to be an expert" graph below resonates with the idea that persistent learning and improvement make mastering Drupal easier, even with its initial complexity. Question #3: Which is easier to customize, Drupal or WordPress? While this again depends on the level of customization you are looking for, let me try to keep it simple. WordPress’s extensive theme and plugin ecosystem allows for straightforward modifications without deep coding knowledge. It offers a vast array of themes, both free and premium, allowing users to change the look and feel of their site instantly. Many WordPress themes come with integrated page builders or support popular ones. These drag-and-drop interfaces enable users to create complex layouts without any coding, enhancing the customization experience. When it comes to deep customizations, Drupal is the clear winner. Its modular architecture allows for precise customization where modules can be added, removed, or modified to extend functionality. The level of control and specificity you have with customizing themes is unparalleled with Drupal. The Twig theming engine allows for a flexible and secure way to customize the presentation layer of your website. You can leverage the Drupal Views module (core module) to customize the way your data is presented using custom queries. The ability to create custom content types and fields enables websites with complex content requirements (educational institutions, media, and publishing houses) to create highly structured data. Clearly, this level of customization comes with a learning curve, which brings us back to the question mentioned before - What do you want to accomplish with your CMS? :) However, this does not mean that WordPress cannot be used to build customizable websites or that Drupal cannot be used to build simple websites. It’s just that each platform has its strengths and sweet spots. WordPress excels in simplicity, quick deployment, and a massive ecosystem of plugins for common features. Drupal's power lies in its flexibility, scalability, and ability to handle complex projects with a high degree of customization.  Question # 4: Are there notable performance differences between Drupal and WordPress? This is where Drupal truly excels, hands down! Clearly, speed and performance are Drupal's key differentiating factors. While WordPress can also be used for complex websites whilst maintaining performance, it does require a lot of optimization expertise. If a WordPress website uses too many or poorly coded plugins, it can slow down performance and speed. Its inability to provide granular access control can also limit performance. Drupal, on the other hand, offers high performance right out of the box: Advanced Caching Mechanism - The built-in caching mechanism is simply brilliant. Drupal doesn't just cache pages; it goes the extra mile by caching dynamic views at both the query and output levels. This meticulous approach can be further optimized and ensures optimal performance. Version Upgrades - With every version upgrade released by Drupal, you don’t just get better features, you get improved performance out of the box. Because of its dependencies like PHP and Symfony, Drupal needs to stay updated to make sure it stays compatible with the best version of the dependencies. A recent study by Kinsta shows that a Drupal 10 website using the latest PHP 8.3 version “gives you an extreme speed boost”. Optimized Database Queries - Drupal's database queries are well-optimized, contributing to efficient data retrieval. This means quicker response times when fetching content from the database. Lazy Loading - Drupal supports lazy loading for images and other assets. Resources are loaded only when needed, enhancing the initial page load speed. BigPipe technology -  Drupal’s BigPipe technology optimizes performance by introducing dynamic page-loading mechanisms for authenticated and anonymous users. Instead of waiting for the entire page to be fully rendered, it prioritizes and delivers the main content first. It also utilizes parallel processing, allowing different components of a page to load concurrently. As of Jan 16, 2024, the usage statistics of Drupal show that although used by fewer websites compared to WordPress, when it comes to being used by high-traffic websites, Drupal tops the list. uestion #5: How do the security features compare between Drupal and WordPress? Whenever we have discussed security, we always make it a point to clarify that security is not just a one-time task but an ongoing process. But yes, choosing the right CMS does make a huge difference in safeguarding your data. While both Drupal and WordPress are dedicated to security, Drupal is known for its excellence in this area. While WordPress core is secure, with thousands of third-party plugins and themes freely available, it is more susceptible to hacker attacks. It requires careful selection and maintenance to ensure a secure environment. Security vulnerabilities may arise from poorly coded or outdated plugins. According to a 2022 Website Threat Research Report by Sucuri, WordPress accounts for 96.2% of infections while Drupal was at 0.6%. Of course, you cannot deny the popularity of WordPress when a comparison analysis of this sort is carried out. Drupal has a robust defense against critical internet vulnerabilities, boasting a proven 15+ year track record of its Security Team successfully identifying and addressing potential threats. The platform's stringent coding standards and rigorous community code review process contribute significantly to preventing security issues altogether. Drupal offers many security modules and when implemented with the right strategy, you can have a highly secure website. Granular access control is a strength of Drupal. Site administrators can define specific roles and permissions, ensuring that users have the appropriate level of access. It is also important to keep your Drupal website updated with the latest release to mitigate any security vulnerabilities. The Automatic Updates module (coming soon to core) makes updating your website easier with features like auto patch-level updates, problem detection and reporting at every stage, error detection API, and more. Final Thoughts It is rather easy for us to give our verdict - Drupal is the best 🙂 But jokes apart, it is up to you to decide which platform best fits your needs and budget. Both Drupal and WordPress offer great features and can be powerful tools for web development. If you’re still confused if Drupal is the right CMS for you or not, we can help. Simply fill out the form and tell us your requirements. You'll hear from us with the best-fit solution. We'll never push a CMS on you if it doesn't meet your specific needs. You can also call us at +1-678-806-8004. 

Talking Drupal: Talking Drupal #434 - Talking Drupal

Today we are talking about te show itself. We’ll also cover Autosave Form as our module of the week.

For show notes visit: www.talkingDrupal.com/434

Topics
  • Update on the show
    • Guest hosts
    • MOTW Correspondent
    • Newsletter
  • Sponsorship
  • Open Collective
  • Content
  • New content in 2024
  • Expanding team
Resources Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Stephen Cross - stephencross.com stephencross

MOTW Correspondent

Martin Anderson-Clutz - mandclu

  • Brief description:
    • Have you ever wanted an autosave feature on your Drupal site’s forms, so content creators won’t lose their work if they accidentally close the window or lose power? There’s a module for that.
  • Module name/project name:
  • Brief history
    • How old: created in Nov 2016 by Hristo Chonov of 1x Internet, who is also one of the organizers of Drupal Dev Days 2024 in Burgas
    • Versions available: 8.x-1.4 which works with Drupal 9 and 10
  • Maintainership
    • Actively maintained, most recent comment less than 3 months ago
    • Test coverage
    • 38 open issues, 20 of which are bugs
  • Usage stats:
    • 6,414 sites
  • Module features and usage
    • Works by automatically saving the content of the current form every 60 seconds, though the time period is configurable
    • When a user opens a form, if an autosaved state exists for that form a dialog will be shown asking if they want to resume editing or discard any autosaved states
    • Once a form is submitted, any saved states will be automatically deleted
    • Notionally it should work with both content entity forms and config forms, but the majority of development and testing has been with entity forms in mind
    • The project page also mentions an issue with nested entity reference inline forms, and has links to relevant Drupal core issues
    • Worth noting that this module uses AJAX to save the states to the Drupal database, separate from entity revisions
    • If you want a solution that save form states into the browser’s localStorage instead, you can check out the Save Form State module, using the jQuery Sisyphus plugin