About us
Contact us
WanariLeaks
Posts containing "code"
Solutions for a filterable sortable pageable list in Spring
József Lakatos
Alex Sükein
2018-11-20
(GraphQL, REST, …) Hello again everybody, it’s Süxy here! Today we are going to take a look at several custom implementations for the good old “filterable + sortable + pageable list” problem. In this post we are going to compare the oldschool REST solution with GraphQL and our custom solution (both at the source code level and performance)...
#comparison
#code
#databases
#graphql
Learning by Doing – BlockChain & Akka Tutorial
Gergő Törcsvári
2018-10-23
Intro BlockChain is a really hot topic in the IT world. Most of the developers have no idea how it works. There are general ideas in the heads, but it’s full of black-boxes. There are several blog posts and toy-projects online to demonstrate some basic idea about Blockchain. This will be one of these.
#Akka
#code
#databases
#Blockchain
Localization on iOS: how Wanari deals with it.
Róbert Klacso
2018-05-30
Localization, why? If you want to reach the most possible users with your app, you will probably need it to support multiple languages. Luckily we have a solution: localization. In this article I will mostly talk about how we started localization, what difficulties we faced, how we solved them, and what’s our current (not final)...
#code
#iOS
#Swift
#localization
Android MVI First Impressions
Tamás Agócs
2018-04-25
Editor’s note: This post on MVI was written in August 2017, however we felt appropriate to share it as we will be posting a sequel to it about Flux, Redux and MVVM. It’s a work in progress and we wanted to give you the whole picture of our journey with these code organization concepts on the Android side...
#Android
#code
#kotlin
#mvi
A more insightful look into IBDesignable and IBInspectable
Tamás Keller
2018-04-06
Intro If you’re an iOS developer, you’ve probably come across the keywords IBDesignable and IBInspectable at some point. Their concept is fairly simple and easy to grasp: An IBInspectable property can be set from the Interface Builder, and an IBDesignable view will reflect your IBInspectable property changes immediately in the IB after your set it.
#code
#iOS
#UI
Awesome Spring Specification How-to
Alex Sükein
2018-01-23
Introduction Okay so we made a filterable + sortable + pageable list before with Spring + Couchbase (you can read more about it here and here, I totally recommend you read those posts, cuz I’ll refer to them in this one). Actually filters are meant to be in an AND relation between the parameters (most of the cases).
#code
#databases
#spring
#WebDevelopment
Push Notifications – a bigger picture
Gábor Pap
2017-12-14
Many applications we create require the ability to send push notifications. Sometimes we are the ones who made the client and the backend side as well. The available tutorials are helpful but not always entirely clear; we met quite a few challenges. Let’s look at a specific example.
#Android
#code
#comparison
#databases
How to make a custom Username Password Authentication Filter with Spring Security
Alex Sükein
2017-11-28
Basically I’ll show you how to use Spring Security and how to customize it if you want. First we’ll implement the basic authentication with basic responses and other stuff, and I’ll show you how to customize the login and logout process as you wish Simple Authentication After you added the required dependencies described on Spring’s...
#code
#spring
#WebDevelopment
#authentication
Adventures of the Junior on the Memory Lake (Leak)
Zoltan Tudlik
2017-11-14
Introduction First of all, I’d like to apologize for the terrible pun in the title. It’s 8 o’clock in the morning and I’m just trying to get through the first hour with my coffee and my sense of humor is definitely not at the top of its game at this time. This is me, Zoli
#code
Ray Tracing with Akka – Part 4
Gergő Törcsvári
2017-11-07
Where did we stop last time? Read the first part of this series for an intorduction to ray tracing and what I wanted to achieve. Here we created a sphere and a shadow. Read part two for a discussion on creating a plane and letting our objects reflect and refract. Part three has been the most advanced, in here we built...
#Akka
#code
#Scala
#WebDevelopment
#ComputerGraphics
#raytracing
Spring & Multiple SQLs: How to easily connect your Spring application to multiple SQL databases
Alex Sükein
2017-10-18
This post will show you how to connect your Spring application to multiple SQL Databases at the same time. But first, let’s see when multiple DB connections are useful. For example you have an application and you have that application set up in different environments (let’s call it “prod app”), and you want to write...
#code
#databases
#WebDevelopment
Ray Tracing with Akka – Part 3
Gergő Törcsvári
2017-09-25
Where we left off In the last two posts, we reached the capabilities of a simple ray-tracer. We now have two types of shapes (sphere and plane), we can calculate shadows, reflections and refractions recursively. Before we move onto the more computation-heavy shapes, I am curious about how I could move our computations to separated nodes. So...
#Akka
#raytracing
#ComputerGraphics
#Scala
#code
Using Websocket on Android
Tamás Agócs
2017-08-29
This post is the sequel to this post about WebSockets. I know what you are thinking. But why? Using WebSockets is a really useful way of building realtime applications, because they provide a fast, full-duplex communication channel between the server and the client. There are many libraries out there, usually providing straightforward, easy-to-use APIs for developers...
#Android
#code
#websocket
Ray Tracing with Akka – Part 2
Gergő Törcsvári
2017-08-16
Where we left off In the first episode, we made a really basic (but parallel) ray tracer. It can handle spheres and use diffuse mapping. We made three types of actors, the renderer, who starts the tracing, collects the answers and saves the picture; the scene, who manages the trace requests, gets the closest object...
#Akka
#code
#Scala
#ComputerGraphics
#raytracing
Couchbase vol2, with/without Sync Gateway — better than your girlfriend :P
Alex Sükein
2017-08-04
CouchbaseQueryExecutor vol2. Welcome back ! In a previous post I wrote about a library I made to dynamically build queries for Couchbase. This dynamic query-building solves the filterable + sortable list problem. Hope you liked that post. In case you didn’t read it, you totally should read it . Today I’m going to introduce the changes I made to that library.
#code
#couchbase
#syncgateway
Ray Tracing with Akka – Part 1
Gergő Törcsvári
2017-05-31
About this series Most of the time, when you learn a new concept or a new programming language from a(n) (e-)book, you get the basics. But these are really far from the production-ready code with the new toolstack. The only good way to learn programming (like most of the other things in life) is to practice.
#Akka
#code
#Scala
#ComputerGraphics
#raytracing
Replacing fragments with Conductors’ Controllers
Gergely Szőke
2017-05-25
We got some good feedback about last week’s development workshop, titled “Replacing Fragments with Conductors’ Controllers” so we decided to share the slides, too! Replacing Fragments Workshop: Click the link to instantly download the slides (and): Get rid of Fragments! 😉
#Android
#code
The Best Scala Code Formatters and Linting Tools
Gergő Törcsvári
Barnabás Oláh
2017-05-04
Have you ever faced the problem: your PR on github is not merged because you didn’t follow the project style-guide? Or your IDE is reformatting the whole file when you just want to modify one line? We had some of theses problems with our own code-base here at Wanari (most of the time when we...
#code
#Scala
#CodeFormatter
XML Drawables for Android Developers
Gergely Szőke
2017-04-12
It’s good to know what you can do in xml to draw something on the UI. I recently noticed that I and some colleagues tend to overcomplicate simple tasks, because we don’t really know the built-in possibilities. Sometimes the design requires a not too complex, but not so simple (e.g. a shape) drawing on the...
#Android
#code
#drawable
#libraries
How are Scala Implicits more explicit than Java Generics?
Gergő Törcsvári
2017-04-05
This blogpost will show you how implicits can solve problems arising from/because of type erasure, proving that Scala implicits sometimes are more explicit than Java generics All of these code snippets can be copy-pasted to the REPL. Some of the require-s will fail, those are just to demonstrate the expected work without the need...
#code
#Java
#Scala
How to Write a Custom Protocol for Gatling?
Gergő Törcsvári
2017-02-10
I like to try out new tools and new things, so I decided to loadtest my newly written “simple chat” application to see how AkkaStreams handles load. Starting with load testing, there are some tools out there. The top three are JMeter, Gatling and Tsug. Tsug is written in erlang, and my half year long...
#code
#Scala
A Quick Guide to Implement a Cross-Browser AngularJS Pull-to-refresh Directive
Csenge Sóti
2016-12-21
What made me do this? As a newbie in frontend development, I have to admit, a few months ago I couldn’t even imagine myself writing my own UI component. In those good days, I just carelessly included other, ready-to-use components and never thought about why and how they really work. Sometimes these plugins caused me...
#code
#WebDevelopment
Deploying a Play! app to Azure via Jenkins
Kristóf Horváth
2016-12-14
Here at Wanari, we use Play Framework for many of our projects and maintain products on our own servers. Not too long ago, a client of ours requested to move such product to Azure Cloud. After a bit of research we found 3 options: We create a Virtual Machine on which we arrange the environment we use on...
#code
#AppDeployment
#Java
#Play
Monday Morning with a Content-Security-Policy HTTP Response Header
Csenge Sóti
2016-11-07
The story Mondays are always a unique mixture of a new beginning and unexpected surprises in every office. Sometimes you find a solution for a long-standing problem, but you never know what awaits you in your mailbox after a long, unclouded weekend. The Monday morning, on which my story begins, is a good example for...
#AngularJs
#code
#WebDevelopment
#security
CouchBase: how can you make a filterable list in SpringData?
Alex Sükein
2016-10-24
Sure it’s not Instagram filters; Couchbase filters are to be created here: What is Couchbase? Couchbase Server is a NoSQL document database with a distributed architecture for performance, scalability, and availability. It enables developers to build applications easier and faster by leveraging the power of SQL with the flexibility of JSON. http://www.couchbase.com/nosql-databases/couchbase-server Why do you...
#code
#comparison
#couchbase
Converting Your Project to Swift 3.0
Róbert Klacso
2016-09-26
Swift 3 is the first update since Apple announced Swift would be going open-source, and is packed with new features based on community direction. When converting to Swift 3, you’ll notice that practically every file needs changes! That’s largely because, all the Cocoa API names have changed. Or to be more precise, the API is...
#code
#Swift
#iOS
Play Framework WebSocket in Java
Alex Sükein
2016-09-19
What is WebSocket? When should I use it? WebSocket is an amazingly fast, easy to use and full-duplex way to communicate between client and server. WebSocket is recommended if you want a fast real-time application like a bid application, or a real time poker game. It’s easy to broadcast messages between users (or just send...
#code
#Play
#websocket
RxMp4Parser for Android App Developers
Tamás Agócs
2016-09-12
More and more Android apps provide video editing based features. This library is not a complete wrapper for the most recent Mp4Parser library. However, it provides a few useful features that are usually used by these apps. If it does fit your application’s needs, feel free to implement those features based on the current implementation. The...
#Android
#code
Java8 orElse versus orElseGet – easily misused
Gergő Törcsvári
2016-09-05
So, the Java8 Optional has two really cool (and similar) functions: the orElse() and the orElseGet(). If we quickly read the javadoc for each, we will only see a small difference; one of them has a T type as a parameter and the other has a function which must return with T (as a parameter).
#code
#comparison
#Java
A Beginner’s Guide to XML Parsing in Swift
Róbert Klacso
2016-08-24
Tons of document formats using XML syntax had been developed, like RSS, Atom, SOAP and XHTML, so it’s good to know, how to work with them. If you are not familiar with XML, it’s basically a precisely formatted text or string, which can be parsed into an array of objects containing the precious information.
#code
#comparison
#iOS
#Swift
Environment-dependent database drivers with Slick
Barnabás Oláh
2016-08-17
When we started to you use Slick for the first time, we had no clue on how to set up our code for multiple database types in our Play! application. In the development phase, our main goal was to run the application quickly with no interference with other developers’ code and development velocity, so we decided to use the in-memory database. We are dedicated towards Continuous Integration, so before every merge we run all the tests to check if the new code breaks the app.
#code
#databases
Rx Wrapper How-To for Critical Resource Tasks
Tamás Agócs
2016-08-10
Android contains several APIs that hold resources back. They need to be released before closing the current Activity or any other UI part. Doing things the old way, you are responsible for releasing these resources at the end of each activity. With complex tasks, it becomes quite hard to keep track of all of these resources. It is even more complicated when you use them in asynchronous tasks. A small programming overhead will eliminate this problem by replacing the async tasks with Rx streams and scheduling them on the background threads. So, Rx wrappers will ease thread handling. Here is how I use Rx wrappers to make them as awesome as possible:
#code
#Android
JavaScript Routing in Play! Framework
Barnabás Oláh
2016-07-27
I was working on a Play! Framework project and I was wondering why our whole API was available in one piece. It got me thinking whether there is a way to hide at least some parts of the API from the clients. Precisely because some of the clients didn’t have the privilege/permission to execute given operations, e.g. visiting restricted pages. I thought there should be a way to hide at least the operations that are on these restricted pages. I’ve found a way to do so and below it is.
#code
#Play
Play framework modularization: everything you wish you had been told
Gergő Törcsvári
2016-06-09
There are many tutorials and articles describing basic module functionality and how you can build it. These articles sometimes leave blanks of the needed information, so this post will do an in-depth tour of the topic applied in the Play framework. What is a module? In Play framework the modules are small functionality packages. These...
#code
#modularization
#Play