Long, but needed new post!

So, first off Happy Leap Day!! It’s been a while since I posted on the blog last, and although I haven’t forgot, I really haven’t had much to post on. It’s probably because I have been less busy working at school and more busy working adapting to the professional life. Short story: I left Eugene, lived in the Bay area for 4 months, worked a cool job making an ipad app in sf, saw friends, hunted for jobs, landed one with Salesforce in portland, been working for them in Portland since September. Its been fun and exciting and there isn’t much to share on my time in the Bay Area except for I love it there, and I got to use the Xamarin platform to build an ipad which was neat. On the contrary working at Salesforce has been awesome and there is plenty to share on that and the platform. If you don’t know about Salesforce, check them out, Salesforce.com. They are a business enterprise software company. They are based on the cloud and started with a CRM app and offered it for a subscription which caught on quick in the early 2000s. Now they run the game in end user cloud computing applications, and more, there product can really do anything. Or at least it is suppose to. Thats where I come in. I am working in developer support. I am on a premier support team aimed to work with developers to resolve issues on the platform. Its a fun way to learn the platform and work with other people. I really like it so far, and enjoy working with all the wonderful people inside salesforce. Its a great place to learn. So without rambling on all day about Salesforce and my time there so far, I figure I would Just highlight why I like working there, some cool things I think the company is offering, some places I think the company should go, and maybe one or two technical details I found useful.

2014_07_28_Salesforce-300x211

Company Culture:
Although I haven’t worked at lot of company’s I feel like I lucked out with Salesforce in terms of people and culture. For a nearly 20k person global company to retain its culture so well is very cool to work in. Although I haven’t met a lot of individuals I talk face to face, we all share the culture of Salesforce and it really enables us. This aspect really makes working everyday much more encouraging.

Success:
Salesforce is doing really well, and that alone inspires me. We got some kickass salesmen landing huge accounts and it is a pleasure to work with suck important customers. Mark Benioff really inspires the company. People may have their complaints about any CEO in a large company like SF, but its hard to with Benioff. First off he treats the employee like no other. The benefits plan for any FTE is great. And his pledge to the community and enabling VTO for employees is unlike any other company. To add to that, he knows how to succeed. I think his role in our sales in instrumental, and our numbers show it.

Lightning:
Lightning is the next gen of Salesforce. Its basically a brand new UI. But for SF that means a lot. SF is a platform that allows you to integrate your code into a native UI/cloud system. Changing the UI is much more complicated than changing the UI for lets say, Facebook, a very complex UI in my opinion. You are changing compilers and engines to inhibit a new behavior while retaining the old. Which is why it will take SF a few years to fully make lightning work, and have the majority of users on it. That being said I really like it. The development of it faintly reminds me of react.js. What they are doing is going from a soap based system to a rest based system. Visualforce to lightning. I don’t have too much to rave about yet because I still need try a few more types of lightning app/components, including one using the new wave api which was recently released. I do however have some initial complaints I will share:
– First off routing. I think you should get control of routing in a lighting app. They could offer an easy interface to customize this, it also would make development more clear. Currently some of the implementations they have of routing do not allow you to share urls, which is very ideal for the next gen of the web. Stateless servers and stateful clients, right?
– Secondly, if you want to publish a lightning app/component on the appexchange, you can not use any external javascript libraries. Hence if you wanted to use react or jquery, you would get denied upon approval. I hope this changes. Using libraries enables developers and will help make the platform more popular.

Wave:
This is the coolest SF product I have seen so far. I am a bit bias as for I know someone that worked on this, but take a look at it and tell me. The UI is so slick, and it works really well. I have seen some neat wave implementations in support and think its a the future within salesforce. Salesforce thrives on data, and what better tool to have than a native, state of the art, visualization engine to look at all this data. I will hopefully post something cool on this later on as I play more with the Wave API.

