Beiträge getagged mit Scala
Verteilte Anwendung komplexer Filteroperationen auf große Bilder
(This is in German. I will translate it, if enough comments asking me to do it ) Bei der Aufklärung werden zur Auswertung von Satellitenbildern derzeit komplexe Filteroperationen auf dem jeweiligen Auswerter-PC ausgeführt. Die Filter können der allgemeinen Bildverbesserung dienen oder auch dafür sorgen, dass bestimmte Objekte wie Strassen oder Fahrzeuge auf einem Satellitenbild besser [...]
Scala Case Class as JPA EmbeddedId
It is a good idea to use case classes as EmbeddedId class. Id classes can be used to specify an embeddable composite primary key class owned by the entity (more…). Scala Case classes provide a default equals and an “automatic” generation of class properties. So lets create a really simple example Entity Class OSEmbeddedId. @Entity [...]
Yet Another Try: A REST Client with Jersey and Scala
[UPDATE] I pushed the code as SJersey to Github. For usage examples check out the test code here [/UPDATE] The are many awesome REST frameworks out there, for Java and for Scala as well. Most of the concepts do cover the server side. Important I know, but where are the smart client side APIs/DSLs? There [...]
Spatial Lucene Example in Scala
Spatial queries are getting more and more important e.g. if you want a query all restaurants in a distance of 5 kilometers around your actual position. This is not easy because our planet is a sphere (so this requires a projection of locations) and spatial calculations are very resource consuming. Thats why Lucene implemented a [...]
Neo4j Example written in Scala
I just converted the little Neo4j example (coming with the distribution) . The most tricky thing was the RelationshipType Enumeration (A more complex one-file-wrapper is here) [UPDATE] code changed to be a little more Scala like, by using a implicit conversion for Enumeration and a transaction wrapper [UPDATE] object RelTypes extends Enumeration { type RelTypes [...]
Command Pattern / Scala / AOP
Please read Cross Cutting Concerns in Scala as well. Assumption: We have a JAX-RS (REST) resource and a updateUserInfo service located at the URL . . ./UserInfo. Every call to this service requires a database transaction that is “manually” created. The question is: How do we handle this transaction scope (and how do we handle [...]
Cross Cutting Concerns in Scala
Although we can use powerful functional and object oriented languages like Scala, I think that Aspect Oriented Programming (AOP) is still one important part of software development. This article should show how easy to use AOP is. I can not write a better definition of CCC than: The Art of Separation of Concerns CCC on [...]
Constructor Arguments with JPA-Annotations
Scala provides the possibility to define constructor argument that are class properties as well. I recoded the entity OrganisationAssociation to use j__organisations as argument. The example entity from my post Relations with Scala Collections and JPA looks like this: @Entity @Table(name = “org_assoc”) @SequenceGenerator(name = “org_assoc_id_seq”, sequenceName = “org_assoc_id_sequence”) class OrganisationAssociation extends MIPEntity { @Id [...]
Relations with Scala Collections and JPA
Java Collection JPA’s One to Many and Many to Many relations require an attribute of type java.util.Collection like it is shown in the next example. This will be normally a List interface and a ArrayList implementation. … @OneToMany public Collection organisations = new ArrayList() … Unfortunately the Scala Library has a different interface concept that [...]
Circuit-Breaker for Scala
I posted my Scala Implementation of the Circuit Breaker state machine mentioned in the book Release It at github. I used the GoF State Machine pattern (like Ken DeLong), implemented it in Scala and added some factory stuff. Use it like this ?View Code SCALA1 2 3 4 5 6 7 8 9 10 11 [...]

Twitter
Xing
Facebook