Rest + graphQL= RestQL.. idee sparse

Dopo anni di sviluppi usando api REST.. Guardando avanti, ho provato graphQL.. In varie salse..in micronaut, da solo.
Ma alla fine la riflessione è: ce n’era veramente bisogno?

Perché non creare un aggregatore REST, che faccia esattamente quello che fa graphQL, ma restando nell’ambito REST?

In un progetto che stiamo creando, abbiamo creato un qualcosa di simile, direttamente da db (per la modellazione libera delle tabelle) https://snello.io

Mancherebbe aggiungere un aggregatore REST (asincrono, reattivo..magari usando solo api standard java e non RXjava)+ un JSON merger..

Ho cominciato a studiare:
https://blog.gilliard.lol/2018/09/25/Java-11-Http-Client.html
https://golb.hplar.ch/2019/01/java-11-http-client.html
https://github.com/ralscha/blog2019/tree/master/java11httpclient/server
https://grokonez.com/java/java-8/java-8-multiple-completablefutures
https://github.com/jsurfer/JsonSurfer

L’idea è questa:

  • mantenere lo standard rest
    Create: POST
    Retrieve: GET
    Update: PUT
    Delete: DELETE
  • aggregare risorse JSON usando  JSON Pointer (RFC6901), JSON Patch (RFC6902) or JSON Merge Patch (RFC7386)

    https://www.voxxed.com/2015/12/10441/

vediamo cosa verrà fuori..

regular expressions in a simple way: VerbalExpressions

Surfing to find new things, i found this important library.. amd i thought:
‘how is possible survive to regular expressions, without using this VerbalExpressions???

If you worked with regex, when you read the initial example.. the smile open your face…

 

VerbalExpression testRegex = VerbalExpression.regex()
                                                .startOfLine().then("http").maybe("s")
	           				.then("://")
	           				.maybe("www.").anythingBut(" ")
	           				.endOfLine()
	           				.build();

// Create an example URL
String url = "https://www.google.com";

// Use VerbalExpression's testExact() method to test if the entire string matches the regex
testRegex.testExact(url); //True

testRegex.toString(); // Outputs the regex used:
                      // ^(?:http)(?:s)?(?:\:\/\/)(?:www\.)?(?:[^\ ]*)$

Is it very very fantastic?

https://github.com/VerbalExpressions/JavaVerbalExpressions

vertx web services

if you need to create ws server:

  • https://groups.google.com/forum/#!topic/vertx/V20YVP3dN9Y
    • (how to generate xml in vertx – https://github.com/FasterXML/jackson-dataformat-xml)
  • http://stackoverflow.com/questions/20460870/java-soap-request-reading-soap-response
  • https://docs.oracle.com/javase/7/docs/api/javax/xml/soap/SOAPMessage.html

http://www.mkyong.com/java/sax-error-content-is-not-allowed-in-prolog/

we need to find a way to parse a multipart/related txt in xml message + attachments

 

 

enterprise logging using jboss tools

Reading the errors of wildfly – weld, sometimes you can see some NUMBERS to identify the error..

/**
* Log messages for Contexts
* Message Ids: 000200 – 000299
*/

@MessageLogger(projectCode = WELD_PROJECT_CODE)
public interface ContextLogger extends WeldLogger

 

@LogMessage(level = Level.TRACE)
@Message(id = 200, value = “Looked for {0} and got {1} in {2}”, format = Format.MESSAGE_FORMAT)
void contextualInstanceFound(Object param1, Object param2, Object param3);

The theory:
https://developer.jboss.org/wiki/JBossLoggingTooling
the code:
https://github.com/wildfly/quickstart/tree/11.x/logging-tools

ejb3: transactions

sometimes, i need a little review of things…

http://www.developerscrappad.com/619/java/java-ee/making-sense-of-ejb3-x-transaction-attributes-part-2-mandatory/

 

http://www.developerscrappad.com/572/java/java-ee/making-sense-of-ejb3-x-transaction-attributes-part-1-requires_new/

 

http://www.developerscrappad.com/748/java/java-ee/making-sense-of-ejb3-x-transaction-attributes-part-4-never/

 

http://www.developerscrappad.com/547/java/java-ee/ejb3-x-jpa-when-to-use-rollback-and-setrollbackonly/

 

http://www.developerscrappad.com/435/java/java-ee/ejb-3-x-jpa-bean-managed-transaction-with-javax-ejb-usertransaction/

 

http://what-when-how.com/enterprise-javabeans-3/container-managed-transactions-ejb-3/

angular connect 2016

…a lot of thinks..

Angular 2 Testing for Hackers (workshop code):
https://github.com/angular-workshops/angular2-testing

Building Mobile Apps With Ionic 2 (workshop code) :
https://github.com/saniyusuf/ac-2016-todo
https://github.com/saniyusuf/ac-filminator

Managing Async With RxJS 5 and Angular 2 (workshop code) :
https://github.com/blesh/rxjs-workshop-angular

AngularConnect 2016 IoT Workshop
https://docs.google.com/document/d/1MuThvPnteYybmcsAKRhb3m87Q44WztSsR9sYq4BLRxc/edit#heading=h.1mit7hvm6z6w

https://medium.com/@urish/reverse-engineering-a-bluetooth-lightbulb-56580fcb7546#.ko2mkm27o

Bulb Ionic App (workshop code) :
https://github.com/gilf/bulb-ionic

Optimizing Angular Apps (slides):
https://docs.google.com/presentation/d/1oky6Px511zXdhfGQUmA9Pc6wdOYkkXgWxl3p7zOQP6A/preview?slide=id.p

 

vertx on java one 2016

Vert.x – From zero to (micro)-hero

Clement Escoffier, Julien VietVersion 0.5,August 30th, 2016

 

Let’s start from the beginning…. Vert.x. What’s Vert.x ? That’s a pretty good question, and probably a good start. If you go on the Vert.x web site, Vert.x is defined as “a toolkit for building reactive applications on the JVM”. This description is rather fuzzy no ? What’s atoolkit ? What are reactive applications ? In this lab, we are going to explain these words, and build an application using Vert.x illustrating what Vert.x is. This application is going to be composed by microservices. Another buzzword to be trendy ? No, Vert.x was promoting microservices before everyone and his dog jumped on the bandwagon…..

http://escoffier.me/vertx-hol/