Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
16thAirhacksQ&A.md

Ask questions and see you at July, 6th 2015 at 6.PM. CET: http://www.ustream.tv/channel/adambien Also see archives: airhacks.tv

  1. Do you see JavaScript frameworks in your work yet? Do you see MVVM becoming popular? [Michael K.]
  2. You mentioned in an earlier video the BCE package structure. For business-cases, this is really straight forward and a good structure. But there are many concerns, which does not really fit in this structure (sort of cross-concern), and because of this I have the question: Where to put the following concerns/classes:
  • ResourceLocator (für REST-SubResources) bzw. AbstractResources (for functionality, which every resource needs (like @Context definitions))
  • DateUtil? / MailService?
  • AbstractEntity
  • ApplicationConfiguration/JaxRSConfig
  • REST-Adapter/Interceptoren/Filter/Mapper
  • Tracing mit LoggerExposer?
  • ValidationController / Validation-Annotations (which do not belong to a concrete domain-object, but is rather used for any validation) [Ulrich C.]
  1. Is it ok to use DTO in a REST-method for request/response-payload? I would argue, that the DTO for the REST-method would separate the domain from a technical interface (REST). In addition, there is the possibility to version the interface (DTO) independently from the domain objects. Furthermore, there are some properties, which needs to be send via REST-interface, which are not needed in the domain objects. [Ulrich C.]

  2. I'm 21 years old , and i'm at 3rd year studying Computer Science. At the moment i'm creating some apps in Java and more specially in Android , i like the server side applications too. What i have seen so far is that Java is very powerful but we must always look at future. By that i mean C# with mono-project.com you can write the truly write once run everywhere that Java tried to offer. So i'm asking the Java guru if i should change to C# ? Also one more question , for next month's Q&A : How annotations are useful ? Explain few of them. Thanks in advance and sorry for your time. [Giorgos]

  3. I have long been a fan of JDO and welcomed JPA. Using annotations it is very easy to persist objects. However, there are very few examples to be found about how to persist third-party objects (assuming said objects provide getters and setters that will not change). I am thinking that using a wrapper around the objects would be one way to go, but I would like to hear how you would approach this. An example would be great, too. [Eddy]

  4. Which cdi annotations are available in jsp? I want to use conversationscoped to design wizard form. TY @8indaas

  5. Where would you put interceptors ? By definition they are "cross-cutting". In the project I am currently doing I have the boundary, control and entity
    packages for each business "component". Because of the cross-cutting nature of interceptors I created a fourth package currently named
    "interceptors". I know ! That's technical like "ejb" and
    "jsf" ! I thought about putting it in a control package. But the
    control package of which business component ? Just choosing at random a
    component seems contrary to the "cross-cutting" nature of
    interceptors. It would also introduce unwanted dependencies at the component
    level. Your insight on this would be much appreciated. Ronald

@kgampe5

This comment has been minimized.

Copy link

kgampe5 commented Jun 3, 2015

Hi Adam, could you please show how to Unit-test a boundary utilizing other @stateless and @Inject (CDI) objects? What exactly do i need to test it fastly without having Arquillian in place?A simple example would be very helpful.
regards Karsten

@antoniovl

This comment has been minimized.

Copy link

antoniovl commented Jun 9, 2015

Adam,
Is there a way to have dynamic finders in JPA like Grails or Rails? Any plans to include this feature on the new MVC framework?
Thank you
Antonio.

@aggenebbisj

This comment has been minimized.

Copy link

aggenebbisj commented Jun 10, 2015

What's your reaction to this post from Juergen Hoeller: http://spring.io/blog/2015/06/04/happy-second-birthday-java-ee-7-how-is-it-going-in-production

It is actually an interesting observation he is making.

@BLTuckerDev

This comment has been minimized.

Copy link

BLTuckerDev commented Jun 18, 2015

Hey Adam,

This one might be a little off topic but I figured its worth a try asking. How do you go about setting up a datasource in wildfly that talks to a mysql server via ssl. I have the mysql server's cert as well as a client key/cert combo.

thank you for your time, your blog and these sessions have taught me a lot about java EE!

