<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Paul Battisson on Medium]]></title>
        <description><![CDATA[Stories by Paul Battisson on Medium]]></description>
        <link>https://medium.com/@pbattisson?source=rss-18d79cfb088b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FgxPKJSzdb5ZQ8mY.</url>
            <title>Stories by Paul Battisson on Medium</title>
            <link>https://medium.com/@pbattisson?source=rss-18d79cfb088b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:11:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pbattisson/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[On Repeatability and the Application of AI Agents]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://pbattisson.medium.com/on-repeatability-and-the-application-of-ai-agents-1d379ee5c128?source=rss-18d79cfb088b------2"><img src="https://cdn-images-1.medium.com/max/1792/1*_H1RLgZECvop5r8sIIeIHQ.jpeg" width="1792"></a></p><p class="medium-feed-snippet">Unless you have been living under a rock for the past couple of years, you will have seen the buzz around generative AI and how it has&#x2026;</p><p class="medium-feed-link"><a href="https://pbattisson.medium.com/on-repeatability-and-the-application-of-ai-agents-1d379ee5c128?source=rss-18d79cfb088b------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://pbattisson.medium.com/on-repeatability-and-the-application-of-ai-agents-1d379ee5c128?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1d379ee5c128</guid>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 10:53:43 GMT</pubDate>
            <atom:updated>2024-12-09T10:58:38.873Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Where has all the deep technical Salesforce content gone?]]></title>
            <link>https://pbattisson.medium.com/where-has-all-the-deep-technical-salesforce-content-gone-75261b5e2c78?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/75261b5e2c78</guid>
            <category><![CDATA[blogging]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Sun, 09 Jun 2024 16:12:59 GMT</pubDate>
            <atom:updated>2024-06-09T16:12:59.471Z</atom:updated>
            <content:encoded><![CDATA[<p>I was browsing Twitter/X on the way back from the Salesforce World Tour London and noticed this post by Christian Szandor Knapp that caught my eye.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fbQSELOS0CnWvqMG4KI21g.png" /><figcaption><a href="https://twitter.com/ch_sz_knapp/status/1798986672014790767">https://twitter.com/ch_sz_knapp/status/1798986672014790767</a></figcaption></figure><p>This post really tweaked my curiosity and got me thinking. I gave a short reply and received some replies back, but as you can see the thread got me thinking — why is there less deep technical content?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i1vAHNSYlm3vBFyerYS9Ng.png" /><figcaption><a href="https://twitter.com/pbattisson/status/1798992484850397384">https://twitter.com/pbattisson/status/1798992484850397384</a></figcaption></figure><h3>ChatGPT, the Rise of Generative AI and the Demise of Twitter</h3><p>Firstly, I want to address Andy’s suggestion in detail and also address the demise of Twitter. I fully agree that some part of this lack of content will be due to the rise of GenAI, such as ChatGPT, and people wondering if it is worthwhile.</p><p>As a creator of deeper technical content (both historically and also figuring out how to do so best at the moment), there is definitely a demotivating factor that comes from seeing the social media scape peppered with “how I earn $xxxxx daily from YouTube using AI” and seeing the general plethora of such content. When someone can simply send a prompt to such a system and get a detailed response that saves them trawling through a blog post, why wouldn’t they?</p><p>However, I personally think GenAI has less of an impact on such deep technical content and believe it is due to a number of other factors. One of those is Twitter/X in general has had less Salesforce people posting and interacting on it in my experience as they move to other platforms like Reddit, Discord, and LinkedIn. Enough has been written about that, but I do think more people have shied away from it and sharing content on it. But I don’t think these two factors cover off the deeper why.</p><h3>A Change in People’s Circumstances and Roles</h3><p>When I first started blogging around Salesforce and reading other’s Salesforce content, most of those creating content were “generalists” and covering a variety of roles. I may have been listed as a “consultant” but I was really a developer, admin, architect, and business analyst in one.</p><p>As Salesforce has grown, there has been a much clearer definition in the number and variety of roles that exist in the ecosystem. This is highlighted by the fact the certification site breaks down the available certifications into 7 roles:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4XHoad84BIZBcvyzI0N81w.png" /><figcaption>Salesforce Certification website</figcaption></figure><p>What does this mean? Well, for starters, people are more likely to look at only a portion of the platform and how it interacts instead of the platform as a broader piece of technology.</p><p>Secondly, many generalists who produced deeper technical content have likely moved along in their careers and now have roles that provide less free time for investigating, researching, and publishing such content, as well as the job type where it would be more common to find such topics. I know from my own personal experience that as I have moved up a career ladder, my time spent managing has increased, and the time I have available for investigative play in programming has decreased.</p><p>So why aren’t newer authors filling this gap? This goes back to the specialisation of roles. Generally speaking, developers on a project now tend to be focused on just coding in a specific set of circumstances. More can be done with declarative tooling. And significantly, there is less new stuff to find.</p><h3>Covering Old Ground</h3><p>I like to say that when I was first developing on Salesforce, it wasn’t hard to do cutting-edge work because the edge was everywhere in my daily activities. Many of the problems that I worked on that led to technical blogs and content have now been solved very well. Some examples are:</p><ul><li>Trigger frameworks — they were less common and are now de-facto</li><li>Messaging queues — I and many others wrote custom object and scheduled batch-based processing and messaging queues. Platform Events solves this</li><li>Test data creation — Between test factory patterns, the @TestSetup annotation, the Test.loadData methods, sandbox seeding and other tools, this is well-covered</li><li>Performant permissions management — SOQL has a number of enhancements now alongside more detailed Apex methods to handle this</li></ul><p>These are all examples of things I know a lot of technical content was produced about, which are all now well-solved and do not need yet another post about. Some of my top-performing content of all time relates to things such as improving Apex performance, but again a lot of that is now well covered elsewhere.</p><p>As the platform has grown, the contents of what is considered easy has grown as well and thus the edges have moved further out and diminished significantly.</p><h3>Smoother Edges = Less Content Opportunities</h3><p>Another thing I think has happened is that the edges of the platform have become a lot smoother as well. What I mean by this is that over time the strange behaviours in the technical aspects of the platform have been ironed out and so there are less places where deep technical content can occur.</p><p>Included in the smoothing of the edges is the improved content from Salesforce itself. As the developer relations team has grown, alongside the documentation teams, and Trailhead, a broader set of content has been produced that has covered some of the more complex areas.</p><p>An example here is identity flows. Many years ago, I was working down the CTA path and, as part of the preparation for the review board, had to ensure I understood all the various identity flows. At the time, I had to draw the diagrams out, do some testing, and figure out edge cases myself. Now, that is all very well documented in detail on multiple Salesforce-owned sites.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XDtMyPM6O7U41h-FfQAdvg.png" /><figcaption>Some of the Salesforce help detailing a full example of configuring Amazon as an OpenID Connect Auth Provider</figcaption></figure><p>I think it is fantastic all this official content is out and I am extremely pleased that Salesforce is now a lot easier to do a lot more. But again this does mean there is less stuff that other content providers can create to cover things off in different technical detail. I see a lot more now around best practices and learnings than deeper investigative work that shows new and interesting things.</p><h3>Best Practices Based Content</h3><p>There are many great blogs and channels out there covering best practices for Salesforce. Some of this content is based upon learnings on the platform and some is based upon porting knowledge from the broader software development ecosystem into Salesforce. Whilst I personally think we need to be careful saying “x pattern works in Java so let’s port it over to do <em>proper development</em> in Apex”, I think this fits into deeper more technical content, however, it doesn’t necessarily fit the bill for what I think is missing.</p><p>Firstly, best practice content should always come with a caveat of “this is my opinion”. There are few definitive best practices on Salesforce when it comes to Apex, and most of those have instances where they need breaking, so anyone reading such content should be aware.</p><p>Secondly, whilst the content is educational, I would not class it as novel. Novel content focusses on doing things not done publicly before and sharing the learnings — especially if the application is not production usable. As two examples, I have written ML models in Apex and VR systems using Apex and Visualforce. Neither of these have any real practical applications, but the art of getting them done helped me find some useful things I could share with people that could then be applied elsewhere (such as the loop performance).</p><h3>Do Stupid Stuff</h3><p>Both of these examples are the things I talked about in my interview on the Salesforce Developers podcast as “<a href="https://developer.salesforce.com/podcast/2021/05/episode-82-weird-apex-with-paul-battisson">Weird Apex</a>” but are really summed up nicely as “doing stupid stuff”. And I think this is where I think some of the missing deep technical content is.</p><p>I have seen people:</p><ul><li><a href="https://diydrones.com/profiles/blogs/control-a-fleet-of-drones-with-salesforce">Control a drone fleet with Apex</a></li><li>Integrate a coffee machine with Salesforce</li><li>Integrations with microcontrollers and <a href="https://brickinthecloud.com/">Lego</a></li><li>Interactive learning experiences integrating with audio and video</li><li><a href="https://www.youtube.com/watch?v=6Sx0P5JDhxE">VR experiences</a></li></ul><p>And a bunch of other things. I see there are still people doing things like this such as <a href="https://www.linkedin.com/pulse/salesforce-gaming-why-mykhailo-vdovychenko-rw4yf/">Tic Tac Toe on Salesforce</a>, but these are fewer between than they used to be and there are definitely less than at Dreamforce and the like. Play is how we learn and I think we are playing less perhaps? Or is just less play being shared?</p><h3>So What’s the Solution?</h3><p>Short answer — I don’t know. This blog was really just me writing out all my thoughts on the matter. From my side, it has made me think about the sort of things I might start playing with and doing to try and see what I can learn. I definitely don’t feel I haven’t learned anything recently, but I can say it has not been a lot of new and novel Apex or Salesforce related things.</p><p>What do you think? Is there a lot of new and novel deep technical content out there I have just been missing?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=75261b5e2c78" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing the Second Edition of “Mastering Apex Programming”]]></title>
            <link>https://pbattisson.medium.com/announcing-the-second-edition-of-mastering-apex-programming-a3f27de65f8d?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a3f27de65f8d</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[apex-programming]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce-developer]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 09:40:24 GMT</pubDate>
            <atom:updated>2023-01-09T09:40:24.353Z</atom:updated>
            <content:encoded><![CDATA[<p>I am very pleased to be able to formally announce that I am working on a second edition of my book, Mastering Apex Programming! Firstly, I want to thank all of those people who have been kind enough to purchase and review the book, at the time of writing it has an average of <a href="https://www.amazon.co.uk/Mastering-Apex-Programming-developers-applications/dp/1800200927">4.6/5 on Amazon</a> which is incredible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/405/1*dfD4UBVaXsBDKbdYgK9HiQ.jpeg" /></figure><p>So why the second edition? What will be new, improved, added or removed?</p><p>Firstly the why. In the 2 years since the book was released Apex as a language has moved ahead and so I want to update some of the content to take note of tweaks or changes, as well as add some relevant sections on the new features that developers can utilise. My original aim for the book was — and will remain in this second edition — to help developers understand how and when to use a feature of the platform. How and why should I be using this feature, rather than simply a load of code for people to copy and paste.</p><p>So what specifically will be changing? Firstly, I am excited to announce that the book will increase in size from 16 chapters to 22. 6 brand new chapters packed full of content, with a portion of these coming together with some restructured material from the first edition to form an entire new section on integrations using Apex. So a 37.5% increase in the rough contents of the book with an entire new section. Of these new chapters, there are 3 in particular I want to call out.</p><p>Firstly, I will be adding a chapter on using Apex and Flow together. Flow has come on leaps and bounds since the initial writing of the book and it is imperative that as an Apex developer you know how to help extend your admins ability to work with the platform through the combination of Flow and Apex with Invocable Actions and Platform Events. Hopefully this chapter will help people see what I am beginning to see in a lot of areas as a service or domain driven approach to organising their Salesforce implementation.</p><p>Secondly, Salesforce Functions. I couldn’t help but notice that its been a while since I last posted on this blog, and 2 of the last 3 posts were related to Salesforce Functions and functions as a service. Salesforce Functions is a huge new feature within the platform and something I wanted to ensure were covered to help developers understand how and when to use them.</p><p>Finally, the third new chapter I want to call out is on the use of DataWeave in Apex. DataWeave is a data processing language from the MuleSoft platform that Apex developers can now use to process and manipulate data in a simple and scalable manner. It’s a really exciting feature for the platform and for Apex developers and one I cannot wait to share more information and detail on.</p><p>There are other changes, updates and amendments too of course, but hopefully this has been enough to pique your interest. The writing process is started and underway and the release is scheduled for the end of the year. If you want to keep updated of any news on the book as we go, you can follow me on <a href="https://twitter.com/pbattisson">Twitter</a>, <a href="https://www.linkedin.com/in/paulbattisson/">LinkedIn</a>, <a href="https://www.youtube.com/c/cloudbitestv">YouTube</a>, and here on Medium.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3f27de65f8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Things Everyone Working in Software Delivery can Learn From Jurassic Park]]></title>
            <link>https://pbattisson.medium.com/10-things-everyone-working-in-software-delivery-can-learn-from-jurassic-park-463306767dd6?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/463306767dd6</guid>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[fun]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[consulting]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Thu, 25 Mar 2021 07:44:22 GMT</pubDate>
            <atom:updated>2021-03-25T11:10:58.653Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yc_XZHlzxiKpcXx6WFVvKw.jpeg" /></figure><p>Jurassic Park was one of the greatest movies of the 90s, a tour de force of marketing, technology, storytelling and acting. One of the things I am constantly reminded of in my day to day life working in software delivery is the quote from Dr Ian Malcolm:</p><blockquote>Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should.</blockquote><p>To me this quote perfectly sums up one of the big things that everyone involved in software delivery needs to remember, yes we can do something, but should we do that thing? What value does it really bring? Are we just replicating an outdated process?</p><p>I started thinking about this a bit more recently and realised that there were a number of lessons we should all be taking from Jurassic Park, so here they are!</p><h4>1. Always start with “Why?”</h4><p>So to reiterate our introductory point — always start with why you are doing something, not how you are going to be doing it. This will likely save you hundreds of hours of pain and allow you to deliver a much simpler and easier to manage solution in the end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WF1SsEetqZyz0_Cn" /><figcaption>Photo by <a href="https://unsplash.com/@emilymorter?utm_source=medium&amp;utm_medium=referral">Emily Morter</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I have worked with hundreds of businesses where someone wants something simply because that is how it works in the existing system, not because there is a real need. Always start by asking why something is needed and see if you can get that answer using an existing feature easily.</p><h4>2. Understand the stakeholders</h4><p>When delivering any sort of software, it is paramount that you spend time understanding who the stakeholders are and what their motivations are. In John Hammond, the park’s creator, we have someone who wants to share a vision with the world. To make people go wow and experience something unlike anything else. In Donald Gennaro, the lawyer, we have someone representing a group of investors who want to know their investment is not going to go down the pan. It is from these positions you can see why they bring in their respective experts — to help them get the outcome they are looking for.</p><p>Understanding your stakeholders and what they want out of any solution is key to delivering success. Knowing what they consider to be success will allow you to ensure you can deliver it, but understanding if they are merely representing another party can also allow you to ensure you focus on the right outcome. If you are working with an individual who represents some users make sure those users are happy and feeding that back, then the individual will also be happy.</p><h4>3. Look for those who might secretly be trying to hinder the delivery</h4><p>Ah Dennis Nedry. Played wonderfully by Wayne Knight, the lead programmer for Jurassic Park was the one who was sabotaging the whole thing from the inside. Sadly this is all too common when delivering projects — someone is there who doesn’t want things to change.</p><p>Keep an eye out for these individuals and try to figure out why they are aiming for failure. It is often just a worry that they are being replaced or will lose some power within the organisation — in which case you can try and bring them onboard to make them more central and end up being an advocate. This is the best and preferred outcome. I will be very honest here though and say it is not always going to be possible, so make sure you know how to deal with these individuals and who to raise their behaviour to if it becomes problematic. And before they shut off the security system.</p><h4>4. Understand the broader IT landscape</h4><p>This one builds on the last and can be a helpful way of improving the delivery. No system lives in isolation. All systems are interconnected now and delivering a solution successfully requires you to see how it will be used in conjunction with all the existing system in the organisation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ypt6ga7KrnWlX4lu" /><figcaption>Photo by <a href="https://unsplash.com/@hidd3n?utm_source=medium&amp;utm_medium=referral">Kevin Horvat</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In Jurassic Park, Lex saves the day in the end by understanding Linux which is running the park’s IT systems. She understood the broader IT landscape and was able to restore the park’s power and ultimately escape. Be like Lex and take an interest in what is running on the broader system’s landscape as it just may save you.</p><h4>5. Know your points of failure</h4><p>Let’s be frank, one thing we all wondered in Jurassic Park was why there was a single wire fence and no backup power generator? Once the grid dropped there was only a single fence stopping all manner of beasts escaping and causing havoc. A single point of failure if there ever was one.</p><p>It’s important you understand your points of failure and who is responsible for them. When I deliver solutions on top of Salesforce their infrastructure is my point of failure — but this is what I am paying them to manage. When I build a mobile app with a custom backend — the backend is a point of failure that is mine to manage. Know where your points of failure are and how to handle them failing gracefully — and without anyone being eaten.</p><h4>6. Understand the impacts of your choices</h4><p>In the film, we are told that they have made all the dinosaurs female to ensure no breeding occurs and that the dinosaur genetic code has been filled out using frogs. We later discover that some of the dinosaurs are male and that the frog DNA has switched sex. This is something some west-African species do when in an environment where all individuals are the same sex and has happened here.</p><p>When designing systems we make a number of choices in different areas — database design, architecture, user experience to name a few buckets. All of these choices has an impact on how the system will operate and behave in the long run. I once worked with a client that built a React based component library for all their user experiences, and failed to check whether it would work with a number of their SaaS platforms. It didn’t and they ended up custom building a bunch of things which cost them a lot of time and money, and hindered their ability to change. When we have data come through the system in a certain format, it may hinder our ability to act differently in future or cause errors if someone starts pushing data into the system in a way we did not anticipate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sw-L4vtSi7omJXF1" /><figcaption>Photo by <a href="https://unsplash.com/@soymeraki?utm_source=medium&amp;utm_medium=referral">Javier Allegue Barros</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>When making design choices, try to have a view as to what the impacts of these may be further down the line. It’s a balance between pragmatism and flexibility. But if nothing else the exercise is useful and can allow the decision and impacts to be recorded.</p><h4>7. Know what really needs to be delivered and what is in scope</h4><p>One of the biggest problems we all face in delivery is trying to do too much. Whether it is an MVP where a couple of extra features get added or a reluctance to be truly iterative which leads to a Big Bang delivery, doing too much in a release happens all the time. And it also happened on Jurassic Park.</p><p>Imagine you showed up to the park and there were no carnivores. Firstly, if there was a small explanation notice saying “to a carnivore you would be a tasty treat and so we have decided not to have carnivores for now” you would likely shrug and say “seems sensible”. And then go back to having your mind blown at seeing a live brachiosaurus. You would hardly go “well there is no T-Rex so this sucks”. There is no need for it.</p><p>I would also like to note here that the Tyrannosaurus Rex and Velociraptor were both from the Cretaceous and NOT the Jurassic period, so shouldn’t even be in the park! Talk about scope creep! So remember, Know what is actually in scope and stick to that for success.</p><h4>8. Know how to stop things getting out of control</h4><p>When something goes wrong in a system, its important to make sure that you stop the entire system from being corrupted and broken. In one of my books I liken systems to nuclear reactions — lots of small controlled reactions are great and provide a tremendous benefit in nuclear energy. If things start to spiral out of control however then you can have a runaway reaction which causes massive damage — a bomb. IT systems are the same, lots of small controlled changes to data are exactly what we want, however, if something starts spiralling out of control you can quickly destroy an entire database and the business associated to it.</p><p>When things started to go wrong in the park, they started to go very wrong. Trying to reboot the security system shuts down all the fences and lets the velociraptors — which as discussed should’t even be in the park — out. This just makes everything worse. At this point in the film, only some of the fences were deactivated, and whilst a T-Rex was roaming about, the entire park was not a free for all. Rebooting the system changes this. It is important to know how to handle errors within any system and stop things from spiralling out of control. If something goes wrong, how do we isolate that failure and pump the brakes before things go from bad to worse. Making systems modular and self-contained makes this easier.</p><h4>9. Have a simple backup and restore plan</h4><p>Following on from the last point where we want to make sure we can stop things from spiralling out of control, we also need to ensure we have a simple backup and restore plan.</p><p>Why was there no backup generator for the fences? Why was it a single generator (a single point of failure — see #5) powering the fences for all the killer creatures? Where was the backup generator? To restore power to a single system (or restore the security system) why did Richard Arnold (Samuel L Jackson) have to reboot everything rather than simply restarting a single portion of the system?</p><p>Make sure you have a simple and effective backup and restore plan. Both in terms of data but also for services. What happens if a service goes down? How do we restart an individual service or function? How do we restore our data? Make this simple and one-click where possible and you will avoid being eaten alive when something goes wrong (by dinosaurs, stakeholders or users).</p><h4>10. Watch out for dinosaurs</h4><p>Yes it has taken me until point 10 to remind you that you should avoid dinosaurs as they will eat you alive. Well the non-Jurassic period carnivores in the park anyway.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nDUiunDWnZnX5X-hRg5fnA.jpeg" /></figure><p>In terms of software delivery I want to be careful with this analogy here. By dinosaurs I want to mean only those who don’t want anything to change ever regardless of the tangible benefit. Its always worked this way, why improve it. They can readily turn into individuals that are trying to derail your work. More often than not, this resistance is founded based upon some real concerns — either for compliance, security or to ensure that a core service is fulfilled still. These concerns can also be around the loss of a job or other Human Resources related worries. Don’t ignore them, ensure that there is a solid change team and process in place to handle this. Often to survive these dinosaurs will need to evolve, but they can also view your delivery as a giant meteor coming to wipe them out…</p><h4>In conclusion</h4><p>Hopefully this has given you a smile as well as some ideas. As I mentioned, it came from me sitting and thinking about Jurassic Park as a film and all the things that went wrong. In delivering software many things can derail our delivery, but being mindful of them can help ensure our launch is successful and we all make it out alive.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=463306767dd6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are Future Methods Functions as a Service on Salesforce?]]></title>
            <link>https://pbattisson.medium.com/are-future-methods-functions-as-a-service-on-salesforce-5e29cfb79e9f?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e29cfb79e9f</guid>
            <category><![CDATA[functions-as-a-service]]></category>
            <category><![CDATA[salesforce-apex]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Sun, 02 Feb 2020 14:28:17 GMT</pubDate>
            <atom:updated>2020-02-02T14:28:17.727Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KnRbnCMNCPBJBMnZvSnr9w.png" /></figure><p>In a couple of weeks time I will be <a href="https://trailblazercommunitygroups.com/events/details/salesforce-london-uk-developers-group-presents-feb-meet-2020-dreamforce-global-gathering">speaking with Peter Chittum at the London Salesforce Developers Group about Salesforce Evergreen</a>. Evergreen is Salesforce’s upcoming Functions as a Service offering, and as part of my planning I began thinking about my experiences with other FaaS toolkits and what it all means. The more I thought about it the more I got to thinking – hasn’t Salesforce had a FaaS offering for years? Aren’t apex future methods actually a FaaS framework? Let’s discuss.</p><h3>What are functions as a service?</h3><p>We’ve all heard of the other various *aaS things offerings. SaaS now dominates the world of software products (very few products are now not SaaS) and most organisations are moving their IT to a mix of IaaS and PaaS offerings.</p><p>FaaS offerings then are an extension of the premise – first we offer you all the software as a service, then we offer you the platform to build applications as a service, then the infrastructure to run your own applications and tools and finally a stripped back way of just running a code function. No other setup, just here is my function, it takes in these parameters and does this.</p><h3>The serverless paradigm</h3><p>The biggest problem for a lot of the PaaS and IaaS offerings in my opinion is that a server is still involved somewhere. You still needed someone to do patches and updates and security and all the associated overhead that comes with a server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*11DoUz1iZt4Fs6R_5SB_NA.jpeg" /><figcaption>None of these server racks for me!</figcaption></figure><p>Now as a confession – I’ve been almost 100% Salesforce focussed for that long, my mind boggles a little bit about setting up a server, or honestly that people still do so. I still do it occasionally but it’s very rare now. However, in previous lives as a developer it was one of the key tasks in setting up a solution. I still occasionally do work requiring a server be configured and every time it makes me miss the Salesforce platform. Salesforce is arguably the original serverless platform with none of the setup work needed. Granted this is all a lot simpler with containers and other orchestration tools now, but there is a big reason that the serverless paradigm has gained so much traction. And as a Salesforce developer you have always been a serverless developer.</p><h3>The Future Method – Salesforce Functions as a Service?</h3><p>Let’s now talk about whether future methods in apex are a functions as a service framework or not?</p><p>An apex future method is always defined as a static method returning void and can take in primitives or collections of primitives as parameters. An example is below:</p><pre>@future<br>public static void updateMyAccounts(Set&lt;Id&gt; accountIds) {<br>    //retrieve my accounts using the ids and process<br>}</pre><p>When you invoke this method, Salesforce places the job on the queue to be run when resources become available. The job runs asynchronously and this allows it to both have its own execution context and a greater set of governor resources than a standard apex execution context.</p><p>So at a high-level, this seems a bit like a FaaS framework. We can define discrete functions that run in their own execution context. Check. In terms of scaling, this is not bound by resources i.e. servers but by events. For us an event is how often you call the method, up to a limit for the org. If you were using only future methods this would be a minimum of 250,000 calls in a 24 hour period which is a good volume for most Salesforce applications. Yes this means our execution scaling isn’t completely dependent only on event scaling, but they are very tightly linked.</p><p>A pure FaaS solution would have event based scaling completely with a pure pay as you go model. Salesforce doesn’t support such models and so this will always be an area where future methods cannot be a FaaS framework completely. That said however, having an effectively free tier of 250,000 methods a day, giving a total of 7.5 million executions a month is a very big chunk to work through.</p><h3>Asynchronicity — A Waiting Game</h3><p>The big area where future methods fall apart as a FaaS framework however is their completely asynchronous nature. Most popular FaaS frameworks have 2 models — synchronous invocation (e.g. a webservice call) or asynchronous invocation (e.g. an event through a pub/sub messaging queue like Amazon SNS). Future methods are purely asynchronous and as such don’t offer the synchronous execution nature provided by other FaaS frameworks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHMM9k6RelSrJzMjnivKaw.jpeg" /><figcaption>Checking to see if my method has executed</figcaption></figure><p>In my experience they are almost always run instantly when called, however this is merely anecdotal and not a guarantee. Salesforce themselves do not provide any expectation of time until execution other than “when resources become available”. As such using future methods will only ever allow us an asynchronous invocation model.</p><p>We also have some best practice practical limitations around the future method. For example, adding more than 2000 calls to an org’s asynchronous queue will cause there to be a brief hiatus whilst methods from other orgs are processed. This includes batch, scheduled and queueable apex and so is a limit we could readily hit in a larger instance or deployment.</p><h3>Adding a Synchronous Option</h3><p>We could tweak this by separating out our actual code logic into a synchronous and an asynchronous option, like shown below.</p><pre>public static void updateMyAccounts(Set&lt;Id&gt; accountIds) {<br>    //retrieve my accounts using the ids and process<br>}</pre><pre>@future<br>public static void updateMyAccountsAsync(Set&lt;Id&gt; accountIds) {<br>    updateMyAccounts(accountIds);<br>}</pre><p>Here we have just created a synchronous version of our function which can be called by any apex and runs in sequence, and is delegated to by our asynchronous version. This is a useful pattern to enable us to reuse code in multiple places, but can leave us with a few problems.</p><p>Firstly, we would lose the separate execution context for the synchronous call that we get with our future method. This means that we would not have a separate independent set of governor limits with which we could run our functions.</p><p>Because of this, we also now have a decision to make and monitoring overhead to add. When should we use the synchronous vs asynchronous versions? How do we monitor appropriately the need to move from synchronous to asynchronous because of governor limit usage?</p><p>Initially this is a small hurdle but as we grow our usage is something we need to consider carefully. We are also not using only the future method framework now and instead have allowed our function to be called inline which means we have started “rolling our own” so to speak.</p><h3>In Conclusion</h3><p>So in conclusion, can we think of Salesforce future methods as a Functions as a Service framework in apex? The answer is kind of.</p><p>If we have discrete pieces of work which can be executed in an asynchronous fashion, then we can consider future methods as a very powerful tool for us to separate our code out into discrete functions for processing. For synchronous needs however this will not work and so we need to either do a hybrid approach as above or wait for <a href="https://medium.com/@pbattisson/salesforce-evergreen-a-game-changer-for-salesforce-developers-4d8dfed4d7da">Salesforce Evergreen</a> to see what that offers.</p><p>We also have other tools at our disposal now such as platform events. I have <a href="https://www.youtube.com/watch?v=FgCa1yPzVMw">discussed previously at Dreamforce</a> how platform events can help deliver microservice based architectures on the platform, however the asynchronous pub/sub model again means it is not truly a FaaS framework.</p><p>I hope you enjoyed reading this thought exercise as much as I did writing it and thinking about the implications. I would love to know any thoughts you have in the comments below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e29cfb79e9f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Salesforce Performance — Some Thoughts]]></title>
            <link>https://pbattisson.medium.com/salesforce-performance-some-thoughts-d9379f7f9983?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9379f7f9983</guid>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[salesforce-lightning]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Sat, 25 Jan 2020 14:31:44 GMT</pubDate>
            <atom:updated>2020-01-26T08:36:03.355Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*srq0uPGXUYxtnCDURdFvAQ.png" /><figcaption>Making Salesforce Lightning Fast!</figcaption></figure><h3>Salesforce Performance — Some Thoughts</h3><p>I was recently interviewed by <a href="https://salesforceway.com/">Xi Xiao on his Salesforce Way podcast</a> about Salesforce Performance, a topic I have spent a lot of time thinking about over the years I have been working with Salesforce. You can listen to the episode now on <a href="https://salesforceway.com/podcast/salesforce-performance/">Xi’s website</a> and I wanted to share some more thoughts around the topic.</p><h3>Back end vs Front end</h3><p>As Xi mentioned during the conversation we can think of separating our performance concerns into the back end and the front end. For the front end our concern is put simply as “how quickly can we make the page render”. There are a number of things that can impact this and some key ares we should look into are as follows:</p><ul><li>How much data are we sending back and forth? Do we need all this data?</li><li>Are there any blocking or long running functions on the page? If so can we improve or remove them?</li><li>How many requests are there to the server? Can we reduce this somehow?</li></ul><p>Certain things will be outside of our control, for example the end user’s internet speed. But by adopting the correct mindset we can try and ensure we mitigate that as much as possible.</p><p>For the back end of our Salesforce applications we have a number of considerations to make, some of which are not directly “code performance” related. Salesforce offers a wide variety of declarative tools leading to the common discussion of clicks vs code for a solution.</p><p>From a running speed perspective, code should always be faster. Put simply this is because visual flow, process builder, workflow etc are all just abstractions of programming. The lower down the abstraction chain you are, the faster you will be. However this is where we have to consider “developer performance” — how quick is the solution to deliver and how easy is it to maintain? For a simple solution updating a single field, doing that declaratively is going to be the best way to go, however as data volumes and complexity increase, code becomes the far superior option. This is all about tradeoffs and knowing when to use the different tools, but can impact the performance of your solution.</p><p>It is also worth remembering that your back end performance will often impact your front end performance. If you have a button on a page or component that is performing some task inefficiently, this will slow down the response to the front end and hamper the user’s experience. The two parts are very closely connected and should often be viewed holistically as well as independently.</p><h3>The OODA Method</h3><p>Know that we know what to consider, how do we go about actually measuring performance and making improvements? As I mentioned in the interview, I am a fan of the [OODA method or OODA loop], a system devised by military strategist John Boyd.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OR__EXR6UCrRIhj0DYzs3Q.png" /><figcaption>The OODA Loop</figcaption></figure><p>The OODA loop has 4 key stages — Observe, Orient, Decide, Act. Lets look at what each of these stages means for us.</p><p><strong>Observe</strong></p><p>This is where we measure our system using things like the Chrome Developer Tools, Limits statements and debug information. We retrieve a set of measurements and data that are observations of how our system is operating in different circumstances.</p><p><strong>Orient</strong></p><p>Once we have this data we use it to build up a mental model of how the system is actually operating and what we anticipate happening in the future. This is the key step, taking the data and making a useful model of the situation with it.</p><p><strong>Decide</strong></p><p>We now decide what to do — if anything — about the information we now have. It is perfectly reasonable to decide here to observe further, however, it is worth remembering that more data will not always help.</p><p><strong>Act</strong></p><p>If we have decided to make changes to the solution, we make them and return to observing to see if they have had the desired effect.</p><p>I personally like this model because it feels natural to me — for most developers/programmers out there this is the way they work. Make some code, test that it works, see what is happening and then update and repeat. Using such a framework can also be helpful in formalising the process to get greater buy-in on technical debt reduction and updates.</p><h3>When Things Go Wrong</h3><p>I want to wrap up talking about something that I mentioned on the podcast which really lies at the heart of why this is important. When I am training new developers on Salesforce this is also a point I labour when discussing testing.</p><blockquote>Things never go wrong at a good time</blockquote><p>In all the years I have been working in software, nothing has ever gone wrong at a “good time”. It has never been at the start of a sprint as we are looking at that area. It has almost certainly always been during a go-live, data deployment or surge.</p><p>I was recently working with a retail client for whom Black Friday is unsurprisingly a major event. We had tested and retested the solution a million times for them to ensure nothing went wrong on Black Friday as it was the time when volumes would suddenly ratchet up. If things went wrong then, it would have been game over, but thankfully we had worked hard to anticipate such issues and avoid anything going wrong.</p><p>It is during these busy times that the system will be used at a higher capacity, in a greater variety of ways and when performance can suddenly slow or cause a failure. Putting some thought into this up front, and it does not need to be more than being conscious of these areas as you are developing, can lead to you having a much happier client base in the long run.</p><p>I hope you enjoyed some of these additional details and the podcast episode with Xi. I would like to thanks Xi again for a great conversation and for having me on. If you would like to read more about Salesforce Performance, I wrote a blog a couple of years ago on “<a href="https://paulbattisson.com/blog/2017/salesforce-application-performance/">Salesforce Application Performance</a>” based on a talk I gave at <a href="http://www.londonscalling.net/sessions/the-need-for-speed-building-performant-applications/">London’s Calling 2017</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9379f7f9983" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SALESFORCE EVERGREEN — A GAME CHANGER FOR SALESFORCE DEVELOPERS]]></title>
            <link>https://pbattisson.medium.com/salesforce-evergreen-a-game-changer-for-salesforce-developers-4d8dfed4d7da?source=rss-18d79cfb088b------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d8dfed4d7da</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[salesforce-development]]></category>
            <category><![CDATA[salesforce]]></category>
            <category><![CDATA[functions-as-a-service]]></category>
            <dc:creator><![CDATA[Paul Battisson]]></dc:creator>
            <pubDate>Sat, 25 Jan 2020 12:44:52 GMT</pubDate>
            <atom:updated>2020-01-26T08:37:30.475Z</atom:updated>
            <content:encoded><![CDATA[<h3>SALESFORCE EVERGREEN — A GAME CHANGER FOR SALESFORCE DEVELOPERS</h3><p><em>This blog was originally posted on my </em><a href="https://paulbattisson.com/blog/2019/Salesforce-Evergreen-a-game-changer-for-Salesforce-developers/"><em>Salesforce Development blog</em></a><em>.</em></p><p>Last week was Salesforce’s annual Dreamforce conference in San Francisco, when over 100,000 Salesforce fans descend upon the city to listen to the latest innovations from Salesforce. I was unable to attend this year, but followed along closely at home to the announcements, and the one that stood out to me in particular was not Salesforce Blockchain, Einstein Voice or Customer 360 — it was the Salesforce Evergreen announcement that for me could be the real game changer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4WOvqAQpmKHKPdZHfj1YRg.png" /><figcaption>Andy Fawcett Announcing Salesforce Evergreen at the Developer Keynote (image is a still taken from image captured from <a href="https://www.salesforce.com/video/7490459/">https://www.salesforce.com/video/7490459/</a>)</figcaption></figure><h3>The Impact of Serverless</h3><p>To understand why you have to perhaps take a step back and look at how the rise of AWS and in particular, the AWS Lambda and the serverless paradigm has impacted development.</p><p>Take the following example — you want to upload an image in Salesforce against a case both before and after work is completed. These images should be stored off platform in Amazon S3 and you want to have both the original and a thumbnail, with the thumbnail being displayed on the case. Whilst uploading the images to S3 could be done via Apex in Salesforce, the resizing must be done off platform currently. So how do we do this and where?</p><p>We can either have an endpoint available on a platform like Heroku with a dyno running, or have a Lambda function that will run whenever called. Thats the key difference here, we have to have the Heroku dyno (at least 1) running to handle requests whereas with Lambda we are only paying per executed function. (Note this example is based upon a Lambda example from AWS you can read about <a href="https://aws.amazon.com/blogs/compute/resize-images-on-the-fly-with-amazon-s3-aws-lambda-and-amazon-api-gateway/">here</a>.) Whilst I am a big fan of Heroku, use cases like this lend themselves more to Lambda for running small jobs and repetitive functions where there is no need for a full web server framework to be setup, just receiving and processing some data from an event.</p><p>Such scenarios are becoming more common as organisations want to connect more pieces of their process seamlessly. This has driven a number of people towards using serverless based solutions to handle these simple problems — they just need the code to run and perform the action. Many organisations are also working to modularise their systems into more discrete functional blocks, often referred to as microservices. I’ve written before on <a href="https://www.linkedin.com/pulse/microservices-salesforce-your-next-step-paul-battisson/">Salesforce and Microservices</a> and spoken on the topic previously at <a href="https://www.salesforce.com/video/194459/">Dreamforce 2015</a> and <a href="https://www.youtube.com/watch?v=FgCa1yPzVMw">Dreamforce 2017</a>. Previously, the conversation has always been how to make Salesforce interact nicely with serverless systems, or how to rearchitect parts of your existing Salesforce setup to operate in a more modular way. As soon as some more complicated processing was required (such as image resizing) you were forced off platform and had to decide which platform to use. How would you manage security and authentication? How could you invoke the new service — API via code or a Platform Event? You couldn’t think of doing all this on Salesforce — until now.</p><h3>Enter Evergreen</h3><p>Salesforce Evergreen is a new toolkit that will allow developers to write small functions and microservices using Apex, Java and Node.js which can be invoked natively from within Salesforce using both declarative and code based tools, as well as having native visibility to the platform — so no need to manage authentication.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*CMn5rqBAh6UNFE66" /><figcaption>Salesforce Evergreen Architecture</figcaption></figure><p>Taking our previous example, instead of a service running off platform, whether Heroku or AWS, we could now have a small set of functions that are called directly from the declarative tools in Salesforce. Whenever a case is closed. upload the images from Salesforce to S3, process these images and update the case. No additional infrastructure needed, no authentication required, all on a single platform.</p><p>This is truly game changing. By allowing developers to build these functions using existing languages in Java and Node.js, you are enabling the developer to utilise all of the existing ecosystem of functionality out there. For example, npm, the package ecosystem for Node.js, has somewhere in the region of a million packages, covering all types of functionality — csv parsing to <a href="https://www.npmjs.com/package/random-joke-getter">providing random jokes</a>. Almost all of these libraries become available for use alongside your existing Salesforce applications with all the plumbing and authentication done for you! You simply add in what you need, leveraging the existing tools and off you go.</p><p>Similarly, if you have an existing complex function in Java from an existing application, you can migrate that to become an Evergreen function and deploy it for use from within Salesforce! As wonderful a language as Apex is there are some things that it cannot do or that Java or Node.js will be a better tool for, now you can leverage these languages to do more with your Salesforce data.</p><h3>Summary</h3><p>The new Evergreen toolkit is going to make a huge difference to what is possible for Salesforce developers and opens up exciting new possibilities which should lead to some incredible new solutions. I am already signed up for updates from Salesforce on the Developer Preview and will be looking ahead for different applications for this toolkit for our customers. If you want to read more, Salesforce have posted a blog <a href="https://developer.salesforce.com/blogs/2019/11/introducing-salesforce-evergreen.html">here</a>.</p><p>All images are from publicly available Salesforce resources and are shown here for educational purposes.</p><p>Keynote still from <a href="https://www.salesforce.com/video/7490459/">https://www.salesforce.com/video/7490459/</a></p><p>Architecture overview image from <a href="https://developer.salesforce.com/blogs/2019/11/introducing-salesforce-evergreen.html">https://developer.salesforce.com/blogs/2019/11/introducing-salesforce-evergreen.html</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d8dfed4d7da" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>