Saturday, December 23, 2017

Partnering with Amazon

Amazon.com
Sounds impressive, doesn't it?

Unfortunately, integrating with them it could be a challenge, I guess the bigger a company becomes the more bureaucratic and slow becomes.

My experience dealing with them it's been less than pleasant and I can't complain about personalities but more about constant rotation of personnel on their side, slowness (every little thing with them takes 2 weeks that become 4 and sometimes 6) and lack of clear communication, you can't even talk to an actual Engineer.

I guess it's the price you have to pay when doing business with them.

Yeah, I know, this entry is more a way to blow some steam rather than providing useful insights.

My only advice I can give about Amazon.com is be patient and keep your business involved so you don't get dinged.

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

Thursday, August 24, 2017

TLS 1.0 has been disabled - Salesforce

First things first: What's TLS and why did Salesforce moved to 1.x and had to disable TLS 1.0?

TLS 1.0

What kind of improvements brings to the table TLS 1.1?

  1. Added protection against cipher-block chaining (CBC) attacks.
  2. Support for IANA registration of parameters.
Clearly TLS 1.1 is more secure (compared to 1.0).

The things that can be affected in your instances are as below:

  • Web requests to Salesforce URLs that require authentication. 
  • Web requests to the login page of a My Domain.
  • Web requests to Community or Force.com sites.
  • Web requests to Customer and Partner portals.
  • Web to lead, web to case, and web to custom object requests API requests to Salesforce Callouts using Apex to a remote endpoint.
  • Workflow outbound messaging callouts to a remote endpoint Callouts using Lightning Connect to a remote endpoint AJAX proxy callouts to a remote endpoint.
  • Delegated authentication callouts to a remote endpoint Mobile apps developed with Salesforce Mobile SDK need to upgraded to SDK v4.


That's a big list and if you are an enterprise org, then I am sure you would have at least one of the above things in your org and you may find it to be broken if you don't take any action.


So below are some of the suggestions to fix this issue:
  • If you are using force.com migration tool and ANT process be on a latest ANT version. 
  • If you are using Java 7, upgrade to Java 8 since Java 8 by default uses 1.2
  • If have an integration running, like WebMethods, there will be setting to disable TLS 1.0 or to enable TLS 1.2 (see -Dhttps.protocols=TLSv1.1,TLSv1.2). 
  • You can disable TLS 1.0 in your browser, but I'd rather upgrade :) 
  • Also look for specific configuration if you want to explicitly force tools to use TLS 1.1 or TLS 1.2


Hopefully this sheds some light and helps you reduce the pain of dealing with this.


Friday, July 14, 2017

The evolution of scalable microservices

Today’s enterprise applications are deployed to everything from mobile devices to cloud-based clusters running thousands of multi-core processors. Users have come to expect millisecond response times and close to 100% uptime. And by “user” I mean both humans and machines. Traditional architectures, tools and products simply won’t cut it anymore. To paraphrase Henry Ford’s classic quote: we can’t make the horse any faster, we need cars for where we are going.

Continue reading

Saturday, June 24, 2017

Setup Lombok with STS/Eclipse based IDE

For those of you who haven't heard about boilerplate code, you can check this link
Now that you already know what's that we found this little library

You can add it to your Maven projects easily, however adding it to your Eclipse is a challenge, especially if you are not using barebones Eclipse like me, who happens to use STS and initially it didn't work:


Why it doesn’t generate getter and setter like in the video? I already installed that thing like 3 times and nothing :(

Well, the solution for me was this:

Paste the JAR manually into MacOS folder

Add the option
to the file STS.ini

Finally you NEED to close the STS/eclipse and start again. (Restart doesn’t take effect)

Once you’ve done close and start STS. You’ll see the getter and setter is autogenerated.
In case you see any compilation errors, just clean and build your project.


Voila!