Trailhead:
Trailhead is a way to learn Salesforce. Its pretty sweet and I like it. I have completed all the coding challenges and a lot of other admin/product ones as well. Its really neat, they did a good job with it. I really like the mobile ones, they have some sweet npm/cordova plugins that make making a custom native app to connect to your salesforce is really easy.

Ideas on what SF should add:
I think there are tons of places SF could go because they are really at the junction of everything in terms of business software. They could make any sort business software and probably sell it to everyone, granted a few exceptions where some companies own the market. Personally I think making the product better and slowly expanding would be a good strategy. Some easy additions I think they should add could be implemented in the next few releases. One being more classes related to limits and debugging. It they could make more classes that report what limits are getting hit, and why they are getting hit, that would really help developers. This is the biggest frustration when developing on the platform. Secondly, they need to add some things to sites. Three tools I believe are essential that could make them a number one sites provider are:
1. adding analytics too to sites. make a product like mixpanel or optimizely for sites to give users details on traffic, as well as ab testing and more
2. add some CDN for users to use. We have a cloud network of servers around the world, just add some small hardward, build a distributed system, and make some abstraction layer/api for orgs to tap into these cdn instances. This could be big bucks too
3. Better Heroku Integration. So SF owns Heroku, but I feel like the customers rarely overlap, and when they do, the technologies rarely intertwine. So why not be able to link a Heroku site to salesforce more easily? There has to be some integration they can offer to make using salesforce better.
These three things would make salesforce a sure option for sites of big businesses.

A few technical things I found while working at SF:
1. SF standard functionality sends emails to users after creating certain records depending on the configuration. Sometimes you might want that email to fire sometimes you might not. This can be handled in the standard UI, but sometimes you need more specific logic that you need to code. Say you don’t want users get two emails when getting created: one with the user name and password, and the other saying congrats. Say you only want them to get the username and password email. You maybe able to disable this in the UI, but you can also to this in code on a trigger.

trigger UserTestTrigger on User (before insert) {
User u = Trigger.New[0];
Database.DMLOptions dlo = new Database.DMLOptions();
dlo.EmailHeader.triggerUserEmail = true;
dlo.EmailHeader.triggerAutoResponseEmail = false;
dlo.EmailHeader.triggerOtherEmail = false;
u.setOptions(dlo);
}

This would replicate the behavior you are looking for. The DMLOptions email handler is available for all records getting saved and can be used in many cases. I found this to be a neat way to customize the email process the native system has.

2. Sometime on a visualforce page you need to access items in a visualforce repeat in javascript outside of the apex controller. There are many scenarios I have come into so far and I use this tactic often. I just add an attribute to all the child elements in the repeat to have the id i want, kinda like

“< apex:inputCheckbox styleClass="boxCheck" value="{!People.Furlough__c}" html-RecId="{!People.ID}" >

“< / apex:inputCheckbox>

Using RecId as the attribute to look for in javascript. So later I can grab all the elements in the repeat by selecting the class like

var peops = {};
j$(‘.boxCheck’).each(function(i,o) {
if(j$(o).is(‘:checked’)) {
peops[j$(o).attr(‘RecId’)] = true;
} else {
peops[j$(o).attr(‘RecId’)] = false;
}
});

Lots of times in visualforce I find a little work using javascript goes a long ways. When you stick to the constraints of the visualforce, and you need something custom and particular, javascript helps a lot.

3. This one might be more obvious, but for visualforce pages on lightning components, or as lightning components, you must use

“< meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

and for most all web pages trying to use the lighting components style (ie heroku app)

Well that is all for now, I will hopefully post more frequently now. If you haven’t heard of Salesforce, don’t hesitate to make a dev account for free here https://developer.salesforce.com/signup. Then check out trailhead. I have laid off working with embedded IOT like stuff and focused mainly on Salesforce dev, and most recently started playing with react again. I want to get good with the Lightning Design System from salesforce components to separate webapps that use the project, building node web apps with es6 react and react-router, and playing with Heroku more. Hopefully I could change my blog to Heroku with a custom site I build, we will see. All goals I hope to meet by July.

Thanks yall! that is all