From the Trenches of the Enterprise Software

Yakov Fain

Subscribe to Yakov Fain: eMailAlertsEmail Alerts
Get Yakov Fain via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Yakov Fain

In this article, I’ll show you aone of the RxJS operators for error handling – the catch() operator. The previous articles in this series include: 1. Basic Terms 2. Operators map, filter, and reduce 3. Using Observable.create() 4. Using RxJS Subject 5. The flatMap operator 6. The switchMap operator The Reactive Manifesto declares that a reactive app should be resilient, which means that the app should implement the procedure to keep it alive in case of a failure. An observable can emit an error by invoking the error() function on the observer, but when the error() method is invoked, the stream completes. A subscription to an observable ends if one of the following occurs: 1. The consumer explicitely unsubscribes 2. The observable invokes the complete() method on the observer 3. The observable invokes the error() method on the observer RxJS offers several operators to int... (more)

Java Serialization

In lessons 5 and 6 of this series, you've learned how to use some of the Java streams to read or write bytes, characters or numeric data. This lesson is about reading or writing entire Java objects into streams. Let's say your application uses a class that looks like this: class Employee { String lName; String fName; double salary; java.util.Date hireDate; String address; } Now consider the following scenario: a program HeadQuarterEmpProcessor creates an instance of the object Employee. The values of its attributes (object's state) have to be saved in a file or some other stream. L... (more)

Taking a Sun Java Studio Creator for a Drive

If you do not really enjoy the process of creation of Web applications with JavaServer Pages, try Sun Java Studio Creator (JSC), which at the time of this writing is available as an Early Access release. There are several general reviews of this product on the Internet, but I'll show you how in less than an hour you can create a Web application with a logon page that performs database user authentication, and displays the main application page for a valid user. If this does not impress you, I can add that I had to write not more than 20 lines of code for this application - the re... (more)

Java Basics: Introduction to Java Threads, Part 1

Java Basics: Introduction to Java Threads, Part 2 A program can perform its actions either in a sequence (one after another) or in parallel. In a sequential mode, if a program needs to call two methods of a class, the second method is called after the first one completes. In other words, such programs have only one thread of execution. In some cases, when a second method does not depend on the results of the first one, you can substantially speed up the processing by executing these methods at the same time in a multi-threaded mode. A good example of a program that creates multipl... (more)

Secrets Of The Masters: Core Java Job Interview Questions

JDJ's Enterprise Editor, Yakov Fain (pictured) writes: If you are planning to hit the job market,  you may need to refresh some of the Java basic terms and techniques to prepare yourself for a technical interview. Let me offer you some of the core Java questions that you might expect during the interviews.  For  most questions  I’ve provided only  short  answers to encourage further research.  I have included only  questions for mid (*) and senior level (**) Java developers. These sample questions could also become handy for people who need to interview Java developers (see also ... (more)