Prezentacija pokriva sljedeće teme:
- Što je REST Web API?
- Resursi i njihove reprezentacije
- Dizajn API-ja baziranih na hipermediji (strategije, hipermedija formati, semantika, procedura)
- HTTP i REST
- Primjer(i) RESTful Web API-ja
Zašto je REST stil programske arhitekture tako popularan za realizaciju otvorenih informacijskih sustava? Temeljem iskustava stečenih kroz implementaciju ISVU REST API-ja (https://www.isvu.hr/api/) pokazan je postupak kako se REST API može realizirati te na koje detalje treba posebno paziti.
Need for seamless communication between web browser and back-end server has resulted in technology called WebSocket. In this presentation we will see what is WebSocket and how can we leverage Spring framework and STOMP (Streaming Text Oriented Messaging Protocol) to display GPS coordinates on OpenLayers map in real time.
Auditing of business applications is very important especially in online banking because we are working with monetary transactions. Privredna banka Zagreb had an requirement
to implement a flexible system to audit user activity in our online banking for SME clients especialy since are authorization model was rather complex, for that we decided to use api with Java filters and intereceptors on are web application and for storage system we choosed MongoDB NoSQL database. In this presentation we are going to show you how we did it.
Prezentacija pokriva sljedeće teme:
- Što je REST Web API?
- Resursi i njihove reprezentacije
- Dizajn API-ja baziranih na hipermediji (strategije, hipermedija formati, semantika, procedura)
- HTTP i REST
- Primjer(i) RESTful Web API-ja
Zašto je REST stil programske arhitekture tako popularan za realizaciju otvorenih informacijskih sustava? Temeljem iskustava stečenih kroz implementaciju ISVU REST API-ja (https://www.isvu.hr/api/) pokazan je postupak kako se REST API može realizirati te na koje detalje treba posebno paziti.
Need for seamless communication between web browser and back-end server has resulted in technology called WebSocket. In this presentation we will see what is WebSocket and how can we leverage Spring framework and STOMP (Streaming Text Oriented Messaging Protocol) to display GPS coordinates on OpenLayers map in real time.
Auditing of business applications is very important especially in online banking because we are working with monetary transactions. Privredna banka Zagreb had an requirement
to implement a flexible system to audit user activity in our online banking for SME clients especialy since are authorization model was rather complex, for that we decided to use api with Java filters and intereceptors on are web application and for storage system we choosed MongoDB NoSQL database. In this presentation we are going to show you how we did it.
HUJAK Community keynote presentation
Branko Mihaljević
Stjepan Matijašević
Hrvoje Đurđević
Slavko Žnidarić
Marin Orlić
Aleksander Radovan
Jurica Križanić
HUJAK Community keynote presentation
Branko Mihaljević
Stjepan Matijašević
Hrvoje Đurđević
Slavko Žnidarić
Marin Orlić
Aleksander Radovan
Jurica Križanić
Konferencija Javantura Zagreb 2014 by HUJAK
Alfresco – Neo4j integracija – nova vrsta CMS aplikacija by Damir Murat
Graph baze imaju mnoge primjene, a jedna od njih je obogaćivanje i novi način pretraživanja i korištenja postojećih podataka. Ako prateći tu ideju povežemo CMS sustav Alfresco (www.alfresco.com) i graph bazu podataka Neo4j (www.neo4j.org), otvara se mogućnost kreiranja nove vrste CMS aplikacija. Dodamo li u mješavinu još i tehnologije kao što su Ext JS, D3.js i Grails, rezultat može biti vrlo atraktivan za krajnjeg korisnika.
[TVZ računarstvo] Dinamičke web aplikacije, predavanje 9. Stipe Predanic
Predavanje iz Dinamičkih web aplikacija, 9. predavanje
Video: https://www.youtube.com/watch?v=NIMP-02mPvM&index=10&list=PLYqeapOP_CtS0kbdbo_GXFgnS81JGAd8L
Tema: Templete i framework (MVC)
Datum snimanja: 5.5.2016
Konferencija Javantura Zagreb 2014 by HUJAK
Vert.x – asinkroni, skalabilni i poliglotni framework nove generacije by Mihovil Rister
Vert.x (vertx.io) je relativno novi, asinkroni, poliglotni framework uvjetovan događajima te baziran na JVM-u, a svojevremeno jedan od najpraćenijih projekata na GitHubu. Također, bio je i razlog ozbiljnih napetosti između Red Hata i VMwarea, koje su umalo zaustavile projekt. Cilj ovog predavanja je predstaviti Vert.x svijet, pokazati osnove, te ponuditi najbolja iskustva, prakse i preporuke pri njegovoj uporabi.
Vert.x (vertx.io) je relativno novi, asinkroni, poliglotni framework uvjetovan događajima te baziran na JVM-u, a svojevremeno jedan od najpraćenijih projekata na GitHubu. Također, bio je i razlog ozbiljnih napetosti između Red Hata i VMwarea, koje su umalo zaustavile projekt. Cilj ovog predavanja je predstaviti Vert.x svijet, pokazati osnove, te ponuditi najbolja iskustva, prakse i preporuke pri njegovoj uporabi.
Javantura, Zagreb, 2014.
Javantura v7 - Behaviour Driven Development with Cucumber - Ivan Lozić
Behaviour-Driven Development (or TDD for that matter) is one of the pillars of Software Quality. While it is very important, not many of us do it or do not have the support from the management to invest time in it. Commonly, it has been described as a waste of time or an intangible effort conflicting with the deadlines. In this presentation, I would like to share my experiences with the Behaviour-Driven Development, the effects of not having it at all, as well as the outcomes of working on projects where a significant amount of behavior is automated with Cucumber tool.
By attending this session you will be able to learn what BDD and Cucumber are, how to build Cucumber tests and hear about first-hand experiences around automating specifications.
Javantura v7 - Learning to Scale Yourself: The Journey from Coder to Leader - Daniel Strmečki
Your success depends on others, a 1-man army can only achieve so much. The only way to progress from coder to leader is to learn how to scale yourself. Nowadays, you can become a Senior Developer with just a few years of experience. After that, there are many roads and possibilities you can take. Whether you decide for a developer, architect, manager or a mixed career, at one point, you will need to become a leader. In the first chapter of the lecture we will start a discussion on how to get there. Since your time is limited, you need to mentor, coach, motivate and engage others. Start with making a stable foundation, like setting up a proper onboarding process. If you help people around you, they will for sure talk about it, and your manager will hear it. Also, demonstrate ability in everyday work: coding, project management, client-focus, communication and care about others. Always stick to your values and keep high standards. In the second chapter we will discuss the challenges that turn up once you get there. At that point you will deal with people more than technology. You will need to step away from coding for meetings very often. Interruptions will happen every day and it we be very hard to maintain “the flow”. You will need to learn how to delegate and drive topics without implementing them yourself. Visit the lecture to find out some techniques for dealing with interruptions, meetings, prioritization, people and their motivation.
The State of Java and Software Development in Croatia (Community Keynote) by dr. sc. Branko Mihaljević, Aleksander Radovan, and doc. dr. sc.Martin Žagar at the 8th International Java Conference in Croatia - JavaCro '19
In this community keynote by HUJAK, we want to present and compare the current state of Java and related software development in Croatia, our part of Europe, and worldwide. Therefore, we will start by discussing the latest global trends in software development and what does it mean in our rapidly evolving world full of new technologies based on IoT, Machine Learning and AI, Blockchain, Virtual Reality, and Robotics, to which we must respond to ASAP. Of course, when addressing those contemporary technology trends, we will focus mostly on our country and the region. In the other part, we will discuss the major events in the world of Java that happened in the last few years since Java 8 and Java 9/10/11 were widely adopted. We will see what Java 11 and 12 brought us and what developers are mostly using (or not) and why, as well as what will be there interesting in Java 13 and beyond, including new features from incubator projects Amber and Valhalla, and new ideas from projects Loom, Panama, Skara, and Metropolis. Once again, we are going to take a typical developer’s point of view on software development challenges in this part of Europe, and we will discuss the future of our software developers from the perspective of how to become one (educational institutions and practice) and how to get/earn a good job (local employers and the job market). We intend to close this keynote with details of (y)our favorite Java community aka HUJAK.
This is a story about our exploration of aspects of Polyglot Programming and Memory Management in a (J)VM. The first part is focused on our research of performance of GraalVM, an open-source, high-performance polyglot virtual machine written in Java, as well as an accompanying Graal compiler, supporting JIT and AOT compilation, with outstanding inlining and escape analysis algorithms. In the second part we are dealing with aspects of automatic memory management and garbage collection analysis in an existing JVM, thus comparing the most commonly used (older) garbage collectors such as Serial, Parallel (Old), CMS, and G1, with contemporary and default Parallel Full G1, and new experimental ZGC and Shenandoah, across several JDKs using a common benchmark suite.
We develop an application prototype with Java and Hyperledger Fabric to facilitate people in the company to sell domestic goods to each other using marketplace application. Java and SmartGWT were used to develop UI, part of data were stored in the relational DBMS, while orders and balances were stored on the blockchain, specifically Hyperledger Fabric.
Bugs happen! It is a developers life fact. Let'e explore one way we the developers can help customers to make batter bug reports.
During lifecycle of systems and applications that support complex and long running business processes it is often the challenge to get accurate bug report. In this talk we will present one custom developed solution that we used on several our projects as well as our experiences in using this approach.
With several years of remote work experience in an agile environment, working from beautiful Zagreb for clients abroad and trying out different distributed team setups, we will share the motivation and philosophy behind it. We will also cover best practices, challenges and general tips & tricks in different segments such as work organisation, technical requirements, social requirements, methodology etc.
This talk is recommended for all developers who want to start working remotely or improve the way they already do it, employers who consider establishing distributed teams inside of their companies and clients searching for partners who have distributed teams.
While Kotlin is designed to work well with Java by default, we'll still need to some work to get clean and idiomatic code in both languages.
In this talk we'll cover both how to make your Java code more Kotlin friendly and how to make your Kotlin code nicer to use from Java.
HATEOAS is without a doubt, the least understood pillar of REST. It seems difficult to implement and shows no immediate reward for it, so many developers don't even bother. The truth is, it just has some bad PR and a horrible acronym that sounds like a breakfast cereal. Join me to take a look at the theory and practice behind using hypermedia by examining both web services and web clients. Along the way we will look at some exciting upcoming Spring HATEOAS features, like the Affordances API, and talk about what the future holds for hypermedia in your web services.
In the last few years we witnessed big changes in how we actually build, deploy and run applications with the rise of Microservices Architectures, Containers, Kubernetes, and DevOps practices. Those amazing improvements need a cultural shift
based on continuous improvement and learning in order to deliver business value and delight our customers.
But how could a team achieve this ambitious goal?
This talk will introduce the attendees to a revolutionary open source project, called Jenkins X, which attempts to achieve this goal. It is basically a reimagined CI/CD Ecosystem for Kubernetes built around Jenkins, either with a classical master or leveraging knative serverless functions.
After this talk, attendees will be able to develop effectively in a cloud native way in any language on any kubernetes cluster!
Let's forget Scrum and be truly Agile! Finally!
Individual microservices are relatively easy to develop, but managing a distributed system composed of microservices is never a simple task. Kubernetes helps, but it falls short of providing everything such a system needs. This is where the Istio Service Mesh comes in.
Running microservices in production, you'll soon realize you want things like traffic splitting, automatic connection retries, timeouts and failovers, secure communication and authentication between your services, distributed metrics, tracing and logging. By introducing Istio into your architecture, you get all of that and more. And you get most of it without changing your code at all.
In this talk, you'll see a demonstration of Istio in action and learn about the tricks that make its magic possible.
Do your customers keep complaining about bugs in your software application? Does it take you too much time to implement new features? If yes, then you probably have issues with the quality of your application. Join me to find out what practical steps you can follow to improve the quality of your application!
We are used to give commands to our computers with keyboard - by natural language recognition improvement, services around this technology stack become better and better each day. Using Google Home mini device, IFTTT service and java web socket netty server hosted on red hat Openshift platform, control your loving private computer terminal or any application from distance with your bare voice.
Quality control during apps development demands continuous testing. Selenium, Cucumber, Jenikns and Docker can help us in that process. Hrvoje will share his experience about that subject.
Bugs are a daily cause of stress in our work as Java developers. Those pesky things can hide behind core concepts in Java 9 and 10—there is no way out of this. If we don’t keep up to date with new Java versions, bugs will take over our projects. But can we have fun hunting them? You bet! How about solving a series of Java puzzles as a way to master concepts and save a lot of time finding those tricky bugs? In this session, attendees can help the bug hunters solve fun Java challenges, gain a clear understanding of what causes the most-stressful bugs—and have fun eliminating them from projects.
In H2020 EU project symbIoTe (symbiosis of smart objects across IoT environments) we have been building IoT middleware based on microservices programmed in Java with Spring Boot and Spring Cloud components. Here I will present our experiences in developing such services in distributed team across EU and employed by 15 organizations. I will present organizational and technical advantages and drawbacks as well as our choices in building such system.
More from HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association (20)
Javantura v6 - Building IoT Middleware with Microservices - Mario Kusek
JavaCro'15 - RESTful Web APIs Design - Denis Kranjčec
1. Dizajn REST Web API-ja
Denis Kranjčec, Srce
denis.kranjcec@srce.hr
2. Dizajn REST Web API-ja
• Što je REST Web API?
• Resursi i njihove reprezentacije
• HTTP i REST
• Dizajn API-ja baziranih na hipermediji (strategije, hipermedija
formati, semantika, procedura)
• Primjer(i) RESTful Web API-ja
3. Što je REST? (1)
• „Representational State Transfer (REST) is a software architecture
style consisting of guidelines and best practices for creating
scalable web services. REST is a coordinated set of constraints
applied to the design of components in a distributed hypermedia
system that can lead to a more performant and maintainable
architecture.” - https://en.wikipedia.org/wiki/Representational_state_transfer
• „The World Wide Web represents the largest implementation of a
system conforming to the REST architectural style.”
• „The term representational state transfer was introduced and
defined in 2000 by Roy Fielding in his doctoral dissertation.”
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
4. Što je REST? (2)
• Constraints
1. Client–server
2. Stateless
3. Cacheable
4. Layered system
5. Uniform interface - „REST is defined by four interface constraints:
identification of resources; manipulation of resources through representations;
self-descriptive messages; and, hypermedia as the engine of application
state.”
6. Code on demand (optional)
5. Što je REST Web API?
• Poštuje REST ograničenja
• Baziran je na HTTP-u
• Izložen je kroz točno jedan početni URL (npr.
https://www.isvu.hr/api/)
• Koristi standardne HTTP metode (npr. GET, POST, PUT, DELETE)
• Koristi „Internet media type” za reprezentaciju podataka (JSON,
HTML, HAL, ...) - http://www.iana.org/assignments/media-types/media-types.xhtml
• Koristi hypertext za opisivanje stanja i povezanih resursa
6. Resurs
• Resurs može biti bilo što što je dovoljno važno da ga se treba
referencirati.
• To može biti neka datoteka, redak u tablici u bazi, slika, ...
• Resurs ne mora biti nešto pohranjeno na računalu, nego to može
biti bilo što kao npr. čovjek, svemir, srce, ideja, knjiga, ...
• Ključno je da svaki resurs mora imati svoj jedinstveni URL
7. Reprezentacija resursa
• Reprezentacija resursa je bilo koji elektronički dokument koji sadrži
bilo koju informaciju o resursu.
• Kada klijent zatraži (GET) neki resurs, server bi mu trebao vratiti
dokument koji opisuje resurs na neki razumljiv način – to je
reprezentacija resursa.
• Resurs (uglavnom) ne može biti razmijenjen kroz internet, to može
biti samo njegova reprezentacija.
• Jedan resurs može imati više reprezentacija – JSON i XML, JPEG
i PNG, ...
• Klijent vidi isključivo URL i reprezentaciju resursa.
8. HTTP metode - značenje
• GET – dohvaća reprezentaciju resursa
• POST – kreira resurs niže u hijerarhiji temeljem poslane reprezentacije
• PUT – zamjenjuje u potpunosti stanje postojećeg resursa s poslanom
reprezentacijom
• DELETE – briše resurs
• HEAD – vraća isključivo HTTP Header, ali ne i reprezentaciju resursa
• OPTIONS – vraća HTTP metode koje resurs trenutno podržava
(temeljeno i na stanju resursa)
• PATCH – zamjenjuje dio stanja resursa s poslanom reprezentacijom
(dodatak na HTTP standard)
9. Hipermedija
• Hipermedija (hypermedia) povezuje resurse i opisuje koje su akcije nad tim
resursima moguće
• Server tako daje do znanja klijentu koji su sljedeći koraci mogući, a klijent odlučuje što će
se od toga dogoditi („koji link će pratiti”)
• To je ključna razlika u odnosu na uobičajene API-je
• Pomoću hipermedije klijent zna kreirati HTTP zahtjev (URL, HTTP metoda, HTTP
zaglavlje i reprezentaciju koju može poslati).
• Postoji veliki broj hipermedijskih standarda
• HTML
• URI Templates – http://example.org/search/{keyword}
• Link Header - https://tools.ietf.org/html/rfc5988
• Link Relations - http://www.iana.org/assignments/link-relations/link-relations.xhtml
• ...
10. Hipermedija – primjeri (1)
• Collection+JSON – baziran na collection pattern-u i JSON-u, dizajniran za
rad i pretraživanje kolekcija podataka. (http://amundsen.com/media-types/collection/)
• Atom Publishing Protocol (AtomPub) – protokol za objavu i rad s web
sadržajima (tipično „novinskim člancima”) temeljen na collection pattern-u
(https://tools.ietf.org/html/rfc5023)
• HTML – temeljni jezik za kreiranje dokumenata i aplikacija za najširu
moguću upotrebu
• Namijenjen ljudima
• Microformats (ver. 1 i 2) – dizajnirani za ljude i strojeve, to su jednostavni i
otvoreni podatkovni formati temeljeni na prihvaćenim standardima
(http://microformats.org/). Primjeri su hCard/h-card, hCalendar/h-event -
<span class="h-card">Pero Perić</span>
11. Hipermedija – primjeri (2)
• Hypertext Application Language (HAL) – općeniti jednostavni format koji omogućava
jednostavno povezivanje između resursa (http://stateless.co/hal_specification.html):
• JSON (application/hal+json) i XML (application/hal+xml) varijanta
• Definirani su samo resursi i linkovi
• Uniform Basis for Exchanging Representations (UBER) – minimalni dizajn s podrškom za
hipermedijom
(https://github.com/mamund/media-types/blob/master/uber-hypermedia.asciidoc):
• JSON (application/vnd.amundsen-uber+json) i XML (application/vnd.amundsen-uber+xml) varijanta
• JSON API - http://jsonapi.org/
• Hypermedia-Driven Web APIs (Hydra) - http://www.markus-lanthaler.com/hydra/
• Siren - https://github.com/kevinswiber/siren
• ...
12. Profili (profiles)
• Kako saznati dodatne detalje o semantici reprezentacije resursa koji nisu definirani
media type-om („gdje je dokumentacija?”)?
• 'profile' Link Relation Type - https://tools.ietf.org/html/rfc6906
• Na tom linku programer/aplikacija može saznati sve detalje o reprezentaciji –
ograničenja, konvencije i proširenja).
• Application-Level Profile Semantics (ALPS - http://alps.io/) – format za jednostavan
opis semantike na razini aplikacije (slično kao microformats).
• Može opisati aplikacijski semantiku uz HTML, HAL, Collection+JSON itd.
• Opisuje akcije i podatke servisa, ali ne i format poruka, protokol ili alate.
• JSON for Linking Dana (http://json-ld.org/) – opisuje context kroz poseban JSON
dokument u kojem se nalaze dodatni linkovi s dodatnim opisom semantike.
• Moguće je i uključiti dodatne informacije u neke formate – npr. HTML, HAL
13. Postupak dizajna REST Web API-ja (1)
1. Popisati sve informacije koje klijent API-ja želi dobiti iz API-ja ili ga
predati u API.
2. Definirati resurse i njihove reprezentacije te veze među njima (site map).
Obično je to dijagram gdje su elementi reprezentacije resursa, a veze
među njima linkovi. Linkovi i njihovi nazivi („rel”) su tu ključni.
3. Pronaći standarde koji odgovaraju u konkrentom slučaju
• Link Relations - http://www.iana.org/assignments/link-relations/link-relations.xhtml
• Dodatne opise - http://schema.org/ i http://apis.io/
4. Odabrati media type
• Poželjno neki stanardni - Media Types - http://www.iana.org/assignments/media-
types/media-types.xhtml
14. Postupak dizajna REST Web API-ja (2)
5. Opisati profile
• I tu je poželjno bazirati se na standardima
6. Implementirati API baziran na dijagramu iz točke 2.
• Koristiti media type iz točke 4.
• Koristiti profile iz točke 5.
7. Objaviti početni URL – u idealnom slučaju to je dovoljno da klijenti počnu
koristiti API, ali u praksi još vjerojatno nedostaje dokumentacija, upute i
primjeri.
15. Primjeri RESTful WEB API-ja
• Amazon Web Services
• PayPal - https://developer.paypal.com/docs/api/
• GitHub - https://developer.github.com/v3/
16. RESTful Web APIs
• RESTful Web APIs - By Leonard Richardson and
Mike Amundsen
• http://restfulwebapis.com/
• {API}Search - http://apis.io/
• Mike Amundsen (@mamund)
• http://amundsen.com/
• Roy T. Fielding (@fielding)
• http://roy.gbiv.com/untangled/
17. Srce politikom otvorenog pristupa široj javnosti
osigurava dostupnost i korištenje svih rezultata rada
Srca, a prvenstveno obrazovnih i stručnih informacija
i sadržaja nastalih djelovanjem i radom Srca.
Ovo djelo je dano na korištenje pod licencom Creative
Commons Imenovanje-Nekomercijalno-Bez prerada
4.0 međunarodna.
www.srce.unizg.hr creativecommons.org/licenses/by-nc-nd/4.0/deed.hr www.srce.unizg.hr/otvoreni-pristup
Dizajn REST Web API-ja
Denis Kranjčec, Srce
denis.kranjcec@srce.hr