This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Java EE8 Design Patterns and Best Practices  RSS feed

 
Ranch Hand
Posts: 353
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
The title of the book suggests patterns and practices that were common in earlier versions of Java are no longer the best way of tackling  a problem.  
What would be two or three things that programmers should be doing differently with JEE 8 and why?

For example, Lamdas are useful but for the most part they are matter of programming preference . I would say people should only use them if it feels more natural to them as opposed to a "best practice" .

thanks,
Paul
 
Ranch Hand
Posts: 196
1
Java Python Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my experience , i would say even today we always look for the standards and best practices, using those are always recommended to write a better /efficient
code(These are now inbuilt into most of the IDEs).
But over doing that would some time lead to  over engineering or what is some time called  doing Anti-patterns.

Lamdas are useful but for the most part they are matter of programming preference . I would say people should only use them if it feels more natural to them as opposed to a "best practice"


I would tend to disagree on this statement , you need to take advantage of any new features, if it really gives you the ability to do a better way of problem solving
more elegantly and with simple constructs on those counts Lambdas  or Streams for that matter scores.
Over the period time  things would become natural if you start practicing /using any new features ...that applies to anything in life as well :-) (Bit of an Anecdote.......)

Thanks
Sundar
 
paul nisset
Ranch Hand
Posts: 353
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response.
 
Author
Posts: 13
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello paul nisset,

Thank you for question!

What would be two or three things that programmers should be doing differently with JEE 8 and why?

1) The Java EE is an umbrella project that have a set of specs. We need understand the use of these specs and decouple the application from vendors.

2) We need understand the relationship between components on Java EE. Enterprise patterns are pattern to solve problems about relationship between component and we shouldl use these patterns will turn the application better.

3) Write a decoupled codes. If we will use lambda or any tools of Java is less important (is less important but is important to any application in Java). The most important is write a decoupled code.

Regards,
Rhuan Rocha
 
paul nisset
Ranch Hand
Posts: 353
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rhaun .
I would say that the points you mention are very good practices but are not specific to Java 8 .
Decoupled code for example has been a good programming practice for a long time.
 
Rhuan Rocha
Author
Posts: 13
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello paul nisset,

Thank you for question!

Perfect!

The diference is how these patterns are implemented and what are the real challenge of Java EE 8. The Design Patterns (GoF Patterns) are focused on the relationship between classes and objects, but the patterns used on Java EE are focused on the relationship between components (enterprise patterns), and USES tsome GoF Patterns. The diference is how it is implemented.

One specific feature that help us to create a decoupled application using Java EE 8 is Event in CDI, that permit us use the reactive programming with Java EE 8.

Regards,
Rhuan Rocha  
 
paul nisset
Ranch Hand
Posts: 353
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rhuan.
That's what  was after . I was interested in Java 8 specific implementations/practices as opposed to general practices.
Sounds like a useful book.

cheers,
Paul
 
Author
Posts: 3
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul! Goog evening!

One of the most exciting thing about writing this book was observing how both the more traditional and newer patterns are very useful in application development. Patterns help in the relationship between the components of an application and we get many cool things like the low coupling of the application modules. Let's take as an example  asynchronous communication, that is, a module or class of the application sends a message or object to a receiving module . In Java EE 8 this mechanism has been improved with the use of asynchronous events. Now an event can be launched asynchronously while other classes can observe and receive this event asynchronously as well. Java EE 8 allows this as an alternative way to messages queues. And this is one implementation of the Service Activator
Pattern. In past we had few alternatives, like the JMS queues. With the evolution of Java EE, we arrive at the asynchronous EJB methods. Now we have the asynchronous events. The purpose of the pattern has always been the same: to activate a service asynchronously. The mechanisms to achieve this goal have also been growing with the latest versions of Java EE

Another interesting fact to be emphasized was that some more traditional patterns, such as the session facade or proxy pattern have been reinvented and adapted for scenarios such as the cloud computing. For instance, in an  an application based on microservices architecture we can find the proxy pattern that is present in one of several ways to work with microservices.

We can use the Java 8 language and many of its new features within the Java EE 8 context. No problem. There is no rigidity in the development of systems, but good practice always offers help. And the patterns and practices can be applied in the development of applications along with the use of the best features of the language.

Best regards

João Carlos Purificação
 
paul nisset
Ranch Hand
Posts: 353
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joao.
That's a great answer .I have a clearer picture of your book. I would definitely find it useful.

-Paul
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!