Lightning Component Bundle

Lightning Component Bundle
All these components together make up the lightning component bundle. Now , these components are wired up with each other so you don’t have to worry about referencing one of them in the other. So lets discuss each of them in brief.
Component (.cmp file)– This is where your markup resides. you can think of it as the component which makes up the design or basic structure of the component. If you are coming from .Net then think of this as the .aspx or .cshtml file where you put all your markup information.
Controller (.js file)– This is a javascript file which acts as a controller and can be referenced from the markup. This file is usually used to store the functions that you would call from the markup.
Helper (.js file) – This again is a javascript file which ‘helps’ the controller. You can think of it as a utility file which stores helper functions those are referenced from the controller. The functions here can’t be called directly from the markup but have to be called via the controller.
These 3 are the main components which you are gonna use most of the times. now the remaining ones.
Style (.css file) – This is where you write down all your css for the component bundle. By default you don’t need to worry too much about UI or look and feel of the component because SLDS (Salesforce Lightning Design System) does most of the heavy lifting for you. I am gonna talk about it later.
Documentation – This is pretty self-explanatory. Any documentation you wanna write for your component can be written here.
Renderer(.js file) – This is again a javascript file and is mostly used to control and customise the rendering of the component. If you want to change how your component or its sub-components are rendered on the browser, then this is where you write your code.
Design – This is similar to an XML file where you can expose some of the attributes of the component so that an admin can supply values while dragging this component on a lightning page. Think of this as a way to give an admin some customisable options for the component. Like he/she can set a predefined value while including that component on the page.
SVG – This is where you keep your static image resources. You wanna use some static image you can store it here and reference in your markup. We will see how we can do that in later posts.
So I hope now you have a pretty decent idea of the basic structure of a lightning component bundle.
Next, I am gonna talk about the Apex Controller.
Greetings from Carolina! I’m bored to death at work so I decided to check out your site on my iphone during lunch break. I enjoy the knowledge you provide here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my mobile .. I’m not even using WIFI, just 3G .. Anyhow, fantastic site!
Aw, this was a very nice post. Finding the time and
actual effort to produce a top notch article… but
what can I say… I put things off a lot and never seem to get
anything done.
I’ve read some good stuff here. Definitely price bookmarking for revisiting.
I wonder how so much attempt you set to make such a
fantastic informative site.
I believe this website has got some rattling good info for everyone :D. “The public will believe anything, so long as it is not founded on truth.” by Edith Sitwell.
We are a group of volunteers and starting a new scheme in our community.
Your website offered us with valuable info to work on. You’ve done a
formidable job and our entire community will be thankful to you.
Very great post. I just stumbled upon your blog and wanted to say that I’ve truly loved surfing
around your blog posts. After all I will be subscribing for your feed and I’m hoping you write again soon!
It’s very simple to find out any topic on net as compared
to textbooks, as I found this article at this website.
I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do
it for you? Plz respond as I’m looking to construct my
own blog and would like to find out where u got this
from. cheers
Hi there would you mind letting me know which web host you’re utilizing?
I’ve loaded your blog in 3 completely different internet browsers and I must say this blog loads
a lot faster then most. Can you recommend
a good internet hosting provider at a honest
price? Thanks, I appreciate it!
Hello, just wanted to tell you, I loved this post. It was practical.
Keep on posting!
Hey there! I know this is somewhat off topic but I was wondering which
blog platform are you using for this site? I’m getting fed up of WordPress because
I’ve had issues with hackers and I’m looking at options for another platform.
I would be fantastic if you could point me in the direction of a good platform.
Excellent post. I absolutely love this website.
Thanks!
Hello! I could have sworn I’ve been to this
blog before but after reading through some of the post
I realized it’s new to me. Anyhow, I’m definitely delighted I found it and I’ll be bookmarking and checking back frequently!
Hi there, I discovered your website by the use of Google at the same time as looking for a similar subject,
your website came up, it appears to be like great. I have bookmarked it in my
google bookmarks.
Hi there, simply become alert to your blog through Google,
and found that it is truly informative. I am gonna watch out for brussels.
I’ll be grateful if you continue this in future. Lots of folks will be benefited out of your writing.
Cheers! adreamoftrains content hosting