RESTEasy 1.0 GA Released

This article was originally published on January 1, 2009.

Java Just Got a Little Better

Have you been struggling to use the Java system as it exists today? If so, don't worry, you are not alone. There are plenty of people going through the same troubles, and no one is pleased with the fact that they have to struggle as hard as they do just to get some simple code put out into the world. Unfortunately, that is the position that many find themselves in today. 

How To REST With Rails and ActiveResource: Part Three

It’s easy to use OpenURI and Net::HTTP. Well, "easy" is a relative term. Building a client library to access our task manager service still requires a fair amount of boilerplate code — more than we care to write, test, and maintain. We have shown you some principles and conventions for designing RESTful web services, and in this final part of our three-part series, we'll take it a step further and show you how we can use them to develop a client library for the task manager using ActiveResource.

If you missed parts one and two of the series you can find them here:

Sweeter Perl Exception Classes

I mentioned at the Ephemeral Miniconf last month that as soon as I write about one Perl module (or five), someone inevitably brings up another (or seven) I’ve missed. And, of course, it happened again last week. No sooner had I written in passing that I was using Exception::Class than the denizens of the Libera Chat IRC #perl channel insisted I should use Throwable instead for defining my exceptions. I’ve already blogged about various ways of catching exceptions.

Why Throwable? Aside from Exception::Class’s author recommending it over his own work due to a “nicer, more modern interface,” Throwable is a Moo role, so it’s composable into classes along with other roles instead of mucking about with multiple inheritances. This means that if your exceptions need to do something reusable in your application like logging, you can also consume a role that does that and not have so much duplicate code. If you're wondering, no, I’m not going to pick a favorite logging module; I’ll probably get that wrong too.

Vicious (Test) Mockery of a Perl Modulino

Over the past two years, I've gotten back into playing Dungeons & Dragons, the famous tabletop fantasy role-playing game. As a software developer and musician, one of my favorite character classes to play is the bard, a magical and inspiring performer or wordsmith. The list of basic bardic spells includes Vicious Mockery, enchanting verbal barbs that have the power to psychically damage and disadvantage an opponent even if they don't understand the words. (Can you see why this is so appealing to a coder?)

Mocking has a role to play in software testing as well, in the form of mock objects that simulate parts of a system that are too brittle, too slow, too complicated, or otherwise too finicky to use in reality. They enable discrete unit testing without relying on dependencies external to the code being tested. Mocks are great for databases, web services, or other network resources where the goal is to test what you wrote, not what's out in "the cloud" somewhere.

2 Examples of Projects that Leverage Java and JSON for Web Services

Java has some amazingly simple tools to make a developer’s life easier. One such tool is the JavaScript Object Notation (JSON) open standard file format and data interchange format. It leverages standard text to store and transfer data objects and makes it significantly easier to build Web Services solutions. It can be leveraged in any language including Java, PHP, .NET, etc. It is easy to read and write and easy to parse and generate data and it is a popular data-interchange language for developers around the world. In this article, we look at two specific web services projects utilizing JSON to build the foundation for business solutions. 

"As the web services market grows, the popularity of JSON is likely to grow as well."

SKP’s Java/Java EE Gotchas: BCEL Issue on JiBX 1.2.5 (java.lang.CharSequence)

So, I spent some time on resolving this issue with a combination of the following:

1. JiBX 1.2.5 / JiBX 1.2.6
2. JDK 1.8

During the jibx-maven-plugin:bind phase of the Maven Build, you may get an error when you upgrade from JDK 1.x to JDK 1.8; The issue will manifest in the following most common form/error:
 
Failed to execute goal org.jibx:jibx-maven-plugin:1.2.5:bind (bind-compile) on project common: Error loading class java.lang.CharSequence: Error reading path java/lang/CharSequence.class for class java.lang.CharSequence
 

You can modify your pom.xml, to make these changes to fix this error.

1. Include the Repository for BCEL 6.0
Include the Repository for BCEL 6.0



2. Check the version of JiBX [Choose any of 1.2.5 or 1.2.6]
Check the version of JiBX [Choose any of 1.2.5 or 1.2.6]


3. Exclude default 'BCEL' from the Build
Exclude default 'BCEL' from the Build


4. See the modifications for the plugin 'jibx-maven-plugin'
See the modifications for the plugin 'jibx-maven-plugin'


5. Voila!
Build Success!

Web Services or Mobile App Testing — The Prioritization Matrices

Web Service and  Mobile App Testing

Generally, we can say that: Web services are packet sized applications that communicate with each other via network but in a precise format. The output of one software used as an input to another reciprocally and the whole process executed with interface language like XML.

Mobile app testing is a strategic approach to detect bugs and fix them before users identify them. It’s evident that scalable and user-friendly applications win the race and gives your product wide recognition. Mobile app testing does it with it’s set of approaches right from installation, the target device and OS, UI/UX usability, functionality, interrupts, data network, hardware, and performance, and many other parameters.

REST API Best Practices — Design Examples From Java and Spring Web Services

REST API Best Practices

When designing a great REST API, it's important to have great microservices. How do you design your REST API? What are the best practices?

You Will Learn

  • How do you design a great REST API?
  • What should you think about when designing a REST API?
  • What are the best practices in designing RESTful Web Services?
You may also be interested in:  Top REST API Best Practices

REST API

This is the last article in a series of articles on REST APIs:

Designing REST API — What Is Contract First?

Contract First Approach

When designing a great REST API, it's important to have great microservices. Contract First approach helps you in designing a great contract before implementing it. However, it does not come easy!

You might also like:  Contract-First API Design With Apicurio and Red Hat Fuse/Camel

You Will Learn

  • What is Contract First approach of designing REST API?
  • What are advantages of Contract First approach?
  • What are disadvantages of Contract First approach?
  • When do you adopt Contract First approach?

REST API

This is the third article in a series of articles on REST APIs:

7 Myths About Web Services

Despite the popularity of SOA and Microservice Architectures, some technological and implementation details are often missunderstood or incorrect interpreted. In this article, we will review seven facts about Web Services that can help developers to better understand the concepts and also to better prepare for interview questions if needed. 

You may also The HTTP Series (Part 1): Overview of the Basic Concepts.

HTTP Is Absolutely Required for RESTful Services

HTTP is not formally required for RESTful web services, but if HTTP methods are used, their formal meaning should be strictly followed so that without additional effort the clients can understand the API (e.g. do not use POST to update data, it is supposed to only create resources and is not idempotent by nature).