@szlachet

This comment has been minimized.

Copy link

szlachet commented Jun 21, 2015

Hi Adam,
I have question related to cooperation with JavaScript in one war. I would like to make a simple app using AngularJS but the structure of this project not directly match to the maven project so I found that I can use yeoman-maven-plugin and everything started work fine but then maven build takes too much time. I think that my approach is a little bit too much complicated :) So can you tell me how you do this, I will be grateful.

@szlachet

This comment has been minimized.

Copy link

szlachet commented Jun 21, 2015

Hi Adam,
I have one more question. How to test two microservices where one communicates with the second.via REST. Exactly I wonder which interfaces should I mocked. Right now (we don't have exactly micoresrvices :)) I test both applications separately. Is it enough? Someone can for example change interface - I know that this is a strange reason but can happen :) Thanks in advance.

@masumcse1

This comment has been minimized.

Copy link

masumcse1 commented Jun 25, 2015

Question 1 : is it possible build web application MVC1 ( ozark ) with JAVAEE7 ? is it enough matured currently for large scale web application ?

Question 2 : in JPA based app. I am facing some problem in
em.mergeI().------------ transaction related problem.
to overcome this problem i am use em.createNativeQuery ("update into").

             please give comments : is it recommend write way ?

Question 3 : what is the best practice primary key generation for large scale financial application ? (for jpa)
a) auto-increment / not auto-increment ?
b) table / sequence strategy ?

Question 4 : how to do audit in JPA ?

@agritsik

This comment has been minimized.

Copy link

agritsik commented Jun 26, 2015

Hello Adam!

Could you suggest how to organize CI process with jenkins and docker. I have a set of the java ee apps and for each of them I configured docker. So, I want to use jenkins to run integration tests and then rebuild image and rerun container for each application.

  1. As I understood the most straightforward way is to use separate VM for CI with preinstalled docker and jenkins on localhost. So, Jenkins tracks changes, updates source, then runs IT via maven and then reruns containers on localhost.
  2. But docker has official image for jenkins and I remember that you use it. If you run jenkins in docker container, how do you organize access to parent host for running IT, rerunning containers with apps? Or do you use docker in docker approach? Here is an example https://github.com/jpetazzo/dind
    Or maybe another way .... I'm really confused :)

Thank you for your answer!

@patrickgarner

This comment has been minimized.

Copy link

patrickgarner commented Jun 28, 2015

Can you provide an example of how to send text to cell phone from web application? Some sites provide an authorization code to cell phone as part of authentication.

@team4rk

This comment has been minimized.

Copy link

team4rk commented Jun 30, 2015

Hi, Adam. When using bce and jsf where do you place your backing beans?

@baztian

This comment has been minimized.

Copy link

baztian commented Jul 3, 2015

Using BCE/ECB I can group my business logic in components. Sometimes I'm struggling to find the right place to put a entity that is used by more than one component. Assume you're writing a webshop. Where would you put the order entity that is used by both components placeorder and shipmentinfo?

  1. placeorder because that's where the order is created
  2. put placeorder and shipmentinfo in just one componen
  3. create a "common" component
  4. Something else (please explain)
@baztian

This comment has been minimized.

Copy link

baztian commented Jul 6, 2015

One more question regarding ECB: How would you design a outbound boundary?
My approach would be to create a separate component having at least a boundary and a control. The control is required to be used by other components. The boundary should not be used directly as it only capsules the interface to the foreign system.

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 6, 2015

Will the Open Sourced Swift 2 beat the Power of Java in the EE sector? What's your opinion?

@ghost

This comment has been minimized.

Copy link

ghost commented Jul 6, 2015

What are the possibilities to build up a ReST-API in Front of a Stateful Business-Logic? How can a jax-rs resource invoke a SFSB? Does this make sense at all?

Example: There is an existing Job-System where we have to build a ReST API in front. There's a "Job-List" Resource, where the API let's you post = create new Jobs. A Job Resource itself is based upon / using a SFSB. Now, when you get = request the status of a Job, the corresponding SFSB must be addressed.

Can you name a pattern for it, like Session-Facade or so?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.