Tuesday, October 31, 2017

JS Frameworks with Salesforce

As I mentioned on previous entries, Salesforce has its good and bad things, but coming from a Java School, I still firmly believe that is not very Developer Friendly.

One of the things I wanted to try was to implement a Rich UI using JavaScript frameworks and either simple backend or APIs. However, Salesforce makes it kind of complicated.

The main challenge is around managing static resources, since all your code will be mostly in a bunch of JS files which have to be packaged and deployed in a Zip file as static resource.
But if you are patient enough you could implement something cool with a Visualforce page that might look like this:

On this particular approach we mixed Apex Remote Objects (Remote Object Model) with React. But that doesn't mean that you can't be creative and go for something more complex like using @RemoteAction in your controller methods.

Yeah, we could have tried something more Salesforcy like Lightning, but that's not what the cool kids use nowadays :D

Saturday, September 16, 2017

Basics of Java Garbage Collection

It’s an old joke from the time when Java was new and slow compared to other languages. Over time, Java became a lot faster. Today it powers many real-time applications with hundreds of thousands of concurrent users. These days, the biggest impact on Java’s performance comes from its garbage collection. Fortunately, in many cases, it can be tweaked and optimized to improve performance.

For most applications, the default settings of the JVM work fine. But when you start noticing performance issues caused by garbage collection and giving more heap memory isn’t possible, you need to tune and optimize the garbage collection. For most developers, it’s a chore. It requires patience, good knowledge garbage collection works and an understanding of application’s behavior. This post is a high-level overview of Java’s garbage collection with some examples of troubleshooting performance issues.

Continue reading here