full disclosure here. you may be looking at a product that is similar looking but fundamentally different than what i think it is.
what you are looking at is a bulkhead light for furniture only. meant to be used inside a cabinet box or some other structure that is classed in the NBC as "furniture". even though many places sell these, you cannot legally use these for potlighting where they are submerged into a drywall ceiling, even I have seen these installed so many times in the wrong way. its disturbing. you cannot just cut a hole and clip these into the hole. I have worked on multiple different residences where these have caught fire outright or been smouldering when they were turned off finally.
1) there is no way to connect to the unit in a way that makes the connection compliant with the OEC. the connections have to be in a metal enclosure, and these don't come with it. I have seen every type of disturbingly mis-thought arrangement with these things.
2) the fire code requires that any penetration into the rooms fire barrier (the drywall ceiling) must be in an appropriately fire rated enclosure. since these have a power supply board either onboard or in a little separate module (with a molex connector usually), that part also has to be installed in an approved enclosure.
3) even if you want to do all your connections in an approved rework pot or some other device, they are a weird diameter that doesn't match any pots that I have ever seen.
4) ESA will not pass these in any installation I have ever seen, and I have had inspectors tell me that ESA is still working on getting the legislative clout to have them banned outright, so that they can't be sold at all in Canada without the aforementioned warnings. just remember that you can run electrical cable through a drain line, but its not legal. caveat emptor.
do yourself a favour and get led refit assemblies from cree or greenlite. I buy them by the skid from greenlite for about $15 ea. they are not that much more if you buy just a case of them. they have a 5 year warranty, honoured by a Canadian company, and they are bombproof, commercial grade lights.
http://www.greenlite.ca/en/lights/1895-led-10w-dimmable-retrofit-kit-4-.html
If the joist is directly over the hole, there is a junction box (called a saddle box) that actually fits around a joist. I found them when I was looking for boxes for ceiling fans. This might keep you from having to do a separate box in the attic. I found some at Lowe's, but seem to be widely available, and come in various configurations depending on how the hole aligns to the joist.
Best Answer
In both cases a box is required. The advantage today is the slim may be cheaper, but in the future you may be tied to a slim box. This could become a problem when all the mfg’s are only making replacement modules for full sized boxes because of the millions or hundred of millions of full sized boxes currently in use. How many slim boxes were ever installed?
The other consideration is that if other wires are in the box to connect to other lights, there is a minimum number of cubic inches required to accommodate those wires, so in this case, a larger size may be required today and provides more options when this light fails (LED’s rarely fail but the electronics driving them sure do).