DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

The Latest Languages Topics

article thumbnail
Java Class Loading: Performance Impact
Learn more about class loading in Java and its performance impact.
August 1, 2022
by Ram Lakshmanan DZone Core CORE
· 7,698 Views · 4 Likes
article thumbnail
Time-Series Forecasting With TensorFlow and QuestDB
This article presents an easy guide on how to build an application that uses time-series data to forecast trends and events using TensorFlow and QuestDB.
August 1, 2022
by Gourav Bais
· 8,624 Views · 3 Likes
article thumbnail
GraphQL in Enterprise: What It Takes to Build, Deploy, and Monitor a New Enterprise GraphQL Service
Enterprise adoption of GraphQL is on the rise. Here’s a look at what it takes to adopt it for yourself.
August 1, 2022
by Matt Tanner
· 5,595 Views · 1 Like
article thumbnail
Data Software Design Pitfalls on Java: Should We Have a Constructor on JPA?
In this article, explore details on code, especially inside the Jakarta EE world, mainly to answer the questions: should we have a constructor on JPA, and why?
July 31, 2022
by Otavio Santana DZone Core CORE
· 12,376 Views · 56 Likes
article thumbnail
Optional in Java: When Better Code Is Not an Alternative
Learn how to take advantage of this API and combine it to create a better, maintainable code design for your Java projects.
July 31, 2022
by Otavio Santana DZone Core CORE
· 15,884 Views · 5 Likes
article thumbnail
Differences Between Windows and SQL Server Authentication
Windows authentication mode and SQL Server authentication mode differ, here we discuss the Differences Between Windows and SQL Server authentication.
July 30, 2022
by Lokesh Joshi
· 9,237 Views · 2 Likes
article thumbnail
Ktor - A Kotlin Web Framework
Know more about Ktor, a Kotlin Web Framework.
July 29, 2022
by Dan Newton
· 5,840 Views · 3 Likes
article thumbnail
65 Resources for Creating Programming Languages
In this guide, we'll show you how to collect and organize all the knowledge you need to create your own programming language from scratch.
Updated July 29, 2022
by Gabriele Tomassetti
· 8,667 Views · 11 Likes
article thumbnail
Selenium vs Cypress: Does Cypress Replace Selenium?
Learn how Cypress compares to Selenium, a better choice in the software testing world, in terms of speed test, architecture, language support, and much more.
July 28, 2022
by Shormistha Chatterjee DZone Core CORE
· 18,040 Views · 3 Likes
article thumbnail
Combining gRPC With Guice
In this article, see what scopes are provided by grpc-scopes lib and when and how to use them.
July 28, 2022
by Morgwai Kotarbinski
· 7,848 Views · 4 Likes
article thumbnail
Migrating From Sakila-MySQL to Couchbase, Part 5: JavaScript User-Defined Functions
Explore this comparison with Sakila DB-MySQL user-defined functions and stored procedures using the new JavaScript functions on Couchbase.
July 27, 2022
by Isha Kandaswamy
· 5,303 Views · 1 Like
article thumbnail
JSP vs Servlet: Difference and Comparison
The main differences between JSP and servlet, as well as describe the definitions of servlet and JSP, along with their advantages.
July 27, 2022
by Ankit Dixit
· 6,877 Views · 1 Like
article thumbnail
The Differences You Should Know About Java and Python
The two languages compete with one another as each provides excellent opportunities for developers — all you need to know about Java and Python.
July 26, 2022
by Mohit Rana
· 7,494 Views · 2 Likes
article thumbnail
Happens-Before In Java Or How To Write a Thread-Safe Application
This article explains the notion of happens-before in Java, including ways to install it, what guarantee it gives, advantages it brings, and how to use it.
July 26, 2022
by Dmitry Egorov DZone Core CORE
· 11,385 Views · 10 Likes
article thumbnail
Top 10 Benefits of ReactJS for Your Application Development
Having plenty of feature-rich components, tools, and libraries, front-end development has been one of the most exciting and multi-faceted tools.
July 26, 2022
by Kiran Beladiya
· 5,602 Views · 1 Like
article thumbnail
A Brief History of JavaScript
JavaScript is one of the most important languages today. Let's take a look at how JavaScript has evolved in its short history and where it is headed next.
Updated July 25, 2022
by Sebastián Peyrott
· 12,792 Views · 13 Likes
article thumbnail
50 Common Java Errors and How to Avoid Them
Bogged down with Java errors? This series presents the 50 most common compiler errors and runtime exceptions that Java devs face, and how to conquer them.
Updated July 25, 2022
by Angela Stringfellow
· 148,518 Views · 30 Likes
article thumbnail
Create a Minimal Web API With ASP.NET Core and Publish To Azure API Management With Visual Studio
Follow this tutorial to learn how to create a minimal Web API with .NET CLI and Visual Studio 2022 to publish it on Azure Web App and API management.
July 25, 2022
by Hamida Rebai
· 6,331 Views · 2 Likes
article thumbnail
A Guide to Parsing: Algorithms and Technology
Get the definition of parsing, and learn about regular expressions in grammar, the structure of parsers, and what scannerless parsers are.
Updated July 25, 2022
by Gabriele Tomassetti
· 28,874 Views · 17 Likes
article thumbnail
Groovy Database Resource Handling
Groovy Database Can Be a Powerful Tool There are coders all around the world right now working on some of the most challenging coding problems that are out there. They are all likely relying on using Groovy database at least to some extent as this is a major player in the industry. People from all over the world recognize the true power of Groovy database and all that it can provide to them from a coding perspective, but the fact that it is such a powerful tool should not be ignored. If you want to advance very far with Groovy database at all, you will need to make sure you have a firm grasp on what it is and why it is so useful to coders all around the world. How it Compares to Java Most people are familiar with Java and have likely used it in their coding adventures at some point. It is a primary tool that has helped with the coding of numerous projects that you are likely familiar with already. Java is a great place to get started, but it doesn't necessarily compare so well to Groovy when they go head to head. It depends on what you are trying to get done, but the use of Groovy trumps Java for most developers. The reason is that most developers prefer to work with a system that has been specifically created for them. Groovy is that system. Everything that it offers is crafted with the developer in mind, and most agree that it is more user-friendly from a developer's point of view. This means that you don't have to waste your time trying to figure out how to work the very system that you are just trying to make some progress on in the first place. Java users are frequently frustrated by their inability to get as much done as they might like to because they are constantly running into brick walls when it comes to how they develop the systems that they need to develop. Most people significantly prefer it if they are able to cut away everything else and simply get to the root of the problem that they are working on. Then, and only then, can they truly begin to formulate a strategy that will allow them to create something that the world will gravitate towards. I am a big fan of using SQL in java and C# software. I typically dislike the usage of ORM frameworks like Hibernate. I feel that ORMs tend to hide a lot of issues. They also tend to have a higher learning curve. I am not sure that the ROI on deeply learning an ORM is sufficient enough to use. However, there are a lot of pitfalls that come with being so close to the SQL. The largest of which is proper resource handling. If database connections are not closed properly, the application will soon become starved of available connections. This post contains a simple example of using Groovy Categories to help manage the resource management of database connections. There are a lot more robust solutions (ie: GORM), but sometimes you only need a quick implementation. To accomplish our goal, we will be using a static closure defined below. The OpenDatabase class is merely a container for the closure. I think the final implementation of the code reads nicely because of the name. OpenDatabase.groovy import groovy.sql.Sql class OpenDatabase { def static with = { DbConnection conn, Closure closure -> Sql sql try { sql = conn.getConnection() if (closure) { closure(sql) } } finally { sql.close() } } } The DbConnection class is a simple interface for creating the groovy.sql.Sql object. DbConnection.groovy import groovy.sql.Sql; public interface DbConnection { Sql getConnection(); } Below is the sample usage of these two classes. OpenDatabase.with(dbConnector) { sql -> sql.execute("insert into BLAH...") } The database connection will be closed after closure exits. Simple, easy resource handling. The groovy way. The original article can be found at http://www.greenmoonsoftware.com/2014/04/groovy-database-resource-handling/ Applying Mass Data to Problems One of the upsides to Groovy database handling is that you don't always hear about is the fact that you can apply massive amounts of data to the issues that you are attempting to take care of today. The beauty of this is the fact that much of that data will prove very useful to you as you work on trying to figure out exactly what it is that people want from your projects. The more data you have, and the more data that you can apply, the better the outcome will be for yourself and others. Groovy allows you to input all of the data that you require all at once so you aren't constantly left struggling to try to figure out which steps you need to take next and how you will get things done. Simply use Groovy to get the results that you need, and you will be all set. A large amount of data is always preferable to use because it will help you figure out what is truly going on within the scope of what you are working on. Any single piece of data could be an outlier, but when you have a major data dump to go through, you know that you are getting the most relevant information right away. Endless Possibilities Groovy has made it so much easier for developers to work out what they will do to get their code set up just right that it has truly performed an amazing service that we should all be grateful for. This is why we need to note that the possibilities are virtually endless when working with Groovy and the tools that this service has provided. It is a very big deal when you get your code to sync up just perfectly, and that is what you get when you use the Groovy system. There are now so many people working within the system that it has grown much larger than some of its competitors. That is why we anticipate that many interesting developments are going to come out of it. When you have that many people working that hard all within the same system, you are generally going to get some pretty outstanding results to come out of this. You need to account for that fact and understand that there are numerous upsides to using a system that works just like that. A Great Place for Starters Those who are just taking on the coding world for the first time need to look at Groovy as the kind of place where they can start to hone their skills. It is not necessarily the first area that people necessarily think of when they are looking over different coding programs to get started with, but it is where they should begin. The controls are so much more refined for the kind of person who is just getting started, and that means that it is the ideal training ground for someone who is truly eager to learn the system and get to work within it. People who are just starting their coding journey should be excited to have the resources available to them to get started in this way. It can all prove extremely useful in the long run.
Updated July 24, 2022
by Robert Greathouse
· 15,927 Views · 1 Like
  • Previous
  • ...
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • ...
  • Next
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook
×